From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 00:42:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3CDC1065673; Sun, 7 Dec 2008 00:42:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1C7B8FC0A; Sun, 7 Dec 2008 00:42:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB70gFir009494; Sun, 7 Dec 2008 00:42:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB70gFEK009493; Sun, 7 Dec 2008 00:42:15 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812070042.mB70gFEK009493@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 7 Dec 2008 00:42:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185727 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 00:42:16 -0000 Author: nwhitehorn Date: Sun Dec 7 00:42:15 2008 New Revision: 185727 URL: http://svn.freebsd.org/changeset/base/185727 Log: Add support for automated reboot after power failure on Apple Core99 machines (G3 laptops, all G4 machines, early G5s, G5 Xserves). The relevant sysctl is named dev.pmu.0.server_mode for mental compatibility with Linux. Modified: head/sys/powerpc/powermac/pmu.c Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Sun Dec 7 00:41:40 2008 (r185726) +++ head/sys/powerpc/powermac/pmu.c Sun Dec 7 00:42:15 2008 (r185727) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -65,10 +66,11 @@ static int pmu_probe(device_t); static int pmu_attach(device_t); static int pmu_detach(device_t); -static u_int pmu_adb_send(device_t dev, u_char command_byte, int len, +static u_int pmu_adb_send(device_t dev, u_char command_byte, int len, u_char *data, u_char poll); -static u_int pmu_adb_autopoll(device_t dev, uint16_t mask); -static void pmu_poll(device_t dev); +static u_int pmu_adb_autopoll(device_t dev, uint16_t mask); +static void pmu_poll(device_t dev); +static int pmu_server_mode(SYSCTL_HANDLER_ARGS); static device_method_t pmu_methods[] = { /* Device interface */ @@ -282,6 +284,8 @@ pmu_attach(device_t dev) uint8_t cmd[2] = {2, 0}; uint8_t resp[16]; phandle_t node,child; + struct sysctl_ctx_list *ctx; + struct sysctl_oid *tree; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -341,6 +345,17 @@ pmu_attach(device_t dev) } } + /* + * Set up sysctls + */ + + ctx = device_get_sysctl_ctx(dev); + tree = device_get_sysctl_tree(dev); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "server_mode", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + pmu_server_mode, "I", "Enable reboot after power failure"); + return (bus_generic_attach(dev)); } @@ -613,3 +628,46 @@ pmu_adb_autopoll(device_t dev, uint16_t return 0; } + +static int +pmu_server_mode(SYSCTL_HANDLER_ARGS) +{ + struct pmu_softc *sc = arg1; + + u_int server_mode = 0; + uint8_t getcmd[] = {PMU_PWR_GET_POWERUP_EVENTS}; + uint8_t setcmd[] = {0, 0, PMU_PWR_WAKEUP_AC_INSERT}; + uint8_t resp[3]; + int error, len; + + mtx_lock(&sc->sc_mutex); + len = pmu_send(sc, PMU_POWER_EVENTS, 1, getcmd, 3, resp); + mtx_unlock(&sc->sc_mutex); + + if (len == 3) + server_mode = (resp[2] & PMU_PWR_WAKEUP_AC_INSERT) ? 1 : 0; + + error = sysctl_handle_int(oidp, &server_mode, 0, req); + + if (len != 3) + return (EINVAL); + + if (error || !req->newptr) + return (error); + + if (server_mode == 1) + setcmd[0] = PMU_PWR_SET_POWERUP_EVENTS; + else if (server_mode == 0) + setcmd[0] = PMU_PWR_CLR_POWERUP_EVENTS; + else + return (EINVAL); + + setcmd[1] = resp[1]; + + mtx_lock(&sc->sc_mutex); + pmu_send(sc, PMU_POWER_EVENTS, 3, setcmd, 2, resp); + mtx_unlock(&sc->sc_mutex); + + return (0); +} + From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 00:45:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 502E01065672; Sun, 7 Dec 2008 00:45:16 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout019.mac.com (asmtpout019.mac.com [17.148.16.94]) by mx1.freebsd.org (Postfix) with ESMTP id 38EE48FC0C; Sun, 7 Dec 2008 00:45:16 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from pmesker-xp.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp019.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0KBH00BITE3ERW30@asmtp019.mac.com>; Sat, 06 Dec 2008 16:45:16 -0800 (PST) Message-id: <01839E58-2D85-40CE-B39A-DC903D48955D@mac.com> From: Marcel Moolenaar To: Nathan Whitehorn In-reply-to: <200812070042.mB70gFEK009493@svn.freebsd.org> Date: Sat, 06 Dec 2008 16:45:14 -0800 References: <200812070042.mB70gFEK009493@svn.freebsd.org> X-Mailer: Apple Mail (2.929.2) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185727 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 00:45:16 -0000 On Dec 6, 2008, at 4:42 PM, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Dec 7 00:42:15 2008 > New Revision: 185727 > URL: http://svn.freebsd.org/changeset/base/185727 > > Log: > Add support for automated reboot after power failure on Apple > Core99 machines > (G3 laptops, all G4 machines, early G5s, G5 Xserves). The relevant > sysctl > is named dev.pmu.0.server_mode for mental compatibility with Linux. Yay! Me and my RPC thank you :-) -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 02:32:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23599106564A; Sun, 7 Dec 2008 02:32:50 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 120338FC12; Sun, 7 Dec 2008 02:32:50 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB72WnVP011585; Sun, 7 Dec 2008 02:32:49 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB72WnrR011584; Sun, 7 Dec 2008 02:32:49 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200812070232.mB72WnrR011584@svn.freebsd.org> From: Peter Wemm Date: Sun, 7 Dec 2008 02:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185728 - head/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 02:32:50 -0000 Author: peter Date: Sun Dec 7 02:32:49 2008 New Revision: 185728 URL: http://svn.freebsd.org/changeset/base/185728 Log: When libthr and rtld start up, there are a number of magic spells cast in order to get the symbol binding state "just so". This is to allow locking to be activated and not run into recursion problems later. However, one of the magic bits involves an explicit call to _umtx_op() to force symbol resolution. It does a wakeup operation on a fake, uninitialized (ie: random contents) umtx. Since libthr isn't active, this is harmless. Nothing can match the random wakeup. However, valgrind finds this and is not amused. Normally I'd just write a suppression record for it, but the idea of passing random args to syscalls (on purpose) just doesn't feel right. Modified: head/lib/libthr/thread/thr_rtld.c Modified: head/lib/libthr/thread/thr_rtld.c ============================================================================== --- head/lib/libthr/thread/thr_rtld.c Sun Dec 7 00:42:15 2008 (r185727) +++ head/lib/libthr/thread/thr_rtld.c Sun Dec 7 02:32:49 2008 (r185728) @@ -180,7 +180,7 @@ _thr_rtld_init(void) { struct RtldLockInfo li; struct pthread *curthread; - long dummy; + long dummy = -1; curthread = _get_curthread(); From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 03:23:59 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7282F1065670; Sun, 7 Dec 2008 03:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2F58E8FC08; Sun, 7 Dec 2008 03:23:59 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mB73NaAq039841; Sat, 6 Dec 2008 20:23:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 06 Dec 2008 20:23:44 -0700 (MST) Message-Id: <20081206.202344.-160243400.imp@bsdimp.com> To: kostikbel@gmail.com From: "M. Warner Losh" In-Reply-To: <20081205230002.GX2038@deviant.kiev.zoral.com.ua> References: <200812052050.mB5KoOcV072648@svn.freebsd.org> <20081205224600.GA16948@freebsd.org> <20081205230002.GX2038@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, rdivacky@FreeBSD.org, src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r185647 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 03:23:59 -0000 In message: <20081205230002.GX2038@deviant.kiev.zoral.com.ua> Kostik Belousov writes: : On Fri, Dec 05, 2008 at 11:46:00PM +0100, Roman Divacky wrote: : > On Fri, Dec 05, 2008 at 08:50:24PM +0000, Konstantin Belousov wrote: : > > Author: kib : > > Date: Fri Dec 5 20:50:24 2008 : > > New Revision: 185647 : > > URL: http://svn.freebsd.org/changeset/base/185647 : > > : > > Log: : > > Several threads in a process may do vfork() simultaneously. Then, all : > > parent threads sleep on the parent' struct proc until corresponding : > > child releases the vmspace. Each sleep is interlocked with proc mutex of : > > the child, that triggers assertion in the sleepq_add(). The assertion : > > requires that at any time, all simultaneous sleepers for the channel use : > > the same interlock. : > > : > > Silent the assertion by using conditional variable allocated in the : > > child. Broadcast the variable event on exec() and exit(). : > > : > > Since struct proc * sleep wait channel is overloaded for several : > > unrelated events, I was unable to remove wakeups from the places where : > > cv_broadcast() is added, except exec(). : > : > are there any differences (performance etc.) in using condition variables : > instead of sleep/wakeup? : : I do not think that there is any measurable difference. On the other : hand, the patch makes struct proc bigger by int + pointer. This shall : not be a problem too. : : Would I been able to convert _all_ uses of the struct proc * wait channel : to cond vars operation, this may be measurable on some loads, since it : would exclude spurious wakeups. Is that a measurable good difference, or a measurable bad difference? Warner From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 03:33:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AFF51065673; Sun, 7 Dec 2008 03:33:37 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 18BC68FC14; Sun, 7 Dec 2008 03:33:37 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB73XaiL012992; Sun, 7 Dec 2008 03:33:36 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB73XaM1012989; Sun, 7 Dec 2008 03:33:36 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200812070333.mB73XaM1012989@svn.freebsd.org> From: Peter Wemm Date: Sun, 7 Dec 2008 03:33:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185729 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 03:33:37 -0000 Author: peter Date: Sun Dec 7 03:33:36 2008 New Revision: 185729 URL: http://svn.freebsd.org/changeset/base/185729 Log: Add filler man pages for the kinfo functions I added recently. While here, hook up the hexdump(3) man page which wasn't being installed. Added: head/lib/libutil/kinfo_getfile.3 (contents, props changed) head/lib/libutil/kinfo_getvmmap.3 (contents, props changed) Modified: head/lib/libutil/Makefile Modified: head/lib/libutil/Makefile ============================================================================== --- head/lib/libutil/Makefile Sun Dec 7 02:32:49 2008 (r185728) +++ head/lib/libutil/Makefile Sun Dec 7 03:33:36 2008 (r185729) @@ -30,7 +30,8 @@ MAN+= kld.3 login.3 login_auth.3 login_t login_cap.3 login_class.3 login_times.3 login_ok.3 \ _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 humanize_number.3 \ - pidfile.3 flopen.3 expand_number.3 + pidfile.3 flopen.3 expand_number.3 hexdump.3 \ + kinfo_getfile.3 kinfo_getvmmap.3 MAN+= login.conf.5 auth.conf.5 MLINKS+= kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+= property.3 properties_read.3 property.3 properties_free.3 Added: head/lib/libutil/kinfo_getfile.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/kinfo_getfile.3 Sun Dec 7 03:33:36 2008 (r185729) @@ -0,0 +1,74 @@ +.\" +.\" Copyright (c) 2008 Peter Wemm +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 6, 2008 +.Os +.Dt KINFO_GETFILE 3 +.Sh NAME +.Nm kinfo_getfile +.Nd function for getting per-process file descriptor information +.Sh LIBRARY +.Lb libutil +.Sh SYNOPSIS +.In sys/types.h +.In libutil.h +.Ft struct kinfo_file * +.Fn kinfo_getfile "pid_t pid" "int *cntp" +.Sh DESCRIPTION +This function is used for obtaining the file descriptor information +of a particular process. +.Pp +The +.Ar pid +field contains the process identifier. +This should be the a process that you have privilige to access. +The +.Ar cntp +field is allows the caller to know how many records are returned. +.Pp +This function is a wrapper around +.Xr sysctl 3 +with the +.Dv KERN_PROC_FILEDESC +mib. +While the kernel returns a packed structure, this function expands the +data into a fixed record format. +.Sh RETURN VALUES +The +.Fn kinfo_getfile +function returns a pointer to an array of +.Vt struct kinfo_file +structures. +The array was obtained by an internal call to +.Xr malloc 3 +and must be freed by the caller with a call to +.Xr free 3 . +.Sh SEE ALSO +.Xr free 3 , +.Xr kinfo_getvmmap 3 , +.Xr malloc 3 , +.Xr sysctl 3 Added: head/lib/libutil/kinfo_getvmmap.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libutil/kinfo_getvmmap.3 Sun Dec 7 03:33:36 2008 (r185729) @@ -0,0 +1,73 @@ +.\" +.\" Copyright (c) 2008 Peter Wemm +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 6, 2008 +.Os +.Dt KINFO_GETVMMAP 3 +.Sh NAME +.Nm kinfo_getvmmap +.Nd function for getting per-process memory map information +.Sh LIBRARY +.Lb libutil +.Sh SYNOPSIS +.In sys/types.h +.In libutil.h +.Ft struct kinfo_vmentry * +.Fn kinfo_getfile "pid_t pid" "int *cntp" +.Sh DESCRIPTION +This function is used for obtaining the file descriptor information +of a particular process. +.Pp +The +.Ar pid +field contains the process identifier. +This should be the a process that you have privilige to access. +The +.Ar cntp +field is allows the caller to know how many records are returned. +.Pp +This function is a wrapper around +.Xr sysctl 3 +with the +.Dv KERN_PROC_VMMAP +mib. +While the kernel returns a packed structure, this function expands the +data into a fixed record format. +.Sh RETURN VALUES +The +.Fn kinfo_getvmmap +function returns a pointer to an array of +.Vt struct kinfo_vmentry +structures. +The array was obtained by an internal call to +.Xr malloc 3 +and must be freed by the caller with a call to +.Xr free 3 . +.Sh SEE ALSO +.Xr free 3 , +.Xr kinfo_getfile 3 , +.Xr malloc 3 From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 06:18:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DB321065793; Sun, 7 Dec 2008 06:18:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9FE8FC13; Sun, 7 Dec 2008 06:18:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB76ImNo016348; Sun, 7 Dec 2008 06:18:48 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB76IlrY016346; Sun, 7 Dec 2008 06:18:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812070618.mB76IlrY016346@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 7 Dec 2008 06:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185736 - head/share/man/man4/man4.powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 06:18:48 -0000 Author: nwhitehorn Date: Sun Dec 7 06:18:47 2008 New Revision: 185736 URL: http://svn.freebsd.org/changeset/base/185736 Log: Now that pmu(4) has features, it should also have a man page. Added: head/share/man/man4/man4.powerpc/pmu.4 (contents, props changed) Modified: head/share/man/man4/man4.powerpc/Makefile Modified: head/share/man/man4/man4.powerpc/Makefile ============================================================================== --- head/share/man/man4/man4.powerpc/Makefile Sun Dec 7 06:01:09 2008 (r185735) +++ head/share/man/man4/man4.powerpc/Makefile Sun Dec 7 06:18:47 2008 (r185736) @@ -1,6 +1,7 @@ # $FreeBSD$ MAN= bm.4 \ + pmu.4 \ powermac_nvram.4 MANSUBDIR=/powerpc Added: head/share/man/man4/man4.powerpc/pmu.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/man4.powerpc/pmu.4 Sun Dec 7 06:18:47 2008 (r185736) @@ -0,0 +1,95 @@ +.\"- +.\" Copyright (c) 2008 Nathan Whitehorn +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +.\" DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 6, 2008 +.Dt PMU 4 +.Os +.Sh NAME +.Nm pmu +.Nd Apple PMU99 Power Management Driver +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device adb" +.Cd "device pmu" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Power Management Unit (PMU) find in Apple +Core99 hardware. This includes late G3 laptops, all G4 machines, early G5 +desktops and all G5 XServes. +.Ed +.Pp +The Apple PMU controller is a multi-purpose ASIC that provides power +management and thermal control, as well as an ADB bus for the internal +keyboard and mouse on laptops. +.Sh HARDWARE +.Pp +Chips supported by the +.Nm +driver include: +.Pp +.Bl -bullet -compact +.It +Apple KeyLargo PMU +.It +Apple K2-KeyLargo PMU +.El +.Pp +.Sh SYSCTL VARIABLES +The +.Nm +driver provides power management services in addition to an +.Xr adb 4 +interface. The following sysctls can be used to control the +power management behavior. +.Bl -tag -width indent +.It Va dev.pmu.%d.server_mode +Restart after power failure behavior (1 causes system to reboot after power +cut, 0 causes system to remain off) +.Sh SEE ALSO +.Xr adb 4 +.Sh HISTORY +The +.Nm +device driver appeared in +.Nx 4.0 , +and then in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Michael Lorenz +.Aq macallan@NetBSD.org +and ported to FreeBSD by +.An Nathan Whitehorn +.Aq nwhitehorn@freebsd.org . From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 06:34:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C7AE1065670; Sun, 7 Dec 2008 06:34:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4AFD48FC12; Sun, 7 Dec 2008 06:34:51 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB76Yomk016719; Sun, 7 Dec 2008 06:34:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB76YoAU016718; Sun, 7 Dec 2008 06:34:50 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812070634.mB76YoAU016718@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 7 Dec 2008 06:34:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185737 - head/share/man/man4/man4.powerpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 06:34:51 -0000 Author: nwhitehorn Date: Sun Dec 7 06:34:50 2008 New Revision: 185737 URL: http://svn.freebsd.org/changeset/base/185737 Log: Fix spelling error (find -> found). Modified: head/share/man/man4/man4.powerpc/pmu.4 Modified: head/share/man/man4/man4.powerpc/pmu.4 ============================================================================== --- head/share/man/man4/man4.powerpc/pmu.4 Sun Dec 7 06:18:47 2008 (r185736) +++ head/share/man/man4/man4.powerpc/pmu.4 Sun Dec 7 06:34:50 2008 (r185737) @@ -42,7 +42,7 @@ kernel configuration file: .Sh DESCRIPTION The .Nm -driver provides support for the Power Management Unit (PMU) find in Apple +driver provides support for the Power Management Unit (PMU) found in Apple Core99 hardware. This includes late G3 laptops, all G4 machines, early G5 desktops and all G5 XServes. .Ed From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 10:26:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BD27106564A; Sun, 7 Dec 2008 10:26:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8A28FC18; Sun, 7 Dec 2008 10:26:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L9GqF-0001QD-TC; Sun, 07 Dec 2008 12:26:23 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB7AQKhM025327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 7 Dec 2008 12:26:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB7AQK9Z074739; Sun, 7 Dec 2008 12:26:20 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB7AQKxi074738; Sun, 7 Dec 2008 12:26:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 7 Dec 2008 12:26:20 +0200 From: Kostik Belousov To: "M. Warner Losh" Message-ID: <20081207102620.GK2038@deviant.kiev.zoral.com.ua> References: <200812052050.mB5KoOcV072648@svn.freebsd.org> <20081205224600.GA16948@freebsd.org> <20081205230002.GX2038@deviant.kiev.zoral.com.ua> <20081206.202344.-160243400.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9SzJfJEKNI6APITJ" Content-Disposition: inline In-Reply-To: <20081206.202344.-160243400.imp@bsdimp.com> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L9GqF-0001QD-TC 1335506a674f49f83f1572321f12c0d1 X-Terabit: YES Cc: svn-src-head@freebsd.org, rdivacky@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r185647 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 10:26:26 -0000 --9SzJfJEKNI6APITJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 06, 2008 at 08:23:44PM -0700, M. Warner Losh wrote: > In message: <20081205230002.GX2038@deviant.kiev.zoral.com.ua> > Kostik Belousov writes: > : On Fri, Dec 05, 2008 at 11:46:00PM +0100, Roman Divacky wrote: > : > On Fri, Dec 05, 2008 at 08:50:24PM +0000, Konstantin Belousov wrote: > : > > Author: kib > : > > Date: Fri Dec 5 20:50:24 2008 > : > > New Revision: 185647 > : > > URL: http://svn.freebsd.org/changeset/base/185647 > : > >=20 > : > > Log: > : > > Several threads in a process may do vfork() simultaneously. Then,= all > : > > parent threads sleep on the parent' struct proc until correspondi= ng > : > > child releases the vmspace. Each sleep is interlocked with proc m= utex of > : > > the child, that triggers assertion in the sleepq_add(). The asser= tion > : > > requires that at any time, all simultaneous sleepers for the chan= nel use > : > > the same interlock. > : > > =20 > : > > Silent the assertion by using conditional variable allocated in t= he > : > > child. Broadcast the variable event on exec() and exit(). > : > > =20 > : > > Since struct proc * sleep wait channel is overloaded for several > : > > unrelated events, I was unable to remove wakeups from the places = where > : > > cv_broadcast() is added, except exec(). > : >=20 > : > are there any differences (performance etc.) in using condition varia= bles > : > instead of sleep/wakeup? > :=20 > : I do not think that there is any measurable difference. On the other > : hand, the patch makes struct proc bigger by int + pointer. This shall > : not be a problem too. > :=20 > : Would I been able to convert _all_ uses of the struct proc * wait chann= el > : to cond vars operation, this may be measurable on some loads, since it > : would exclude spurious wakeups. >=20 > Is that a measurable good difference, or a measurable bad difference? I expect this could be measurable good difference, i.e. such patch might improve performance on some loads by eliminating false wakeups. --9SzJfJEKNI6APITJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk7pMsACgkQC3+MBN1Mb4iETgCfX2qVnP2e+1gPG2HBrwspv+HV EtoAoMuhcsgY0JbRg3gnuTQ3zvSmU0Af =jhP7 -----END PGP SIGNATURE----- --9SzJfJEKNI6APITJ-- From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 13:25:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDA41065678; Sun, 7 Dec 2008 13:25:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DBE3A8FC1C; Sun, 7 Dec 2008 13:25:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7DP66w026631; Sun, 7 Dec 2008 13:25:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7DP64P026630; Sun, 7 Dec 2008 13:25:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812071325.mB7DP64P026630@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 7 Dec 2008 13:25:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185739 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 13:25:07 -0000 Author: kib Date: Sun Dec 7 13:25:06 2008 New Revision: 185739 URL: http://svn.freebsd.org/changeset/base/185739 Log: Improve usefulness of the panic by printing the pointer to the problematic dquot. In-tree gdb is often unable to get the dq value, so supply it in panic message. MFC after: 3 days Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Sun Dec 7 07:02:26 2008 (r185738) +++ head/sys/ufs/ufs/ufs_quota.c Sun Dec 7 13:25:06 2008 (r185739) @@ -1151,7 +1151,7 @@ hfound: DQI_LOCK(dq); return (EUSERS); } if (dq->dq_cnt || (dq->dq_flags & DQ_MOD)) - panic("dqget: free dquot isn't"); + panic("dqget: free dquot isn't %p", dq); TAILQ_REMOVE(&dqfreelist, dq, dq_freelist); if (dq->dq_ump != NULL) LIST_REMOVE(dq, dq_hash); From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 18:32:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C4010656AE; Sun, 7 Dec 2008 18:32:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51C518FC16; Sun, 7 Dec 2008 18:32:10 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7IW9IJ032500; Sun, 7 Dec 2008 18:32:09 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7IW96f032499; Sun, 7 Dec 2008 18:32:09 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812071832.mB7IW96f032499@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Dec 2008 18:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185740 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 18:32:10 -0000 Author: imp Date: Sun Dec 7 18:32:09 2008 New Revision: 185740 URL: http://svn.freebsd.org/changeset/base/185740 Log: Use atomic_add_int rather than a simple ++ to ensure no cache races if the power interrupt and init code waiting for the interrupt are running on different CPUs. I haven't seen this make any real difference, but I've also had some reports of odd behavior I can't otherwise explain. It is an infrequent operation, and certainly wouldn't hurt. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Sun Dec 7 13:25:06 2008 (r185739) +++ head/sys/dev/pccbb/pccbb_pci.c Sun Dec 7 18:32:09 2008 (r185740) @@ -730,7 +730,7 @@ cbb_pci_filt(void *arg) if (sockevent & CBB_SOCKET_EVENT_POWER) { cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_EVENT_POWER); cbb_set(sc, CBB_SOCKET_EVENT, CBB_SOCKET_EVENT_POWER); - sc->powerintr++; + atomic_add_int(&sc->powerintr, 1); wakeup((void *)&sc->powerintr); } retval = FILTER_HANDLED; From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 18:34:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB4B91065675; Sun, 7 Dec 2008 18:34:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 996108FC0C; Sun, 7 Dec 2008 18:34:27 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7IYRxq032654; Sun, 7 Dec 2008 18:34:27 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7IYR7k032653; Sun, 7 Dec 2008 18:34:27 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812071834.mB7IYR7k032653@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Dec 2008 18:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185741 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 18:34:27 -0000 Author: imp Date: Sun Dec 7 18:34:27 2008 New Revision: 185741 URL: http://svn.freebsd.org/changeset/base/185741 Log: Use '0' rather than PZERO to not change the priority that I'm waiting at. I don't think this will make a huge difference, but I have received a report of a interrupt storm on one 16-bit card that this might fix (chances are it won't, since I think that we may need to check both the CBB registers for the 16-bit card as well as the PCIC registers for power state change). Submitted by: jhb@ Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Sun Dec 7 18:32:09 2008 (r185740) +++ head/sys/dev/pccbb/pccbb.c Sun Dec 7 18:34:27 2008 (r185741) @@ -515,11 +515,11 @@ cbb_event_thread(void *arg) */ mtx_lock(&sc->mtx); cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD | CBB_SOCKET_MASK_CSTS); - msleep(&sc->intrhand, &sc->mtx, PZERO, "-", 0); + msleep(&sc->intrhand, &sc->mtx, 0, "-", 0); err = 0; while (err != EWOULDBLOCK && (sc->flags & CBB_KTHREAD_DONE) == 0) - err = msleep(&sc->intrhand, &sc->mtx, PZERO, "-", hz / 5); + err = msleep(&sc->intrhand, &sc->mtx, 0, "-", hz / 5); } DEVPRINTF((sc->dev, "Thread terminating\n")); sc->flags &= ~CBB_KTHREAD_RUNNING; @@ -795,7 +795,7 @@ cbb_power(device_t brdev, int volts) sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && cnt == sc->powerintr && sane-- > 0) - msleep(&sc->powerintr, &sc->mtx, PZERO, "-", hz / 20); + msleep(&sc->powerintr, &sc->mtx, 0, "-", hz / 20); mtx_unlock(&sc->mtx); /* * The TOPIC95B requires a little bit extra time to get From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 18:45:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FABD1065673; Sun, 7 Dec 2008 18:45:30 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DCAA8FC17; Sun, 7 Dec 2008 18:45:30 +0000 (UTC) (envelope-from trhodes@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7IjUJL032888; Sun, 7 Dec 2008 18:45:30 GMT (envelope-from trhodes@svn.freebsd.org) Received: (from trhodes@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7IjU4T032887; Sun, 7 Dec 2008 18:45:30 GMT (envelope-from trhodes@svn.freebsd.org) Message-Id: <200812071845.mB7IjU4T032887@svn.freebsd.org> From: Tom Rhodes Date: Sun, 7 Dec 2008 18:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185742 - head/usr.sbin/syslogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 18:45:30 -0000 Author: trhodes Date: Sun Dec 7 18:45:30 2008 New Revision: 185742 URL: http://svn.freebsd.org/changeset/base/185742 Log: Use "allowed_peer" throughout this manual page. Modified: head/usr.sbin/syslogd/syslogd.8 Modified: head/usr.sbin/syslogd/syslogd.8 ============================================================================== --- head/usr.sbin/syslogd/syslogd.8 Sun Dec 7 18:34:27 2008 (r185741) +++ head/usr.sbin/syslogd/syslogd.8 Sun Dec 7 18:45:30 2008 (r185742) @@ -95,8 +95,9 @@ Multiple .Fl a options may be specified. .Pp -.Ar Allowed_peer -can be any of the following: +The +.Ar allowed_peer +option may be any of the following: .Bl -tag -width "ipaddr/masklen[:service]XX" .It Xo .Sm off From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 19:17:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1F7D106564A; Sun, 7 Dec 2008 19:17:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD2FC8FC13; Sun, 7 Dec 2008 19:17:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7JHYK2033544; Sun, 7 Dec 2008 19:17:34 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7JHYYJ033534; Sun, 7 Dec 2008 19:17:34 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812071917.mB7JHYYJ033534@svn.freebsd.org> From: Sam Leffler Date: Sun, 7 Dec 2008 19:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185743 - in head/tools/tools/ath: . athdebug athkey athpow athprom athregs athstats common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 19:17:35 -0000 Author: sam Date: Sun Dec 7 19:17:33 2008 New Revision: 185743 URL: http://svn.freebsd.org/changeset/base/185743 Log: bring in diagnostic tools that are useful now that we have hal source code Added: head/tools/tools/ath/Makefile.inc (contents, props changed) head/tools/tools/ath/athkey/ head/tools/tools/ath/athkey/Makefile (contents, props changed) head/tools/tools/ath/athkey/athkey.c (contents, props changed) head/tools/tools/ath/athpow/ head/tools/tools/ath/athpow/Makefile (contents, props changed) head/tools/tools/ath/athpow/athpow.c (contents, props changed) head/tools/tools/ath/athprom/ head/tools/tools/ath/athprom/Makefile (contents, props changed) head/tools/tools/ath/athprom/athprom.c (contents, props changed) head/tools/tools/ath/athprom/eeprom-14 (contents, props changed) head/tools/tools/ath/athprom/eeprom-3 (contents, props changed) head/tools/tools/ath/athprom/eeprom-4 (contents, props changed) head/tools/tools/ath/athprom/eeprom-5 (contents, props changed) head/tools/tools/ath/athregs/ head/tools/tools/ath/athregs/Makefile (contents, props changed) head/tools/tools/ath/athregs/dumpregs.c (contents, props changed) head/tools/tools/ath/athregs/dumpregs.h (contents, props changed) head/tools/tools/ath/athregs/dumpregs_5210.c (contents, props changed) head/tools/tools/ath/athregs/dumpregs_5211.c (contents, props changed) head/tools/tools/ath/athregs/dumpregs_5212.c (contents, props changed) head/tools/tools/ath/athregs/dumpregs_5416.c (contents, props changed) head/tools/tools/ath/common/ head/tools/tools/ath/common/ah_osdep.h (contents, props changed) head/tools/tools/ath/common/diag.h (contents, props changed) Modified: head/tools/tools/ath/Makefile head/tools/tools/ath/athdebug/Makefile head/tools/tools/ath/athstats/Makefile Modified: head/tools/tools/ath/Makefile ============================================================================== --- head/tools/tools/ath/Makefile Sun Dec 7 18:45:30 2008 (r185742) +++ head/tools/tools/ath/Makefile Sun Dec 7 19:17:33 2008 (r185743) @@ -1,5 +1,5 @@ # $FreeBSD$ -SUBDIR= athstats athdebug +SUBDIR= athdebug athkey athprom athregs athstats .include Added: head/tools/tools/ath/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/Makefile.inc Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +BINDIR= /usr/local/bin +NO_MAN= + +ATH_DEFAULT= ath0 + +CFLAGS+=-DATH_DEFAULT='"${ATH_DEFAULT}"' +CFLAGS+=-I../common +CFLAGS+=-I../../../../sys/dev/ath +CFLAGS+=-I../../../../sys/dev/ath/ath_hal Modified: head/tools/tools/ath/athdebug/Makefile ============================================================================== --- head/tools/tools/ath/athdebug/Makefile Sun Dec 7 18:45:30 2008 (r185742) +++ head/tools/tools/ath/athdebug/Makefile Sun Dec 7 19:17:33 2008 (r185743) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= athdebug -BINDIR= /usr/local/bin -NO_MAN= + +.include <../Makefile.inc> .include Added: head/tools/tools/ath/athkey/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athkey/Makefile Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= athkey + +.include <../Makefile.inc> + +.include Added: head/tools/tools/ath/athkey/athkey.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athkey/athkey.c Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,203 @@ +/*- + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ + +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" + +#include +#include +#include +#include +#include + +const char *progname; + +static int +toint(int c) +{ + return isdigit(c) ? c - '0' : isupper(c) ? c - 'A' + 10 : c - 'a' + 10; +} + +static int +getdata(const char *arg, u_int8_t *data, size_t maxlen) +{ + const char *cp = arg; + int len; + + if (cp[0] == '0' && (cp[1] == 'x' || cp[1] == 'X')) + cp += 2; + len = 0; + while (*cp) { + int b0, b1; + if (cp[0] == ':' || cp[0] == '-' || cp[0] == '.') { + cp++; + continue; + } + if (!isxdigit(cp[0])) { + fprintf(stderr, "%s: invalid data value %c (not hex)\n", + progname, cp[0]); + exit(-1); + } + b0 = toint(cp[0]); + if (cp[1] != '\0') { + if (!isxdigit(cp[1])) { + fprintf(stderr, "%s: invalid data value %c " + "(not hex)\n", progname, cp[1]); + exit(-1); + } + b1 = toint(cp[1]); + cp += 2; + } else { /* fake up 0 */ + b1 = b0, b0 = 0; + cp += 1; + } + if (len > maxlen) { + fprintf(stderr, + "%s: too much data in %s, max %u bytes\n", + progname, arg, maxlen); + } + data[len++] = (b0<<4) | b1; + } + return len; +} + +/* XXX this assumes 5212 key types are common to 5211 and 5210 */ + +static int +getcipher(const char *name) +{ +#define streq(a,b) (strcasecmp(a,b) == 0) + + if (streq(name, "wep")) + return HAL_CIPHER_WEP; + if (streq(name, "tkip")) + return HAL_CIPHER_TKIP; + if (streq(name, "aes-ocb") || streq(name, "ocb")) + return HAL_CIPHER_AES_OCB; + if (streq(name, "aes-ccm") || streq(name, "ccm") || + streq(name, "aes")) + return HAL_CIPHER_AES_CCM; + if (streq(name, "ckip")) + return HAL_CIPHER_CKIP; + if (streq(name, "none") || streq(name, "clr")) + return HAL_CIPHER_CLR; + + fprintf(stderr, "%s: unknown cipher %s\n", progname, name); + exit(-1); +#undef streq +} + +static void +usage(void) +{ + fprintf(stderr, "usage: %s [-i device] keyix cipher keyval [mac]\n", + progname); + exit(-1); +} + +int +main(int argc, char *argv[]) +{ + const char *ifname; + struct ath_diag atd; + HAL_DIAG_KEYVAL setkey; + const char *cp; + int s, c; + u_int16_t keyix; + int op = HAL_DIAG_SETKEY; + int xor = 0; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + ifname = getenv("ATH"); + if (!ifname) + ifname = ATH_DEFAULT; + + progname = argv[0]; + while ((c = getopt(argc, argv, "di:x")) != -1) + switch (c) { + case 'd': + op = HAL_DIAG_RESETKEY; + break; + case 'i': + ifname = optarg; + break; + case 'x': + xor = 1; + break; + default: + usage(); + /*NOTREACHED*/ + } + argc -= optind; + argv += optind; + if (argc < 1) + usage(); + + keyix = (u_int16_t) atoi(argv[0]); + if (keyix > 127) + errx(-1, "%s: invalid key index %s, must be [0..127]", + progname, argv[0]); + strncpy(atd.ad_name, ifname, sizeof (atd.ad_name)); + atd.ad_id = op | ATH_DIAG_IN | ATH_DIAG_DYN; + atd.ad_out_data = NULL; + atd.ad_out_size = 0; + switch (op) { + case HAL_DIAG_RESETKEY: + atd.ad_in_data = (caddr_t) &keyix; + atd.ad_in_size = sizeof(u_int16_t); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + return 0; + case HAL_DIAG_SETKEY: + if (argc != 3 && argc != 4) + usage(); + memset(&setkey, 0, sizeof(setkey)); + setkey.dk_keyix = keyix; + setkey.dk_xor = xor; + setkey.dk_keyval.kv_type = getcipher(argv[1]); + setkey.dk_keyval.kv_len = getdata(argv[2], + setkey.dk_keyval.kv_val, sizeof(setkey.dk_keyval.kv_val)); + /* XXX MIC */ + if (argc == 4) + (void) getdata(argv[3], setkey.dk_mac, + IEEE80211_ADDR_LEN); + atd.ad_in_data = (caddr_t) &setkey; + atd.ad_in_size = sizeof(setkey); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + return 0; + } + return -1; +} Added: head/tools/tools/ath/athpow/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athpow/Makefile Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +PROG= athpow + +.include <../Makefile.inc> + +.include Added: head/tools/tools/ath/athpow/athpow.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athpow/athpow.c Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,198 @@ +/*- + * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ +#include "diag.h" + +#include +#include +#include + +#include "ah.h" +#include "ah_internal.h" +#include "ah_eeprom.h" +#include "ah_eeprom_v1.h" +#include "ah_eeprom_v3.h" +#include "ah_eeprom_v14.h" +#include "ar5212/ar5212reg.h" +#define IS_5112(ah) \ + (((ah)->ah_analog5GhzRev&0xf0) >= AR_RAD5112_SREV_MAJOR \ + && ((ah)->ah_analog5GhzRev&0xf0) < AR_RAD2316_SREV_MAJOR ) +#define IS_2316(ah) \ + ((ah)->ah_macVersion == AR_SREV_2415) +#define IS_2413(ah) \ + ((ah)->ah_macVersion == AR_SREV_2413 || IS_2316(ah)) +#define IS_5424(ah) \ + ((ah)->ah_macVersion == AR_SREV_5424 || \ + ((ah)->ah_macVersion == AR_SREV_5413 && \ + (ah)->ah_macRev <= AR_SREV_D2PLUS_MS)) +#define IS_5413(ah) \ + ((ah)->ah_macVersion == AR_SREV_5413 || IS_5424(ah)) + +#ifndef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#endif + +static void printPcdacTable(FILE *fd, u_int16_t pcdac[], u_int n); +static void printPowerPerRate(FILE *fd, u_int16_t ratesArray[], u_int n); +static void printRevs(FILE *fd, const HAL_REVS *revs); + +static void +usage(const char *progname) +{ + fprintf(stderr, "usage: %s [-v] [-i dev]\n", progname); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + int s, i, verbose = 0, c; + struct ath_diag atd; + const char *ifname; + HAL_REVS revs; + u_int16_t pcdacTable[MAX(PWR_TABLE_SIZE,PWR_TABLE_SIZE_2413)]; + u_int16_t ratesArray[16]; + u_int nrates, npcdac; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + ifname = getenv("ATH"); + if (!ifname) + ifname = ATH_DEFAULT; + while ((c = getopt(argc, argv, "i:v")) != -1) + switch (c) { + case 'i': + ifname = optarg; + break; + case 'v': + verbose++; + break; + default: + usage(argv[0]); + } + strncpy(atd.ad_name, ifname, sizeof (atd.ad_name)); + + atd.ad_id = HAL_DIAG_REVS; + atd.ad_out_data = (caddr_t) &revs; + atd.ad_out_size = sizeof(revs); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + + if (verbose) + printRevs(stdout, &revs); + + atd.ad_id = HAL_DIAG_TXRATES; + atd.ad_out_data = (caddr_t) ratesArray; + atd.ad_out_size = sizeof(ratesArray); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + nrates = sizeof(ratesArray) / sizeof(u_int16_t); + + atd.ad_id = HAL_DIAG_PCDAC; + atd.ad_out_data = (caddr_t) pcdacTable; + atd.ad_out_size = sizeof(pcdacTable); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + if (IS_2413(&revs) || IS_5413(&revs)) + npcdac = PWR_TABLE_SIZE_2413; + else + npcdac = PWR_TABLE_SIZE; + + printf("PCDAC table:\n"); + printPcdacTable(stdout, pcdacTable, npcdac); + + printf("Power per rate table:\n"); + printPowerPerRate(stdout, ratesArray, nrates); + + return 0; +} + +static void +printPcdacTable(FILE *fd, u_int16_t pcdac[], u_int n) +{ + int i, halfRates = n/2; + + for (i = 0; i < halfRates; i += 2) + fprintf(fd, "[%2u] %04x %04x [%2u] %04x %04x\n", + i, pcdac[2*i + 1], pcdac[2*i], + i+1, pcdac[2*(i+1) + 1], pcdac[2*(i+1)]); +} + +static void +printPowerPerRate(FILE *fd, u_int16_t ratesArray[], u_int n) +{ + const char *rateString[] = { + " 6mb OFDM", " 9mb OFDM", "12mb OFDM", "18mb OFDM", + "24mb OFDM", "36mb OFDM", "48mb OFDM", "54mb OFDM", + "1L CCK ", "2L CCK ", "2S CCK ", "5.5L CCK ", + "5.5S CCK ", "11L CCK ", "11S CCK ", "XR " + }; + int i, halfRates = n/2; + + for (i = 0; i < halfRates; i++) + fprintf(fd, " %s %3d.%1d dBm | %s %3d.%1d dBm\n", + rateString[i], ratesArray[i]/2, + (ratesArray[i] %2) * 5, + rateString[i + halfRates], + ratesArray[i + halfRates]/2, + (ratesArray[i + halfRates] %2) *5); +} + +static void +printRevs(FILE *fd, const HAL_REVS *revs) +{ + const char *rfbackend; + + fprintf(fd, "PCI device id 0x%x subvendor id 0x%x\n", + revs->ah_devid, revs->ah_subvendorid); + fprintf(fd, "mac %d.%d phy %d.%d" + , revs->ah_macVersion, revs->ah_macRev + , revs->ah_phyRev >> 4, revs->ah_phyRev & 0xf + ); + rfbackend = IS_5413(revs) ? "5413" : + IS_2413(revs) ? "2413" : + IS_5112(revs) ? "5112" : + "5111"; + if (revs->ah_analog5GhzRev && revs->ah_analog2GhzRev) + fprintf(fd, " 5ghz radio %d.%d 2ghz radio %d.%d (%s)\n" + , revs->ah_analog5GhzRev >> 4 + , revs->ah_analog5GhzRev & 0xf + , revs->ah_analog2GhzRev >> 4 + , revs->ah_analog2GhzRev & 0xf + , rfbackend + ); + else + fprintf(fd, " radio %d.%d (%s)\n" + , revs->ah_analog5GhzRev >> 4 + , revs->ah_analog5GhzRev & 0xf + , rfbackend + ); +} Added: head/tools/tools/ath/athprom/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athprom/Makefile Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,17 @@ +# $FreeBSD$ + +PROG= athprom + +.include <../Makefile.inc> + +TEMPLATEDIR= /usr/local/libdata/athprom +TEXTMODE?= 444 + +CFLAGS+=-DDIR_TEMPLATE='"${TEMPLATEDIR}"' + +beforeinstall: + mkdir -p ${DESTDIR}${TEMPLATEDIR} + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${TEXTMODE} \ + ${.CURDIR}/eeprom-* ${DESTDIR}${TEMPLATEDIR}/ + +.include Added: head/tools/tools/ath/athprom/athprom.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/tools/ath/athprom/athprom.c Sun Dec 7 19:17:33 2008 (r185743) @@ -0,0 +1,978 @@ +/*- + * Copyright (c) 2008 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any + * redistribution must be conditioned upon including a substantially + * similar Disclaimer requirement for further binary redistribution. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY + * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. + * + * $FreeBSD$ + */ +#include "diag.h" + +#include "ah.h" +#include "ah_internal.h" +#include "ah_eeprom_v1.h" +#include "ah_eeprom_v3.h" +#include "ah_eeprom_v14.h" + +#define IS_VERS(op, v) (eeprom.ee_version op (v)) + +#include +#include +#include +#include +#include + +#ifndef DIR_TEMPLATE +#define DIR_TEMPLATE "/usr/local/libdata/athprom" +#endif + +struct ath_diag atd; +int s; +const char *progname; +union { + HAL_EEPROM legacy; /* format v3.x ... v5.x */ + struct ar5416eeprom v14; /* 11n format v14.x ... */ +} eep; +#define eeprom eep.legacy +#define eepromN eep.v14 + +static void parseTemplate(FILE *ftemplate, FILE *fd); +static uint16_t eeread(uint16_t); +static void eewrite(uint16_t, uint16_t); + +static void +usage() +{ + fprintf(stderr, "usage: %s [-i ifname] [-t pathname] [offset | offset=value]\n", progname); + exit(-1); +} + +static FILE * +opentemplate(const char *dir) +{ + char filename[PATH_MAX]; + FILE *fd; + + /* find the template using the eeprom version */ + snprintf(filename, sizeof(filename), "%s/eeprom-%d.%d", + dir, eeprom.ee_version >> 12, eeprom.ee_version & 0xfff); + fd = fopen(filename, "r"); + if (fd == NULL && errno == ENOENT) { + /* retry with just the major version */ + snprintf(filename, sizeof(filename), "%s/eeprom-%d", + dir, eeprom.ee_version >> 12); + fd = fopen(filename, "r"); + if (fd != NULL) /* XXX verbose */ + warnx("Using template file %s", filename); + } + return fd; +} + +int +main(int argc, char *argv[]) +{ + FILE *fd = NULL; + const char *ifname; + int c; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s < 0) + err(1, "socket"); + ifname = getenv("ATH"); + if (!ifname) + ifname = ATH_DEFAULT; + + progname = argv[0]; + while ((c = getopt(argc, argv, "i:t:")) != -1) + switch (c) { + case 'i': + ifname = optarg; + break; + case 't': + fd = fopen(optarg, "r"); + if (fd == NULL) + err(-1, "Cannot open %s", optarg); + break; + default: + usage(); + /*NOTREACHED*/ + } + argc -= optind; + argv += optind; + + strncpy(atd.ad_name, ifname, sizeof (atd.ad_name)); + + if (argc != 0) { + for (; argc > 0; argc--, argv++) { + uint16_t off, val, oval; + char line[256]; + char *cp; + + cp = strchr(argv[0], '='); + if (cp != NULL) + *cp = '\0'; + off = (uint16_t) strtoul(argv[0], NULL, 0); + if (off == 0 && errno == EINVAL) + errx(1, "%s: invalid eeprom offset %s", + progname, argv[0]); + if (cp == NULL) { + printf("%04x: %04x\n", off, eeread(off)); + } else { + val = (uint16_t) strtoul(cp+1, NULL, 0); + if (val == 0 && errno == EINVAL) + errx(1, "%s: invalid eeprom value %s", + progname, cp+1); + oval = eeread(off); + printf("Write %04x: %04x = %04x? ", + off, oval, val); + fflush(stdout); + if (fgets(line, sizeof(line), stdin) != NULL && + line[0] == 'y') + eewrite(off, val); + } + } + } else { + atd.ad_id = HAL_DIAG_EEPROM; + atd.ad_out_data = (caddr_t) &eep; + atd.ad_out_size = sizeof(eep); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + if (fd == NULL) { + fd = opentemplate(DIR_TEMPLATE); + if (fd == NULL) + fd = opentemplate("."); + if (fd == NULL) + errx(-1, "Cannot locate template file for " + "v%d.%d EEPROM", eeprom.ee_version >> 12, + eeprom.ee_version & 0xfff); + } + parseTemplate(fd, stdout); + fclose(fd); + } + return 0; +} + +static u_int16_t +eeread(u_int16_t off) +{ + u_int16_t eedata; + + atd.ad_id = HAL_DIAG_EEREAD | ATH_DIAG_IN | ATH_DIAG_DYN; + atd.ad_in_size = sizeof(off); + atd.ad_in_data = (caddr_t) &off; + atd.ad_out_size = sizeof(eedata); + atd.ad_out_data = (caddr_t) &eedata; + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + return eedata; +} + +static void +eewrite(uint16_t off, uint16_t value) +{ + HAL_DIAG_EEVAL eeval; + + eeval.ee_off = off; + eeval.ee_data = value; + + atd.ad_id = HAL_DIAG_EEWRITE | ATH_DIAG_IN; + atd.ad_in_size = sizeof(eeval); + atd.ad_in_data = (caddr_t) &eeval; + atd.ad_out_size = 0; + atd.ad_out_data = NULL; + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); +} + +#define MAXID 128 +int lineno; +int bol; +int curmode = -1; +int curchan; +int curpdgain; /* raw pdgain index */ +int curlpdgain; /* logical pdgain index */ +int curpcdac; +int curctl; +int numChannels; +const RAW_DATA_STRUCT_2413 *pRaw; +const TRGT_POWER_INFO *pPowerInfo; +const DATA_PER_CHANNEL *pDataPerChannel; +const EEPROM_POWER_EXPN_5112 *pExpnPower; +int singleXpd; + +static int +token(FILE *fd, char id[], int maxid, const char *what) +{ + int c, i; + + i = 0; + for (;;) { + c = getc(fd); + if (c == EOF) + return EOF; + if (!isalnum(c) && c != '_') { + ungetc(c, fd); + break; + } + if (i == maxid-1) { + warnx("line %d, %s too long", lineno, what); + break; + } + id[i++] = c; + } + id[i] = '\0'; + if (i != 0) + bol = 0; + return i; +} + +static int +skipto(FILE *fd, const char *what) +{ + char id[MAXID]; + int c; + + for (;;) { + c = getc(fd); + if (c == EOF) + goto bad; + if (c == '.' && bol) { /* .directive */ + if (token(fd, id, MAXID, ".directive") == EOF) + goto bad; + if (strcasecmp(id, what) == 0) + break; + continue; + } + if (c == '\\') { /* escape next character */ + c = getc(fd); + if (c == EOF) + goto bad; + } + bol = (c == '\n'); + if (bol) + lineno++; + } + return 0; +bad: + warnx("EOF with no matching .%s", what); + return EOF; +} + +static int +skipws(FILE *fd) +{ + int c, i; + + i = 0; + while ((c = getc(fd)) != EOF && isblank(c)) + i++; + if (c != EOF) + ungetc(c, fd); + if (i != 0) + bol = 0; + return 0; +} + +static void +setmode(int mode) +{ + EEPROM_POWER_EXPN_5112 *exp; + + curmode = mode; + curchan = -1; + curctl = -1; + curpdgain = -1; + curlpdgain = -1; + curpcdac = -1; + switch (curmode) { + case headerInfo11A: + pPowerInfo = eeprom.ee_trgtPwr_11a; + pDataPerChannel = eeprom.ee_dataPerChannel11a; + break; + case headerInfo11B: + pPowerInfo = eeprom.ee_trgtPwr_11b; + pDataPerChannel = eeprom.ee_dataPerChannel11b; + break; + case headerInfo11G: + pPowerInfo = eeprom.ee_trgtPwr_11g; + pDataPerChannel = eeprom.ee_dataPerChannel11g; + break; + } + if (IS_VERS(<, AR_EEPROM_VER4_0)) /* nothing to do */ + return; + if (IS_VERS(<, AR_EEPROM_VER5_0)) { + exp = &eeprom.ee_modePowerArray5112[curmode]; + /* fetch indirect data*/ + atd.ad_id = HAL_DIAG_EEPROM_EXP_11A+curmode; + atd.ad_out_size = roundup( + sizeof(u_int16_t) * exp->numChannels, sizeof(u_int32_t)) + + sizeof(EXPN_DATA_PER_CHANNEL_5112) * exp->numChannels; + atd.ad_out_data = (caddr_t) malloc(atd.ad_out_size); + if (ioctl(s, SIOCGATHDIAG, &atd) < 0) + err(1, atd.ad_name); + exp->pChannels = (void *) atd.ad_out_data; + exp->pDataPerChannel = (void *)((char *)atd.ad_out_data + + roundup(sizeof(u_int16_t) * exp->numChannels, sizeof(u_int32_t))); + pExpnPower = exp; + numChannels = pExpnPower->numChannels; + if (exp->xpdMask != 0x9) { + for (singleXpd = 0; singleXpd < NUM_XPD_PER_CHANNEL; singleXpd++) + if (exp->xpdMask == (1<numChannels; + } +} + +int +nextctl(int start) +{ + int i; + + for (i = start; i < eeprom.ee_numCtls && eeprom.ee_ctl[i]; i++) { + switch (eeprom.ee_ctl[i] & 3) { + case 0: case 3: + if (curmode != headerInfo11A) + continue; + break; + case 1: + if (curmode != headerInfo11B) + continue; + break; + case 2: + if (curmode != headerInfo11G) + continue; + break; + } + return i; + } + return -1; +} + +static void +printAntennaControl(FILE *fd, int ant) +{ + fprintf(fd, "0x%02X", eeprom.ee_antennaControl[ant][curmode]); +} + +static void +printEdge(FILE *fd, int edge) +{ + const RD_EDGES_POWER *pRdEdgePwrInfo = + &eeprom.ee_rdEdgesPower[curctl*NUM_EDGES]; + + if (pRdEdgePwrInfo[edge].rdEdge == 0) + fprintf(fd, " -- "); + else + fprintf(fd, "%04d", pRdEdgePwrInfo[edge].rdEdge); +} + +static void +printEdgePower(FILE *fd, int edge) +{ + const RD_EDGES_POWER *pRdEdgePwrInfo = + &eeprom.ee_rdEdgesPower[curctl*NUM_EDGES]; + + if (pRdEdgePwrInfo[edge].rdEdge == 0) + fprintf(fd, " -- "); + else + fprintf(fd, "%2d.%d", + pRdEdgePwrInfo[edge].twice_rdEdgePower / 2, + (pRdEdgePwrInfo[edge].twice_rdEdgePower % 2) * 5); +} + +static void +printEdgeFlag(FILE *fd, int edge) +{ + const RD_EDGES_POWER *pRdEdgePwrInfo = + &eeprom.ee_rdEdgesPower[curctl*NUM_EDGES]; + + if (pRdEdgePwrInfo[edge].rdEdge == 0) + fprintf(fd, "--"); + else + fprintf(fd, " %1d", pRdEdgePwrInfo[edge].flag); +} + +static int16_t +getMaxPowerV5(const RAW_DATA_PER_CHANNEL_2413 *data) +{ + uint32_t i; + uint16_t numVpd; + + for (i = 0; i < MAX_NUM_PDGAINS_PER_CHANNEL; i++) { + numVpd = data->pDataPerPDGain[i].numVpd; + if (numVpd > 0) + return data->pDataPerPDGain[i].pwr_t4[numVpd-1]; + } + return 0; +} + +static void +printQuarterDbmPower(FILE *fd, int16_t power25dBm) +{ + fprintf(fd, "%2d.%02d", power25dBm / 4, (power25dBm % 4) * 25); +} + +static void +printHalfDbmPower(FILE *fd, int16_t power5dBm) +{ + fprintf(fd, "%2d.%d", power5dBm / 2, (power5dBm % 2) * 5); +} + +static void +printVpd(FILE *fd, int vpd) +{ + fprintf(fd, "[%3d]", vpd); +} + +static void +printPcdacValue(FILE *fd, int v) +{ + fprintf(fd, "%2d.%02d", v / EEP_SCALE, v % EEP_SCALE); +} + +static void +undef(const char *what) +{ + warnx("%s undefined for version %d.%d format EEPROM", what, + eeprom.ee_version >> 12, eeprom.ee_version & 0xfff); +} + +static int +pdgain(int lpdgain) +{ + uint32_t mask; + int i, l = lpdgain; + + if (IS_VERS(<, AR_EEPROM_VER5_0)) + mask = pExpnPower->xpdMask; + else + mask = pRaw->xpd_mask; + for (i = 0; mask != 0; mask >>= 1, i++) + if ((mask & 1) && l-- == 0) + return i; + warnx("can't find logical pdgain %d", lpdgain); + return -1; +} + +#define COUNTRY_ERD_FLAG 0x8000 +#define WORLDWIDE_ROAMING_FLAG 0x4000 + +void +eevar(FILE *fd, const char *var) +{ +#define streq(a,b) (strcasecmp(a,b) == 0) +#define strneq(a,b,n) (strncasecmp(a,b,n) == 0) + if (streq(var, "mode")) { + fprintf(fd, "%s", + curmode == headerInfo11A ? "11a" : + curmode == headerInfo11B ? "11b" : + curmode == headerInfo11G ? "11g" : "???"); + } else if (streq(var, "version")) { + fprintf(fd, "%04x", eeprom.ee_version); + } else if (streq(var, "V_major")) { + fprintf(fd, "%2d", eeprom.ee_version >> 12); + } else if (streq(var, "V_minor")) { + fprintf(fd, "%2d", eeprom.ee_version & 0xfff); + } else if (streq(var, "earStart")) { + fprintf(fd, "%03x", eeprom.ee_earStart); + } else if (streq(var, "tpStart")) { + fprintf(fd, "%03x", eeprom.ee_targetPowersStart); + } else if (streq(var, "eepMap")) { + fprintf(fd, "%3d", eeprom.ee_eepMap); + } else if (streq(var, "exist32KHzCrystal")) { + fprintf(fd, "%3d", eeprom.ee_exist32kHzCrystal); + } else if (streq(var, "eepMap2PowerCalStart")) { + fprintf(fd , "%3d", eeprom.ee_eepMap2PowerCalStart); + } else if (streq(var, "Amode")) { + fprintf(fd , "%1d", eeprom.ee_Amode); + } else if (streq(var, "Bmode")) { + fprintf(fd , "%1d", eeprom.ee_Bmode); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 19:26:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C87481065679; Sun, 7 Dec 2008 19:26:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A81A8FC1F; Sun, 7 Dec 2008 19:26:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7JQYkm033767; Sun, 7 Dec 2008 19:26:34 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7JQYud033765; Sun, 7 Dec 2008 19:26:34 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812071926.mB7JQYud033765@svn.freebsd.org> From: Sam Leffler Date: Sun, 7 Dec 2008 19:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185744 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 19:26:34 -0000 Author: sam Date: Sun Dec 7 19:26:34 2008 New Revision: 185744 URL: http://svn.freebsd.org/changeset/base/185744 Log: New periodic calibration scheme needed for 11n parts that have multiple algorithms and potentially collect multiple samples. Instead of a single calibration interval we now have short and long intervals; the long interval roughly corresponds to the previous single interval. The short interval is used to speedup collection of samples and happens much quicker. We make calls using the short interval until we're told the calibration work is complete at which point we fallback to the long interval. In addition there is a much longer reset interval used to flush all calibration state and cause everthing to start anew. With these changes you can also disable calibration entirely by setting the long interval to zero. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Dec 7 19:17:33 2008 (r185743) +++ head/sys/dev/ath/if_ath.c Sun Dec 7 19:26:34 2008 (r185744) @@ -219,9 +219,15 @@ static void ath_announce(struct ath_soft SYSCTL_DECL(_hw_ath); /* XXX validate sysctl values */ -static int ath_calinterval = 30; /* calibrate every 30 secs */ -SYSCTL_INT(_hw_ath, OID_AUTO, calibrate, CTLFLAG_RW, &ath_calinterval, - 0, "chip calibration interval (secs)"); +static int ath_longcalinterval = 30; /* long cals every 30 secs */ +SYSCTL_INT(_hw_ath, OID_AUTO, longcal, CTLFLAG_RW, &ath_longcalinterval, + 0, "long chip calibration interval (secs)"); +static int ath_shortcalinterval = 100; /* short cals every 100 ms */ +SYSCTL_INT(_hw_ath, OID_AUTO, shortcal, CTLFLAG_RW, &ath_shortcalinterval, + 0, "short chip calibration interval (msecs)"); +static int ath_resetcalinterval = 20*60; /* reset cal state 20 mins */ +SYSCTL_INT(_hw_ath, OID_AUTO, resetcal, CTLFLAG_RW, &ath_resetcalinterval, + 0, "reset chip calibration results (secs)"); static int ath_rxbuf = ATH_RXBUF; /* # rx buffers to allocate */ SYSCTL_INT(_hw_ath, OID_AUTO, rxbuf, CTLFLAG_RW, &ath_rxbuf, @@ -1433,8 +1439,9 @@ ath_init(void *arg) * state cached in the driver. */ sc->sc_diversity = ath_hal_getdiversity(ah); - sc->sc_calinterval = 1; - sc->sc_caltries = 0; + sc->sc_lastlongcal = 0; + sc->sc_resetcal = 1; + sc->sc_lastcalreset = 0; /* * Setup the hardware after reset: the key cache @@ -1566,8 +1573,6 @@ ath_reset(struct ifnet *ifp) if_printf(ifp, "%s: unable to reset hardware; hal status %u\n", __func__, status); sc->sc_diversity = ath_hal_getdiversity(ah); - sc->sc_calinterval = 1; - sc->sc_caltries = 0; if (ath_startrecv(sc) != 0) /* restart recv */ if_printf(ifp, "%s: unable to start recv logic\n", __func__); /* @@ -5493,8 +5498,6 @@ ath_chan_set(struct ath_softc *sc, struc } sc->sc_curchan = hchan; sc->sc_diversity = ath_hal_getdiversity(ah); - sc->sc_calinterval = 1; - sc->sc_caltries = 0; /* * Re-enable rx framework. @@ -5528,54 +5531,76 @@ ath_calibrate(void *arg) { struct ath_softc *sc = arg; struct ath_hal *ah = sc->sc_ah; - HAL_BOOL iqCalDone; - - sc->sc_stats.ast_per_cal++; + struct ifnet *ifp = sc->sc_ifp; + HAL_BOOL longCal, isCalDone; + int nextcal; - if (ath_hal_getrfgain(ah) == HAL_RFGAIN_NEED_CHANGE) { + longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz); + if (longCal) { + sc->sc_stats.ast_per_cal++; + if (ath_hal_getrfgain(ah) == HAL_RFGAIN_NEED_CHANGE) { + /* + * Rfgain is out of bounds, reset the chip + * to load new gain values. + */ + DPRINTF(sc, ATH_DEBUG_CALIBRATE, + "%s: rfgain change\n", __func__); + sc->sc_stats.ast_per_rfgain++; + ath_reset(ifp); + } /* - * Rfgain is out of bounds, reset the chip - * to load new gain values. + * If this long cal is after an idle period, then + * reset the data collection state so we start fresh. */ - DPRINTF(sc, ATH_DEBUG_CALIBRATE, - "%s: rfgain change\n", __func__); - sc->sc_stats.ast_per_rfgain++; - ath_reset(sc->sc_ifp); + if (sc->sc_resetcal) { + (void) ath_hal_calreset(ah, &sc->sc_curchan); + sc->sc_lastcalreset = ticks; + sc->sc_resetcal = 0; + } } - if (!ath_hal_calibrate(ah, &sc->sc_curchan, &iqCalDone)) { + if (ath_hal_calibrateN(ah, &sc->sc_curchan, longCal, &isCalDone)) { + if (longCal) { + /* + * Calibrate noise floor data again in case of change. + */ + ath_hal_process_noisefloor(ah); + } + } else { DPRINTF(sc, ATH_DEBUG_ANY, "%s: calibration of channel %u failed\n", __func__, sc->sc_curchan.channel); sc->sc_stats.ast_per_calfail++; } - /* - * Calibrate noise floor data again in case of change. - */ - ath_hal_process_noisefloor(ah); - /* - * Poll more frequently when the IQ calibration is in - * progress to speedup loading the final settings. - * We temper this aggressive polling with an exponential - * back off after 4 tries up to ath_calinterval. - */ - if (iqCalDone || sc->sc_calinterval >= ath_calinterval) { - sc->sc_caltries = 0; - sc->sc_calinterval = ath_calinterval; - } else if (sc->sc_caltries > 4) { - sc->sc_caltries = 0; - sc->sc_calinterval <<= 1; - if (sc->sc_calinterval > ath_calinterval) - sc->sc_calinterval = ath_calinterval; - } - KASSERT(0 < sc->sc_calinterval && sc->sc_calinterval <= ath_calinterval, - ("bad calibration interval %u", sc->sc_calinterval)); - - DPRINTF(sc, ATH_DEBUG_CALIBRATE, - "%s: next +%u (%siqCalDone tries %u)\n", __func__, - sc->sc_calinterval, iqCalDone ? "" : "!", sc->sc_caltries); - sc->sc_caltries++; - callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz, - ath_calibrate, sc); + if (!isCalDone) { + /* + * Use a shorter interval to potentially collect multiple + * data samples required to complete calibration. Once + * we're told the work is done we drop back to a longer + * interval between requests. We're more aggressive doing + * work when operating as an AP to improve operation right + * after startup. + */ + nextcal = (1000*ath_shortcalinterval)/hz; + if (sc->sc_opmode != HAL_M_HOSTAP) + nextcal *= 10; + } else { + nextcal = ath_longcalinterval*hz; + sc->sc_lastlongcal = ticks; + if (sc->sc_lastcalreset == 0) + sc->sc_lastcalreset = sc->sc_lastlongcal; + else if (ticks - sc->sc_lastcalreset >= ath_resetcalinterval*hz) + sc->sc_resetcal = 1; /* setup reset next trip */ + } + + if (nextcal != 0) { + DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: next +%u (%sisCalDone)\n", + __func__, nextcal, isCalDone ? "" : "!"); + callout_reset(&sc->sc_cal_ch, nextcal, ath_calibrate, sc); + } else { + DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: calibration disabled\n", + __func__); + /* NB: don't rearm timer */ + } } static void @@ -5803,10 +5828,12 @@ ath_newstate(struct ieee80211vap *vap, e * Finally, start any timers and the task q thread * (in case we didn't go through SCAN state). */ - if (sc->sc_calinterval != 0) { + if (ath_longcalinterval != 0) { /* start periodic recalibration timer */ - callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz, - ath_calibrate, sc); + callout_reset(&sc->sc_cal_ch, 1, ath_calibrate, sc); + } else { + DPRINTF(sc, ATH_DEBUG_CALIBRATE, + "%s: calibration disabled\n", __func__); } taskqueue_unblock(sc->sc_tq); } else if (nstate == IEEE80211_S_INIT) { Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Sun Dec 7 19:17:33 2008 (r185743) +++ head/sys/dev/ath/if_athvar.h Sun Dec 7 19:26:34 2008 (r185744) @@ -248,7 +248,8 @@ struct ath_softc { sc_swbmiss : 1,/* sta mode using sw bmiss */ sc_stagbeacons:1,/* use staggered beacons */ sc_wmetkipmic:1,/* can do WME+TKIP MIC */ - sc_resume_up: 1;/* on resume, start all vaps */ + sc_resume_up: 1,/* on resume, start all vaps */ + sc_resetcal : 1;/* reset cal state next trip */ uint32_t sc_eerd; /* regdomain from EEPROM */ uint32_t sc_eecc; /* country code from EEPROM */ /* rate tables */ @@ -334,8 +335,8 @@ struct ath_softc { int sc_nbcnvaps; /* # vaps with beacons */ struct callout sc_cal_ch; /* callout handle for cals */ - int sc_calinterval; /* current polling interval */ - int sc_caltries; /* cals at current interval */ + int sc_lastlongcal; /* last long cal completed */ + int sc_lastcalreset;/* last cal reset done */ HAL_NODE_STATS sc_halstats; /* station-mode rssi stats */ }; @@ -438,6 +439,16 @@ void ath_intr(void *); ((*(_ah)->ah_setChannel)((_ah), (_chan))) #define ath_hal_calibrate(_ah, _chan, _iqcal) \ ((*(_ah)->ah_perCalibration)((_ah), (_chan), (_iqcal))) +#if HAL_ABI_VERSION >= 0x08111000 +#define ath_hal_calibrateN(_ah, _chan, _lcal, _isdone) \ + ((*(_ah)->ah_perCalibrationN)((_ah), (_chan), 0x1, (_lcal), (_isdone))) +#define ath_hal_calreset(_ah, _chan) \ + ((*(_ah)->ah_resetCalValid)((_ah), (_chan))) +#else +#define ath_hal_calibrateN(_ah, _chan, _lcal, _isdone) \ + ath_hal_calibrate(_ah, _chan, _isdone) +#define ath_hal_calreset(_ah, _chan) (0) +#endif #define ath_hal_setledstate(_ah, _state) \ ((*(_ah)->ah_setLedState)((_ah), (_state))) #define ath_hal_beaconinit(_ah, _nextb, _bperiod) \ From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 19:29:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F2C106564A; Sun, 7 Dec 2008 19:29:12 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 649988FC16; Sun, 7 Dec 2008 19:29:12 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7JTCMe033856; Sun, 7 Dec 2008 19:29:12 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7JTCjB033855; Sun, 7 Dec 2008 19:29:12 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812071929.mB7JTCjB033855@svn.freebsd.org> From: Sam Leffler Date: Sun, 7 Dec 2008 19:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185745 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 19:29:12 -0000 Author: sam Date: Sun Dec 7 19:29:11 2008 New Revision: 185745 URL: http://svn.freebsd.org/changeset/base/185745 Log: honor IEEE80211_BPF_CRYPTO for raw xmit; fixes shared key auth in sta mode PR: kern/129022 Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sun Dec 7 19:26:34 2008 (r185744) +++ head/sys/dev/ath/if_ath.c Sun Dec 7 19:29:11 2008 (r185745) @@ -6912,7 +6912,7 @@ ath_tx_raw_start(struct ath_softc *sc, s struct ieee80211com *ic = ifp->if_l2com; struct ath_hal *ah = sc->sc_ah; int error, ismcast, ismrr; - int hdrlen, pktlen, try0, txantenna; + int keyix, hdrlen, pktlen, try0, txantenna; u_int8_t rix, cix, txrate, ctsrate, rate1, rate2, rate3; struct ieee80211_frame *wh; u_int flags, ctsduration; @@ -6931,6 +6931,54 @@ ath_tx_raw_start(struct ath_softc *sc, s /* XXX honor IEEE80211_BPF_DATAPAD */ pktlen = m0->m_pkthdr.len - (hdrlen & 3) + IEEE80211_CRC_LEN; + if (params->ibp_flags & IEEE80211_BPF_CRYPTO) { + const struct ieee80211_cipher *cip; + struct ieee80211_key *k; + + /* + * Construct the 802.11 header+trailer for an encrypted + * frame. The only reason this can fail is because of an + * unknown or unsupported cipher/key type. + */ + k = ieee80211_crypto_encap(ni, m0); + if (k == NULL) { + /* + * This can happen when the key is yanked after the + * frame was queued. Just discard the frame; the + * 802.11 layer counts failures and provides + * debugging/diagnostics. + */ + ath_freetx(m0); + return EIO; + } + /* + * Adjust the packet + header lengths for the crypto + * additions and calculate the h/w key index. When + * a s/w mic is done the frame will have had any mic + * added to it prior to entry so m0->m_pkthdr.len will + * account for it. Otherwise we need to add it to the + * packet length. + */ + cip = k->wk_cipher; + hdrlen += cip->ic_header; + pktlen += cip->ic_header + cip->ic_trailer; + /* NB: frags always have any TKIP MIC done in s/w */ + if ((k->wk_flags & IEEE80211_KEY_SWMIC) == 0) + pktlen += cip->ic_miclen; + keyix = k->wk_keyix; + + /* packet header may have moved, reset our local pointer */ + wh = mtod(m0, struct ieee80211_frame *); + } else if (ni->ni_ucastkey.wk_cipher == &ieee80211_cipher_none) { + /* + * Use station key cache slot, if assigned. + */ + keyix = ni->ni_ucastkey.wk_keyix; + if (keyix == IEEE80211_KEYIX_NONE) + keyix = HAL_TXKEYIX_INVALID; + } else + keyix = HAL_TXKEYIX_INVALID; + error = ath_tx_dmasetup(sc, bf, m0); if (error != 0) return error; @@ -7019,7 +7067,7 @@ ath_tx_raw_start(struct ath_softc *sc, s , atype /* Atheros packet type */ , params->ibp_power /* txpower */ , txrate, try0 /* series 0 rate/tries */ - , HAL_TXKEYIX_INVALID /* key cache index */ + , keyix /* key cache index */ , txantenna /* antenna mode */ , flags /* flags */ , ctsrate /* rts/cts rate */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 19:42:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E2ED1065670; Sun, 7 Dec 2008 19:42:20 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B89A8FC22; Sun, 7 Dec 2008 19:42:20 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7JgK3w034138; Sun, 7 Dec 2008 19:42:20 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7JgK94034137; Sun, 7 Dec 2008 19:42:20 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200812071942.mB7JgK94034137@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 7 Dec 2008 19:42:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185746 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 19:42:20 -0000 Author: luigi Date: Sun Dec 7 19:42:20 2008 New Revision: 185746 URL: http://svn.freebsd.org/changeset/base/185746 Log: PROBLEM: putting in a loader config file a line of the form loader_conf_files="foo bar baz" should cause loading the files listed, and then resume with the remaining config files (from previous values of the variable). Unfortunately, sometimes the line was ignored -- actually even modifying the line in /boot/default/loader.conf sometimes doesn't work. ANALYSIS: After much investigation, turned out to be a bug in the logic. The existing code detected a new assignment by looking at the address of the the variable containing the string. This only worked by pure chance, i.e. if the new string is longer than the previous value then the memory allocator may return a different address to store the string hence triggering the detection. SOLUTION: This commit contains a minimal change to fix the problem, without altering too much the existing structure of the code. However, as a step towards improving the quality and reliability of this code, I have introduced a handful of one-line functions (strget, strset, strfree, string= ) that could be used in dozens of places in the existing code. HOWEVER: There is a much bigger problem here. Even though I am no Forth expert (as most fellow src committers) I can tell that much of the forth code (in support.4th at least) is in severe need of a review/refactoring: + pieces of code are replicated multiple times instead of writing functions (see e.g. set_module_*); + a lot of stale code (e.g. "structure" definitions for preloaded_files, kernel_module, pnp stuff) which is not used or at least belongs elsewhere. The code bload is extremely bad as the loader runs with very small memory constraints, and we already hit the limit once (see http://svn.freebsd.org/viewvc/base?view=revision&revision=185132 Reducing the footprint of the forth files is critical. + two different styles of coding, one using pure stack functions (maybe beautiful but surely highly unreadable), one using high level mechanisms to give names to arguments and local variables (which leads to readable code). Note that this code is used by default by all FreeBSD installations, so the fragility and the code bloat are extremely damaging. I will try to work fixing the three items above, but if others have time, please have a look at these issues. MFC after: 4 weeks Modified: head/sys/boot/forth/support.4th Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Sun Dec 7 19:29:11 2008 (r185745) +++ head/sys/boot/forth/support.4th Sun Dec 7 19:42:20 2008 (r185746) @@ -288,6 +288,17 @@ only forth also support-functions defini : free-memory free if free_error throw then ; +: strget { var -- addr len } var .addr @ var .len @ ; + +\ assign addr len to variable. +: strset { addr len var -- } addr var .addr ! len var .len ! ; + +\ free memory and reset fields +: strfree { var -- } var .addr @ ?dup if free-memory 0 0 var strset then ; + +\ free old content, make a copy of the string and assign to variable +: string= { addr len var -- } var strfree addr len strdup var strset ; + \ Assignment data temporary storage string name_buffer @@ -712,19 +723,6 @@ only forth also support-functions also f module_loaderror_suffix suffix_type? ; -: set_conf_files - conf_files .addr @ ?dup if - free-memory - then - value_buffer .addr @ c@ [char] " = if - value_buffer .addr @ char+ value_buffer .len @ 2 chars - - else - value_buffer .addr @ value_buffer .len @ - then - strdup - conf_files .len ! conf_files .addr ! -; - : set_nextboot_conf nextboot_conf_file .addr @ ?dup if free-memory @@ -888,6 +886,11 @@ only forth also support-functions also f then ; +: set_conf_files + set_environment_variable + s" loader_conf_files" getenv conf_files string= +; + : set_nextboot_flag yes_value? to nextboot? ; @@ -1045,7 +1048,6 @@ only forth also support-functions defini \ Variables used for processing multiple conf files string current_file_name -variable current_conf_files \ Indicates if any conf file was succesfully read @@ -1053,16 +1055,8 @@ variable current_conf_files \ loader_conf_files processing support functions -: set_current_conf_files - conf_files .addr @ current_conf_files ! -; - -: get_conf_files - conf_files .addr @ conf_files .len @ strdup -; - -: recurse_on_conf_files? - current_conf_files @ conf_files .addr @ <> +: get_conf_files ( -- addr len ) \ put addr/len on stack, reset var + conf_files strget 0 0 conf_files strset ; : skip_leading_spaces { addr len pos -- addr len pos' } @@ -1133,7 +1127,6 @@ variable current_conf_files \ Interface to loader_conf_files processing : include_conf_files - set_current_conf_files get_conf_files 0 begin get_next_file ?dup @@ -1141,7 +1134,7 @@ variable current_conf_files set_current_file_name ['] load_conf catch process_conf_errors - recurse_on_conf_files? if recurse then + conf_files .addr @ if recurse then repeat ; From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 21:15:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC5A1065678; Sun, 7 Dec 2008 21:15:44 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 09E478FC1F; Sun, 7 Dec 2008 21:15:44 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7LFhoe036519; Sun, 7 Dec 2008 21:15:43 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7LFhD1036508; Sun, 7 Dec 2008 21:15:43 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812072115.mB7LFhD1036508@svn.freebsd.org> From: Kip Macy Date: Sun, 7 Dec 2008 21:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185747 - in head/sys: contrib/pf/net kern net netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 21:15:44 -0000 Author: kmacy Date: Sun Dec 7 21:15:43 2008 New Revision: 185747 URL: http://svn.freebsd.org/changeset/base/185747 Log: - convert radix node head lock from mutex to rwlock - make radix node head lock not recursive - fix LOR in rtexpunge - fix LOR in rtredirect Reviewed by: sam Modified: head/sys/contrib/pf/net/pf_table.c head/sys/kern/subr_witness.c head/sys/kern/vfs_export.c head/sys/net/radix.c head/sys/net/radix.h head/sys/net/route.c head/sys/net/route.h head/sys/net/rtsock.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/contrib/pf/net/pf_table.c ============================================================================== --- head/sys/contrib/pf/net/pf_table.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/contrib/pf/net/pf_table.c Sun Dec 7 21:15:43 2008 (r185747) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #ifdef __FreeBSD__ #include #endif Modified: head/sys/kern/subr_witness.c ============================================================================== --- head/sys/kern/subr_witness.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/kern/subr_witness.c Sun Dec 7 21:15:43 2008 (r185747) @@ -505,7 +505,7 @@ static struct witness_order_list_entry o * Routing */ { "so_rcv", &lock_class_mtx_sleep }, - { "radix node head", &lock_class_mtx_sleep }, + { "radix node head", &lock_class_rw }, { "rtentry", &lock_class_mtx_sleep }, { "ifaddr", &lock_class_mtx_sleep }, { NULL, NULL }, Modified: head/sys/kern/vfs_export.c ============================================================================== --- head/sys/kern/vfs_export.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/kern/vfs_export.c Sun Dec 7 21:15:43 2008 (r185747) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -425,10 +426,10 @@ vfs_export_lookup(struct mount *mp, stru saddr = nam; rnh = nep->ne_rtable[saddr->sa_family]; if (rnh != NULL) { - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); np = (struct netcred *) (*rnh->rnh_matchaddr)(saddr, rnh); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); if (np && np->netc_rnodes->rn_flags & RNF_ROOT) np = NULL; } Modified: head/sys/net/radix.c ============================================================================== --- head/sys/net/radix.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/net/radix.c Sun Dec 7 21:15:43 2008 (r185747) @@ -38,6 +38,7 @@ #ifdef _KERNEL #include #include +#include #include #include #include Modified: head/sys/net/radix.h ============================================================================== --- head/sys/net/radix.h Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/net/radix.h Sun Dec 7 21:15:43 2008 (r185747) @@ -36,6 +36,7 @@ #ifdef _KERNEL #include #include +#include #endif #ifdef MALLOC_DECLARE @@ -132,7 +133,7 @@ struct radix_node_head { struct radix_node rnh_nodes[3]; /* empty tree for common case */ int rnh_multipath; /* multipath capable ? */ #ifdef _KERNEL - struct mtx rnh_mtx; /* locks entire radix tree */ + struct rwlock rnh_lock; /* locks entire radix tree */ #endif }; @@ -146,11 +147,17 @@ struct radix_node_head { #define Free(p) free((caddr_t)p, M_RTABLE); #define RADIX_NODE_HEAD_LOCK_INIT(rnh) \ - mtx_init(&(rnh)->rnh_mtx, "radix node head", NULL, MTX_DEF | MTX_RECURSE) -#define RADIX_NODE_HEAD_LOCK(rnh) mtx_lock(&(rnh)->rnh_mtx) -#define RADIX_NODE_HEAD_UNLOCK(rnh) mtx_unlock(&(rnh)->rnh_mtx) -#define RADIX_NODE_HEAD_DESTROY(rnh) mtx_destroy(&(rnh)->rnh_mtx) -#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) mtx_assert(&(rnh)->rnh_mtx, MA_OWNED) + rw_init_flags(&(rnh)->rnh_lock, "radix node head", 0) +#define RADIX_NODE_HEAD_LOCK(rnh) rw_wlock(&(rnh)->rnh_lock) +#define RADIX_NODE_HEAD_UNLOCK(rnh) rw_wunlock(&(rnh)->rnh_lock) +#define RADIX_NODE_HEAD_RLOCK(rnh) rw_rlock(&(rnh)->rnh_lock) +#define RADIX_NODE_HEAD_RUNLOCK(rnh) rw_runlock(&(rnh)->rnh_lock) +#define RADIX_NODE_HEAD_LOCK_TRY_UPGRADE(rnh) rw_try_upgrade(&(rnh)->rnh_lock) + + +#define RADIX_NODE_HEAD_DESTROY(rnh) rw_destroy(&(rnh)->rnh_lock) +#define RADIX_NODE_HEAD_LOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_LOCKED) +#define RADIX_NODE_HEAD_WLOCK_ASSERT(rnh) rw_assert(&(rnh)->rnh_lock, RA_WLOCKED) #endif /* _KERNEL */ void rn_init(void); Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/net/route.c Sun Dec 7 21:15:43 2008 (r185747) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -269,7 +270,8 @@ rtalloc1_fib(struct sockaddr *dst, int r struct rtentry *newrt; struct rt_addrinfo info; u_long nflags; - int err = 0, msgtype = RTM_MISS; + int needresolve = 0, err = 0, msgtype = RTM_MISS; + int needlock; KASSERT((fibnum < rt_numfibs), ("rtalloc1_fib: bad fibnum")); if (dst->sa_family != AF_INET) /* Only INET supports > 1 fib now */ @@ -283,59 +285,92 @@ rtalloc1_fib(struct sockaddr *dst, int r V_rtstat.rts_unreach++; goto miss2; } - RADIX_NODE_HEAD_LOCK(rnh); - if ((rn = rnh->rnh_matchaddr(dst, rnh)) && - (rn->rn_flags & RNF_ROOT) == 0) { - /* - * If we find it and it's not the root node, then - * get a reference on the rtentry associated. - */ + needlock = !(ignflags & RTF_RNH_LOCKED); +retry: + if (needlock) + RADIX_NODE_HEAD_RLOCK(rnh); +#ifdef INVARIANTS + else + RADIX_NODE_HEAD_LOCK_ASSERT(rnh); +#endif + rn = rnh->rnh_matchaddr(dst, rnh); + if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { + newrt = rt = RNTORT(rn); nflags = rt->rt_flags & ~ignflags; if (report && (nflags & RTF_CLONING)) { - /* - * We are apparently adding (report = 0 in delete). - * If it requires that it be cloned, do so. - * (This implies it wasn't a HOST route.) - */ - err = rtrequest_fib(RTM_RESOLVE, dst, NULL, - NULL, 0, &newrt, fibnum); - if (err) { + if (needlock && !RADIX_NODE_HEAD_LOCK_TRY_UPGRADE(rnh)) { + RADIX_NODE_HEAD_RUNLOCK(rnh); + RADIX_NODE_HEAD_LOCK(rnh); /* - * If the cloning didn't succeed, maybe - * what we have will do. Return that. + * lookup again to make sure it wasn't changed */ - newrt = rt; /* existing route */ - RT_LOCK(newrt); - RT_ADDREF(newrt); - goto miss; - } - KASSERT(newrt, ("no route and no error")); - RT_LOCK(newrt); - if (newrt->rt_flags & RTF_XRESOLVE) { - /* - * If the new route specifies it be - * externally resolved, then go do that. - */ - msgtype = RTM_RESOLVE; - goto miss; - } - /* Inform listeners of the new route. */ - bzero(&info, sizeof(info)); - info.rti_info[RTAX_DST] = rt_key(newrt); - info.rti_info[RTAX_NETMASK] = rt_mask(newrt); - info.rti_info[RTAX_GATEWAY] = newrt->rt_gateway; - if (newrt->rt_ifp != NULL) { - info.rti_info[RTAX_IFP] = - newrt->rt_ifp->if_addr->ifa_addr; - info.rti_info[RTAX_IFA] = newrt->rt_ifa->ifa_addr; + rn = rnh->rnh_matchaddr(dst, rnh); + if (!(rn && ((rn->rn_flags & RNF_ROOT) == 0))) { + RADIX_NODE_HEAD_UNLOCK(rnh); + needresolve = 0; + log(LOG_INFO, "retrying route lookup ...\n"); + goto retry; + } } - rt_missmsg(RTM_ADD, &info, newrt->rt_flags, 0); + needresolve = 1; } else { RT_LOCK(newrt); RT_ADDREF(newrt); + if (needlock) + RADIX_NODE_HEAD_RUNLOCK(rnh); + goto done; } - RADIX_NODE_HEAD_UNLOCK(rnh); + } + /* + * if needresolve is set then we have the exclusive lock + * and we need to keep it held for the benefit of rtrequest_fib + */ + if (!needresolve && needlock) + RADIX_NODE_HEAD_RUNLOCK(rnh); + + if (needresolve) { + RADIX_NODE_HEAD_WLOCK_ASSERT(rnh); + /* + * We are apparently adding (report = 0 in delete). + * If it requires that it be cloned, do so. + * (This implies it wasn't a HOST route.) + */ + err = rtrequest_fib(RTM_RESOLVE, dst, NULL, + NULL, RTF_RNH_LOCKED, &newrt, fibnum); + if (err) { + /* + * If the cloning didn't succeed, maybe + * what we have will do. Return that. + */ + newrt = rt; /* existing route */ + RT_LOCK(newrt); + RT_ADDREF(newrt); + goto miss; + } + KASSERT(newrt, ("no route and no error")); + RT_LOCK(newrt); + if (newrt->rt_flags & RTF_XRESOLVE) { + /* + * If the new route specifies it be + * externally resolved, then go do that. + */ + msgtype = RTM_RESOLVE; + goto miss; + } + /* Inform listeners of the new route. */ + bzero(&info, sizeof(info)); + info.rti_info[RTAX_DST] = rt_key(newrt); + info.rti_info[RTAX_NETMASK] = rt_mask(newrt); + info.rti_info[RTAX_GATEWAY] = newrt->rt_gateway; + if (newrt->rt_ifp != NULL) { + info.rti_info[RTAX_IFP] = + newrt->rt_ifp->if_addr->ifa_addr; + info.rti_info[RTAX_IFA] = newrt->rt_ifa->ifa_addr; + } + rt_missmsg(RTM_ADD, &info, newrt->rt_flags, 0); + if (needlock) + RADIX_NODE_HEAD_UNLOCK(rnh); } else { /* * Either we hit the root or couldn't find any match, @@ -344,7 +379,8 @@ rtalloc1_fib(struct sockaddr *dst, int r */ V_rtstat.rts_unreach++; miss: - RADIX_NODE_HEAD_UNLOCK(rnh); + if (needlock && needresolve) + RADIX_NODE_HEAD_UNLOCK(rnh); miss2: if (report) { /* * If required, report the failure to the supervising @@ -356,6 +392,7 @@ rtalloc1_fib(struct sockaddr *dst, int r rt_missmsg(msgtype, &info, 0, err); } } +done: if (newrt) RT_LOCK_ASSERT(newrt); return (newrt); @@ -475,6 +512,8 @@ rtredirect_fib(struct sockaddr *dst, short *stat = NULL; struct rt_addrinfo info; struct ifaddr *ifa; + struct radix_node_head *rnh = + V_rt_tables[rt->rt_fibnum][dst->sa_family]; /* verify the gateway is directly reachable */ if ((ifa = ifa_ifwithnet(gateway)) == NULL) { @@ -524,14 +563,17 @@ rtredirect_fib(struct sockaddr *dst, info.rti_info[RTAX_NETMASK] = netmask; info.rti_ifa = ifa; info.rti_flags = flags; + if (rt0 != NULL) + RT_UNLOCK(rt0); /* drop lock to avoid LOR with RNH */ error = rtrequest1_fib(RTM_ADD, &info, &rt, fibnum); if (rt != NULL) { RT_LOCK(rt); - EVENTHANDLER_INVOKE(route_redirect_event, rt0, rt, dst); + if (rt0 != NULL) + EVENTHANDLER_INVOKE(route_redirect_event, rt0, rt, dst); flags = rt->rt_flags; } - if (rt0) - RTFREE_LOCKED(rt0); + if (rt0 != NULL) + RTFREE(rt0); stat = &V_rtstat.rts_dynamic; } else { @@ -547,8 +589,12 @@ rtredirect_fib(struct sockaddr *dst, /* * add the key and gateway (in one malloc'd chunk). */ + RT_UNLOCK(rt); + RADIX_NODE_HEAD_LOCK(rnh); + RT_LOCK(rt); rt_setgate(rt, rt_key(rt), gateway); - gwrt = rtalloc1(gateway, 1, 0); + gwrt = rtalloc1(gateway, 1, RTF_RNH_LOCKED); + RADIX_NODE_HEAD_UNLOCK(rnh); EVENTHANDLER_INVOKE(route_redirect_event, rt, gwrt, dst); RTFREE_LOCKED(gwrt); } @@ -782,7 +828,9 @@ rtexpunge(struct rtentry *rt) struct ifaddr *ifa; int error = 0; + rnh = V_rt_tables[rt->rt_fibnum][rt_key(rt)->sa_family]; RT_LOCK_ASSERT(rt); + RADIX_NODE_HEAD_LOCK_ASSERT(rnh); #if 0 /* * We cannot assume anything about the reference count @@ -798,8 +846,6 @@ rtexpunge(struct rtentry *rt) if (rnh == NULL) return (EAFNOSUPPORT); - RADIX_NODE_HEAD_LOCK(rnh); - /* * Remove the item from the tree; it should be there, * but when callers invoke us blindly it may not (sigh). @@ -854,7 +900,6 @@ rtexpunge(struct rtentry *rt) */ V_rttrash++; bad: - RADIX_NODE_HEAD_UNLOCK(rnh); return (error); } @@ -869,7 +914,7 @@ rtrequest1_fib(int req, struct rt_addrin u_int fibnum) { INIT_VNET_NET(curvnet); - int error = 0; + int error = 0, needlock = 0; register struct rtentry *rt; register struct radix_node *rn; register struct radix_node_head *rnh; @@ -886,7 +931,10 @@ rtrequest1_fib(int req, struct rt_addrin rnh = V_rt_tables[fibnum][dst->sa_family]; if (rnh == NULL) return (EAFNOSUPPORT); - RADIX_NODE_HEAD_LOCK(rnh); + needlock = ((flags & RTF_RNH_LOCKED) == 0); + flags &= ~RTF_RNH_LOCKED; + if (needlock) + RADIX_NODE_HEAD_LOCK(rnh); /* * If we are adding a host route then we don't want to put * a netmask in the tree, nor do we want to clone it. @@ -1200,7 +1248,8 @@ deldone: error = EOPNOTSUPP; } bad: - RADIX_NODE_HEAD_UNLOCK(rnh); + if (needlock) + RADIX_NODE_HEAD_UNLOCK(rnh); return (error); #undef senderr } @@ -1307,7 +1356,8 @@ rt_setgate(struct rtentry *rt, struct so again: RT_LOCK_ASSERT(rt); - + RADIX_NODE_HEAD_LOCK_ASSERT(rnh); + /* * A host route with the destination equal to the gateway * will interfere with keeping LLINFO in the routing @@ -1333,7 +1383,7 @@ again: struct rtentry *gwrt; RT_UNLOCK(rt); /* XXX workaround LOR */ - gwrt = rtalloc1_fib(gate, 1, 0, rt->rt_fibnum); + gwrt = rtalloc1_fib(gate, 1, RTF_RNH_LOCKED, rt->rt_fibnum); if (gwrt == rt) { RT_REMREF(rt); return (EADDRINUSE); /* failure */ @@ -1404,12 +1454,8 @@ again: arg.rnh = rnh; arg.rt0 = rt; - RT_UNLOCK(rt); /* XXX workaround LOR */ - RADIX_NODE_HEAD_LOCK(rnh); - RT_LOCK(rt); rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt), rt_fixchange, &arg); - RADIX_NODE_HEAD_UNLOCK(rnh); } return 0; Modified: head/sys/net/route.h ============================================================================== --- head/sys/net/route.h Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/net/route.h Sun Dec 7 21:15:43 2008 (r185747) @@ -196,6 +196,7 @@ struct ortentry { #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ #define RTF_MULTICAST 0x800000 /* route represents a mcast address */ /* 0x1000000 and up unassigned */ +#define RTF_RNH_LOCKED 0x40000000 /* radix node head locked by caller */ /* Mask of RTF flags that are allowed to be modified by RTM_CHANGE. */ #define RTF_FMASK \ Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/net/rtsock.c Sun Dec 7 21:15:43 2008 (r185747) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -554,11 +555,11 @@ route_output(struct mbuf *m, struct sock rnh = V_rt_tables[so->so_fibnum][info.rti_info[RTAX_DST]->sa_family]; if (rnh == NULL) senderr(EAFNOSUPPORT); - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); rt = (struct rtentry *) rnh->rnh_lookup(info.rti_info[RTAX_DST], info.rti_info[RTAX_NETMASK], rnh); if (rt == NULL) { /* XXX looks bogus */ - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); senderr(ESRCH); } #ifdef RADIX_MPATH @@ -574,14 +575,14 @@ route_output(struct mbuf *m, struct sock (rtm->rtm_type != RTM_GET || info.rti_info[RTAX_GATEWAY])) { rt = rt_mpath_matchgate(rt, info.rti_info[RTAX_GATEWAY]); if (!rt) { - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); senderr(ESRCH); } } #endif RT_LOCK(rt); RT_ADDREF(rt); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); /* * Fix for PR: 82974 Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/netinet6/in6_rmx.c Sun Dec 7 21:15:43 2008 (r185747) @@ -83,6 +83,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Sun Dec 7 19:42:20 2008 (r185746) +++ head/sys/netinet6/nd6_rtr.c Sun Dec 7 21:15:43 2008 (r185747) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 21:32:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDED1065676; Sun, 7 Dec 2008 21:32:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1DF78FC08; Sun, 7 Dec 2008 21:32:56 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7LWuJY036874; Sun, 7 Dec 2008 21:32:56 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7LWuIT036873; Sun, 7 Dec 2008 21:32:56 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812072132.mB7LWuIT036873@svn.freebsd.org> From: Andrew Thompson Date: Sun, 7 Dec 2008 21:32:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185748 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 21:32:57 -0000 Author: thompsa Date: Sun Dec 7 21:32:56 2008 New Revision: 185748 URL: http://svn.freebsd.org/changeset/base/185748 Log: Restore opt_inet.h include which was lost in the last commit. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Sun Dec 7 21:15:43 2008 (r185747) +++ head/sys/dev/e1000/if_em.c Sun Dec 7 21:32:56 2008 (r185748) @@ -34,6 +34,7 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" +#include "opt_inet.h" #endif #include From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 22:49:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71EDF1065670; Sun, 7 Dec 2008 22:49:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 607698FC18; Sun, 7 Dec 2008 22:49:48 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7Mnm12038342; Sun, 7 Dec 2008 22:49:48 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7MnmdA038341; Sun, 7 Dec 2008 22:49:48 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812072249.mB7MnmdA038341@svn.freebsd.org> From: Warner Losh Date: Sun, 7 Dec 2008 22:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185749 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 22:49:48 -0000 Author: imp Date: Sun Dec 7 22:49:47 2008 New Revision: 185749 URL: http://svn.freebsd.org/changeset/base/185749 Log: Minor tweaks to some of the comments. Also, add a XXX wondering if we need to frob the 16-bit EXCA registers during the new interrupt-driven power-up sequence. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Sun Dec 7 21:32:56 2008 (r185748) +++ head/sys/dev/pccbb/pccbb.c Sun Dec 7 22:49:47 2008 (r185749) @@ -765,15 +765,17 @@ cbb_power(device_t brdev, int volts) reg = cbb_o2micro_power_hack(sc); /* - * We have to mask the card change detect interrupt while - * we're messing with the power. It is allowed to bounce - * while we're messing with power as things settle down. In - * addition, we mask off the card's function interrupt by - * routing it via the ISA bus. This bit generally only - * affects 16-bit cards. Some bridges allow one to set - * another bit to have it also affect 32-bit cards. Since - * 32-bit cards are required to be better behaved, we don't - * bother to get into those bridge specific features. + * We have to mask the card change detect interrupt while we're + * messing with the power. It is allowed to bounce while we're + * messing with power as things settle down. In addition, we mask off + * the card's function interrupt by routing it via the ISA bus. This + * bit generally only affects 16-bit cards. Some bridges allow one to + * set another bit to have it also affect 32-bit cards. Since 32-bit + * cards are required to be better behaved, we don't bother to get + * into those bridge specific features. + * + * XXX I wonder if we need to enable the READY bit interrupt in the + * EXCA CSC register for 16-bit cards, and disable the CD bit? */ mask = cbb_get(sc, CBB_SOCKET_MASK); mask |= CBB_SOCKET_MASK_POWER; @@ -786,11 +788,10 @@ cbb_power(device_t brdev, int volts) mtx_lock(&sc->mtx); cnt = sc->powerintr; /* - * We have a shortish timeout of 500ms here. Some - * bridges do not generate a POWER_CYCLE event for - * 16-bit cards. In those cases, we have to cope the - * best we can, and having only a short delay is - * better than the alternatives. + * We have a shortish timeout of 500ms here. Some bridges do + * not generate a POWER_CYCLE event for 16-bit cards. In + * those cases, we have to cope the best we can, and having + * only a short delay is better than the alternatives. */ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && @@ -798,9 +799,9 @@ cbb_power(device_t brdev, int volts) msleep(&sc->powerintr, &sc->mtx, 0, "-", hz / 20); mtx_unlock(&sc->mtx); /* - * The TOPIC95B requires a little bit extra time to get - * its act together, so delay for an additional 100ms. Also - * as documented below, it doesn't seem to set the POWER_CYCLE + * The TOPIC95B requires a little bit extra time to get its + * act together, so delay for an additional 100ms. Also as + * documented below, it doesn't seem to set the POWER_CYCLE * bit, so don't whine if it never came on. */ if (sc->chipset == CB_TOPIC95) { From owner-svn-src-all@FreeBSD.ORG Sun Dec 7 23:02:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 372B41065676; Sun, 7 Dec 2008 23:02:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2522B8FC21; Sun, 7 Dec 2008 23:02:38 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB7N2c5t038635; Sun, 7 Dec 2008 23:02:38 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB7N2bkp038633; Sun, 7 Dec 2008 23:02:37 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200812072302.mB7N2bkp038633@svn.freebsd.org> From: Marius Strobl Date: Sun, 7 Dec 2008 23:02:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185750 - head/sys/dev/dc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2008 23:02:38 -0000 Author: marius Date: Sun Dec 7 23:02:37 2008 New Revision: 185750 URL: http://svn.freebsd.org/changeset/base/185750 Log: - According to the corresponding Linux, NetBSD and OpenSolaris drivers, there should be a 1us delay after every write when bit-banging the MII. Also insert barriers in order to ensure the intended ordering. These changes hopefully will solve the bus wedging occasionally experienced with DM9102A since r182461. - Deobfuscate dc_mii_readreg() a bit. Modified: head/sys/dev/dc/if_dc.c head/sys/dev/dc/if_dcreg.h Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Sun Dec 7 22:49:47 2008 (r185749) +++ head/sys/dev/dc/if_dc.c Sun Dec 7 23:02:37 2008 (r185750) @@ -607,15 +607,22 @@ dc_read_eeprom(struct dc_softc *sc, cadd static void dc_mii_writebit(struct dc_softc *sc, int bit) { + uint32_t reg; - if (bit) - CSR_WRITE_4(sc, DC_SIO, - DC_SIO_ROMCTL_WRITE | DC_SIO_MII_DATAOUT); - else - CSR_WRITE_4(sc, DC_SIO, DC_SIO_ROMCTL_WRITE); - - DC_SETBIT(sc, DC_SIO, DC_SIO_MII_CLK); - DC_CLRBIT(sc, DC_SIO, DC_SIO_MII_CLK); + reg = DC_SIO_ROMCTL_WRITE | (bit != 0 ? DC_SIO_MII_DATAOUT : 0); + CSR_WRITE_4(sc, DC_SIO, reg); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); + + CSR_WRITE_4(sc, DC_SIO, reg | DC_SIO_MII_CLK); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); + CSR_WRITE_4(sc, DC_SIO, reg); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); } /* @@ -624,11 +631,22 @@ dc_mii_writebit(struct dc_softc *sc, int static int dc_mii_readbit(struct dc_softc *sc) { + uint32_t reg; - CSR_WRITE_4(sc, DC_SIO, DC_SIO_ROMCTL_READ | DC_SIO_MII_DIR); - CSR_READ_4(sc, DC_SIO); - DC_SETBIT(sc, DC_SIO, DC_SIO_MII_CLK); - DC_CLRBIT(sc, DC_SIO, DC_SIO_MII_CLK); + reg = DC_SIO_ROMCTL_READ | DC_SIO_MII_DIR; + CSR_WRITE_4(sc, DC_SIO, reg); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); + (void)CSR_READ_4(sc, DC_SIO); + CSR_WRITE_4(sc, DC_SIO, reg | DC_SIO_MII_CLK); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); + CSR_WRITE_4(sc, DC_SIO, reg); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); if (CSR_READ_4(sc, DC_SIO) & DC_SIO_MII_DATAIN) return (1); @@ -644,6 +662,9 @@ dc_mii_sync(struct dc_softc *sc) int i; CSR_WRITE_4(sc, DC_SIO, DC_SIO_ROMCTL_WRITE); + CSR_BARRIER_4(sc, DC_SIO, + BUS_SPACE_BARRIER_READ | BUS_SPACE_BARRIER_WRITE); + DELAY(1); for (i = 0; i < 32; i++) dc_mii_writebit(sc, 1); @@ -667,15 +688,13 @@ dc_mii_send(struct dc_softc *sc, u_int32 static int dc_mii_readreg(struct dc_softc *sc, struct dc_mii_frame *frame) { - int i, ack; + int i; /* * Set up frame for RX. */ frame->mii_stdelim = DC_MII_STARTDELIM; frame->mii_opcode = DC_MII_READOP; - frame->mii_turnaround = 0; - frame->mii_data = 0; /* * Sync the PHYs. @@ -690,38 +709,28 @@ dc_mii_readreg(struct dc_softc *sc, stru dc_mii_send(sc, frame->mii_phyaddr, 5); dc_mii_send(sc, frame->mii_regaddr, 5); -#ifdef notdef - /* Idle bit */ - dc_mii_writebit(sc, 1); - dc_mii_writebit(sc, 0); -#endif - - /* Check for ack. */ - ack = dc_mii_readbit(sc); - /* - * Now try reading data bits. If the ack failed, we still + * Now try reading data bits. If the turnaround failed, we still * need to clock through 16 cycles to keep the PHY(s) in sync. */ - if (ack) { + frame->mii_turnaround = dc_mii_readbit(sc); + if (frame->mii_turnaround != 0) { for (i = 0; i < 16; i++) dc_mii_readbit(sc); goto fail; } - for (i = 0x8000; i; i >>= 1) { - if (!ack) { - if (dc_mii_readbit(sc)) - frame->mii_data |= i; - } + if (dc_mii_readbit(sc)) + frame->mii_data |= i; } fail: + /* Clock the idle bits. */ dc_mii_writebit(sc, 0); dc_mii_writebit(sc, 0); - if (ack) + if (frame->mii_turnaround != 0) return (1); return (0); } @@ -736,7 +745,6 @@ dc_mii_writereg(struct dc_softc *sc, str /* * Set up frame for TX. */ - frame->mii_stdelim = DC_MII_STARTDELIM; frame->mii_opcode = DC_MII_WRITEOP; frame->mii_turnaround = DC_MII_TURNAROUND; @@ -753,7 +761,7 @@ dc_mii_writereg(struct dc_softc *sc, str dc_mii_send(sc, frame->mii_turnaround, 2); dc_mii_send(sc, frame->mii_data, 16); - /* Idle bit. */ + /* Clock the idle bits. */ dc_mii_writebit(sc, 0); dc_mii_writebit(sc, 0); Modified: head/sys/dev/dc/if_dcreg.h ============================================================================== --- head/sys/dev/dc/if_dcreg.h Sun Dec 7 22:49:47 2008 (r185749) +++ head/sys/dev/dc/if_dcreg.h Sun Dec 7 23:02:37 2008 (r185750) @@ -791,6 +791,9 @@ struct dc_softc { #define CSR_READ_4(sc, reg) \ bus_space_read_4(sc->dc_btag, sc->dc_bhandle, reg) +#define CSR_BARRIER_4(sc, reg, flags) \ + bus_space_barrier(sc->dc_btag, sc->dc_bhandle, reg, 4, flags) + #define DC_TIMEOUT 1000 #define ETHER_ALIGN 2 From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 00:28:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 491AC106564A; Mon, 8 Dec 2008 00:28:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 37A668FC1C; Mon, 8 Dec 2008 00:28:22 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB80SMaR040241; Mon, 8 Dec 2008 00:28:22 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB80SM3s040238; Mon, 8 Dec 2008 00:28:22 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812080028.mB80SM3s040238@svn.freebsd.org> From: Warner Losh Date: Mon, 8 Dec 2008 00:28:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185751 - in head/sys: net netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 00:28:22 -0000 Author: imp Date: Mon Dec 8 00:28:21 2008 New Revision: 185751 URL: http://svn.freebsd.org/changeset/base/185751 Log: Add missing include to sys/lock.h before sys/rwlock.h Modified: head/sys/net/rtsock.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/nd6_rtr.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Dec 7 23:02:37 2008 (r185750) +++ head/sys/net/rtsock.c Mon Dec 8 00:28:21 2008 (r185751) @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Sun Dec 7 23:02:37 2008 (r185750) +++ head/sys/netinet6/in6_rmx.c Mon Dec 8 00:28:21 2008 (r185751) @@ -78,6 +78,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Sun Dec 7 23:02:37 2008 (r185750) +++ head/sys/netinet6/nd6_rtr.c Mon Dec 8 00:28:21 2008 (r185751) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 01:44:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD6DD1065675; Mon, 8 Dec 2008 01:44:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC3BF8FC1A; Mon, 8 Dec 2008 01:44:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB81iI2M041698; Mon, 8 Dec 2008 01:44:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB81iIF0041697; Mon, 8 Dec 2008 01:44:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812080144.mB81iIF0041697@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Dec 2008 01:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185752 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 01:44:18 -0000 Author: yongari Date: Mon Dec 8 01:44:18 2008 New Revision: 185752 URL: http://svn.freebsd.org/changeset/base/185752 Log: Make sure to return the result of meida change request. Previously it used to return success regardless of the result. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Dec 8 00:28:21 2008 (r185751) +++ head/sys/dev/re/if_re.c Mon Dec 8 01:44:18 2008 (r185752) @@ -2652,14 +2652,15 @@ re_ifmedia_upd(struct ifnet *ifp) { struct rl_softc *sc; struct mii_data *mii; + int error; sc = ifp->if_softc; mii = device_get_softc(sc->rl_miibus); RL_LOCK(sc); - mii_mediachg(mii); + error = mii_mediachg(mii); RL_UNLOCK(sc); - return (0); + return (error); } /* From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 02:34:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF95106564A; Mon, 8 Dec 2008 02:34:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D1EE8FC1F; Mon, 8 Dec 2008 02:34:14 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB82YEXV042790; Mon, 8 Dec 2008 02:34:14 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB82YDD7042788; Mon, 8 Dec 2008 02:34:13 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812080234.mB82YDD7042788@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Dec 2008 02:34:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185753 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 02:34:14 -0000 Author: yongari Date: Mon Dec 8 02:34:13 2008 New Revision: 185753 URL: http://svn.freebsd.org/changeset/base/185753 Log: o Implemented miibus_statchg handler. It detects whether re(4) established a valid link or not. In miibus_statchg handler add a check for established link is valid one for the controller(e.g. 1000baseT is not a valid link for fastethernet controllers.) o Added a flag RE_FLAG_FASTETHER to mark fastethernet controllers. o Added additional check to know whether we've really encountered watchdog timeouts or missed Tx completion interrupts. This change may help to track down the cause of watchdog timeouts. o In interrupt handler, removed a check for link state change interrupt. Not all controllers have the bit and re(4) did not rely on the event for a long time. In addition, re(4) didn't request the interrupt in RL_IMR register. Tested by: rpaulo Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Dec 8 01:44:18 2008 (r185752) +++ head/sys/dev/re/if_re.c Mon Dec 8 02:34:13 2008 (r185753) @@ -573,7 +573,39 @@ re_miibus_writereg(device_t dev, int phy static void re_miibus_statchg(device_t dev) { + struct rl_softc *sc; + struct ifnet *ifp; + struct mii_data *mii; + sc = device_get_softc(dev); + mii = device_get_softc(sc->rl_miibus); + ifp = sc->rl_ifp; + if (mii == NULL || ifp == NULL || + (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + + sc->rl_flags &= ~RL_FLAG_LINK; + if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == + (IFM_ACTIVE | IFM_AVALID)) { + switch (IFM_SUBTYPE(mii->mii_media_active)) { + case IFM_10_T: + case IFM_100_TX: + sc->rl_flags |= RL_FLAG_LINK; + break; + case IFM_1000_T: + if ((sc->rl_flags & RL_FLAG_FASTETHER) != 0) + break; + sc->rl_flags |= RL_FLAG_LINK; + break; + default: + break; + } + } + /* + * RealTek controllers does not provide any interface to + * Tx/Rx MACs for resolved speed, duplex and flow-control + * parameters. + */ } /* @@ -1204,18 +1236,18 @@ re_attach(device_t dev) switch (hw_rev->rl_rev) { case RL_HWREV_8139CPLUS: - sc->rl_flags |= RL_FLAG_NOJUMBO; + sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER; break; case RL_HWREV_8100E: case RL_HWREV_8101E: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | - RL_FLAG_PHYWAKE; + RL_FLAG_PHYWAKE | RL_FLAG_FASTETHER; break; case RL_HWREV_8102E: case RL_HWREV_8102EL: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | - RL_FLAG_MACSTAT; + RL_FLAG_MACSTAT | RL_FLAG_FASTETHER; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -2011,30 +2043,14 @@ re_tick(void *xsc) { struct rl_softc *sc; struct mii_data *mii; - struct ifnet *ifp; sc = xsc; - ifp = sc->rl_ifp; RL_LOCK_ASSERT(sc); - re_watchdog(sc); - mii = device_get_softc(sc->rl_miibus); mii_tick(mii); - if ((sc->rl_flags & RL_FLAG_LINK) != 0) { - if (!(mii->mii_media_status & IFM_ACTIVE)) - sc->rl_flags &= ~RL_FLAG_LINK; - } else { - if (mii->mii_media_status & IFM_ACTIVE && - IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) { - sc->rl_flags |= RL_FLAG_LINK; - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - taskqueue_enqueue_fast(taskqueue_fast, - &sc->rl_txtask); - } - } - + re_watchdog(sc); callout_reset(&sc->rl_stat_callout, hz, re_tick, sc); } @@ -2149,11 +2165,6 @@ re_int_task(void *arg, int npending) re_init_locked(sc); } - if (status & RL_ISR_LINKCHG) { - callout_stop(&sc->rl_stat_callout); - re_tick(sc); - } - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); @@ -2815,18 +2826,30 @@ re_ioctl(struct ifnet *ifp, u_long comma static void re_watchdog(struct rl_softc *sc) { + struct ifnet *ifp; RL_LOCK_ASSERT(sc); if (sc->rl_watchdog_timer == 0 || --sc->rl_watchdog_timer != 0) return; - device_printf(sc->rl_dev, "watchdog timeout\n"); - sc->rl_ifp->if_oerrors++; - + ifp = sc->rl_ifp; re_txeof(sc); + if (sc->rl_ldata.rl_tx_free == sc->rl_ldata.rl_tx_desc_cnt) { + if_printf(ifp, "watchdog timeout (missed Tx interrupts) " + "-- recovering\n"); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); + return; + } + + if_printf(ifp, "watchdog timeout\n"); + ifp->if_oerrors++; + re_rxeof(sc); re_init_locked(sc); + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) + taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); } /* Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Mon Dec 8 01:44:18 2008 (r185752) +++ head/sys/pci/if_rlreg.h Mon Dec 8 02:34:13 2008 (r185753) @@ -882,6 +882,7 @@ struct rl_softc { #define RL_FLAG_PAR 0x0020 #define RL_FLAG_DESCV2 0x0040 #define RL_FLAG_MACSTAT 0x0080 +#define RL_FLAG_FASTETHER 0x0100 #define RL_FLAG_LINK 0x8000 }; From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 02:37:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EA821065670; Mon, 8 Dec 2008 02:37:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6AD778FC08; Mon, 8 Dec 2008 02:37:09 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB82b9R3042876; Mon, 8 Dec 2008 02:37:09 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB82b9Hs042873; Mon, 8 Dec 2008 02:37:09 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812080237.mB82b9Hs042873@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 8 Dec 2008 02:37:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185754 - in head: share/man/man4/man4.powerpc sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 02:37:09 -0000 Author: nwhitehorn Date: Mon Dec 8 02:37:08 2008 New Revision: 185754 URL: http://svn.freebsd.org/changeset/base/185754 Log: Add facilities to pmu(4) to interrogate battery status on Apple PowerPC laptops. This includes battery presence detection, charging status, current and voltage readouts, and charge level indication. The sysctl interface is somewhat ACPI-like. Modified: head/share/man/man4/man4.powerpc/pmu.4 head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/pmuvar.h Modified: head/share/man/man4/man4.powerpc/pmu.4 ============================================================================== --- head/share/man/man4/man4.powerpc/pmu.4 Mon Dec 8 02:34:13 2008 (r185753) +++ head/share/man/man4/man4.powerpc/pmu.4 Mon Dec 8 02:37:08 2008 (r185754) @@ -69,13 +69,32 @@ The driver provides power management services in addition to an .Xr adb 4 interface. The following sysctls can be used to control the -power management behavior. +power management behavior and to examine current system power and +thermal conditions. .Bl -tag -width indent .It Va dev.pmu.%d.server_mode Restart after power failure behavior (1 causes system to reboot after power -cut, 0 causes system to remain off) +cut, 0 causes system to remain off). +.It Va dev.pmu.%d.batteries.%d.present +Indicates whether the relevant battery is inserted. +.It Va dev.pmu.%d.batteries.%d.charging +Indicates whether the battery is currently charging. +.It Va dev.pmu.%d.batteries.%d.charge +The current battery charge, in milliamp hours. +.It Va dev.pmu.%d.batteries.%d.maxcharge +The battery's self-reported maximum charge, in milliamp hours. +.It Va dev.pmu.%d.batteries.%d.rate +The current into the battery, in milliamps. While the battery is discharging, +this will be negative. +.It Va dev.pmu.%d.batteries.%d.voltage +Battery voltage, in millivolts. +.It Va dev.pmu.%d.batteries.%d.time +Estimated time until full battery charge (or discharge), in minutes. +.It Va dev.pmu.%d.batteries.%d.life +Current fraction of the battery's maximum charge, in percent. .Sh SEE ALSO -.Xr adb 4 +.Xr adb 4 , +.Xr acpi 4 .Sh HISTORY The .Nm Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Mon Dec 8 02:34:13 2008 (r185753) +++ head/sys/powerpc/powermac/pmu.c Mon Dec 8 02:37:08 2008 (r185754) @@ -67,10 +67,29 @@ static int pmu_attach(device_t); static int pmu_detach(device_t); static u_int pmu_adb_send(device_t dev, u_char command_byte, int len, - u_char *data, u_char poll); + u_char *data, u_char poll); static u_int pmu_adb_autopoll(device_t dev, uint16_t mask); static void pmu_poll(device_t dev); + static int pmu_server_mode(SYSCTL_HANDLER_ARGS); +static int pmu_query_battery(struct pmu_softc *sc, int batt, + struct pmu_battstate *info); +static int pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS); + +/* + * List of battery-related sysctls we might ask for + */ + +enum { + PMU_BATSYSCTL_PRESENT = 1 << 8, + PMU_BATSYSCTL_CHARGING = 2 << 8, + PMU_BATSYSCTL_CHARGE = 3 << 8, + PMU_BATSYSCTL_MAXCHARGE = 4 << 8, + PMU_BATSYSCTL_CURRENT = 5 << 8, + PMU_BATSYSCTL_VOLTAGE = 6 << 8, + PMU_BATSYSCTL_TIME = 7 << 8, + PMU_BATSYSCTL_LIFE = 8 << 8 +}; static device_method_t pmu_methods[] = { /* Device interface */ @@ -280,6 +299,7 @@ pmu_attach(device_t dev) { struct pmu_softc *sc; + int i; uint8_t reg; uint8_t cmd[2] = {2, 0}; uint8_t resp[16]; @@ -312,8 +332,6 @@ pmu_attach(device_t dev) return (ENXIO); } - sc->sc_error = 0; - sc->sc_polling = 0; sc->sc_autopoll = 0; /* Init PMU */ @@ -343,6 +361,18 @@ pmu_attach(device_t dev) if (strncmp(name, "adb", 4) == 0) { sc->adb_bus = device_add_child(dev,"adb",-1); } + + if (strncmp(name, "power-mgt", 9) == 0) { + uint32_t prim_info[9]; + + if (OF_getprop(child, "prim-info", prim_info, + sizeof(prim_info)) >= 7) + sc->sc_batteries = (prim_info[6] >> 16) & 0xff; + + if (bootverbose && sc->sc_batteries > 0) + device_printf(dev, "%d batteries detected\n", + sc->sc_batteries); + } } /* @@ -353,8 +383,61 @@ pmu_attach(device_t dev) tree = device_get_sysctl_tree(dev); SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "server_mode", CTLTYPE_INT | CTLFLAG_RW, sc, 0, - pmu_server_mode, "I", "Enable reboot after power failure"); + "server_mode", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + pmu_server_mode, "I", "Enable reboot after power failure"); + + if (sc->sc_batteries > 0) { + struct sysctl_oid *oid, *battroot; + char battnum[2]; + + battroot = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "batteries", CTLFLAG_RD, 0, "Battery Information"); + + for (i = 0; i < sc->sc_batteries; i++) { + battnum[0] = i + '0'; + battnum[1] = '\0'; + + oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(battroot), + OID_AUTO, battnum, CTLFLAG_RD, 0, + "Battery Information"); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "present", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_PRESENT | i, pmu_battquery_sysctl, + "I", "Battery present"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "charging", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_CHARGING | i, pmu_battquery_sysctl, + "I", "Battery charging"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "charge", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_CHARGE | i, pmu_battquery_sysctl, + "I", "Battery charge (mAh)"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "maxcharge", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_MAXCHARGE | i, pmu_battquery_sysctl, + "I", "Maximum battery capacity (mAh)"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "rate", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_CURRENT | i, pmu_battquery_sysctl, + "I", "Battery discharge rate (mA)"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "voltage", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_VOLTAGE | i, pmu_battquery_sysctl, + "I", "Battery voltage (mV)"); + + /* Knobs for mental compatibility with ACPI */ + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "time", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_TIME | i, pmu_battquery_sysctl, + "I", "Time Remaining (minutes)"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, + "life", CTLTYPE_INT | CTLFLAG_RD, sc, + PMU_BATSYSCTL_LIFE | i, pmu_battquery_sysctl, + "I", "Capacity remaining (percent)"); + } + } return (bus_generic_attach(dev)); } @@ -437,7 +520,6 @@ pmu_send(void *cookie, int cmd, int leng /* wait idle */ do {} while (pmu_intr_state(sc)); - sc->sc_error = 0; /* send command */ pmu_send_byte(sc, cmd); @@ -671,3 +753,124 @@ pmu_server_mode(SYSCTL_HANDLER_ARGS) return (0); } +static int +pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info) +{ + uint8_t reg; + uint8_t resp[16]; + int len; + + reg = batt + 1; + + mtx_lock(&sc->sc_mutex); + len = pmu_send(sc, PMU_SMART_BATTERY_STATE, 1, ®, 16, resp); + mtx_unlock(&sc->sc_mutex); + + if (len < 3) + return (-1); + + /* All PMU battery info replies share a common header: + * Byte 1 Payload Format + * Byte 2 Battery Flags + */ + + info->state = resp[2]; + + switch (resp[1]) { + case 3: + case 4: + /* + * Formats 3 and 4 appear to be the same: + * Byte 3 Charge + * Byte 4 Max Charge + * Byte 5 Current + * Byte 6 Voltage + */ + + info->charge = resp[3]; + info->maxcharge = resp[4]; + /* Current can be positive or negative */ + info->current = (int8_t)resp[5]; + info->voltage = resp[6]; + break; + case 5: + /* + * Formats 5 is a wider version of formats 3 and 4 + * Byte 3-4 Charge + * Byte 5-6 Max Charge + * Byte 7-8 Current + * Byte 9-10 Voltage + */ + + info->charge = (resp[3] << 8) | resp[4]; + info->maxcharge = (resp[5] << 8) | resp[6]; + /* Current can be positive or negative */ + info->current = (int16_t)((resp[7] << 8) | resp[8]); + info->voltage = (resp[9] << 8) | resp[10]; + break; + default: + device_printf(sc->sc_dev, "Unknown battery info format (%d)!\n", + resp[1]); + return (-1); + } + + return (0); +} + +static int +pmu_battquery_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct pmu_softc *sc; + struct pmu_battstate batt; + int error, result; + + sc = arg1; + + error = pmu_query_battery(sc, arg2 & 0x00ff, &batt); + + if (error != 0) + return (error); + + switch (arg2 & 0xff00) { + case PMU_BATSYSCTL_PRESENT: + result = (batt.state & PMU_PWR_BATT_PRESENT) ? 1 : 0; + break; + case PMU_BATSYSCTL_CHARGING: + result = (batt.state & PMU_PWR_BATT_CHARGING) ? 1 : 0; + break; + case PMU_BATSYSCTL_CHARGE: + result = batt.charge; + break; + case PMU_BATSYSCTL_MAXCHARGE: + result = batt.maxcharge; + break; + case PMU_BATSYSCTL_CURRENT: + result = batt.current; + break; + case PMU_BATSYSCTL_VOLTAGE: + result = batt.voltage; + break; + case PMU_BATSYSCTL_TIME: + /* Time remaining until full charge/discharge, in minutes */ + + if (batt.current >= 0) + result = (batt.maxcharge - batt.charge) /* mAh */ * 60 + / batt.current /* mA */; + else + result = (batt.charge /* mAh */ * 60) + / (-batt.current /* mA */); + break; + case PMU_BATSYSCTL_LIFE: + /* Battery charge fraction, in percent */ + result = (batt.charge * 100) / batt.maxcharge; + break; + default: + /* This should never happen */ + result = -1; + }; + + error = sysctl_handle_int(oidp, &result, 0, req); + + return (error); +} + Modified: head/sys/powerpc/powermac/pmuvar.h ============================================================================== --- head/sys/powerpc/powermac/pmuvar.h Mon Dec 8 02:34:13 2008 (r185753) +++ head/sys/powerpc/powermac/pmuvar.h Mon Dec 8 02:37:08 2008 (r185754) @@ -158,14 +158,18 @@ struct pmu_softc { void *sc_ih; struct mtx sc_mutex; - device_t adb_bus; + volatile int sc_autopoll; + int sc_batteries; +}; + +struct pmu_battstate { + int state; - int sc_node; - volatile int sc_state; - int sc_polling; - int sc_error; - volatile int sc_autopoll; + int charge; + int maxcharge; + int current; + int voltage; }; #endif /* PMUVAR_H */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 02:38:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 119351065672; Mon, 8 Dec 2008 02:38:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 007538FC08; Mon, 8 Dec 2008 02:38:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB82cDX7042930; Mon, 8 Dec 2008 02:38:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB82cD7I042929; Mon, 8 Dec 2008 02:38:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812080238.mB82cD7I042929@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 8 Dec 2008 02:38:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185755 - head/sys/powerpc/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 02:38:14 -0000 Author: nwhitehorn Date: Mon Dec 8 02:38:13 2008 New Revision: 185755 URL: http://svn.freebsd.org/changeset/base/185755 Log: Accidentally left ADB out of the PowerPC NOTES file during initial import. Modified: head/sys/powerpc/conf/NOTES Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Mon Dec 8 02:37:08 2008 (r185754) +++ head/sys/powerpc/conf/NOTES Mon Dec 8 02:38:13 2008 (r185755) @@ -26,6 +26,9 @@ device pci device bm # Apple BMAC (Big Mac Ethernet) device ofwd # Open Firmware disks +device adb # Apple Desktop Bus +device cuda # VIA-CUDA ADB interface +device pmu # Apple Power Management Unit ##################################################################### From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 02:48:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8E761065670; Mon, 8 Dec 2008 02:48:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D7B038FC1A; Mon, 8 Dec 2008 02:48:41 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB82mf4u043155; Mon, 8 Dec 2008 02:48:41 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB82mfV9043154; Mon, 8 Dec 2008 02:48:41 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812080248.mB82mfV9043154@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Dec 2008 02:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185756 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 02:48:42 -0000 Author: yongari Date: Mon Dec 8 02:48:41 2008 New Revision: 185756 URL: http://svn.freebsd.org/changeset/base/185756 Log: Reduce spin wait time consumed in GMII register access routines. Waiting for 1ms for each GMII register access looks overkill and it may also decrease overall performance of driver because re(4) invokes mii_tick for every hz. Tested by: rpaulo Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Mon Dec 8 02:38:13 2008 (r185755) +++ head/sys/dev/re/if_re.c Mon Dec 8 02:48:41 2008 (r185756) @@ -417,13 +417,12 @@ re_gmii_readreg(device_t dev, int phy, i } CSR_WRITE_4(sc, RL_PHYAR, reg << 16); - DELAY(1000); for (i = 0; i < RL_TIMEOUT; i++) { + DELAY(30); rval = CSR_READ_4(sc, RL_PHYAR); if (rval & RL_PHYAR_BUSY) break; - DELAY(100); } if (i == RL_TIMEOUT) { @@ -445,13 +444,12 @@ re_gmii_writereg(device_t dev, int phy, CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); - DELAY(1000); for (i = 0; i < RL_TIMEOUT; i++) { + DELAY(30); rval = CSR_READ_4(sc, RL_PHYAR); if (!(rval & RL_PHYAR_BUSY)) break; - DELAY(100); } if (i == RL_TIMEOUT) { From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 03:00:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD9F1065676; Mon, 8 Dec 2008 03:00:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D8298FC0C; Mon, 8 Dec 2008 03:00:45 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB830jMd044570; Mon, 8 Dec 2008 03:00:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB830j7j044568; Mon, 8 Dec 2008 03:00:45 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812080300.mB830j7j044568@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 8 Dec 2008 03:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185757 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 03:00:45 -0000 Author: nwhitehorn Date: Mon Dec 8 03:00:45 2008 New Revision: 185757 URL: http://svn.freebsd.org/changeset/base/185757 Log: Clean up the mac GPIO interface a little. Also remove bogus copyright and 3rd license clause. Submitted by: Marco Trillo Modified: head/sys/powerpc/powermac/macgpio.c head/sys/powerpc/powermac/macgpiovar.h Modified: head/sys/powerpc/powermac/macgpio.c ============================================================================== --- head/sys/powerpc/powermac/macgpio.c Mon Dec 8 02:48:41 2008 (r185756) +++ head/sys/powerpc/powermac/macgpio.c Mon Dec 8 03:00:45 2008 (r185757) @@ -1,5 +1,5 @@ /*- - * Copyright 2002 by Peter Grehan. All rights reserved. + * Copyright 2008 by Nathan Whitehorn. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -9,8 +9,6 @@ * 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 name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -51,6 +49,8 @@ #include #include +#include + /* * Macgpio softc */ @@ -62,21 +62,18 @@ struct macgpio_softc { static MALLOC_DEFINE(M_MACGPIO, "macgpio", "macgpio device information"); -static int macgpio_probe(device_t); -static int macgpio_attach(device_t); -static int macgpio_print_child(device_t dev, device_t child); -static void macgpio_probe_nomatch(device_t, device_t); -static struct resource *macgpio_alloc_resource(device_t, device_t, int, int *, - u_long, u_long, u_long, u_int); -static int macgpio_activate_resource(device_t, device_t, int, int, - struct resource *); -static int macgpio_deactivate_resource(device_t, device_t, int, int, - struct resource *); +static int macgpio_probe(device_t); +static int macgpio_attach(device_t); +static int macgpio_print_child(device_t dev, device_t child); +static void macgpio_probe_nomatch(device_t, device_t); +static struct resource *macgpio_alloc_resource(device_t, device_t, int, int *, + u_long, u_long, u_long, u_int); +static int macgpio_activate_resource(device_t, device_t, int, int, + struct resource *); +static int macgpio_deactivate_resource(device_t, device_t, int, int, + struct resource *); static ofw_bus_get_devinfo_t macgpio_get_devinfo; -uint8_t macgpio_read(device_t dev); -void macgpio_write(device_t dev,uint8_t); - /* * Bus interface definition */ @@ -125,7 +122,7 @@ struct macgpio_devinfo { struct ofw_bus_devinfo mdi_obdinfo; struct resource_list mdi_resources; - int gpio_num; + int gpio_num; }; static int @@ -215,8 +212,14 @@ macgpio_print_child(device_t dev, device dinfo = device_get_ivars(child); retval += bus_print_child_header(dev, child); + + if (dinfo->gpio_num >= GPIO_BASE) + printf(" gpio %d", dinfo->gpio_num - GPIO_BASE); + else if (dinfo->gpio_num >= GPIO_EXTINT_BASE) + printf(" extint-gpio %d", dinfo->gpio_num - GPIO_EXTINT_BASE); + else + printf(" addr 0x%02x", dinfo->gpio_num); /* should not happen */ - printf(" gpio %d",dinfo->gpio_num); resource_list_print_type(&dinfo->mdi_resources, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); Modified: head/sys/powerpc/powermac/macgpiovar.h ============================================================================== --- head/sys/powerpc/powermac/macgpiovar.h Mon Dec 8 02:48:41 2008 (r185756) +++ head/sys/powerpc/powermac/macgpiovar.h Mon Dec 8 03:00:45 2008 (r185757) @@ -9,8 +9,6 @@ * 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 name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -30,13 +28,15 @@ #ifndef _MACIO_MACGPIOVAR_H_ #define _MACIO_MACGPIOVAR_H_ -struct macgpio_devinfo { - struct ofw_bus_devinfo mdi_obdinfo; - struct resource_list mdi_resources; - - int gpio_num; -}; - +/* relative offsets into gpio space */ +#define GPIO_EXTINT_BASE 0x08 +#define GPIO_BASE 0x1a + +/* gpio bit definitions */ +#define GPIO_DATA 0x01 /* GPIO data */ +#define GPIO_LEVEL_RO 0x02 /* read-only level on pin */ +#define GPIO_DDR_INPUT 0x00 /* use for input */ +#define GPIO_DDR_OUTPUT 0x04 /* use for output */ uint8_t macgpio_read(device_t dev); void macgpio_write(device_t dev,uint8_t); From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 03:48:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7BC11065670; Mon, 8 Dec 2008 03:48:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A64CF8FC0C; Mon, 8 Dec 2008 03:48:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB83m3eG045960; Mon, 8 Dec 2008 03:48:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB83m3Oi045959; Mon, 8 Dec 2008 03:48:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812080348.mB83m3Oi045959@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 8 Dec 2008 03:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185758 - head/sys/dev/fxp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 03:48:03 -0000 Author: yongari Date: Mon Dec 8 03:48:03 2008 New Revision: 185758 URL: http://svn.freebsd.org/changeset/base/185758 Log: mutex.h is needed here. It got it by namespace pollution. Pointed out by: bde Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c ============================================================================== --- head/sys/dev/fxp/if_fxp.c Mon Dec 8 03:00:45 2008 (r185757) +++ head/sys/dev/fxp/if_fxp.c Mon Dec 8 03:48:03 2008 (r185758) @@ -44,7 +44,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 05:44:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B00F7106564A for ; Mon, 8 Dec 2008 05:44:23 +0000 (UTC) (envelope-from moguabjy@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.186]) by mx1.freebsd.org (Postfix) with ESMTP id 494858FC08 for ; Mon, 8 Dec 2008 05:44:23 +0000 (UTC) (envelope-from moguabjy@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so629009tib.3 for ; Sun, 07 Dec 2008 21:44:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=ehtrZMpa9QIQ4eXXFGRp4xYUcLs4EvlPg1lvxTDCuJ0=; b=Dl7t3NQUxcMYjsOsiuuTTos2NPPaRHyrZ+46C76yMEmu8KL7HQxWhZlq+W+ORcyraA vw2g/wrYJF7l4oI7B2DP8SDegnmJQJ0wKv58+rDgiS6eMAQFs/D68GN6j3DNUYCZFOGF jgt64TwU15xfi/ITq+nomfvvBfWCGqCcV149k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=f8fO8Fj589Qj+NmZlkzRI9+USl3VS08IEvqbwnN59Jnstm5D+qZHg7ns/BOxx6UUEK s8aLero8lNWqkaHzMvRi4r44I71js2AJ2pSVQM1kVuWuxCz/RN7G/kAg8t0FHt1AJqV+ p+fWJb44/kYlDKk4Qa2DIQ+iZNxGWgeznAQjg= Received: by 10.110.49.6 with SMTP id w6mr2851362tiw.40.1228713272653; Sun, 07 Dec 2008 21:14:32 -0800 (PST) Received: by 10.110.33.11 with HTTP; Sun, 7 Dec 2008 21:14:32 -0800 (PST) Message-ID: Date: Mon, 8 Dec 2008 14:14:32 +0900 From: "Bang Jun-young" Sender: moguabjy@gmail.com To: "Tim Kientzle" In-Reply-To: <200812060612.mB66COVb084955@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812060612.mB66COVb084955@svn.freebsd.org> X-Google-Sender-Auth: 1bfb078a58ebc179 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185674 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 05:44:23 -0000 On Sat, Dec 6, 2008 at 3:12 PM, Tim Kientzle wrote: > Author: kientzle > Date: Sat Dec 6 06:12:24 2008 > New Revision: 185674 > URL: http://svn.freebsd.org/changeset/base/185674 > > Log: > A couple of portability fixes from Joerg Sonnenberger > > Modified: > head/lib/libarchive/archive_endian.h > > Modified: head/lib/libarchive/archive_endian.h > ============================================================================== > --- head/lib/libarchive/archive_endian.h Sat Dec 6 06:08:12 2008 (r185673) > +++ head/lib/libarchive/archive_endian.h Sat Dec 6 06:12:24 2008 (r185674) > @@ -35,14 +35,14 @@ > #define ARCHIVE_ENDIAN_H_INCLUDED > > > -/* Watcom C++ doesn't support 'inline' in C code. (For any version?) */ > -#if defined( __WATCOMC__ ) > - #define inline > -#endif > - > -/* Visual C++ 6.0 doesn't support 'inline' in C code. (Does VC7? VC8?) */ > -#if defined(_MSC_VER) > - #define inline > +/* > + * Disabling inline keyword for compilers known to choke on it: > + * - Watcom C++ in C code. (For any version?) > + * - SGI MIPSpro > + * - Microsoft Visual C++ 6.0 (supposedly newer versions too) > + */ > +#if defined(__WATCOMC__) || defined(__sgi) || defined(_MSC_VER) > +#define inline > #endif MSC actually supports inline functions as '__inline' keyword in C mode. The above should be written as follows: #if defined(__WATCOMC__) || defined(__sgi) #define inline #elif defined(_MSC_VER) #define inline __inline #endif See http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx http://msdn.microsoft.com/en-us/library/aa260842.aspx for details. junyoung From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 11:04:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 641D71065675; Mon, 8 Dec 2008 11:04:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CB918FC13; Mon, 8 Dec 2008 11:04:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8B4Hc3058123; Mon, 8 Dec 2008 11:04:17 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8B4HwA058122; Mon, 8 Dec 2008 11:04:17 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812081104.mB8B4HwA058122@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Dec 2008 11:04:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185761 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 11:04:17 -0000 Author: kib Date: Mon Dec 8 11:04:17 2008 New Revision: 185761 URL: http://svn.freebsd.org/changeset/base/185761 Log: The dqrele() function syncs the dq, then acquires the dqh lock, and then does final drop of the the dq reference to put it onto the free list. There is a possibility that the dq would be found by another thread after sync and before the dqh lock is acquired. If that other thread drops the dq before we have taken the dqh lock, the dirty dq is put on the free list. Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if the dq is dirty. This ensures that up to date dq is written in the quota file and fixes assertion in dqget(). Reported and tested by: Frode Nordahl MFC after: 3 days Modified: head/sys/ufs/ufs/ufs_quota.c Modified: head/sys/ufs/ufs/ufs_quota.c ============================================================================== --- head/sys/ufs/ufs/ufs_quota.c Mon Dec 8 06:54:24 2008 (r185760) +++ head/sys/ufs/ufs/ufs_quota.c Mon Dec 8 11:04:17 2008 (r185761) @@ -1262,7 +1262,7 @@ dqrele(struct vnode *vp, struct dquot *d return; } DQH_UNLOCK(); - +sync: (void) dqsync(vp, dq); DQH_LOCK(); @@ -1271,6 +1271,18 @@ dqrele(struct vnode *vp, struct dquot *d DQH_UNLOCK(); return; } + + /* + * The dq may become dirty after it is synced but before it is + * put to the free list. Checking the DQ_MOD there without + * locking dq should be safe since no other references to the + * dq exist. + */ + if ((dq->dq_flags & DQ_MOD) != 0) { + dq->dq_cnt++; + DQH_UNLOCK(); + goto sync; + } TAILQ_INSERT_TAIL(&dqfreelist, dq, dq_freelist); DQH_UNLOCK(); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 12:04:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 829031065676; Mon, 8 Dec 2008 12:04:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 580BB8FC20; Mon, 8 Dec 2008 12:04:01 +0000 (UTC) (envelope-from philip@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8C41or059252; Mon, 8 Dec 2008 12:04:01 GMT (envelope-from philip@svn.freebsd.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8C41MG059251; Mon, 8 Dec 2008 12:04:01 GMT (envelope-from philip@svn.freebsd.org) Message-Id: <200812081204.mB8C41MG059251@svn.freebsd.org> From: Philip Paeps Date: Mon, 8 Dec 2008 12:04:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185762 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 12:04:01 -0000 Author: philip Date: Mon Dec 8 12:04:00 2008 New Revision: 185762 URL: http://svn.freebsd.org/changeset/base/185762 Log: Take dhartmei's commit bit into safekeeping per his request. Approved by: core Modified: svnadmin/conf/access Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Dec 8 11:04:17 2008 (r185761) +++ svnadmin/conf/access Mon Dec 8 12:04:00 2008 (r185762) @@ -57,7 +57,6 @@ delphij des dfr dg -dhartmei dougb dumbbell dwhite From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 12:28:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008AF1065672; Mon, 8 Dec 2008 12:28:49 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E372B8FC19; Mon, 8 Dec 2008 12:28:48 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8CSmIY059942; Mon, 8 Dec 2008 12:28:48 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8CSm4o059941; Mon, 8 Dec 2008 12:28:48 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812081228.mB8CSm4o059941@svn.freebsd.org> From: Joseph Koshy Date: Mon, 8 Dec 2008 12:28:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185763 - head/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 12:28:49 -0000 Author: jkoshy Date: Mon Dec 8 12:28:48 2008 New Revision: 185763 URL: http://svn.freebsd.org/changeset/base/185763 Log: Document processor errata that affect performance measurement. Modified: head/lib/libpmc/pmc.core.3 Modified: head/lib/libpmc/pmc.core.3 ============================================================================== --- head/lib/libpmc/pmc.core.3 Mon Dec 8 12:04:00 2008 (r185762) +++ head/lib/libpmc/pmc.core.3 Mon Dec 8 12:28:48 2008 (r185763) @@ -730,6 +730,58 @@ and the underlying hardware events used. .It Li interrupts Ta Li HW_Int_Rx .It Li unhalted-cycles Ta (unsupported) .El +.Sh PROCESSOR ERRATA +The following errata affect performance measurement on these +processors. +These errata are documented in +.Rs +.%T "Intel® CoreTM Duo Processor and Intel® CoreTM Solo Processor on 65 nm Process" +.%B "Specification Update" +.%N "Order Number 309222-017" +.%D July 2008 +.%Q "Intel Corporation" +.Re +.Bl -tag -width indent -compact +.It AE19 +Data prefetch performance monitoring events can only be enabled +on a single core. +.It AE25 +Performance monitoring counters that count external bus events +may report incorrect values after processor power state transitions. +.It AE28 +Performance monitoring events for retired floating point operations +(C1H) may not be accurate. +.It AE29 +DR3 address match on MOVD/MOVQ/MOVNTQ memory store +instruction may incorrectly increment performance monitoring count +for saturating simd instructions retired (Event CFH). +.It AE33 +Hardware prefetch performance monitoring events may be counted +inaccurately. +.It AE36 +The +.Li CPU_CLK_UNHALTED +performance monitoring event (Event 3CH) counts +clocks when the processor is in the C1/C2 processor power states. +.It AE39 +Certain performance monitoring counters related to bus, L2 cache +and power management are inaccurate. +.It AE51 +Performance monitoring events for retired instructions (Event C0H) may +not be accurate. +.It AE67 +Performance monitoring event +.Li FP_ASSIST +may not be accurate. +.It AE78 +Performance monitoring event for hardware prefetch requests (Event +4EH) and hardware prefetch request cache misses (Event 4FH) may not be +accurate. +.It AE82 +Performance monitoring event +.Li FP_MMX_TRANS_TO_MMX +may not count some transitions. +.El .Sh SEE ALSO .Xr pmc 3 , .Xr pmc.atom 3 , From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 12:29:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A87AC1065675; Mon, 8 Dec 2008 12:29:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 978908FC1B; Mon, 8 Dec 2008 12:29:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8CTUCg060006; Mon, 8 Dec 2008 12:29:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8CTU1E060005; Mon, 8 Dec 2008 12:29:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812081229.mB8CTU1E060005@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Dec 2008 12:29:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185764 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 12:29:30 -0000 Author: kib Date: Mon Dec 8 12:29:30 2008 New Revision: 185764 URL: http://svn.freebsd.org/changeset/base/185764 Log: Do drop vm map lock earlier in the sysctl_kern_proc_vmmap(), to avoid locking a vnode while having vm map locked. Reported and tested by: pho MFC after: 1 week Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Mon Dec 8 12:28:48 2008 (r185763) +++ head/sys/kern/kern_proc.c Mon Dec 8 12:29:30 2008 (r185764) @@ -1412,13 +1412,32 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A lobj = tobj; } + kve->kve_start = (void*)entry->start; + kve->kve_end = (void*)entry->end; + kve->kve_offset = (off_t)entry->offset; + + if (entry->protection & VM_PROT_READ) + kve->kve_protection |= KVME_PROT_READ; + if (entry->protection & VM_PROT_WRITE) + kve->kve_protection |= KVME_PROT_WRITE; + if (entry->protection & VM_PROT_EXECUTE) + kve->kve_protection |= KVME_PROT_EXEC; + + if (entry->eflags & MAP_ENTRY_COW) + kve->kve_flags |= KVME_FLAG_COW; + if (entry->eflags & MAP_ENTRY_NEEDS_COPY) + kve->kve_flags |= KVME_FLAG_NEEDS_COPY; + + last_timestamp = map->timestamp; + vm_map_unlock_read(map); + kve->kve_fileid = 0; kve->kve_fsid = 0; freepath = NULL; fullpath = ""; if (lobj) { vp = NULL; - switch(lobj->type) { + switch (lobj->type) { case OBJT_DEFAULT: kve->kve_type = KVME_TYPE_DEFAULT; break; @@ -1468,28 +1487,10 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A kve->kve_shadow_count = 0; } - kve->kve_start = (void*)entry->start; - kve->kve_end = (void*)entry->end; - kve->kve_offset = (off_t)entry->offset; - - if (entry->protection & VM_PROT_READ) - kve->kve_protection |= KVME_PROT_READ; - if (entry->protection & VM_PROT_WRITE) - kve->kve_protection |= KVME_PROT_WRITE; - if (entry->protection & VM_PROT_EXECUTE) - kve->kve_protection |= KVME_PROT_EXEC; - - if (entry->eflags & MAP_ENTRY_COW) - kve->kve_flags |= KVME_FLAG_COW; - if (entry->eflags & MAP_ENTRY_NEEDS_COPY) - kve->kve_flags |= KVME_FLAG_NEEDS_COPY; - strlcpy(kve->kve_path, fullpath, sizeof(kve->kve_path)); if (freepath != NULL) free(freepath, M_TEMP); - last_timestamp = map->timestamp; - vm_map_unlock_read(map); error = SYSCTL_OUT(req, kve, sizeof(*kve)); vm_map_lock_read(map); if (error) @@ -1577,13 +1578,32 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR lobj = tobj; } + kve->kve_start = entry->start; + kve->kve_end = entry->end; + kve->kve_offset = entry->offset; + + if (entry->protection & VM_PROT_READ) + kve->kve_protection |= KVME_PROT_READ; + if (entry->protection & VM_PROT_WRITE) + kve->kve_protection |= KVME_PROT_WRITE; + if (entry->protection & VM_PROT_EXECUTE) + kve->kve_protection |= KVME_PROT_EXEC; + + if (entry->eflags & MAP_ENTRY_COW) + kve->kve_flags |= KVME_FLAG_COW; + if (entry->eflags & MAP_ENTRY_NEEDS_COPY) + kve->kve_flags |= KVME_FLAG_NEEDS_COPY; + + last_timestamp = map->timestamp; + vm_map_unlock_read(map); + kve->kve_fileid = 0; kve->kve_fsid = 0; freepath = NULL; fullpath = ""; if (lobj) { vp = NULL; - switch(lobj->type) { + switch (lobj->type) { case OBJT_DEFAULT: kve->kve_type = KVME_TYPE_DEFAULT; break; @@ -1633,28 +1653,10 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR kve->kve_shadow_count = 0; } - kve->kve_start = entry->start; - kve->kve_end = entry->end; - kve->kve_offset = entry->offset; - - if (entry->protection & VM_PROT_READ) - kve->kve_protection |= KVME_PROT_READ; - if (entry->protection & VM_PROT_WRITE) - kve->kve_protection |= KVME_PROT_WRITE; - if (entry->protection & VM_PROT_EXECUTE) - kve->kve_protection |= KVME_PROT_EXEC; - - if (entry->eflags & MAP_ENTRY_COW) - kve->kve_flags |= KVME_FLAG_COW; - if (entry->eflags & MAP_ENTRY_NEEDS_COPY) - kve->kve_flags |= KVME_FLAG_NEEDS_COPY; - strlcpy(kve->kve_path, fullpath, sizeof(kve->kve_path)); if (freepath != NULL) free(freepath, M_TEMP); - last_timestamp = map->timestamp; - vm_map_unlock_read(map); /* Pack record size down */ kve->kve_structsize = offsetof(struct kinfo_vmentry, kve_path) + strlen(kve->kve_path) + 1; From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 12:34:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B5E9106564A; Mon, 8 Dec 2008 12:34:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 896BB8FC08; Mon, 8 Dec 2008 12:34:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8CYqMG060150; Mon, 8 Dec 2008 12:34:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8CYqr0060148; Mon, 8 Dec 2008 12:34:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812081234.mB8CYqr0060148@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Dec 2008 12:34:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185765 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 12:34:52 -0000 Author: kib Date: Mon Dec 8 12:34:52 2008 New Revision: 185765 URL: http://svn.freebsd.org/changeset/base/185765 Log: Change the linprocfs /maps and procfs /map handlers to use sbuf instead of doing uiomove. This allows for reads from non-zero offsets to work. Patch is forward-ported des@' one, and was adopted to current code by dchagin@ and me. Reviewed by: des (linprocfs part) PR: kern/101453 MFC after: 1 week Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 12:29:30 2008 (r185764) +++ head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 12:34:52 2008 (r185765) @@ -876,10 +876,12 @@ static int linprocfs_doprocmaps(PFS_FILL_ARGS) { vm_map_t map = &p->p_vmspace->vm_map; - vm_map_entry_t entry; + vm_map_entry_t entry, tmp_entry; vm_object_t obj, tobj, lobj; - vm_offset_t saved_end; + vm_offset_t e_start, e_end; vm_ooffset_t off = 0; + vm_prot_t e_prot; + unsigned int last_timestamp; char *name = "", *freename = NULL; ino_t ino; int ref_count, shadow_count, flags; @@ -905,7 +907,9 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) freename = NULL; if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) continue; - saved_end = entry->end; + e_prot = entry->protection; + e_start = entry->start; + e_end = entry->end; obj = entry->object.vm_object; for (lobj = tobj = obj; tobj; tobj = tobj->backing_object) { VM_OBJECT_LOCK(tobj); @@ -913,6 +917,8 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) VM_OBJECT_UNLOCK(lobj); lobj = tobj; } + last_timestamp = map->timestamp; + vm_map_unlock_read(map); ino = 0; if (lobj) { off = IDX_TO_OFF(lobj->size); @@ -950,10 +956,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) */ error = sbuf_printf(sb, "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n", - (u_long)entry->start, (u_long)entry->end, - (entry->protection & VM_PROT_READ)?"r":"-", - (entry->protection & VM_PROT_WRITE)?"w":"-", - (entry->protection & VM_PROT_EXECUTE)?"x":"-", + (u_long)e_start, (u_long)e_end, + (e_prot & VM_PROT_READ)?"r":"-", + (e_prot & VM_PROT_WRITE)?"w":"-", + (e_prot & VM_PROT_EXECUTE)?"x":"-", "p", (u_long)off, 0, @@ -968,6 +974,16 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) error = 0; break; } + vm_map_lock_read(map); + if (last_timestamp + 1 != map->timestamp) { + /* + * Look again for the entry because the map was + * modified while it was unlocked. Specifically, + * the entry may have been clipped, merged, or deleted. + */ + vm_map_lookup_entry(map, e_end - 1, &tmp_entry); + entry = tmp_entry; + } } vm_map_unlock_read(map); Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Dec 8 12:29:30 2008 (r185764) +++ head/sys/fs/procfs/procfs_map.c Mon Dec 8 12:34:52 2008 (r185765) @@ -84,9 +84,10 @@ procfs_doprocmap(PFS_FILL_ARGS) { int error, vfslocked; vm_map_t map = &p->p_vmspace->vm_map; - vm_map_entry_t entry; + vm_map_entry_t entry, tmp_entry; struct vnode *vp; char *fullpath, *freepath; + unsigned int last_timestamp; #ifdef COMPAT_IA32 int wrap32 = 0; #endif @@ -113,13 +114,19 @@ procfs_doprocmap(PFS_FILL_ARGS) entry = entry->next) { vm_object_t obj, tobj, lobj; int ref_count, shadow_count, flags; - vm_offset_t addr; + vm_offset_t e_start, e_end, addr; int resident, privateresident; char *type; + vm_eflags_t e_eflags; + vm_prot_t e_prot; if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) continue; + e_eflags = entry->eflags; + e_prot = entry->protection; + e_start = entry->start; + e_end = entry->end; privateresident = 0; obj = entry->object.vm_object; if (obj != NULL) { @@ -143,11 +150,13 @@ procfs_doprocmap(PFS_FILL_ARGS) VM_OBJECT_UNLOCK(lobj); lobj = tobj; } + last_timestamp = map->timestamp; + vm_map_unlock_read(map); freepath = NULL; fullpath = "-"; if (lobj) { - switch(lobj->type) { + switch (lobj->type) { default: case OBJT_DEFAULT: type = "default"; @@ -193,19 +202,19 @@ procfs_doprocmap(PFS_FILL_ARGS) */ error = sbuf_printf(sb, "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n", - (u_long)entry->start, (u_long)entry->end, + (u_long)e_start, (u_long)e_end, resident, privateresident, #ifdef COMPAT_IA32 wrap32 ? NULL : obj, /* Hide 64 bit value */ #else obj, #endif - (entry->protection & VM_PROT_READ)?"r":"-", - (entry->protection & VM_PROT_WRITE)?"w":"-", - (entry->protection & VM_PROT_EXECUTE)?"x":"-", + (e_prot & VM_PROT_READ)?"r":"-", + (e_prot & VM_PROT_WRITE)?"w":"-", + (e_prot & VM_PROT_EXECUTE)?"x":"-", ref_count, shadow_count, flags, - (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW", - (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC", + (e_eflags & MAP_ENTRY_COW)?"COW":"NCOW", + (e_eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC", type, fullpath); if (freepath != NULL) @@ -215,6 +224,16 @@ procfs_doprocmap(PFS_FILL_ARGS) error = 0; break; } + vm_map_lock_read(map); + if (last_timestamp + 1 != map->timestamp) { + /* + * Look again for the entry because the map was + * modified while it was unlocked. Specifically, + * the entry may have been clipped, merged, or deleted. + */ + vm_map_lookup_entry(map, e_end - 1, &tmp_entry); + entry = tmp_entry; + } } vm_map_unlock_read(map); return (error); From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 13:01:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FCFC106567E; Mon, 8 Dec 2008 13:01:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 1EA948FC08; Mon, 8 Dec 2008 13:01:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L9fkD-000GPI-F8; Mon, 08 Dec 2008 15:01:49 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB8D1i5X035235 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Dec 2008 15:01:45 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB8D1iWl067053; Mon, 8 Dec 2008 15:01:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB8D1iOU067052; Mon, 8 Dec 2008 15:01:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Dec 2008 15:01:44 +0200 From: Kostik Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <20081208130144.GU2038@deviant.kiev.zoral.com.ua> References: <200812081234.mB8CYqr0060148@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="w5nY8nmEklXMR7Cj" Content-Disposition: inline In-Reply-To: <200812081234.mB8CYqr0060148@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L9fkD-000GPI-F8 e96cf10ae2a472d33bda9789f4a9430d X-Terabit: YES Cc: rdivacky@freebsd.org Subject: Re: svn commit: r185765 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 13:01:51 -0000 --w5nY8nmEklXMR7Cj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 08, 2008 at 12:34:52PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Dec 8 12:34:52 2008 > New Revision: 185765 > URL: http://svn.freebsd.org/changeset/base/185765 >=20 > Log: > Change the linprocfs /maps and procfs /map handlers to use > sbuf instead of doing uiomove. This allows for reads from non-zero > offsets to work. > =20 > Patch is forward-ported des@' one, and was adopted to current code > by dchagin@ and me. > =20 > Reviewed by: des (linprocfs part) > PR: kern/101453 > MFC after: 1 week >=20 > Modified: > head/sys/compat/linprocfs/linprocfs.c > head/sys/fs/procfs/procfs_map.c Thanks for Roman Divacky for pointing this out, commit message is wrong. I specified wrong log file to the svn ci -F switch. The right commit message is below. In procfs map handler, and in linprocfs maps handler, do not call vn_fullpath() while having vm map locked. This is done in anticipation of the vop_vptocnp commit, that would make vn_fullpath sometime acquire vnode lock. Also, in linprocfs, maps handler already acquires vnode lock. No objections from: des MFC after: 2 week >=20 > Modified: head/sys/compat/linprocfs/linprocfs.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 12:29:30 2008 (r1857= 64) > +++ head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 12:34:52 2008 (r1857= 65) > @@ -876,10 +876,12 @@ static int > linprocfs_doprocmaps(PFS_FILL_ARGS) > { > vm_map_t map =3D &p->p_vmspace->vm_map; > - vm_map_entry_t entry; > + vm_map_entry_t entry, tmp_entry; > vm_object_t obj, tobj, lobj; > - vm_offset_t saved_end; > + vm_offset_t e_start, e_end; > vm_ooffset_t off =3D 0; > + vm_prot_t e_prot; > + unsigned int last_timestamp; > char *name =3D "", *freename =3D NULL; > ino_t ino; > int ref_count, shadow_count, flags; > @@ -905,7 +907,9 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > freename =3D NULL; > if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) > continue; > - saved_end =3D entry->end; > + e_prot =3D entry->protection; > + e_start =3D entry->start; > + e_end =3D entry->end; > obj =3D entry->object.vm_object; > for (lobj =3D tobj =3D obj; tobj; tobj =3D tobj->backing_object) { > VM_OBJECT_LOCK(tobj); > @@ -913,6 +917,8 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > VM_OBJECT_UNLOCK(lobj); > lobj =3D tobj; > } > + last_timestamp =3D map->timestamp; > + vm_map_unlock_read(map); > ino =3D 0; > if (lobj) { > off =3D IDX_TO_OFF(lobj->size); > @@ -950,10 +956,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > */ > error =3D sbuf_printf(sb, > "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n", > - (u_long)entry->start, (u_long)entry->end, > - (entry->protection & VM_PROT_READ)?"r":"-", > - (entry->protection & VM_PROT_WRITE)?"w":"-", > - (entry->protection & VM_PROT_EXECUTE)?"x":"-", > + (u_long)e_start, (u_long)e_end, > + (e_prot & VM_PROT_READ)?"r":"-", > + (e_prot & VM_PROT_WRITE)?"w":"-", > + (e_prot & VM_PROT_EXECUTE)?"x":"-", > "p", > (u_long)off, > 0, > @@ -968,6 +974,16 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) > error =3D 0; > break; > } > + vm_map_lock_read(map); > + if (last_timestamp + 1 !=3D map->timestamp) { > + /* > + * Look again for the entry because the map was > + * modified while it was unlocked. Specifically, > + * the entry may have been clipped, merged, or deleted. > + */ > + vm_map_lookup_entry(map, e_end - 1, &tmp_entry); > + entry =3D tmp_entry; > + } > } > vm_map_unlock_read(map); > =20 >=20 > Modified: head/sys/fs/procfs/procfs_map.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/fs/procfs/procfs_map.c Mon Dec 8 12:29:30 2008 (r185764) > +++ head/sys/fs/procfs/procfs_map.c Mon Dec 8 12:34:52 2008 (r185765) > @@ -84,9 +84,10 @@ procfs_doprocmap(PFS_FILL_ARGS) > { > int error, vfslocked; > vm_map_t map =3D &p->p_vmspace->vm_map; > - vm_map_entry_t entry; > + vm_map_entry_t entry, tmp_entry; > struct vnode *vp; > char *fullpath, *freepath; > + unsigned int last_timestamp; > #ifdef COMPAT_IA32 > int wrap32 =3D 0; > #endif > @@ -113,13 +114,19 @@ procfs_doprocmap(PFS_FILL_ARGS) > entry =3D entry->next) { > vm_object_t obj, tobj, lobj; > int ref_count, shadow_count, flags; > - vm_offset_t addr; > + vm_offset_t e_start, e_end, addr; > int resident, privateresident; > char *type; > + vm_eflags_t e_eflags; > + vm_prot_t e_prot; > =20 > if (entry->eflags & MAP_ENTRY_IS_SUB_MAP) > continue; > =20 > + e_eflags =3D entry->eflags; > + e_prot =3D entry->protection; > + e_start =3D entry->start; > + e_end =3D entry->end; > privateresident =3D 0; > obj =3D entry->object.vm_object; > if (obj !=3D NULL) { > @@ -143,11 +150,13 @@ procfs_doprocmap(PFS_FILL_ARGS) > VM_OBJECT_UNLOCK(lobj); > lobj =3D tobj; > } > + last_timestamp =3D map->timestamp; > + vm_map_unlock_read(map); > =20 > freepath =3D NULL; > fullpath =3D "-"; > if (lobj) { > - switch(lobj->type) { > + switch (lobj->type) { > default: > case OBJT_DEFAULT: > type =3D "default"; > @@ -193,19 +202,19 @@ procfs_doprocmap(PFS_FILL_ARGS) > */ > error =3D sbuf_printf(sb, > "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n", > - (u_long)entry->start, (u_long)entry->end, > + (u_long)e_start, (u_long)e_end, > resident, privateresident, > #ifdef COMPAT_IA32 > wrap32 ? NULL : obj, /* Hide 64 bit value */ > #else > obj, > #endif > - (entry->protection & VM_PROT_READ)?"r":"-", > - (entry->protection & VM_PROT_WRITE)?"w":"-", > - (entry->protection & VM_PROT_EXECUTE)?"x":"-", > + (e_prot & VM_PROT_READ)?"r":"-", > + (e_prot & VM_PROT_WRITE)?"w":"-", > + (e_prot & VM_PROT_EXECUTE)?"x":"-", > ref_count, shadow_count, flags, > - (entry->eflags & MAP_ENTRY_COW)?"COW":"NCOW", > - (entry->eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC", > + (e_eflags & MAP_ENTRY_COW)?"COW":"NCOW", > + (e_eflags & MAP_ENTRY_NEEDS_COPY)?"NC":"NNC", > type, fullpath); > =20 > if (freepath !=3D NULL) > @@ -215,6 +224,16 @@ procfs_doprocmap(PFS_FILL_ARGS) > error =3D 0; > break; > } > + vm_map_lock_read(map); > + if (last_timestamp + 1 !=3D map->timestamp) { > + /* > + * Look again for the entry because the map was > + * modified while it was unlocked. Specifically, > + * the entry may have been clipped, merged, or deleted. > + */ > + vm_map_lookup_entry(map, e_end - 1, &tmp_entry); > + entry =3D tmp_entry; > + } > } > vm_map_unlock_read(map); > return (error); --w5nY8nmEklXMR7Cj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk9GrcACgkQC3+MBN1Mb4h76gCg9MxYoQcoxC3fIXy1dNnhpm6n HdAAn2o0XBcNhBDKk5KSjLsTdMMzEQis =GYHS -----END PGP SIGNATURE----- --w5nY8nmEklXMR7Cj-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 13:08:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 751E31065670; Mon, 8 Dec 2008 13:08:42 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 32E938FC14; Mon, 8 Dec 2008 13:08:42 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 397B56D43F; Mon, 8 Dec 2008 13:08:41 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 1ABFE844DD; Mon, 8 Dec 2008 14:08:41 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Kostik Belousov References: <200812081234.mB8CYqr0060148@svn.freebsd.org> <20081208130144.GU2038@deviant.kiev.zoral.com.ua> Date: Mon, 08 Dec 2008 14:08:40 +0100 In-Reply-To: <20081208130144.GU2038@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 8 Dec 2008 15:01:44 +0200") Message-ID: <86prk2zuef.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rdivacky@freebsd.org Subject: Re: svn commit: r185765 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 13:08:42 -0000 Kostik Belousov writes: > Thanks for Roman Divacky for pointing this out, commit message is > wrong. I specified wrong log file to the svn ci -F switch. The right > commit message is below. Can you please make a forced commit to document this? Just add or remove a blank line somewhere (or unwrap line 276 for instance). DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 13:15:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD81F106574F; Mon, 8 Dec 2008 13:15:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BBFBE8FC13; Mon, 8 Dec 2008 13:15:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8DFVSG061025; Mon, 8 Dec 2008 13:15:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8DFVMk061023; Mon, 8 Dec 2008 13:15:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812081315.mB8DFVMk061023@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Dec 2008 13:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185766 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 13:15:31 -0000 Author: kib Date: Mon Dec 8 13:15:31 2008 New Revision: 185766 URL: http://svn.freebsd.org/changeset/base/185766 Log: Make two style changes to create new commit and document proper commit message for r185765. Noted by: rdivacky Requested by: des Commit message for r185765 should be: In procfs map handler, and in linprocfs maps handler, do not call vn_fullpath() while having vm map locked. This is done in anticipation of the vop_vptocnp commit, that would make vn_fullpath sometime acquire vnode lock. Also, in linprocfs, maps handler already acquires vnode lock. No objections from: des MFC after: 2 week Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 12:34:52 2008 (r185765) +++ head/sys/compat/linprocfs/linprocfs.c Mon Dec 8 13:15:31 2008 (r185766) @@ -273,8 +273,7 @@ linprocfs_docpuinfo(PFS_FILL_ARGS) /* XXX per-cpu vendor / class / model / id? */ } - sbuf_cat(sb, - "flags\t\t:"); + sbuf_cat(sb, "flags\t\t:"); if (!strcmp(cpu_vendor, "AuthenticAMD") && (class < 6)) { flags[16] = "fcmov"; Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Mon Dec 8 12:34:52 2008 (r185765) +++ head/sys/fs/procfs/procfs_map.c Mon Dec 8 13:15:31 2008 (r185766) @@ -82,11 +82,11 @@ extern struct sysentvec ia32_freebsd_sys int procfs_doprocmap(PFS_FILL_ARGS) { - int error, vfslocked; vm_map_t map = &p->p_vmspace->vm_map; vm_map_entry_t entry, tmp_entry; struct vnode *vp; char *fullpath, *freepath; + int error, vfslocked; unsigned int last_timestamp; #ifdef COMPAT_IA32 int wrap32 = 0; From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 14:53:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68FD3106564A for ; Mon, 8 Dec 2008 14:53:34 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.sonnenberger.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 26DAE8FC16 for ; Mon, 8 Dec 2008 14:53:33 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.sonnenberger.org [192.168.1.10]) by www.sonnenberger.org (Postfix) with ESMTP id 5853F667C9 for ; Mon, 8 Dec 2008 15:53:29 +0100 (CET) Received: by britannica.bec.de (Postfix, from userid 1000) id 312BB8DBDF; Mon, 8 Dec 2008 12:05:43 +0100 (CET) Date: Mon, 8 Dec 2008 12:05:42 +0100 From: Joerg Sonnenberger To: svn-src-all@freebsd.org Message-ID: <20081208110542.GA905@britannica.bec.de> References: <200812060612.mB66COVb084955@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Subject: Re: svn commit: r185674 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 14:53:34 -0000 On Mon, Dec 08, 2008 at 02:14:32PM +0900, Bang Jun-young wrote: > MSC actually supports inline functions as '__inline' keyword in C mode. The > above should be written as follows: Can you say that for all versions? Besides, it will very likely inline this anyway, so it doesn't matter very much. Joerg From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:09:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F6901065676; Mon, 8 Dec 2008 17:09:02 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E5AF8FC19; Mon, 8 Dec 2008 17:09:02 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8H92eZ065760; Mon, 8 Dec 2008 17:09:02 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8H92Qe065759; Mon, 8 Dec 2008 17:09:02 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200812081709.mB8H92Qe065759@svn.freebsd.org> From: Ulf Lilleengen Date: Mon, 8 Dec 2008 17:09:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185768 - head/sys/geom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:09:02 -0000 Author: lulf Date: Mon Dec 8 17:09:02 2008 New Revision: 185768 URL: http://svn.freebsd.org/changeset/base/185768 Log: - Add missing word in comment. Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Mon Dec 8 17:01:05 2008 (r185767) +++ head/sys/geom/geom_subr.c Mon Dec 8 17:09:02 2008 (r185768) @@ -370,7 +370,7 @@ g_destroy_geom(struct g_geom *gp) } /* - * This function is called (repeatedly) until the has withered away. + * This function is called (repeatedly) until the geom has withered away. */ void g_wither_geom(struct g_geom *gp, int error) From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:12:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 992B1106564A; Mon, 8 Dec 2008 17:12:40 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0858FC13; Mon, 8 Dec 2008 17:12:40 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8HCeE0065883; Mon, 8 Dec 2008 17:12:40 GMT (envelope-from schweikh@svn.freebsd.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8HCeod065882; Mon, 8 Dec 2008 17:12:40 GMT (envelope-from schweikh@svn.freebsd.org) Message-Id: <200812081712.mB8HCeod065882@svn.freebsd.org> From: Jens Schweikhardt Date: Mon, 8 Dec 2008 17:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185769 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:12:40 -0000 Author: schweikh Date: Mon Dec 8 17:12:40 2008 New Revision: 185769 URL: http://svn.freebsd.org/changeset/base/185769 Log: White space only: Tabify; white space at EOL removed. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Dec 8 17:09:02 2008 (r185768) +++ head/UPDATING Mon Dec 8 17:12:40 2008 (r185769) @@ -38,11 +38,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. and thereby the code size); consult ath_hal(4) for details. 20081121: - __FreeBSD_version 800054 adds memory barriers to - , new interfaces to ifnet to facilitate + __FreeBSD_version 800054 adds memory barriers to + , new interfaces to ifnet to facilitate multiple hardware transmit queues for cards that support them, and a lock-less ring-buffer implementation to - enable drivers to more efficiently manage queueing of + enable drivers to more efficiently manage queueing of packets. 20081117: @@ -287,11 +287,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. be recompiled; this includes the hal and xorg-server ports. 20070928: - The caching daemon (cached) was renamed to nscd. nscd.conf - configuration file should be used instead of cached.conf and - nscd_enable, nscd_pidfile and nscd_flags options should be used - instead of cached_enable, cached_pidfile and cached_flags in - rc.conf. + The caching daemon (cached) was renamed to nscd. nscd.conf + configuration file should be used instead of cached.conf and + nscd_enable, nscd_pidfile and nscd_flags options should be used + instead of cached_enable, cached_pidfile and cached_flags in + rc.conf. 20070921: The getfacl(1) utility now prints owning user and group name @@ -299,7 +299,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. This is the same behavior as getfacl(1) on Solaris and Linux. 20070704: - The new IPsec code is now compiled in using the IPSEC option. The + The new IPsec code is now compiled in using the IPSEC option. The IPSEC option now requires "device crypto" be defined in your kernel configuration. The FAST_IPSEC kernel option is now deprecated. @@ -602,10 +602,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. If you have such a file, you need old utility to decrypt it. 20060709: - The interface version of the i4b kernel part has changed. So - after updating the kernel sources and compiling a new kernel, - the i4b user space tools in "/usr/src/usr.sbin/i4b" must also - be rebuilt, and vice versa. + The interface version of the i4b kernel part has changed. So + after updating the kernel sources and compiling a new kernel, + the i4b user space tools in "/usr/src/usr.sbin/i4b" must also + be rebuilt, and vice versa. 20060627: The XBOX kernel now defaults to the nfe(4) driver instead of @@ -1071,7 +1071,7 @@ COMMON ITEMS: - + To upgrade in-place from 5.x-stable to current From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:18:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C08821065670; Mon, 8 Dec 2008 17:18:37 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACF1F8FC18; Mon, 8 Dec 2008 17:18:37 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8HIbOr066047; Mon, 8 Dec 2008 17:18:37 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8HIbwf066044; Mon, 8 Dec 2008 17:18:37 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812081718.mB8HIbwf066044@svn.freebsd.org> From: Tim Kientzle Date: Mon, 8 Dec 2008 17:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185770 - stable/7/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:18:37 -0000 Author: kientzle Date: Mon Dec 8 17:18:37 2008 New Revision: 185770 URL: http://svn.freebsd.org/changeset/base/185770 Log: MFC r185667,r185680,r185681: Overhaul the Rockridge option parsing and beef up the ISO9660 bidder. This makes the ISO reader a lot more robust when reading malformed input. Approved by: re Modified: stable/7/lib/libarchive/ (props changed) stable/7/lib/libarchive/archive_read_support_format_iso9660.c stable/7/lib/libarchive/archive_string.c stable/7/lib/libarchive/archive_string.h Modified: stable/7/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- stable/7/lib/libarchive/archive_read_support_format_iso9660.c Mon Dec 8 17:12:40 2008 (r185769) +++ stable/7/lib/libarchive/archive_read_support_format_iso9660.c Mon Dec 8 17:18:37 2008 (r185770) @@ -138,6 +138,15 @@ __FBSDID("$FreeBSD$"); #define PVD_reserved4_size 1 #define PVD_application_data_offset (PVD_reserved4_offset + PVD_reserved4_size) #define PVD_application_data_size 512 +#define PVD_reserved5_offset (PVD_application_data_offset + PVD_application_data_size) +#define PVD_reserved5_size (2048 - PVD_reserved5_offset) + +/* TODO: It would make future maintenance easier to just hardcode the + * above values. In particular, ECMA119 states the offsets as part of + * the standard. That would eliminate the need for the following check.*/ +#if PVD_reserved5_offset != 1395 +#error PVD offset and size definitions are wrong. +#endif /* Structure of an on-disk directory record. */ /* Note: ISO9660 stores each multi-byte integer twice, once in @@ -178,17 +187,20 @@ struct file_info { uint64_t size; /* File size in bytes. */ uint64_t ce_offset; /* Offset of CE */ uint64_t ce_size; /* Size of CE */ + time_t birthtime; /* File created time. */ time_t mtime; /* File last modified time. */ time_t atime; /* File last accessed time. */ - time_t ctime; /* File creation time. */ + time_t ctime; /* File attribute change time. */ uint64_t rdev; /* Device number */ mode_t mode; uid_t uid; gid_t gid; ino_t inode; int nlinks; - char *name; /* Null-terminated filename. */ + struct archive_string name; /* Pathname */ + char name_continues; /* Non-zero if name continues */ struct archive_string symlink; + char symlink_continues; /* Non-zero if link continues */ }; @@ -210,6 +222,7 @@ struct iso9660 { uint64_t current_position; ssize_t logical_block_size; + uint64_t volume_size; /* Total size of volume in bytes. */ off_t entry_sparse_offset; int64_t entry_bytes_remaining; @@ -224,7 +237,9 @@ static int archive_read_format_iso9660_r static int archive_read_format_iso9660_read_header(struct archive_read *, struct archive_entry *); static const char *build_pathname(struct archive_string *, struct file_info *); +#if DEBUG static void dump_isodirrec(FILE *, const unsigned char *isodirrec); +#endif static time_t time_from_tm(struct tm *); static time_t isodate17(const unsigned char *); static time_t isodate7(const unsigned char *); @@ -238,6 +253,12 @@ static struct file_info * static void parse_rockridge(struct iso9660 *iso9660, struct file_info *file, const unsigned char *start, const unsigned char *end); +static void parse_rockridge_NM1(struct file_info *, + const unsigned char *, int); +static void parse_rockridge_SL1(struct file_info *, + const unsigned char *, int); +static void parse_rockridge_TF1(struct file_info *, + const unsigned char *, int); static void release_file(struct iso9660 *, struct file_info *); static unsigned toi(const void *p, int n); @@ -314,13 +335,61 @@ static int isPVD(struct iso9660 *iso9660, const unsigned char *h) { struct file_info *file; + int i; - if (h[0] != 1) + /* Type of the Primary Volume Descriptor must be 1. */ + if (h[PVD_type_offset] != 1) return (0); - if (memcmp(h+1, "CD001", 5) != 0) + + /* ID must be "CD001" */ + if (memcmp(h + PVD_id_offset, "CD001", 5) != 0) + return (0); + + /* PVD version must be 1. */ + if (h[PVD_version_offset] != 1) return (0); + /* Reserved field must be 0. */ + if (h[PVD_reserved1_offset] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved2_size; ++i) + if (h[PVD_reserved2_offset + i] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved3_size; ++i) + if (h[PVD_reserved3_offset + i] != 0) + return (0); + + /* Logical block size must be > 0. */ + /* I've looked at Ecma 119 and can't find any stronger + * restriction on this field. */ iso9660->logical_block_size = toi(h + PVD_logical_block_size_offset, 2); + if (iso9660->logical_block_size <= 0) + return (0); + + iso9660->volume_size = iso9660->logical_block_size + * (uint64_t)toi(h + PVD_volume_space_size_offset, 4); + + /* File structure version must be 1 for ISO9660/ECMA119. */ + if (h[PVD_file_structure_version_offset] != 1) + return (0); + + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved4_size; ++i) + if (h[PVD_reserved4_offset + i] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved5_size; ++i) + if (h[PVD_reserved5_offset + i] != 0) + return (0); + + /* XXX TODO: Check other values for sanity; reject more + * malformed PVDs. XXX */ /* Store the root directory in the pending list. */ file = parse_file_info(iso9660, NULL, h + PVD_root_directory_record_offset); @@ -352,12 +421,22 @@ archive_read_format_iso9660_read_header( iso9660->entry_bytes_remaining = file->size; iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */ + if (file->offset + file->size > iso9660->volume_size) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "File is beyond end-of-media: %s", file->name); + iso9660->entry_bytes_remaining = 0; + iso9660->entry_sparse_offset = 0; + release_file(iso9660, file); + return (ARCHIVE_WARN); + } + /* Set up the entry structure with information about this entry. */ archive_entry_set_mode(entry, file->mode); archive_entry_set_uid(entry, file->uid); archive_entry_set_gid(entry, file->gid); archive_entry_set_nlink(entry, file->nlinks); archive_entry_set_ino(entry, file->inode); + /* archive_entry_set_birthtime(entry, file->birthtime, 0); */ archive_entry_set_mtime(entry, file->mtime, 0); archive_entry_set_ctime(entry, file->ctime, 0); archive_entry_set_atime(entry, file->atime, 0); @@ -535,13 +614,7 @@ parse_file_info(struct iso9660 *iso9660, file->mtime = isodate7(isodirrec + DR_date_offset); file->ctime = file->atime = file->mtime; name_len = (size_t)*(const unsigned char *)(isodirrec + DR_name_len_offset); - file->name = (char *)malloc(name_len + 1); - if (file->name == NULL) { - free(file); - return (NULL); - } - memcpy(file->name, isodirrec + DR_name_offset, name_len); - file->name[name_len] = '\0'; + archive_strncpy(&file->name, isodirrec + DR_name_offset, name_len); flags = *(isodirrec + DR_flags_offset); if (flags & 0x02) file->mode = AE_IFDIR | 0700; @@ -561,6 +634,7 @@ parse_file_info(struct iso9660 *iso9660, parse_rockridge(iso9660, file, rr_start, rr_end); } +#if DEBUG /* DEBUGGING: Warn about attributes I don't yet fully support. */ if ((flags & ~0x02) != 0) { fprintf(stderr, "\n ** Unrecognized flag: "); @@ -583,7 +657,7 @@ parse_file_info(struct iso9660 *iso9660, dump_isodirrec(stderr, isodirrec); fprintf(stderr, "\n"); } - +#endif return (file); } @@ -623,6 +697,7 @@ parse_rockridge(struct iso9660 *iso9660, while (p + 4 < end /* Enough space for another entry. */ && p[0] >= 'A' && p[0] <= 'Z' /* Sanity-check 1st char of name. */ && p[1] >= 'A' && p[1] <= 'Z' /* Sanity-check 2nd char of name. */ + && p[2] >= 4 /* Sanity-check length. */ && p + p[2] <= end) { /* Sanity-check length. */ const unsigned char *data = p + 4; int data_length = p[2] - 4; @@ -635,61 +710,54 @@ parse_rockridge(struct iso9660 *iso9660, */ switch(p[0]) { case 'C': - if (p[0] == 'C' && p[1] == 'E' && version == 1) { - /* - * CE extension comprises: - * 8 byte sector containing extension - * 8 byte offset w/in above sector - * 8 byte length of continuation - */ - file->ce_offset = toi(data, 4) - * iso9660->logical_block_size - + toi(data + 8, 4); - file->ce_size = toi(data + 16, 4); + if (p[0] == 'C' && p[1] == 'E') { + if (version == 1 && data_length == 24) { + /* + * CE extension comprises: + * 8 byte sector containing extension + * 8 byte offset w/in above sector + * 8 byte length of continuation + */ + file->ce_offset = (uint64_t)toi(data, 4) + * iso9660->logical_block_size + + toi(data + 8, 4); + file->ce_size = toi(data + 16, 4); + /* If the result is rediculous, + * ignore it. */ + if (file->ce_offset + file->ce_size + > iso9660->volume_size) { + file->ce_offset = 0; + file->ce_size = 0; + } + } break; } /* FALLTHROUGH */ case 'N': - if (p[0] == 'N' && p[1] == 'M' && version == 1 - && *data == 0) { - /* NM extension with flag byte == 0 */ - /* - * NM extension comprises: - * one byte flag - * rest is long name - */ - /* TODO: Obey flags. */ - char *old_name = file->name; - - data++; /* Skip flag byte. */ - data_length--; - file->name = (char *)malloc(data_length + 1); - if (file->name != NULL) { - free(old_name); - memcpy(file->name, data, data_length); - file->name[data_length] = '\0'; - } else - file->name = old_name; + if (p[0] == 'N' && p[1] == 'M') { + if (version == 1) + parse_rockridge_NM1(file, + data, data_length); break; } /* FALLTHROUGH */ case 'P': - if (p[0] == 'P' && p[1] == 'D' && version == 1) { + if (p[0] == 'P' && p[1] == 'D') { /* * PD extension is padding; * contents are always ignored. */ break; } - if (p[0] == 'P' && p[1] == 'N' && version == 1) { - if (data_length == 16) { + if (p[0] == 'P' && p[1] == 'N') { + if (version == 1 && data_length == 16) { file->rdev = toi(data,4); file->rdev <<= 32; file->rdev |= toi(data + 8, 4); } break; } - if (p[0] == 'P' && p[1] == 'X' && version == 1) { + if (p[0] == 'P' && p[1] == 'X') { /* * PX extension comprises: * 8 bytes for mode, @@ -698,12 +766,22 @@ parse_rockridge(struct iso9660 *iso9660, * 8 bytes for gid, * 8 bytes for inode. */ - if (data_length == 32) { - file->mode = toi(data, 4); - file->nlinks = toi(data + 8, 4); - file->uid = toi(data + 16, 4); - file->gid = toi(data + 24, 4); - file->inode = toi(data + 32, 4); + if (version == 1) { + if (data_length >= 8) + file->mode + = toi(data, 4); + if (data_length >= 16) + file->nlinks + = toi(data + 8, 4); + if (data_length >= 24) + file->uid + = toi(data + 16, 4); + if (data_length >= 32) + file->gid + = toi(data + 24, 4); + if (data_length >= 40) + file->inode + = toi(data + 32, 4); } break; } @@ -720,56 +798,14 @@ parse_rockridge(struct iso9660 *iso9660, } /* FALLTHROUGH */ case 'S': - if (p[0] == 'S' && p[1] == 'L' && version == 1 - && *data == 0) { - int cont = 1; - /* SL extension with flags == 0 */ - /* TODO: handle non-zero flag values. */ - data++; /* Skip flag byte. */ - data_length--; - while (data_length > 0) { - unsigned char flag = *data++; - unsigned char nlen = *data++; - data_length -= 2; - - if (cont == 0) - archive_strcat(&file->symlink, "/"); - cont = 0; - - switch(flag) { - case 0x01: /* Continue */ - archive_strncat(&file->symlink, - (const char *)data, nlen); - cont = 1; - break; - case 0x02: /* Current */ - archive_strcat(&file->symlink, "."); - break; - case 0x04: /* Parent */ - archive_strcat(&file->symlink, ".."); - break; - case 0x08: /* Root */ - case 0x10: /* Volume root */ - archive_string_empty(&file->symlink); - break; - case 0x20: /* Hostname */ - archive_strcat(&file->symlink, "hostname"); - break; - case 0: - archive_strncat(&file->symlink, - (const char *)data, nlen); - break; - default: - /* TODO: issue a warning ? */ - break; - } - data += nlen; - data_length -= nlen; - } + if (p[0] == 'S' && p[1] == 'L') { + if (version == 1) + parse_rockridge_SL1(file, + data, data_length); break; } if (p[0] == 'S' && p[1] == 'P' - && version == 1 && data_length == 7 + && version == 1 && data_length == 3 && data[0] == (unsigned char)'\xbe' && data[1] == (unsigned char)'\xef') { /* @@ -805,66 +841,27 @@ parse_rockridge(struct iso9660 *iso9660, return; } case 'T': - if (p[0] == 'T' && p[1] == 'F' && version == 1) { - char flag = data[0]; - /* - * TF extension comprises: - * one byte flag - * create time (optional) - * modify time (optional) - * access time (optional) - * attribute time (optional) - * Time format and presence of fields - * is controlled by flag bits. - */ - data++; - if (flag & 0x80) { - /* Use 17-byte time format. */ - if (flag & 1) /* Create time. */ - data += 17; - if (flag & 2) { /* Modify time. */ - file->mtime = isodate17(data); - data += 17; - } - if (flag & 4) { /* Access time. */ - file->atime = isodate17(data); - data += 17; - } - if (flag & 8) { /* Attribute time. */ - file->ctime = isodate17(data); - data += 17; - } - } else { - /* Use 7-byte time format. */ - if (flag & 1) /* Create time. */ - data += 7; - if (flag & 2) { /* Modify time. */ - file->mtime = isodate7(data); - data += 7; - } - if (flag & 4) { /* Access time. */ - file->atime = isodate7(data); - data += 7; - } - if (flag & 8) { /* Attribute time. */ - file->ctime = isodate7(data); - data += 7; - } - } + if (p[0] == 'T' && p[1] == 'F') { + if (version == 1) + parse_rockridge_TF1(file, + data, data_length); break; } /* FALLTHROUGH */ default: /* The FALLTHROUGHs above leave us here for * any unsupported extension. */ +#if DEBUG { const unsigned char *t; - fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name); + fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name.s); fprintf(stderr, " %c%c(%d):", p[0], p[1], data_length); for (t = data; t < data + data_length && t < data + 16; t++) fprintf(stderr, " %02x", *t); fprintf(stderr, "\n"); } +#endif + break; } @@ -874,14 +871,222 @@ parse_rockridge(struct iso9660 *iso9660, } static void +parse_rockridge_NM1(struct file_info *file, const unsigned char *data, + int data_length) +{ + if (!file->name_continues) + archive_string_empty(&file->name); + file->name_continues = 0; + if (data_length < 1) + return; + /* + * NM version 1 extension comprises: + * 1 byte flag, value is one of: + * = 0: remainder is name + * = 1: remainder is name, next NM entry continues name + * = 2: "." + * = 4: ".." + * = 32: Implementation specific + * All other values are reserved. + */ + switch(data[0]) { + case 0: + if (data_length < 2) + return; + archive_strncat(&file->name, data + 1, data_length - 1); + break; + case 1: + if (data_length < 2) + return; + archive_strncat(&file->name, data + 1, data_length - 1); + file->name_continues = 1; + break; + case 2: + archive_strcat(&file->name, "."); + break; + case 4: + archive_strcat(&file->name, ".."); + break; + default: + return; + } + +} + +static void +parse_rockridge_TF1(struct file_info *file, const unsigned char *data, + int data_length) +{ + char flag; + /* + * TF extension comprises: + * one byte flag + * create time (optional) + * modify time (optional) + * access time (optional) + * attribute time (optional) + * Time format and presence of fields + * is controlled by flag bits. + */ + if (data_length < 1) + return; + flag = data[0]; + ++data; + --data_length; + if (flag & 0x80) { + /* Use 17-byte time format. */ + if ((flag & 1) && data_length >= 17) { + /* Create time. */ + file->birthtime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 2) && data_length >= 17) { + /* Modify time. */ + file->mtime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 4) && data_length >= 17) { + /* Access time. */ + file->atime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 8) && data_length >= 17) { + /* Attribute change time. */ + file->ctime = isodate17(data); + data += 17; + data_length -= 17; + } + } else { + /* Use 7-byte time format. */ + if ((flag & 1) && data_length >= 7) { + /* Create time. */ + file->birthtime = isodate17(data); + data += 7; + data_length -= 7; + } + if ((flag & 2) && data_length >= 7) { + /* Modify time. */ + file->mtime = isodate7(data); + data += 7; + data_length -= 7; + } + if ((flag & 4) && data_length >= 7) { + /* Access time. */ + file->atime = isodate7(data); + data += 7; + data_length -= 7; + } + if ((flag & 8) && data_length >= 7) { + /* Attribute change time. */ + file->ctime = isodate7(data); + data += 7; + data_length -= 7; + } + } +} + +static void +parse_rockridge_SL1(struct file_info *file, const unsigned char *data, + int data_length) +{ + int component_continues = 1; + + if (!file->symlink_continues) + archive_string_empty(&file->symlink); + else + archive_strcat(&file->symlink, "/"); + file->symlink_continues = 0; + + /* + * Defined flag values: + * 0: This is the last SL record for this symbolic link + * 1: this symbolic link field continues in next SL entry + * All other values are reserved. + */ + if (data_length < 1) + return; + switch(*data) { + case 0: + break; + case 1: + file->symlink_continues = 1; + break; + default: + return; + } + ++data; /* Skip flag byte. */ + --data_length; + + /* + * SL extension body stores "components". + * Basically, this is a complicated way of storing + * a POSIX path. It also interferes with using + * symlinks for storing non-path data. + * + * Each component is 2 bytes (flag and length) + * possibly followed by name data. + */ + while (data_length >= 2) { + unsigned char flag = *data++; + unsigned char nlen = *data++; + data_length -= 2; + + if (!component_continues) + archive_strcat(&file->symlink, "/"); + component_continues = 0; + + switch(flag) { + case 0: /* Usual case, this is text. */ + if (data_length < nlen) + return; + archive_strncat(&file->symlink, + (const char *)data, nlen); + break; + case 0x01: /* Text continues in next component. */ + if (data_length < nlen) + return; + archive_strncat(&file->symlink, + (const char *)data, nlen); + component_continues = 1; + break; + case 0x02: /* Current dir. */ + archive_strcat(&file->symlink, "."); + break; + case 0x04: /* Parent dir. */ + archive_strcat(&file->symlink, ".."); + break; + case 0x08: /* Root of filesystem. */ + archive_string_empty(&file->symlink); + archive_strcat(&file->symlink, "/"); + break; + case 0x10: /* Undefined (historically "volume root" */ + archive_string_empty(&file->symlink); + archive_strcat(&file->symlink, "ROOT"); + break; + case 0x20: /* Undefined (historically "hostname") */ + archive_strcat(&file->symlink, "hostname"); + break; + default: + /* TODO: issue a warning ? */ + return; + } + data += nlen; + data_length -= nlen; + } +} + + +static void release_file(struct iso9660 *iso9660, struct file_info *file) { struct file_info *parent; if (file->refcount == 0) { parent = file->parent; - if (file->name) - free(file->name); + archive_string_free(&file->name); archive_string_free(&file->symlink); free(file); if (parent != NULL) { @@ -906,7 +1111,9 @@ next_entry_seek(struct archive_read *a, /* CE area precedes actual file data? Ignore it. */ if (file->ce_offset > file->offset) { -fprintf(stderr, " *** Discarding CE data.\n"); +#if DEBUG + fprintf(stderr, " *** Discarding CE data.\n"); +#endif file->ce_offset = 0; file->ce_size = 0; } @@ -1071,17 +1278,18 @@ time_from_tm(struct tm *t) static const char * build_pathname(struct archive_string *as, struct file_info *file) { - if (file->parent != NULL && file->parent->name[0] != '\0') { + if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) { build_pathname(as, file->parent); archive_strcat(as, "/"); } - if (file->name[0] == '\0') + if (archive_strlen(&file->name) == 0) archive_strcat(as, "."); else - archive_strcat(as, file->name); + archive_string_concat(as, &file->name); return (as->s); } +#if DEBUG static void dump_isodirrec(FILE *out, const unsigned char *isodirrec) { @@ -1106,3 +1314,4 @@ dump_isodirrec(FILE *out, const unsigned fprintf(out, " `%.*s'", toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset); } +#endif Modified: stable/7/lib/libarchive/archive_string.c ============================================================================== --- stable/7/lib/libarchive/archive_string.c Mon Dec 8 17:12:40 2008 (r185769) +++ stable/7/lib/libarchive/archive_string.c Mon Dec 8 17:18:37 2008 (r185770) @@ -70,6 +70,18 @@ __archive_string_copy(struct archive_str } void +__archive_string_concat(struct archive_string *dest, struct archive_string *src) +{ + if (src->length > 0) { + if (__archive_string_ensure(dest, dest->length + src->length + 1) == NULL) + __archive_errx(1, "Out of memory"); + memcpy(dest->s + dest->length, src->s, src->length); + dest->length += src->length; + dest->s[dest->length] = 0; + } +} + +void __archive_string_free(struct archive_string *as) { as->length = 0; Modified: stable/7/lib/libarchive/archive_string.h ============================================================================== --- stable/7/lib/libarchive/archive_string.h Mon Dec 8 17:12:40 2008 (r185769) +++ stable/7/lib/libarchive/archive_string.h Mon Dec 8 17:18:37 2008 (r185770) @@ -92,6 +92,12 @@ __archive_string_copy(struct archive_str #define archive_string_copy(dest, src) \ __archive_string_copy(dest, src) +/* Concatenate one archive_string to another */ +void +__archive_string_concat(struct archive_string *dest, struct archive_string *src); +#define archive_string_concat(dest, src) \ + __archive_string_concat(dest, src) + /* Ensure that the underlying buffer is at least as large as the request. */ struct archive_string * __archive_string_ensure(struct archive_string *, size_t); From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:22:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03CCF1065675; Mon, 8 Dec 2008 17:22:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9A0A28FC12; Mon, 8 Dec 2008 17:22:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB8HMIXO002722; Mon, 8 Dec 2008 12:22:19 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Konstantin Belousov Date: Mon, 8 Dec 2008 11:41:39 -0500 User-Agent: KMail/1.9.7 References: <200812071325.mB7DP64P026630@svn.freebsd.org> In-Reply-To: <200812071325.mB7DP64P026630@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812081141.39800.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 08 Dec 2008 12:22:19 -0500 (EST) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185739 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:22:26 -0000 On Sunday 07 December 2008 08:25:06 am Konstantin Belousov wrote: > Author: kib > Date: Sun Dec 7 13:25:06 2008 > New Revision: 185739 > URL: http://svn.freebsd.org/changeset/base/185739 > > Log: > Improve usefulness of the panic by printing the pointer to the problematic > dquot. In-tree gdb is often unable to get the dq value, so supply it in > panic message. Even in userland I find gdb to be an epic fail for handling local variables if inlined functions are involved. I haven't tried a newer gdb from ports to see if it fares better in that case. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:22:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E3CC106574C; Mon, 8 Dec 2008 17:22:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 3FCD18FC16; Mon, 8 Dec 2008 17:22:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB8HMIXP002722; Mon, 8 Dec 2008 12:22:25 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Tim Kientzle Date: Mon, 8 Dec 2008 11:48:00 -0500 User-Agent: KMail/1.9.7 References: <200812060657.mB66vjXM086176@svn.freebsd.org> In-Reply-To: <200812060657.mB66vjXM086176@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812081148.00728.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 08 Dec 2008 12:22:25 -0500 (EST) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185682 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:22:33 -0000 On Saturday 06 December 2008 01:57:45 am Tim Kientzle wrote: > Author: kientzle > Date: Sat Dec 6 06:57:45 2008 > New Revision: 185682 > URL: http://svn.freebsd.org/changeset/base/185682 > > Log: > Strip ";1" and trailing "." from ISO9660 entries. > This seems a better match for people's expectations. Err, maybe strip whatever version is present? The '1' is a version number and in theory you can have newer versions. I think the intention was to allow replacing files by growing an ISO fs with version '2' files "replacing" version '1', etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:22:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DB071065715; Mon, 8 Dec 2008 17:22:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 0E83D8FC18; Mon, 8 Dec 2008 17:22:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB8HMIXQ002722; Mon, 8 Dec 2008 12:22:30 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Roman Divacky Date: Mon, 8 Dec 2008 11:50:51 -0500 User-Agent: KMail/1.9.7 References: <200812052050.mB5KoOcV072648@svn.freebsd.org> <20081205224600.GA16948@freebsd.org> In-Reply-To: <20081205224600.GA16948@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812081150.52312.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 08 Dec 2008 12:22:31 -0500 (EST) X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov Subject: Re: svn commit: r185647 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:22:37 -0000 On Friday 05 December 2008 05:46:00 pm Roman Divacky wrote: > On Fri, Dec 05, 2008 at 08:50:24PM +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Fri Dec 5 20:50:24 2008 > > New Revision: 185647 > > URL: http://svn.freebsd.org/changeset/base/185647 > > > > Log: > > Several threads in a process may do vfork() simultaneously. Then, all > > parent threads sleep on the parent' struct proc until corresponding > > child releases the vmspace. Each sleep is interlocked with proc mutex of > > the child, that triggers assertion in the sleepq_add(). The assertion > > requires that at any time, all simultaneous sleepers for the channel use > > the same interlock. > > > > Silent the assertion by using conditional variable allocated in the > > child. Broadcast the variable event on exec() and exit(). > > > > Since struct proc * sleep wait channel is overloaded for several > > unrelated events, I was unable to remove wakeups from the places where > > cv_broadcast() is added, except exec(). > > are there any differences (performance etc.) in using condition variables > instead of sleep/wakeup? They are both just wrappers around sleepq_*. cv does have a minor optimization where it attempts to avoid calling the sleepq_* code directly during a broadcast/signal if there are zero waiters. wakeup/wakeup_one always look in the hash table and walk the hash bucket via sleepq_*. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 17:22:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B949A106578E; Mon, 8 Dec 2008 17:22:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6CCF8FC1C; Mon, 8 Dec 2008 17:22:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8HMi0b066188; Mon, 8 Dec 2008 17:22:44 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8HMicp066187; Mon, 8 Dec 2008 17:22:44 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812081722.mB8HMicp066187@svn.freebsd.org> From: Tim Kientzle Date: Mon, 8 Dec 2008 17:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185771 - head/lib/libarchive/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 17:22:45 -0000 Author: kientzle Date: Mon Dec 8 17:22:44 2008 New Revision: 185771 URL: http://svn.freebsd.org/changeset/base/185771 Log: Obey the TMPDIR, TMP, TEMP, or TEMPDIR environment variables when choosing a scratch directory for the tests. Fallback to "/tmp", of course. Modified: head/lib/libarchive/test/main.c Modified: head/lib/libarchive/test/main.c ============================================================================== --- head/lib/libarchive/test/main.c Mon Dec 8 17:18:37 2008 (r185770) +++ head/lib/libarchive/test/main.c Mon Dec 8 17:22:44 2008 (r185771) @@ -897,6 +897,7 @@ int main(int argc, char **argv) time_t now; char *refdir_alloc = NULL; char *progname, *p; + char *tmp; char tmpdir[256]; char tmpdir_timestamp[256]; @@ -916,6 +917,17 @@ int main(int argc, char **argv) testprog = getenv(ENVBASE); #endif + if (getenv("TMPDIR") != NULL) + tmp = getenv("TMPDIR"); + else if (getenv("TMP") != NULL) + tmp = getenv("TMP"); + else if (getenv("TEMP") != NULL) + tmp = getenv("TEMP"); + else if (getenv("TEMPDIR") != NULL) + tmp = getenv("TEMPDIR"); + else + tmp = "/tmp"; + /* Allow -d to be controlled through the environment. */ if (getenv(ENVBASE "_DEBUG") != NULL) dump_on_failure = 1; @@ -976,7 +988,8 @@ int main(int argc, char **argv) strftime(tmpdir_timestamp, sizeof(tmpdir_timestamp), "%Y-%m-%dT%H.%M.%S", localtime(&now)); - sprintf(tmpdir, "/tmp/%s.%s-%03d", progname, tmpdir_timestamp, i); + sprintf(tmpdir, "%s/%s.%s-%03d", tmp, progname, + tmpdir_timestamp, i); if (mkdir(tmpdir,0755) == 0) break; if (errno == EEXIST) From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 18:40:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 053ED1065670; Mon, 8 Dec 2008 18:40:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7DB28FC1D; Mon, 8 Dec 2008 18:39:59 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8Idx0m067658; Mon, 8 Dec 2008 18:39:59 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8IdxbT067657; Mon, 8 Dec 2008 18:39:59 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200812081839.mB8IdxbT067657@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 8 Dec 2008 18:39:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 18:40:00 -0000 Author: jkim Date: Mon Dec 8 18:39:59 2008 New Revision: 185772 URL: http://svn.freebsd.org/changeset/base/185772 Log: - Detect Bochs BIOS variants and use HZ_VM as well. - Free kernel environment variable after its use. - Fix style(9) nits. Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Mon Dec 8 17:22:44 2008 (r185771) +++ head/sys/kern/subr_param.c Mon Dec 8 18:39:59 2008 (r185772) @@ -118,6 +118,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, */ struct buf *swbuf; +static const char *const vm_bnames[] = { + "QEMU", /* QEMU */ + "Plex86", /* Plex86 */ + "Bochs", /* Bochs */ + NULL +}; + static const char *const vm_pnames[] = { "VMware Virtual Platform", /* VMWare VM */ "Virtual Machine", /* Microsoft VirtualPC */ @@ -132,14 +139,25 @@ detect_virtual(void) char *sysenv; int i; + sysenv = getenv("smbios.bios.vendor"); + if (sysenv != NULL) { + for (i = 0; vm_bnames[i] != NULL; i++) + if (strcmp(sysenv, vm_bnames[i]) == 0) { + freeenv(sysenv); + return (1); + } + freeenv(sysenv); + } sysenv = getenv("smbios.system.product"); if (sysenv != NULL) { - for (i = 0; vm_pnames[i] != NULL; i++) { - if (strcmp(sysenv, vm_pnames[i]) == 0) - return 1; - } + for (i = 0; vm_pnames[i] != NULL; i++) + if (strcmp(sysenv, vm_pnames[i]) == 0) { + freeenv(sysenv); + return (1); + } + freeenv(sysenv); } - return 0; + return (0); } /* @@ -151,13 +169,8 @@ init_param1(void) hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); - if (hz == -1) { - if (detect_virtual()) { - hz = HZ_VM; - } else { - hz = HZ; - } - } + if (hz == -1) + hz = detect_virtual() ? HZ_VM : HZ; tick = 1000000 / hz; #ifdef VM_SWZONE_SIZE_MAX From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:01:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62DDE1065676 for ; Mon, 8 Dec 2008 19:01:16 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by mx1.freebsd.org (Postfix) with ESMTP id BF0938FC16 for ; Mon, 8 Dec 2008 19:01:15 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so1514135fgb.35 for ; Mon, 08 Dec 2008 11:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=UPxrJXe8z0/TeHRi8kyFcygUjS93DjjjQRWAKEoh14M=; b=Xnf97s4oxaX4fUk4rARNYuqekyXc6H1vl7KiGMFSBsXQqrlVxYS7zl+08vx1cllxhW 1TdFQxMU2EcC9KFoHY+mNmDyZc6oC+zsPwAiU2i/+84r7MGgMY6Pzr1Cr4Cmjxgn1njz 8cygCdk0bMM171ZDOYL+s+2sUv2jmVML/IG9M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=WkyEnChVrVZutZ0ZnR4AziQWtOg1uAVV0c5xI5Y44n+7/wEeoW2jazbw+ZKzKTnInH Q+E3mx5SDJ0xFJHL137pfZzZkUTci6OI4X01RoywCnSN2KY+BIihMsg3hkKYU3YLrWqK Wft/+lmkOrriMlZ4QNJYbQF5gBxya1lU7SL8k= Received: by 10.181.226.2 with SMTP id d2mr1318143bkr.204.1228762874440; Mon, 08 Dec 2008 11:01:14 -0800 (PST) Received: by 10.181.229.16 with HTTP; Mon, 8 Dec 2008 11:01:14 -0800 (PST) Message-ID: <9bbcef730812081101o52905c4ak56acfb784bd58d16@mail.gmail.com> Date: Mon, 8 Dec 2008 20:01:14 +0100 From: "Ivan Voras" To: "Jung-uk Kim" In-Reply-To: <200812081839.mB8IdxbT067657@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812081839.mB8IdxbT067657@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:01:16 -0000 Hi, How about introducing a read-only sysctl, something like kern.in_vm that would be 0 : none detected / as far as we can tell we're on bare metal 1 : if detect_virtual() returns 1 2 : Xen dom-U 3, etc... for future use, like VMWare VMI, etc. ? (of course, for symmetry, if we ever support any hosting for full virtualization, another sysctl might be introduced as a bitmap :) ). 2008/12/8 Jung-uk Kim : > Author: jkim > Date: Mon Dec 8 18:39:59 2008 > New Revision: 185772 > URL: http://svn.freebsd.org/changeset/base/185772 > > Log: > - Detect Bochs BIOS variants and use HZ_VM as well. > - Free kernel environment variable after its use. > - Fix style(9) nits. > > Modified: > head/sys/kern/subr_param.c > > Modified: head/sys/kern/subr_param.c > ============================================================================== > --- head/sys/kern/subr_param.c Mon Dec 8 17:22:44 2008 (r185771) > +++ head/sys/kern/subr_param.c Mon Dec 8 18:39:59 2008 (r185772) > @@ -118,6 +118,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, > */ > struct buf *swbuf; > > +static const char *const vm_bnames[] = { > + "QEMU", /* QEMU */ > + "Plex86", /* Plex86 */ > + "Bochs", /* Bochs */ > + NULL > +}; > + > static const char *const vm_pnames[] = { > "VMware Virtual Platform", /* VMWare VM */ > "Virtual Machine", /* Microsoft VirtualPC */ > @@ -132,14 +139,25 @@ detect_virtual(void) > char *sysenv; > int i; > > + sysenv = getenv("smbios.bios.vendor"); > + if (sysenv != NULL) { > + for (i = 0; vm_bnames[i] != NULL; i++) > + if (strcmp(sysenv, vm_bnames[i]) == 0) { > + freeenv(sysenv); > + return (1); > + } > + freeenv(sysenv); > + } > sysenv = getenv("smbios.system.product"); > if (sysenv != NULL) { > - for (i = 0; vm_pnames[i] != NULL; i++) { > - if (strcmp(sysenv, vm_pnames[i]) == 0) > - return 1; > - } > + for (i = 0; vm_pnames[i] != NULL; i++) > + if (strcmp(sysenv, vm_pnames[i]) == 0) { > + freeenv(sysenv); > + return (1); > + } > + freeenv(sysenv); > } > - return 0; > + return (0); > } > > /* > @@ -151,13 +169,8 @@ init_param1(void) > > hz = -1; > TUNABLE_INT_FETCH("kern.hz", &hz); > - if (hz == -1) { > - if (detect_virtual()) { > - hz = HZ_VM; > - } else { > - hz = HZ; > - } > - } > + if (hz == -1) > + hz = detect_virtual() ? HZ_VM : HZ; > tick = 1000000 / hz; > > #ifdef VM_SWZONE_SIZE_MAX > From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:06:16 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id BFA321065676; Mon, 8 Dec 2008 19:06:15 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Mon, 8 Dec 2008 14:06:00 -0500 User-Agent: KMail/1.6.2 References: <200812081839.mB8IdxbT067657@svn.freebsd.org> In-Reply-To: <200812081839.mB8IdxbT067657@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200812081406.02370.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:06:16 -0000 On Monday 08 December 2008 01:39 pm, Jung-uk Kim wrote: > Author: jkim > Date: Mon Dec 8 18:39:59 2008 > New Revision: 185772 > URL: http://svn.freebsd.org/changeset/base/185772 > > Log: > - Detect Bochs BIOS variants and use HZ_VM as well. > - Free kernel environment variable after its use. > - Fix style(9) nits. > > Modified: > head/sys/kern/subr_param.c Recently QEMU added "firmware configuration" backdoor port to identify itself to host OS: http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01231.html We can add other guest architectures with it later. FYI... Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:22:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17F7E1065677 for ; Mon, 8 Dec 2008 19:22:19 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id 96C958FC21 for ; Mon, 8 Dec 2008 19:22:18 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so2864873fkk.11 for ; Mon, 08 Dec 2008 11:22:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=pdiWbDCkQQohSgKxUyPeT7BlYpDR8+ot3fZrUHgPZaQ=; b=NFX+pKfnIHr/cCugndKu8lE2g0zXIMyQ51arit7G9lZRjo3xqFwNN+jkJ+U8zaaOPI aZvbmV/Xwia7x3aSUZYGKyaFNQO0AlscrCYzuaEgh9qGBz5izNFQ1Hm5YNIwn6VFnrue kvc/eYWIPsrMmokbZnupEL11suf2DaPHoQQzM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=m18mTaNJoev7h7BOidOy2KhxcVeDrBToTNyOp3/eI5NNthCeipg9yn1htDAy6KmfRA TfESFPVbZ2Je/IZaUpGeEJCciccjXQaG4WZSHK9YReImdTj3dPkeprEPbSlNgqby7uue ZeqsIutuKQUq92aOJb20KzW/yBDxg3HlzQZqw= Received: by 10.180.213.14 with SMTP id l14mr1336564bkg.107.1228764136818; Mon, 08 Dec 2008 11:22:16 -0800 (PST) Received: by 10.181.229.16 with HTTP; Mon, 8 Dec 2008 11:22:16 -0800 (PST) Message-ID: <9bbcef730812081122r2b1fb938s6201aeee7756b884@mail.gmail.com> Date: Mon, 8 Dec 2008 20:22:16 +0100 From: "Ivan Voras" To: "Jung-uk Kim" In-Reply-To: <9bbcef730812081101o52905c4ak56acfb784bd58d16@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812081839.mB8IdxbT067657@svn.freebsd.org> <9bbcef730812081101o52905c4ak56acfb784bd58d16@mail.gmail.com> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:22:19 -0000 2008/12/8 Ivan Voras : > Hi, > > How about introducing a read-only sysctl, something like kern.in_vm > that would be > > 0 : none detected / as far as we can tell we're on bare metal > 1 : if detect_virtual() returns 1 > 2 : Xen dom-U > 3, etc... for future use, like VMWare VMI, etc. > > ? > > (of course, for symmetry, if we ever support any hosting for full > virtualization, another sysctl might be introduced as a bitmap :) ). Patch suggested: http://people.freebsd.org/~ivoras/diffs/subr_param.c.diff.txt From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:42:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC7F61065673; Mon, 8 Dec 2008 19:42:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 5D6A28FC18; Mon, 8 Dec 2008 19:42:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1L9m01-0004Bc-B9; Mon, 08 Dec 2008 21:42:33 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mB8JgUKR072357 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Dec 2008 21:42:30 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mB8JgTEw097439; Mon, 8 Dec 2008 21:42:29 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mB8JgT79097438; Mon, 8 Dec 2008 21:42:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 8 Dec 2008 21:42:29 +0200 From: Kostik Belousov To: John Baldwin Message-ID: <20081208194229.GX2038@deviant.kiev.zoral.com.ua> References: <200812071325.mB7DP64P026630@svn.freebsd.org> <200812081141.39800.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="rVbcdceMkFY6fDyG" Content-Disposition: inline In-Reply-To: <200812081141.39800.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1L9m01-0004Bc-B9 4409df330c321681a1e6269f50f659f3 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185739 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:42:35 -0000 --rVbcdceMkFY6fDyG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 08, 2008 at 11:41:39AM -0500, John Baldwin wrote: > On Sunday 07 December 2008 08:25:06 am Konstantin Belousov wrote: > > Author: kib > > Date: Sun Dec 7 13:25:06 2008 > > New Revision: 185739 > > URL: http://svn.freebsd.org/changeset/base/185739 > >=20 > > Log: > > Improve usefulness of the panic by printing the pointer to the proble= matic > > dquot. In-tree gdb is often unable to get the dq value, so supply it = in > > panic message. >=20 > Even in userland I find gdb to be an epic fail for handling local > variables if inlined functions are involved. I haven't tried a newer > gdb from ports to see if it fares better in that case. I have locally built 6.8 exactly for this purposes, made by configure;make. I can confirm that its dwarf handling is _much_ better then in-tree gdb. --rVbcdceMkFY6fDyG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkk9eKUACgkQC3+MBN1Mb4iaOwCcCeF+AvL31xTo7OI9/xQg+7a1 AsAAoKdEJQ+HiYBDKU+Bf3Yrk3Zy1A8Y =ufS+ -----END PGP SIGNATURE----- --rVbcdceMkFY6fDyG-- From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:44:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 7FCAD1065673; Mon, 8 Dec 2008 19:44:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: "Ivan Voras" Date: Mon, 8 Dec 2008 14:44:19 -0500 User-Agent: KMail/1.6.2 References: <200812081839.mB8IdxbT067657@svn.freebsd.org> <9bbcef730812081101o52905c4ak56acfb784bd58d16@mail.gmail.com> <9bbcef730812081122r2b1fb938s6201aeee7756b884@mail.gmail.com> In-Reply-To: <9bbcef730812081122r2b1fb938s6201aeee7756b884@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200812081444.25575.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:44:40 -0000 On Monday 08 December 2008 02:22 pm, Ivan Voras wrote: > 2008/12/8 Ivan Voras : > > Hi, > > > > How about introducing a read-only sysctl, something like > > kern.in_vm that would be > > > > 0 : none detected / as far as we can tell we're on bare metal > > 1 : if detect_virtual() returns 1 > > 2 : Xen dom-U > > 3, etc... for future use, like VMWare VMI, etc. > > > > ? > > > > (of course, for symmetry, if we ever support any hosting for full > > virtualization, another sysctl might be introduced as a bitmap :) > > ). > > Patch suggested: > http://people.freebsd.org/~ivoras/diffs/subr_param.c.diff.txt Personally I have no preference but I think you should move this discussion to freebsd-emulation@ and freebsd-virtualization@. Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 19:49:53 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 17E021065672; Mon, 8 Dec 2008 19:49:53 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Mon, 8 Dec 2008 14:49:39 -0500 User-Agent: KMail/1.6.2 References: <200812081839.mB8IdxbT067657@svn.freebsd.org> <200812081406.02370.jkim@FreeBSD.org> In-Reply-To: <200812081406.02370.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200812081449.41300.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r185772 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 19:49:53 -0000 On Monday 08 December 2008 02:06 pm, Jung-uk Kim wrote: > On Monday 08 December 2008 01:39 pm, Jung-uk Kim wrote: > > Author: jkim > > Date: Mon Dec 8 18:39:59 2008 > > New Revision: 185772 > > URL: http://svn.freebsd.org/changeset/base/185772 > > > > Log: > > - Detect Bochs BIOS variants and use HZ_VM as well. > > - Free kernel environment variable after its use. > > - Fix style(9) nits. > > > > Modified: > > head/sys/kern/subr_param.c > > Recently QEMU added "firmware configuration" backdoor port to > identify itself to host OS: ^^^^ guest > http://lists.gnu.org/archive/html/qemu-devel/2008-08/msg01231.html > > We can add other guest architectures with it later. > > FYI... > > Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 20:18:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB21B1065670; Mon, 8 Dec 2008 20:18:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A84CA8FC08; Mon, 8 Dec 2008 20:18:50 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8KIolY069622; Mon, 8 Dec 2008 20:18:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8KIofH069620; Mon, 8 Dec 2008 20:18:50 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812082018.mB8KIofH069620@svn.freebsd.org> From: Robert Watson Date: Mon, 8 Dec 2008 20:18:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185773 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 20:18:50 -0000 Author: rwatson Date: Mon Dec 8 20:18:50 2008 New Revision: 185773 URL: http://svn.freebsd.org/changeset/base/185773 Log: Add a reference count to struct inpcb, which may be explicitly incremented using in_pcbref(), and decremented using in_pcbfree() or inpcbrele(). Protocols using only current in_pcballoc() and in_pcbfree() calls will see the same semantics, but it is now possible for TCP to call in_pcbref() and in_pcbrele() to prevent an inpcb from being freed when both tcbinfo and per-inpcb locks are released. This makes it possible to safely transition from holding only the inpcb lock to both tcbinfo and inpcb lock without re-looking up a connection in the input path, timer path, etc. Notice that in_pcbrele() does not unlock the connection after decrementing the refcount, if the connection remains, so that the caller can continue to use it; in_pcbrele() returns a flag indicating whether or not the inpcb pointer is still valid, and in_pcbfee() is now a simple wrapper around in_pcbrele(). MFC after: 1 month Discussed with: bz, kmacy Reviewed by: bz, gnn, kmacy Tested by: kmacy Modified: head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Mon Dec 8 18:39:59 2008 (r185772) +++ head/sys/netinet/in_pcb.c Mon Dec 8 20:18:50 2008 (r185773) @@ -1,7 +1,7 @@ /*- * Copyright (c) 1982, 1986, 1991, 1993, 1995 * The Regents of the University of California. - * Copyright (c) 2007 Robert N. M. Watson + * Copyright (c) 2007-2008 Robert N. M. Watson * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -238,6 +238,7 @@ in_pcballoc(struct socket *so, struct in #endif INP_WLOCK(inp); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; + inp->inp_refcount = 1; /* Reference from the inpcbinfo */ #if defined(IPSEC) || defined(MAC) out: @@ -872,14 +873,10 @@ in_pcbdisconnect(struct inpcb *inp) } /* - * Historically, in_pcbdetach() included the functionality now found in - * in_pcbfree() and in_pcbdrop(). They are now broken out to reflect the - * more complex life cycle of TCP. - * - * in_pcbdetach() is responsibe for disconnecting the socket from an inpcb. + * in_pcbdetach() is responsibe for disassociating a socket from an inpcb. * For most protocols, this will be invoked immediately prior to calling - * in_pcbfree(). However, for TCP the inpcb may significantly outlive the - * socket, in which case in_pcbfree() may be deferred. + * in_pcbfree(). However, with TCP the inpcb may significantly outlive the + * socket, in which case in_pcbfree() is deferred. */ void in_pcbdetach(struct inpcb *inp) @@ -892,15 +889,17 @@ in_pcbdetach(struct inpcb *inp) } /* - * in_pcbfree() is responsible for freeing an already-detached inpcb, as well - * as removing it from any global inpcb lists it might be on. + * in_pcbfree_internal() frees an inpcb that has been detached from its + * socket, and whose reference count has reached 0. It will also remove the + * inpcb from any global lists it might remain on. */ -void -in_pcbfree(struct inpcb *inp) +static void +in_pcbfree_internal(struct inpcb *inp) { struct inpcbinfo *ipi = inp->inp_pcbinfo; KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", __func__)); + KASSERT(inp->inp_refcount == 0, ("%s: refcount !0", __func__)); INP_INFO_WLOCK_ASSERT(ipi); INP_WLOCK_ASSERT(inp); @@ -932,6 +931,77 @@ in_pcbfree(struct inpcb *inp) } /* + * in_pcbref() bumps the reference count on an inpcb in order to maintain + * stability of an inpcb pointer despite the inpcb lock being released. This + * is used in TCP when the inpcbinfo lock needs to be acquired or upgraded, + * but where the inpcb lock is already held. + * + * While the inpcb will not be freed, releasing the inpcb lock means that the + * connection's state may change, so the caller should be careful to + * revalidate any cached state on reacquiring the lock. Drop the reference + * using in_pcbrele(). + */ +void +in_pcbref(struct inpcb *inp) +{ + + INP_WLOCK_ASSERT(inp); + + KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + + inp->inp_refcount++; +} + +/* + * Drop a refcount on an inpcb elevated using in_pcbref(); because a call to + * in_pcbfree() may have been made between in_pcbref() and in_pcbrele(), we + * return a flag indicating whether or not the inpcb remains valid. If it is + * valid, we return with the inpcb lock held. + */ +int +in_pcbrele(struct inpcb *inp) +{ +#ifdef INVARIANTS + struct inpcbinfo *ipi = inp->inp_pcbinfo; +#endif + + KASSERT(inp->inp_refcount > 0, ("%s: refcount 0", __func__)); + + INP_INFO_WLOCK_ASSERT(ipi); + INP_WLOCK_ASSERT(inp); + + inp->inp_refcount--; + if (inp->inp_refcount > 0) + return (0); + in_pcbfree_internal(inp); + return (1); +} + +/* + * Unconditionally schedule an inpcb to be freed by decrementing its + * reference count, which should occur only after the inpcb has been detached + * from its socket. If another thread holds a temporary reference (acquired + * using in_pcbref()) then the free is deferred until that reference is + * released using in_pcbrele(), but the inpcb is still unlocked. + */ +void +in_pcbfree(struct inpcb *inp) +{ +#ifdef INVARIANTS + struct inpcbinfo *ipi = inp->inp_pcbinfo; +#endif + + KASSERT(inp->inp_socket == NULL, ("%s: inp_socket != NULL", + __func__)); + + INP_INFO_WLOCK_ASSERT(ipi); + INP_WLOCK_ASSERT(inp); + + if (!in_pcbrele(inp)) + INP_WUNLOCK(inp); +} + +/* * in_pcbdrop() removes an inpcb from hashed lists, releasing its address and * port reservation, and preventing it from being returned by inpcb lookups. * Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Mon Dec 8 18:39:59 2008 (r185772) +++ head/sys/netinet/in_pcb.h Mon Dec 8 20:18:50 2008 (r185773) @@ -170,6 +170,7 @@ struct inpcb { u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_ispare1; /* (x) connection id / queue id */ + u_int inp_refcount; /* (i) refcount */ void *inp_pspare[2]; /* (x) rtentry / general use */ /* Local and foreign ports, local and foreign addr. */ @@ -478,7 +479,9 @@ struct inpcb * struct in_addr, u_int, int, struct ifnet *); void in_pcbnotifyall(struct inpcbinfo *pcbinfo, struct in_addr, int, struct inpcb *(*)(struct inpcb *, int)); +void in_pcbref(struct inpcb *); void in_pcbrehash(struct inpcb *); +int in_pcbrele(struct inpcb *); void in_pcbsetsolabel(struct socket *so); int in_getpeeraddr(struct socket *so, struct sockaddr **nam); int in_getsockaddr(struct socket *so, struct sockaddr **nam); From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 20:21:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B6EF1065675; Mon, 8 Dec 2008 20:21:58 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A0228FC16; Mon, 8 Dec 2008 20:21:58 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8KLvoS069708; Mon, 8 Dec 2008 20:21:57 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8KLvkr069707; Mon, 8 Dec 2008 20:21:57 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812082021.mB8KLvkr069707@svn.freebsd.org> From: Kip Macy Date: Mon, 8 Dec 2008 20:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185774 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 20:21:58 -0000 Author: kmacy Date: Mon Dec 8 20:21:57 2008 New Revision: 185774 URL: http://svn.freebsd.org/changeset/base/185774 Log: - avoid recursively locking the radix node head lock - assert that it is held if RTF_RNH_LOCKED is not passed Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Mon Dec 8 20:18:50 2008 (r185773) +++ head/sys/net/route.c Mon Dec 8 20:21:57 2008 (r185774) @@ -866,7 +866,7 @@ rtexpunge(struct rtentry *rt) * Now search what's left of the subtree for any cloned * routes which might have been formed from this node. */ - if ((rt->rt_flags & RTF_CLONING) && rt_mask(rt)) + if ((rt->rt_flags & RTF_CLONING) && rt_mask(rt)) rnh->rnh_walktree_from(rnh, rt_key(rt), rt_mask(rt), rt_fixdelete, rt); @@ -935,6 +935,8 @@ rtrequest1_fib(int req, struct rt_addrin flags &= ~RTF_RNH_LOCKED; if (needlock) RADIX_NODE_HEAD_LOCK(rnh); + else + RADIX_NODE_HEAD_LOCK_ASSERT(rnh); /* * If we are adding a host route then we don't want to put * a netmask in the tree, nor do we want to clone it. @@ -1277,7 +1279,7 @@ rt_fixdelete(struct radix_node *rn, void if (rt->rt_parent == rt0 && !(rt->rt_flags & (RTF_PINNED | RTF_CLONING))) { return rtrequest_fib(RTM_DELETE, rt_key(rt), NULL, rt_mask(rt), - rt->rt_flags, NULL, rt->rt_fibnum); + rt->rt_flags|RTF_RNH_LOCKED, NULL, rt->rt_fibnum); } return 0; } From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 20:27:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C6BB0106564A; Mon, 8 Dec 2008 20:27:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B36CD8FC12; Mon, 8 Dec 2008 20:27:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8KR0pS069832; Mon, 8 Dec 2008 20:27:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8KR0Vt069831; Mon, 8 Dec 2008 20:27:00 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812082027.mB8KR0Vt069831@svn.freebsd.org> From: Robert Watson Date: Mon, 8 Dec 2008 20:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185775 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 20:27:00 -0000 Author: rwatson Date: Mon Dec 8 20:27:00 2008 New Revision: 185775 URL: http://svn.freebsd.org/changeset/base/185775 Log: Move from solely write-locking the global tcbinfo in tcp_input() to read-locking in the TCP input path, allowing greater TCP input parallelism where multiple ithreads or ithread and netisr are able to run in parallel. Previously, most TCP input paths held a write lock on the global tcbinfo lock, effectively serializing TCP input. Before looking up the connection, acquire a write lock if a potentially state-changing flag is set on the TCP segment header (FIN, RST, SYN), and otherwise a read lock. We may later have to upgrade to a write lock in certain cases (ACKs received by the syncache or during TIMEWAIT) in order to support global state transitions, but this is never required for steady-state packets. Upgrading from a write lock to a read lock must be done as a trylock operation to avoid deadlocks, and actually violates the lock order as the tcbinfo lock preceeds the inpcb lock held at the time of upgrade. If the trylock fails, we bump the refcount on the inpcb, drop both locks, and re-acquire in-order. If another thread has freed the connection while the locks are dropped, we free the inpcb and repeat the lookup (this should hardly ever or never happen in practice). For now, maintain a number of new counters measuring how many times various cases execute, and in particular whether various optimistic assumptions about when read locks can be used, whether upgrades are done using the fast path, and whether connections close in practice in the above-described race, actually occur. MFC after: 6 weeks Discussed with: kmacy Reviewed by: bz, gnn, kmacy Tested by: kmacy Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Dec 8 20:21:57 2008 (r185774) +++ head/sys/netinet/tcp_input.c Mon Dec 8 20:27:00 2008 (r185775) @@ -166,6 +166,30 @@ SYSCTL_V_INT(V_NET, vnet_inet, _net_inet CTLFLAG_RW, tcp_autorcvbuf_max, 0, "Max size of automatic receive buffer"); +int tcp_read_locking = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, read_locking, CTLFLAG_RW, + &tcp_read_locking, 0, "Enable read locking strategy"); + +int tcp_rlock_atfirst; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rlock_atfirst, CTLFLAG_RD, + &tcp_rlock_atfirst, 0, ""); + +int tcp_wlock_atfirst; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcp_wlock_atfirst, CTLFLAG_RD, + &tcp_wlock_atfirst, 0, ""); + +int tcp_wlock_upgraded; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_upgraded, CTLFLAG_RD, + &tcp_wlock_upgraded, 0, ""); + +int tcp_wlock_relocked; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_relocked, CTLFLAG_RD, + &tcp_wlock_relocked, 0, ""); + +int tcp_wlock_looped; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, wlock_looped, CTLFLAG_RD, + &tcp_wlock_looped, 0, ""); + #ifdef VIMAGE_GLOBALS struct inpcbhead tcb; struct inpcbinfo tcbinfo; @@ -174,7 +198,8 @@ struct inpcbinfo tcbinfo; static void tcp_dooptions(struct tcpopt *, u_char *, int, int); static void tcp_do_segment(struct mbuf *, struct tcphdr *, - struct socket *, struct tcpcb *, int, int, uint8_t); + struct socket *, struct tcpcb *, int, int, uint8_t, + int); static void tcp_dropwithreset(struct mbuf *, struct tcphdr *, struct tcpcb *, int, int); static void tcp_pulloutofband(struct socket *, @@ -298,6 +323,10 @@ tcp_input(struct mbuf *m, int off0) #endif struct tcpopt to; /* options in this segment */ char *s = NULL; /* address and port logging */ + int ti_locked; +#define TI_UNLOCKED 1 +#define TI_RLOCKED 2 +#define TI_WLOCKED 3 #ifdef TCPDEBUG /* @@ -450,11 +479,34 @@ tcp_input(struct mbuf *m, int off0) drop_hdrlen = off0 + off; /* - * Locate pcb for segment. - */ - INP_INFO_WLOCK(&V_tcbinfo); + * Locate pcb for segment, which requires a lock on tcbinfo. + * Optimisticaly acquire a global read lock unless header flags + * necessarily imply a state change. There are two cases where we + * might discover later we need a write lock despite the flags: ACKs + * moving a connection out of the syncache, and ACK relating to a + * connection in TIMEWAIT. + */ + if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || + tcp_read_locking == 0) { + INP_INFO_WLOCK(&V_tcbinfo); + ti_locked = TI_WLOCKED; + tcp_wlock_atfirst++; + } else { + INP_INFO_RLOCK(&V_tcbinfo); + ti_locked = TI_RLOCKED; + tcp_rlock_atfirst++; + } + findpcb: - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); +#ifdef INVARIANTS + if (ti_locked == TI_RLOCKED) + INP_INFO_RLOCK_ASSERT(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + else + panic("%s: findpcb ti_locked %d\n", __func__, ti_locked); +#endif + #ifdef IPFIREWALL_FORWARD /* * Grab info from PACKET_TAG_IPFORWARD tag prepended to the chain. @@ -561,12 +613,44 @@ findpcb: } /* - * A previous connection in TIMEWAIT state is supposed to catch - * stray or duplicate segments arriving late. If this segment - * was a legitimate new connection attempt the old INPCB gets - * removed and we can try again to find a listening socket. + * A previous connection in TIMEWAIT state is supposed to catch stray + * or duplicate segments arriving late. If this segment was a + * legitimate new connection attempt the old INPCB gets removed and + * we can try again to find a listening socket. + * + * At this point, due to earlier optimism, we may hold a read lock on + * the inpcbinfo, rather than a write lock. If so, we need to + * upgrade, or if that fails, acquire a reference on the inpcb, drop + * all locks, acquire a global write lock, and then re-acquire the + * inpcb lock. We may at that point discover that another thread has + * tried to free the inpcb, in which case we need to loop back and + * try to find a new inpcb to deliver to. */ if (inp->inp_vflag & INP_TIMEWAIT) { + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("%s: INP_TIMEWAIT ti_locked %d", __func__, ti_locked)); + + if (ti_locked == TI_RLOCKED) { + if (rw_try_upgrade(&V_tcbinfo.ipi_lock) == 0) { + in_pcbref(inp); + INP_WUNLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); + ti_locked = TI_WLOCKED; + INP_WLOCK(inp); + if (in_pcbrele(inp)) { + tcp_wlock_looped++; + inp = NULL; + goto findpcb; + } + tcp_wlock_relocked++; + } else { + ti_locked = TI_WLOCKED; + tcp_wlock_upgraded++; + } + } + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + if (thflags & TH_SYN) tcp_dooptions(&to, optp, optlen, TO_SYN); /* @@ -588,6 +672,40 @@ findpcb: goto dropwithreset; } + /* + * We've identified a valid inpcb, but it could be that we need an + * inpcbinfo write lock and have only a read lock. In this case, + * attempt to upgrade/relock using the same strategy as the TIMEWAIT + * case above. + */ + if (tp->t_state != TCPS_ESTABLISHED || + (thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || + tcp_read_locking == 0) { + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("%s: upgrade check ti_locked %d", __func__, ti_locked)); + + if (ti_locked == TI_RLOCKED) { + if (rw_try_upgrade(&V_tcbinfo.ipi_lock) == 0) { + in_pcbref(inp); + INP_WUNLOCK(inp); + INP_INFO_RUNLOCK(&V_tcbinfo); + INP_INFO_WLOCK(&V_tcbinfo); + ti_locked = TI_WLOCKED; + INP_WLOCK(inp); + if (in_pcbrele(inp)) { + tcp_wlock_looped++; + inp = NULL; + goto findpcb; + } + tcp_wlock_relocked++; + } else { + ti_locked = TI_WLOCKED; + tcp_wlock_upgraded++; + } + } + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + } + #ifdef MAC INP_WLOCK_ASSERT(inp); if (mac_inpcb_check_deliver(inp, m)) @@ -700,7 +818,7 @@ findpcb: * the mbuf chain and unlocks the inpcb. */ tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen, - iptos); + iptos, ti_locked); INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); return; } @@ -900,13 +1018,18 @@ findpcb: * state. tcp_do_segment() always consumes the mbuf chain, unlocks * the inpcb, and unlocks pcbinfo. */ - tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen, iptos); + tcp_do_segment(m, th, so, tp, drop_hdrlen, tlen, iptos, ti_locked); INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); return; dropwithreset: - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); - INP_INFO_WUNLOCK(&V_tcbinfo); + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: dropwithreset ti_locked %d", __func__, ti_locked); + ti_locked = TI_UNLOCKED; if (inp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); @@ -917,10 +1040,16 @@ dropwithreset: goto drop; dropunlock: - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: dropunlock ti_locked %d", __func__, ti_locked); + ti_locked = TI_UNLOCKED; + if (inp != NULL) INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); drop: INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); @@ -932,11 +1061,11 @@ drop: static void tcp_do_segment(struct mbuf *m, struct tcphdr *th, struct socket *so, - struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos) + struct tcpcb *tp, int drop_hdrlen, int tlen, uint8_t iptos, + int ti_locked) { INIT_VNET_INET(tp->t_vnet); int thflags, acked, ourfinisacked, needoutput = 0; - int headlocked = 1; int rstreason, todrop, win; u_long tiwin; struct tcpopt to; @@ -952,7 +1081,35 @@ tcp_do_segment(struct mbuf *m, struct tc #endif thflags = th->th_flags; - INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + /* + * If this is either a state-changing packet or current state isn't + * established, we require a write lock on tcbinfo. Otherwise, we + * allow either a read lock or a write lock, as we may have acquired + * a write lock due to a race. + * + * Require a global write lock for SYN/SIN/RST segments or + * non-established connections; otherwise accept either a read or + * write lock, as we may have conservatively acquired a write lock in + * certain cases in tcp_input() (is this still true?). Currently we + * will never enter with no lock, so we try to drop it quickly in the + * common pure ack/pure data cases. + */ + if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || + tp->t_state != TCPS_ESTABLISHED) { + KASSERT(ti_locked == TI_WLOCKED, ("%s ti_locked %d for " + "SYN/FIN/RST/!EST", __func__, ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + } else { +#ifdef INVARIANTS + if (ti_locked == TI_RLOCKED) + INP_INFO_RLOCK_ASSERT(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + else + panic("%s: ti_locked %d for EST", __func__, + ti_locked); +#endif + } INP_WLOCK_ASSERT(tp->t_inpcb); KASSERT(tp->t_state > TCPS_LISTEN, ("%s: TCPS_LISTEN", __func__)); @@ -1106,14 +1263,20 @@ tcp_do_segment(struct mbuf *m, struct tc !IN_FASTRECOVERY(tp) && (to.to_flags & TOF_SACK) == 0 && TAILQ_EMPTY(&tp->snd_holes)))) { - KASSERT(headlocked, - ("%s: headlocked", __func__)); - INP_INFO_WUNLOCK(&V_tcbinfo); - headlocked = 0; /* * This is a pure ack for outstanding data. */ + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: ti_locked %d on pure ACK", + __func__, ti_locked); + ti_locked = TI_UNLOCKED; + ++V_tcpstat.tcps_predack; + /* * "bad retransmit" recovery. */ @@ -1200,14 +1363,20 @@ tcp_do_segment(struct mbuf *m, struct tc tlen <= sbspace(&so->so_rcv)) { int newsize = 0; /* automatic sockbuf scaling */ - KASSERT(headlocked, ("%s: headlocked", __func__)); - INP_INFO_WUNLOCK(&V_tcbinfo); - headlocked = 0; /* - * This is a pure, in-sequence data packet - * with nothing on the reassembly queue and - * we have enough buffer space to take it. - */ + * This is a pure, in-sequence data packet with + * nothing on the reassembly queue and we have enough + * buffer space to take it. + */ + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: ti_locked %d on pure data " + "segment", __func__, ti_locked); + ti_locked = TI_UNLOCKED; + /* Clean receiver SACK report if present */ if ((tp->t_flags & TF_SACK_PERMIT) && tp->rcv_numsacks) tcp_clean_sackreport(tp); @@ -1434,8 +1603,9 @@ tcp_do_segment(struct mbuf *m, struct tc tp->t_state = TCPS_SYN_RECEIVED; } - KASSERT(headlocked, ("%s: trimthenstep6: head not locked", - __func__)); + KASSERT(ti_locked == TI_WLOCKED, ("%s: trimthenstep6: " + "ti_locked %d", __func__, ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(tp->t_inpcb); /* @@ -1563,17 +1733,23 @@ tcp_do_segment(struct mbuf *m, struct tc case TCPS_CLOSE_WAIT: so->so_error = ECONNRESET; close: + KASSERT(ti_locked == TI_WLOCKED, + ("tcp_do_segment: TH_RST 1 ti_locked %d", + ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + tp->t_state = TCPS_CLOSED; V_tcpstat.tcps_drops++; - KASSERT(headlocked, ("%s: trimthenstep6: " - "tcp_close: head not locked", __func__)); tp = tcp_close(tp); break; case TCPS_CLOSING: case TCPS_LAST_ACK: - KASSERT(headlocked, ("%s: trimthenstep6: " - "tcp_close.2: head not locked", __func__)); + KASSERT(ti_locked == TI_WLOCKED, + ("tcp_do_segment: TH_RST 2 ti_locked %d", + ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + tp = tcp_close(tp); break; } @@ -1678,8 +1854,10 @@ tcp_do_segment(struct mbuf *m, struct tc tp->t_state > TCPS_CLOSE_WAIT && tlen) { char *s; - KASSERT(headlocked, ("%s: trimthenstep6: tcp_close.3: head " - "not locked", __func__)); + KASSERT(ti_locked == TI_WLOCKED, ("%s: SS_NOFDEREF && " + "CLOSE_WAIT && tlen ti_locked %d", __func__, ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + if ((s = tcp_log_addrs(&tp->t_inpcb->inp_inc, th, NULL, NULL))) { log(LOG_DEBUG, "%s; %s: %s: Received %d bytes of data after socket " "was closed, sending RST and removing tcpcb\n", @@ -1751,8 +1929,10 @@ tcp_do_segment(struct mbuf *m, struct tc * error and we send an RST and drop the connection. */ if (thflags & TH_SYN) { - KASSERT(headlocked, ("%s: tcp_drop: trimthenstep6: " - "head not locked", __func__)); + KASSERT(ti_locked == TI_WLOCKED, + ("tcp_do_segment: TH_SYN ti_locked %d", ti_locked)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + tp = tcp_drop(tp, ECONNRESET); rstreason = BANDLIM_UNLIMITED; goto drop; @@ -2039,8 +2219,9 @@ tcp_do_segment(struct mbuf *m, struct tc } process_ACK: - KASSERT(headlocked, ("%s: process_ACK: head not locked", - __func__)); + INP_INFO_LOCK_ASSERT(&V_tcbinfo); + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("tcp_input: process_ACK ti_locked %d", ti_locked)); INP_WLOCK_ASSERT(tp->t_inpcb); acked = th->th_ack - tp->snd_una; @@ -2197,11 +2378,9 @@ process_ACK: */ case TCPS_CLOSING: if (ourfinisacked) { - KASSERT(headlocked, ("%s: process_ACK: " - "head not locked", __func__)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); tcp_twstart(tp); INP_INFO_WUNLOCK(&V_tcbinfo); - headlocked = 0; m_freem(m); return; } @@ -2215,8 +2394,7 @@ process_ACK: */ case TCPS_LAST_ACK: if (ourfinisacked) { - KASSERT(headlocked, ("%s: process_ACK: " - "tcp_close: head not locked", __func__)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); tp = tcp_close(tp); goto drop; } @@ -2225,7 +2403,9 @@ process_ACK: } step6: - KASSERT(headlocked, ("%s: step6: head not locked", __func__)); + INP_INFO_LOCK_ASSERT(&V_tcbinfo); + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("tcp_do_segment: step6 ti_locked %d", ti_locked)); INP_WLOCK_ASSERT(tp->t_inpcb); /* @@ -2311,7 +2491,9 @@ step6: tp->rcv_up = tp->rcv_nxt; } dodata: /* XXX */ - KASSERT(headlocked, ("%s: dodata: head not locked", __func__)); + INP_INFO_LOCK_ASSERT(&V_tcbinfo); + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("tcp_do_segment: dodata ti_locked %d", ti_locked)); INP_WLOCK_ASSERT(tp->t_inpcb); /* @@ -2430,15 +2612,25 @@ dodata: /* XXX */ * standard timers. */ case TCPS_FIN_WAIT_2: - KASSERT(headlocked == 1, ("%s: dodata: " - "TCP_FIN_WAIT_2: head not locked", __func__)); + INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + KASSERT(ti_locked == TI_WLOCKED, ("%s: dodata " + "TCP_FIN_WAIT_2 ti_locked: %d", __func__, + ti_locked)); + tcp_twstart(tp); INP_INFO_WUNLOCK(&V_tcbinfo); return; } } - INP_INFO_WUNLOCK(&V_tcbinfo); - headlocked = 0; + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: dodata epilogue ti_locked %d", __func__, + ti_locked); + ti_locked = TI_UNLOCKED; + #ifdef TCPDEBUG if (so->so_options & SO_DEBUG) tcp_trace(TA_INPUT, ostate, tp, (void *)tcp_saveipgen, @@ -2452,10 +2644,11 @@ dodata: /* XXX */ (void) tcp_output(tp); check_delack: - KASSERT(headlocked == 0, ("%s: check_delack: head locked", - __func__)); + KASSERT(ti_locked == TI_UNLOCKED, ("%s: check_delack ti_locked %d", + __func__, ti_locked)); INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); INP_WLOCK_ASSERT(tp->t_inpcb); + if (tp->t_flags & TF_DELACK) { tp->t_flags &= ~TF_DELACK; tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); @@ -2464,7 +2657,9 @@ check_delack: return; dropafterack: - KASSERT(headlocked, ("%s: dropafterack: head not locked", __func__)); + KASSERT(ti_locked == TI_RLOCKED || ti_locked == TI_WLOCKED, + ("tcp_do_segment: dropafterack ti_locked %d", ti_locked)); + /* * Generate an ACK dropping incoming segment if it occupies * sequence space, where the ACK reflects our state. @@ -2491,8 +2686,15 @@ dropafterack: tcp_trace(TA_DROP, ostate, tp, (void *)tcp_saveipgen, &tcp_savetcp, 0); #endif - KASSERT(headlocked, ("%s: headlocked should be 1", __func__)); - INP_INFO_WUNLOCK(&V_tcbinfo); + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: dropafterack epilogue ti_locked %d", __func__, + ti_locked); + ti_locked = TI_UNLOCKED; + tp->t_flags |= TF_ACKNOW; (void) tcp_output(tp); INP_WUNLOCK(tp->t_inpcb); @@ -2500,8 +2702,13 @@ dropafterack: return; dropwithreset: - KASSERT(headlocked, ("%s: dropwithreset: head not locked", __func__)); - INP_INFO_WUNLOCK(&V_tcbinfo); + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); + else + panic("%s: dropwithreset ti_locked %d", __func__, ti_locked); + ti_locked = TI_UNLOCKED; if (tp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); @@ -2511,6 +2718,16 @@ dropwithreset: return; drop: + if (ti_locked == TI_RLOCKED) + INP_INFO_RUNLOCK(&V_tcbinfo); + else if (ti_locked == TI_WLOCKED) + INP_INFO_WUNLOCK(&V_tcbinfo); +#ifdef INVARIANTS + else + INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); +#endif + ti_locked = TI_UNLOCKED; + /* * Drop space held by incoming segment and return. */ @@ -2521,8 +2738,6 @@ drop: #endif if (tp != NULL) INP_WUNLOCK(tp->t_inpcb); - if (headlocked) - INP_INFO_WUNLOCK(&V_tcbinfo); m_freem(m); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 20:53:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6379E106564A; Mon, 8 Dec 2008 20:53:27 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51BA38FC1A; Mon, 8 Dec 2008 20:53:27 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8KrRr0070417; Mon, 8 Dec 2008 20:53:27 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8KrRjX070416; Mon, 8 Dec 2008 20:53:27 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812082053.mB8KrRjX070416@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 8 Dec 2008 20:53:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185776 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 20:53:27 -0000 Author: sobomax Date: Mon Dec 8 20:53:27 2008 New Revision: 185776 URL: http://svn.freebsd.org/changeset/base/185776 Log: Fix typo in the comment %is -> %si. Modified: head/sys/boot/i386/boot0/boot0.S Modified: head/sys/boot/i386/boot0/boot0.S ============================================================================== --- head/sys/boot/i386/boot0/boot0.S Mon Dec 8 20:27:00 2008 (r185775) +++ head/sys/boot/i386/boot0/boot0.S Mon Dec 8 20:53:27 2008 (r185776) @@ -93,7 +93,7 @@ * %si pointer to the partition table from which we were loaded. * Some boot code (e.g. syslinux) use this info to relocate * themselves, so we want to pass a valid one to the next stage. - * NOTE: the use of %is is not a standard. + * NOTE: the use of %si is not a standard. * * This boot block first relocates itself at a different address (0:0x600), * to free the space at 0:0x7c00 for the next stage boot block. From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 21:04:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FEAC106564A; Mon, 8 Dec 2008 21:04:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F028B8FC17; Mon, 8 Dec 2008 21:04:24 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8L4OpU070678; Mon, 8 Dec 2008 21:04:24 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8L4OW0070671; Mon, 8 Dec 2008 21:04:24 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812082104.mB8L4OW0070671@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 8 Dec 2008 21:04:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185777 - in head: gnu/usr.bin/cc/libiberty gnu/usr.bin/sort include kerberos5/include lib/bind/bind lib/libmagic usr.bin/file X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 21:04:25 -0000 Author: kib Date: Mon Dec 8 21:04:24 2008 New Revision: 185777 URL: http://svn.freebsd.org/changeset/base/185777 Log: Add strndup(3) prototype to string.h. This change was erronously ommitted from the r185690, and attempt to simply add the prototype to string.h has revealed that several contributed programs defined local prototypes for strndup(), controlled by autoconfed config.h. So, manually change #undef HAVE_STRNDUP to #define HAVE_STRNDUP 1. Next import of the corresponding program would regenerate config.h, overriding the changes in this commit. No objections from: kan Modified: head/gnu/usr.bin/cc/libiberty/config.h head/gnu/usr.bin/sort/config.h head/include/string.h head/kerberos5/include/config.h head/lib/bind/bind/port_after.h head/lib/libmagic/config.h head/usr.bin/file/config.h Modified: head/gnu/usr.bin/cc/libiberty/config.h ============================================================================== --- head/gnu/usr.bin/cc/libiberty/config.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/gnu/usr.bin/cc/libiberty/config.h Mon Dec 8 21:04:24 2008 (r185777) @@ -235,7 +235,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 Modified: head/gnu/usr.bin/sort/config.h ============================================================================== --- head/gnu/usr.bin/sort/config.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/gnu/usr.bin/sort/config.h Mon Dec 8 21:04:24 2008 (r185777) @@ -759,7 +759,7 @@ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strpbrk' function. */ #define HAVE_STRPBRK 1 Modified: head/include/string.h ============================================================================== --- head/include/string.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/include/string.h Mon Dec 8 21:04:24 2008 (r185777) @@ -96,6 +96,7 @@ char *strncat(char * __restrict, const c int strncmp(const char *, const char *, size_t) __pure; char *strncpy(char * __restrict, const char * __restrict, size_t); #if __BSD_VISIBLE +char *strndup(const char *, size_t); char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; Modified: head/kerberos5/include/config.h ============================================================================== --- head/kerberos5/include/config.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/kerberos5/include/config.h Mon Dec 8 21:04:24 2008 (r185777) @@ -785,7 +785,7 @@ static /**/const char *const rcsid[] = { #define HAVE_STRNCASECMP 1 /* Define if you have the function `strndup'. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define if you have the function `strnlen'. */ /* #undef HAVE_STRNLEN */ Modified: head/lib/bind/bind/port_after.h ============================================================================== --- head/lib/bind/bind/port_after.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/lib/bind/bind/port_after.h Mon Dec 8 21:04:24 2008 (r185777) @@ -30,7 +30,7 @@ #undef HAS_IN_ADDR6 #define HAVE_SOCKADDR_STORAGE 1 #undef NEED_GETTIMEOFDAY -#undef HAVE_STRNDUP +#define HAVE_STRNDUP 1 #undef USE_FIONBIO_IOCTL #undef USE_SYSERROR_LIST #undef INNETGR_ARGS Modified: head/lib/libmagic/config.h ============================================================================== --- head/lib/libmagic/config.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/lib/libmagic/config.h Mon Dec 8 21:04:24 2008 (r185777) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 Modified: head/usr.bin/file/config.h ============================================================================== --- head/usr.bin/file/config.h Mon Dec 8 20:53:27 2008 (r185776) +++ head/usr.bin/file/config.h Mon Dec 8 21:04:24 2008 (r185777) @@ -77,7 +77,7 @@ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strndup' function. */ -/* #undef HAVE_STRNDUP */ +#define HAVE_STRNDUP 1 /* Define to 1 if you have the `strtof' function. */ #define HAVE_STRTOF 1 From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 21:46:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51FF21065678; Mon, 8 Dec 2008 21:46:56 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 402668FC25; Mon, 8 Dec 2008 21:46:56 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8LkthG071501; Mon, 8 Dec 2008 21:46:55 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8LktPW071499; Mon, 8 Dec 2008 21:46:55 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812082146.mB8LktPW071499@svn.freebsd.org> From: Kip Macy Date: Mon, 8 Dec 2008 21:46:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185778 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 21:46:56 -0000 Author: kmacy Date: Mon Dec 8 21:46:55 2008 New Revision: 185778 URL: http://svn.freebsd.org/changeset/base/185778 Log: add RW_SYSINIT_FLAGS macro and rw_sysinit_flags initialization function Modified: head/sys/kern/kern_rwlock.c head/sys/sys/rwlock.h Modified: head/sys/kern/kern_rwlock.c ============================================================================== --- head/sys/kern/kern_rwlock.c Mon Dec 8 21:04:24 2008 (r185777) +++ head/sys/kern/kern_rwlock.c Mon Dec 8 21:46:55 2008 (r185778) @@ -191,6 +191,14 @@ rw_sysinit(void *arg) rw_init(args->ra_rw, args->ra_desc); } +void +rw_sysinit_flags(void *arg) +{ + struct rw_args_flags *args = arg; + + rw_init_flags(args->ra_rw, args->ra_desc, args->ra_flags); +} + int rw_wowned(struct rwlock *rw) { Modified: head/sys/sys/rwlock.h ============================================================================== --- head/sys/sys/rwlock.h Mon Dec 8 21:04:24 2008 (r185777) +++ head/sys/sys/rwlock.h Mon Dec 8 21:46:55 2008 (r185778) @@ -132,6 +132,7 @@ void rw_init_flags(struct rwlock *rw, const char *name, int opts); void rw_destroy(struct rwlock *rw); void rw_sysinit(void *arg); +void rw_sysinit_flags(void *arg); int rw_wowned(struct rwlock *rw); void _rw_wlock(struct rwlock *rw, const char *file, int line); int _rw_try_wlock(struct rwlock *rw, const char *file, int line); @@ -187,6 +188,12 @@ struct rw_args { const char *ra_desc; }; +struct rw_args_flags { + struct rwlock *ra_rw; + const char *ra_desc; + int ra_flags; +}; + #define RW_SYSINIT(name, rw, desc) \ static struct rw_args name##_args = { \ (rw), \ @@ -197,6 +204,18 @@ struct rw_args { SYSUNINIT(name##_rw_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ rw_destroy, (rw)) + +#define RW_SYSINIT_FLAGS(name, rw, desc, flags) \ + static struct rw_args_flags name##_args = { \ + (rw), \ + (desc), \ + (flags), \ + }; \ + SYSINIT(name##_rw_sysinit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ + rw_sysinit_flags, &name##_args); \ + SYSUNINIT(name##_rw_sysuninit, SI_SUB_LOCK, SI_ORDER_MIDDLE, \ + rw_destroy, (rw)) + /* * Options passed to rw_init_flags(). */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 21:52:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32A7B1065675; Mon, 8 Dec 2008 21:52:07 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20BFA8FC1F; Mon, 8 Dec 2008 21:52:07 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8Lq7FK071636; Mon, 8 Dec 2008 21:52:07 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8Lq7Kv071635; Mon, 8 Dec 2008 21:52:07 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812082152.mB8Lq7Kv071635@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 8 Dec 2008 21:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185779 - head/sys/boot/i386/btx/btxldr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 21:52:07 -0000 Author: sobomax Date: Mon Dec 8 21:52:06 2008 New Revision: 185779 URL: http://svn.freebsd.org/changeset/base/185779 Log: Respect RBX_MUTE flag from boot[012]. MFC after: 4 weeks Modified: head/sys/boot/i386/btx/btxldr/btxldr.S Modified: head/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 21:46:55 2008 (r185778) +++ head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 21:52:06 2008 (r185779) @@ -15,6 +15,9 @@ * $FreeBSD$ */ +#define RBX_MUTE 0x10 /* -m */ +#define OPT_SET(opt) (1 << (opt)) + /* * Prototype BTX loader program, written in a couple of hours. The * real thing should probably be more flexible, and in C. @@ -64,6 +67,11 @@ * BTX program loader for ELF clients. */ start: cld # String ops inc + leal 0x4(%esp,1),%ebx # First argument + testl $OPT_SET(RBX_MUTE),(%ebx) # check for RBX_MUTE + jz nomute + movb $1,muted +nomute: movl $m_logo,%esi # Identify call putstr # ourselves movzwl BDA_MEM,%eax # Get base memory @@ -288,7 +296,10 @@ putstr: lodsb # Load char /* * Output character AL to the console. */ -putchr: pusha # Save +putchr: testb $1,muted + jz putchr_nm + ret +putchr_nm: pusha # Save xorl %ecx,%ecx # Zero for loops movb $SCR_MAT,%ah # Mode/attribute movl $BDA_POS,%ebx # BDA pointer @@ -390,6 +401,12 @@ m_segs: .asciz "text segment: offset=" .asciz " memsz=\0\n" m_done: .asciz "Loading complete\n" #endif + +/* + * Flags + */ +muted: .byte 0x0 + /* * Uninitialized data area. */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 8 23:45:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6914E1065672; Mon, 8 Dec 2008 23:45:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57B8C8FC18; Mon, 8 Dec 2008 23:45:42 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB8Njgdj074169; Mon, 8 Dec 2008 23:45:42 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB8Njgvf074168; Mon, 8 Dec 2008 23:45:42 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812082345.mB8Njgvf074168@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 8 Dec 2008 23:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185780 - head/sys/boot/i386/btx/btxldr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Dec 2008 23:45:42 -0000 Author: sobomax Date: Mon Dec 8 23:45:41 2008 New Revision: 185780 URL: http://svn.freebsd.org/changeset/base/185780 Log: Optimiza assembly in the previous r185779, to save whooping 16 bytes. Submitted by: Christoph Mallon MFC after: 4 weeks (including r185779) Modified: head/sys/boot/i386/btx/btxldr/btxldr.S Modified: head/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 21:52:06 2008 (r185779) +++ head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 23:45:41 2008 (r185780) @@ -67,11 +67,8 @@ * BTX program loader for ELF clients. */ start: cld # String ops inc - leal 0x4(%esp,1),%ebx # First argument - testl $OPT_SET(RBX_MUTE),(%ebx) # check for RBX_MUTE - jz nomute - movb $1,muted -nomute: + testl $OPT_SET(RBX_MUTE), 4(%esp) # Check first argument + setnz muted # for RBX_MUTE, set flag movl $m_logo,%esi # Identify call putstr # ourselves movzwl BDA_MEM,%eax # Get base memory @@ -296,9 +293,8 @@ putstr: lodsb # Load char /* * Output character AL to the console. */ -putchr: testb $1,muted - jz putchr_nm - ret +putchr: testb $1,muted # Check muted + jnz putchr.5 # do a nop putchr_nm: pusha # Save xorl %ecx,%ecx # Zero for loops movb $SCR_MAT,%ah # Mode/attribute @@ -336,7 +332,7 @@ putchr.3: cmpb $SCR_ROW,%dh # Beyond sc movb $SCR_ROW-1,%dh # Bottom line putchr.4: movw %dx,(%ebx) # Update position popa # Restore - ret # To caller +putchr.5: ret # To caller /* * Convert EAX, AX, or AL to hex, saving the result to [EDI]. */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 00:25:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C88041065675; Tue, 9 Dec 2008 00:25:57 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B72718FC0C; Tue, 9 Dec 2008 00:25:57 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB90PvGl074921; Tue, 9 Dec 2008 00:25:57 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB90PvD2074920; Tue, 9 Dec 2008 00:25:57 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812090025.mB90PvD2074920@svn.freebsd.org> From: Maxim Sobolev Date: Tue, 9 Dec 2008 00:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185781 - head/sys/boot/i386/btx/btxldr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 00:25:57 -0000 Author: sobomax Date: Tue Dec 9 00:25:57 2008 New Revision: 185781 URL: http://svn.freebsd.org/changeset/base/185781 Log: Remove now unused label. Submitted by: Christoph Mallon MFC after: 4 weeks (along with r185779 and r185780) Modified: head/sys/boot/i386/btx/btxldr/btxldr.S Modified: head/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- head/sys/boot/i386/btx/btxldr/btxldr.S Mon Dec 8 23:45:41 2008 (r185780) +++ head/sys/boot/i386/btx/btxldr/btxldr.S Tue Dec 9 00:25:57 2008 (r185781) @@ -295,7 +295,7 @@ putstr: lodsb # Load char */ putchr: testb $1,muted # Check muted jnz putchr.5 # do a nop -putchr_nm: pusha # Save + pusha # Save xorl %ecx,%ecx # Zero for loops movb $SCR_MAT,%ah # Mode/attribute movl $BDA_POS,%ebx # BDA pointer From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 01:01:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AADE31065677; Tue, 9 Dec 2008 01:01:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98BAC8FC18; Tue, 9 Dec 2008 01:01:02 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9112gN075631; Tue, 9 Dec 2008 01:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9112IL075629; Tue, 9 Dec 2008 01:01:02 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812090101.mB9112IL075629@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 9 Dec 2008 01:01:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185782 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 01:01:02 -0000 Author: nwhitehorn Date: Tue Dec 9 01:01:02 2008 New Revision: 185782 URL: http://svn.freebsd.org/changeset/base/185782 Log: Add the ability to control the sleep LED with led(4). Adding this fairly useless feature gives us a reasonably complete PMU implementation. Modified: head/sys/powerpc/powermac/pmu.c head/sys/powerpc/powermac/pmuvar.h Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Tue Dec 9 00:25:57 2008 (r185781) +++ head/sys/powerpc/powermac/pmu.c Tue Dec 9 01:01:02 2008 (r185782) @@ -11,8 +11,6 @@ * 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 name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES @@ -41,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -71,6 +70,7 @@ static u_int pmu_adb_send(device_t dev, static u_int pmu_adb_autopoll(device_t dev, uint16_t mask); static void pmu_poll(device_t dev); +static void pmu_set_sleepled(void *xsc, int onoff); static int pmu_server_mode(SYSCTL_HANDLER_ARGS); static int pmu_query_battery(struct pmu_softc *sc, int batt, struct pmu_battstate *info); @@ -333,6 +333,9 @@ pmu_attach(device_t dev) } sc->sc_autopoll = 0; + sc->sc_batteries = 0; + sc->adb_bus = NULL; + sc->sc_leddev = NULL; /* Init PMU */ @@ -439,6 +442,12 @@ pmu_attach(device_t dev) } } + /* + * Set up LED interface + */ + + sc->sc_leddev = led_create(pmu_set_sleepled, sc, "sleepled"); + return (bus_generic_attach(dev)); } @@ -449,6 +458,9 @@ pmu_detach(device_t dev) sc = device_get_softc(dev); + if (sc->sc_leddev != NULL) + led_destroy(sc->sc_leddev); + bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih); bus_release_resource(dev, SYS_RES_IRQ, sc->sc_irqrid, sc->sc_irq); bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, sc->sc_memr); @@ -711,6 +723,19 @@ pmu_adb_autopoll(device_t dev, uint16_t return 0; } +static void +pmu_set_sleepled(void *xsc, int onoff) +{ + struct pmu_softc *sc = xsc; + uint8_t cmd[] = {4, 0, 0}; + + cmd[2] = onoff; + + mtx_lock(&sc->sc_mutex); + pmu_send(sc, PMU_SET_SLEEPLED, 3, cmd, 0, NULL); + mtx_unlock(&sc->sc_mutex); +} + static int pmu_server_mode(SYSCTL_HANDLER_ARGS) { Modified: head/sys/powerpc/powermac/pmuvar.h ============================================================================== --- head/sys/powerpc/powermac/pmuvar.h Tue Dec 9 00:25:57 2008 (r185781) +++ head/sys/powerpc/powermac/pmuvar.h Tue Dec 9 01:01:02 2008 (r185782) @@ -11,9 +11,6 @@ * 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. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -76,6 +73,7 @@ #define PMU_I2C_CMD 0x9a /* i2c commands */ #define PMU_GET_LID_STATE 0xdc /* Report lid state */ #define PMU_GET_VERSION 0xea /* Identify thyself */ +#define PMU_SET_SLEEPLED 0xee /* Set sleep LED on/off */ /* Bits in PMU interrupt and interrupt mask bytes */ #define PMU_INT_ADB_AUTO 0x04 /* ADB autopoll, when PMU_INT_ADB */ @@ -161,6 +159,7 @@ struct pmu_softc { device_t adb_bus; volatile int sc_autopoll; int sc_batteries; + struct cdev *sc_leddev; }; struct pmu_battstate { From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 02:06:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B78A106564A; Tue, 9 Dec 2008 02:06:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAC38FC17; Tue, 9 Dec 2008 02:06:03 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=UTF-8; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) id <0KBL00C004E31E00@smtpauth2.wiscmail.wisc.edu>; Mon, 08 Dec 2008 19:06:03 -0600 (CST) Received: from trantor.tachypleus.net ([76.204.99.187]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPSA id <0KBL0097A4E1MF10@smtpauth2.wiscmail.wisc.edu>; Mon, 08 Dec 2008 19:06:02 -0600 (CST) Date: Mon, 08 Dec 2008 19:07:42 -0600 From: Nathan Whitehorn In-reply-to: <200812090101.mB9112IL075629@svn.freebsd.org> To: Nathan Whitehorn Message-id: <493DC4DE.1090401@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.204.99.187 X-Spam-PmxInfo: Server=avs-12, Version=5.4.1.325704, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.12.9.4911, SenderIP=76.204.99.187 References: <200812090101.mB9112IL075629@svn.freebsd.org> User-Agent: Thunderbird 2.0.0.17 (X11/20080928) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185782 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 02:06:03 -0000 Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Tue Dec 9 01:01:02 2008 > New Revision: 185782 > URL: http://svn.freebsd.org/changeset/base/185782 > > Log: > Add the ability to control the sleep LED with led(4). Adding this fairly > useless feature gives us a reasonably complete PMU implementation. > > Modified: > head/sys/powerpc/powermac/pmu.c > head/sys/powerpc/powermac/pmuvar.h > As is evident from the actual text of the commit, this also updates the license to 2 clauses to reflect changes in NetBSD. -Nathan From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 03:43:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5FE2106564A for ; Tue, 9 Dec 2008 03:43:12 +0000 (UTC) (envelope-from moguabjy@gmail.com) Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by mx1.freebsd.org (Postfix) with ESMTP id 4F74D8FC13 for ; Tue, 9 Dec 2008 03:43:11 +0000 (UTC) (envelope-from moguabjy@gmail.com) Received: by ti-out-0910.google.com with SMTP id a1so823756tib.3 for ; Mon, 08 Dec 2008 19:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=gfWl34gA+9cXClgLo/BZI6jA7ekX5irSm4Aq1M/y6us=; b=TvTolOxK8LDfQKbuZGCWj+C2FqODhzseHCTsflWOPpxFbbrR/lrT3ujqTU2n2xESS4 2b1fmNOQ6xlaIoQ7FbT8ta1sECsdmidddlUdxXWFrlQZxIgGP+kw5NRufgmHJ0juoFIE BA+PBP2F05cft6N2lPWcIV3CB4XutkDaf3KJg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=iXIv0mV0lhsdhW34Nud94eBcKAT8RyQRwy0wSVgHONlQFOrIFlYycwM7xuG6+bl0K9 zthYNXeGR/Wc2f2qQD029fdbsoOUIG0iPMvLIwTcAKoD0yGArtkXRA12Lbja5mB8geAK xb9EgtF2HV2FHHwvDM4SuVPVDTbyUuxQWkdJ4= Received: by 10.110.43.18 with SMTP id q18mr4982280tiq.18.1228794190855; Mon, 08 Dec 2008 19:43:10 -0800 (PST) Received: by 10.110.69.11 with HTTP; Mon, 8 Dec 2008 19:43:10 -0800 (PST) Message-ID: Date: Tue, 9 Dec 2008 12:43:10 +0900 From: "Bang Jun-young" Sender: moguabjy@gmail.com To: "Joerg Sonnenberger" In-Reply-To: <20081208110542.GA905@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812060612.mB66COVb084955@svn.freebsd.org> <20081208110542.GA905@britannica.bec.de> X-Google-Sender-Auth: 287f27f775ca5747 Cc: svn-src-all@freebsd.org Subject: Re: svn commit: r185674 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 03:43:12 -0000 On Mon, Dec 8, 2008 at 8:05 PM, Joerg Sonnenberger wrote: > On Mon, Dec 08, 2008 at 02:14:32PM +0900, Bang Jun-young wrote: >> MSC actually supports inline functions as '__inline' keyword in C mode. The >> above should be written as follows: > > Can you say that for all versions? Yes. > Besides, it will very likely inline > this anyway, so it doesn't matter very much. That doesn't seem to be true with libarchive 2.5.903a. junyoung From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 04:17:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBB871065673; Tue, 9 Dec 2008 04:17:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B8FBE8FC13; Tue, 9 Dec 2008 04:17:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB94Hios079616; Tue, 9 Dec 2008 04:17:44 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB94Hipt079613; Tue, 9 Dec 2008 04:17:44 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812090417.mB94Hipt079613@svn.freebsd.org> From: Tim Kientzle Date: Tue, 9 Dec 2008 04:17:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185783 - releng/7.1/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 04:17:44 -0000 Author: kientzle Date: Tue Dec 9 04:17:44 2008 New Revision: 185783 URL: http://svn.freebsd.org/changeset/base/185783 Log: MFC r185667,r185680,r185681: Overhaul the Rockridge option parsing and beef up the ISO9660 bidder. This makes the ISO reader a lot more robust when reading malformed input. Approved by: re Modified: releng/7.1/lib/libarchive/ (props changed) releng/7.1/lib/libarchive/archive_read_support_format_iso9660.c releng/7.1/lib/libarchive/archive_string.c releng/7.1/lib/libarchive/archive_string.h Modified: releng/7.1/lib/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- releng/7.1/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 9 01:01:02 2008 (r185782) +++ releng/7.1/lib/libarchive/archive_read_support_format_iso9660.c Tue Dec 9 04:17:44 2008 (r185783) @@ -138,6 +138,15 @@ __FBSDID("$FreeBSD$"); #define PVD_reserved4_size 1 #define PVD_application_data_offset (PVD_reserved4_offset + PVD_reserved4_size) #define PVD_application_data_size 512 +#define PVD_reserved5_offset (PVD_application_data_offset + PVD_application_data_size) +#define PVD_reserved5_size (2048 - PVD_reserved5_offset) + +/* TODO: It would make future maintenance easier to just hardcode the + * above values. In particular, ECMA119 states the offsets as part of + * the standard. That would eliminate the need for the following check.*/ +#if PVD_reserved5_offset != 1395 +#error PVD offset and size definitions are wrong. +#endif /* Structure of an on-disk directory record. */ /* Note: ISO9660 stores each multi-byte integer twice, once in @@ -178,17 +187,20 @@ struct file_info { uint64_t size; /* File size in bytes. */ uint64_t ce_offset; /* Offset of CE */ uint64_t ce_size; /* Size of CE */ + time_t birthtime; /* File created time. */ time_t mtime; /* File last modified time. */ time_t atime; /* File last accessed time. */ - time_t ctime; /* File creation time. */ + time_t ctime; /* File attribute change time. */ uint64_t rdev; /* Device number */ mode_t mode; uid_t uid; gid_t gid; ino_t inode; int nlinks; - char *name; /* Null-terminated filename. */ + struct archive_string name; /* Pathname */ + char name_continues; /* Non-zero if name continues */ struct archive_string symlink; + char symlink_continues; /* Non-zero if link continues */ }; @@ -210,6 +222,7 @@ struct iso9660 { uint64_t current_position; ssize_t logical_block_size; + uint64_t volume_size; /* Total size of volume in bytes. */ off_t entry_sparse_offset; int64_t entry_bytes_remaining; @@ -224,7 +237,9 @@ static int archive_read_format_iso9660_r static int archive_read_format_iso9660_read_header(struct archive_read *, struct archive_entry *); static const char *build_pathname(struct archive_string *, struct file_info *); +#if DEBUG static void dump_isodirrec(FILE *, const unsigned char *isodirrec); +#endif static time_t time_from_tm(struct tm *); static time_t isodate17(const unsigned char *); static time_t isodate7(const unsigned char *); @@ -238,6 +253,12 @@ static struct file_info * static void parse_rockridge(struct iso9660 *iso9660, struct file_info *file, const unsigned char *start, const unsigned char *end); +static void parse_rockridge_NM1(struct file_info *, + const unsigned char *, int); +static void parse_rockridge_SL1(struct file_info *, + const unsigned char *, int); +static void parse_rockridge_TF1(struct file_info *, + const unsigned char *, int); static void release_file(struct iso9660 *, struct file_info *); static unsigned toi(const void *p, int n); @@ -314,13 +335,61 @@ static int isPVD(struct iso9660 *iso9660, const unsigned char *h) { struct file_info *file; + int i; - if (h[0] != 1) + /* Type of the Primary Volume Descriptor must be 1. */ + if (h[PVD_type_offset] != 1) return (0); - if (memcmp(h+1, "CD001", 5) != 0) + + /* ID must be "CD001" */ + if (memcmp(h + PVD_id_offset, "CD001", 5) != 0) + return (0); + + /* PVD version must be 1. */ + if (h[PVD_version_offset] != 1) return (0); + /* Reserved field must be 0. */ + if (h[PVD_reserved1_offset] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved2_size; ++i) + if (h[PVD_reserved2_offset + i] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved3_size; ++i) + if (h[PVD_reserved3_offset + i] != 0) + return (0); + + /* Logical block size must be > 0. */ + /* I've looked at Ecma 119 and can't find any stronger + * restriction on this field. */ iso9660->logical_block_size = toi(h + PVD_logical_block_size_offset, 2); + if (iso9660->logical_block_size <= 0) + return (0); + + iso9660->volume_size = iso9660->logical_block_size + * (uint64_t)toi(h + PVD_volume_space_size_offset, 4); + + /* File structure version must be 1 for ISO9660/ECMA119. */ + if (h[PVD_file_structure_version_offset] != 1) + return (0); + + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved4_size; ++i) + if (h[PVD_reserved4_offset + i] != 0) + return (0); + + /* Reserved field must be 0. */ + for (i = 0; i < PVD_reserved5_size; ++i) + if (h[PVD_reserved5_offset + i] != 0) + return (0); + + /* XXX TODO: Check other values for sanity; reject more + * malformed PVDs. XXX */ /* Store the root directory in the pending list. */ file = parse_file_info(iso9660, NULL, h + PVD_root_directory_record_offset); @@ -352,12 +421,22 @@ archive_read_format_iso9660_read_header( iso9660->entry_bytes_remaining = file->size; iso9660->entry_sparse_offset = 0; /* Offset for sparse-file-aware clients. */ + if (file->offset + file->size > iso9660->volume_size) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, + "File is beyond end-of-media: %s", file->name); + iso9660->entry_bytes_remaining = 0; + iso9660->entry_sparse_offset = 0; + release_file(iso9660, file); + return (ARCHIVE_WARN); + } + /* Set up the entry structure with information about this entry. */ archive_entry_set_mode(entry, file->mode); archive_entry_set_uid(entry, file->uid); archive_entry_set_gid(entry, file->gid); archive_entry_set_nlink(entry, file->nlinks); archive_entry_set_ino(entry, file->inode); + /* archive_entry_set_birthtime(entry, file->birthtime, 0); */ archive_entry_set_mtime(entry, file->mtime, 0); archive_entry_set_ctime(entry, file->ctime, 0); archive_entry_set_atime(entry, file->atime, 0); @@ -535,13 +614,7 @@ parse_file_info(struct iso9660 *iso9660, file->mtime = isodate7(isodirrec + DR_date_offset); file->ctime = file->atime = file->mtime; name_len = (size_t)*(const unsigned char *)(isodirrec + DR_name_len_offset); - file->name = (char *)malloc(name_len + 1); - if (file->name == NULL) { - free(file); - return (NULL); - } - memcpy(file->name, isodirrec + DR_name_offset, name_len); - file->name[name_len] = '\0'; + archive_strncpy(&file->name, isodirrec + DR_name_offset, name_len); flags = *(isodirrec + DR_flags_offset); if (flags & 0x02) file->mode = AE_IFDIR | 0700; @@ -561,6 +634,7 @@ parse_file_info(struct iso9660 *iso9660, parse_rockridge(iso9660, file, rr_start, rr_end); } +#if DEBUG /* DEBUGGING: Warn about attributes I don't yet fully support. */ if ((flags & ~0x02) != 0) { fprintf(stderr, "\n ** Unrecognized flag: "); @@ -583,7 +657,7 @@ parse_file_info(struct iso9660 *iso9660, dump_isodirrec(stderr, isodirrec); fprintf(stderr, "\n"); } - +#endif return (file); } @@ -623,6 +697,7 @@ parse_rockridge(struct iso9660 *iso9660, while (p + 4 < end /* Enough space for another entry. */ && p[0] >= 'A' && p[0] <= 'Z' /* Sanity-check 1st char of name. */ && p[1] >= 'A' && p[1] <= 'Z' /* Sanity-check 2nd char of name. */ + && p[2] >= 4 /* Sanity-check length. */ && p + p[2] <= end) { /* Sanity-check length. */ const unsigned char *data = p + 4; int data_length = p[2] - 4; @@ -635,61 +710,54 @@ parse_rockridge(struct iso9660 *iso9660, */ switch(p[0]) { case 'C': - if (p[0] == 'C' && p[1] == 'E' && version == 1) { - /* - * CE extension comprises: - * 8 byte sector containing extension - * 8 byte offset w/in above sector - * 8 byte length of continuation - */ - file->ce_offset = toi(data, 4) - * iso9660->logical_block_size - + toi(data + 8, 4); - file->ce_size = toi(data + 16, 4); + if (p[0] == 'C' && p[1] == 'E') { + if (version == 1 && data_length == 24) { + /* + * CE extension comprises: + * 8 byte sector containing extension + * 8 byte offset w/in above sector + * 8 byte length of continuation + */ + file->ce_offset = (uint64_t)toi(data, 4) + * iso9660->logical_block_size + + toi(data + 8, 4); + file->ce_size = toi(data + 16, 4); + /* If the result is rediculous, + * ignore it. */ + if (file->ce_offset + file->ce_size + > iso9660->volume_size) { + file->ce_offset = 0; + file->ce_size = 0; + } + } break; } /* FALLTHROUGH */ case 'N': - if (p[0] == 'N' && p[1] == 'M' && version == 1 - && *data == 0) { - /* NM extension with flag byte == 0 */ - /* - * NM extension comprises: - * one byte flag - * rest is long name - */ - /* TODO: Obey flags. */ - char *old_name = file->name; - - data++; /* Skip flag byte. */ - data_length--; - file->name = (char *)malloc(data_length + 1); - if (file->name != NULL) { - free(old_name); - memcpy(file->name, data, data_length); - file->name[data_length] = '\0'; - } else - file->name = old_name; + if (p[0] == 'N' && p[1] == 'M') { + if (version == 1) + parse_rockridge_NM1(file, + data, data_length); break; } /* FALLTHROUGH */ case 'P': - if (p[0] == 'P' && p[1] == 'D' && version == 1) { + if (p[0] == 'P' && p[1] == 'D') { /* * PD extension is padding; * contents are always ignored. */ break; } - if (p[0] == 'P' && p[1] == 'N' && version == 1) { - if (data_length == 16) { + if (p[0] == 'P' && p[1] == 'N') { + if (version == 1 && data_length == 16) { file->rdev = toi(data,4); file->rdev <<= 32; file->rdev |= toi(data + 8, 4); } break; } - if (p[0] == 'P' && p[1] == 'X' && version == 1) { + if (p[0] == 'P' && p[1] == 'X') { /* * PX extension comprises: * 8 bytes for mode, @@ -698,12 +766,22 @@ parse_rockridge(struct iso9660 *iso9660, * 8 bytes for gid, * 8 bytes for inode. */ - if (data_length == 32) { - file->mode = toi(data, 4); - file->nlinks = toi(data + 8, 4); - file->uid = toi(data + 16, 4); - file->gid = toi(data + 24, 4); - file->inode = toi(data + 32, 4); + if (version == 1) { + if (data_length >= 8) + file->mode + = toi(data, 4); + if (data_length >= 16) + file->nlinks + = toi(data + 8, 4); + if (data_length >= 24) + file->uid + = toi(data + 16, 4); + if (data_length >= 32) + file->gid + = toi(data + 24, 4); + if (data_length >= 40) + file->inode + = toi(data + 32, 4); } break; } @@ -720,56 +798,14 @@ parse_rockridge(struct iso9660 *iso9660, } /* FALLTHROUGH */ case 'S': - if (p[0] == 'S' && p[1] == 'L' && version == 1 - && *data == 0) { - int cont = 1; - /* SL extension with flags == 0 */ - /* TODO: handle non-zero flag values. */ - data++; /* Skip flag byte. */ - data_length--; - while (data_length > 0) { - unsigned char flag = *data++; - unsigned char nlen = *data++; - data_length -= 2; - - if (cont == 0) - archive_strcat(&file->symlink, "/"); - cont = 0; - - switch(flag) { - case 0x01: /* Continue */ - archive_strncat(&file->symlink, - (const char *)data, nlen); - cont = 1; - break; - case 0x02: /* Current */ - archive_strcat(&file->symlink, "."); - break; - case 0x04: /* Parent */ - archive_strcat(&file->symlink, ".."); - break; - case 0x08: /* Root */ - case 0x10: /* Volume root */ - archive_string_empty(&file->symlink); - break; - case 0x20: /* Hostname */ - archive_strcat(&file->symlink, "hostname"); - break; - case 0: - archive_strncat(&file->symlink, - (const char *)data, nlen); - break; - default: - /* TODO: issue a warning ? */ - break; - } - data += nlen; - data_length -= nlen; - } + if (p[0] == 'S' && p[1] == 'L') { + if (version == 1) + parse_rockridge_SL1(file, + data, data_length); break; } if (p[0] == 'S' && p[1] == 'P' - && version == 1 && data_length == 7 + && version == 1 && data_length == 3 && data[0] == (unsigned char)'\xbe' && data[1] == (unsigned char)'\xef') { /* @@ -805,66 +841,27 @@ parse_rockridge(struct iso9660 *iso9660, return; } case 'T': - if (p[0] == 'T' && p[1] == 'F' && version == 1) { - char flag = data[0]; - /* - * TF extension comprises: - * one byte flag - * create time (optional) - * modify time (optional) - * access time (optional) - * attribute time (optional) - * Time format and presence of fields - * is controlled by flag bits. - */ - data++; - if (flag & 0x80) { - /* Use 17-byte time format. */ - if (flag & 1) /* Create time. */ - data += 17; - if (flag & 2) { /* Modify time. */ - file->mtime = isodate17(data); - data += 17; - } - if (flag & 4) { /* Access time. */ - file->atime = isodate17(data); - data += 17; - } - if (flag & 8) { /* Attribute time. */ - file->ctime = isodate17(data); - data += 17; - } - } else { - /* Use 7-byte time format. */ - if (flag & 1) /* Create time. */ - data += 7; - if (flag & 2) { /* Modify time. */ - file->mtime = isodate7(data); - data += 7; - } - if (flag & 4) { /* Access time. */ - file->atime = isodate7(data); - data += 7; - } - if (flag & 8) { /* Attribute time. */ - file->ctime = isodate7(data); - data += 7; - } - } + if (p[0] == 'T' && p[1] == 'F') { + if (version == 1) + parse_rockridge_TF1(file, + data, data_length); break; } /* FALLTHROUGH */ default: /* The FALLTHROUGHs above leave us here for * any unsupported extension. */ +#if DEBUG { const unsigned char *t; - fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name); + fprintf(stderr, "\nUnsupported RRIP extension for %s\n", file->name.s); fprintf(stderr, " %c%c(%d):", p[0], p[1], data_length); for (t = data; t < data + data_length && t < data + 16; t++) fprintf(stderr, " %02x", *t); fprintf(stderr, "\n"); } +#endif + break; } @@ -874,14 +871,222 @@ parse_rockridge(struct iso9660 *iso9660, } static void +parse_rockridge_NM1(struct file_info *file, const unsigned char *data, + int data_length) +{ + if (!file->name_continues) + archive_string_empty(&file->name); + file->name_continues = 0; + if (data_length < 1) + return; + /* + * NM version 1 extension comprises: + * 1 byte flag, value is one of: + * = 0: remainder is name + * = 1: remainder is name, next NM entry continues name + * = 2: "." + * = 4: ".." + * = 32: Implementation specific + * All other values are reserved. + */ + switch(data[0]) { + case 0: + if (data_length < 2) + return; + archive_strncat(&file->name, data + 1, data_length - 1); + break; + case 1: + if (data_length < 2) + return; + archive_strncat(&file->name, data + 1, data_length - 1); + file->name_continues = 1; + break; + case 2: + archive_strcat(&file->name, "."); + break; + case 4: + archive_strcat(&file->name, ".."); + break; + default: + return; + } + +} + +static void +parse_rockridge_TF1(struct file_info *file, const unsigned char *data, + int data_length) +{ + char flag; + /* + * TF extension comprises: + * one byte flag + * create time (optional) + * modify time (optional) + * access time (optional) + * attribute time (optional) + * Time format and presence of fields + * is controlled by flag bits. + */ + if (data_length < 1) + return; + flag = data[0]; + ++data; + --data_length; + if (flag & 0x80) { + /* Use 17-byte time format. */ + if ((flag & 1) && data_length >= 17) { + /* Create time. */ + file->birthtime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 2) && data_length >= 17) { + /* Modify time. */ + file->mtime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 4) && data_length >= 17) { + /* Access time. */ + file->atime = isodate17(data); + data += 17; + data_length -= 17; + } + if ((flag & 8) && data_length >= 17) { + /* Attribute change time. */ + file->ctime = isodate17(data); + data += 17; + data_length -= 17; + } + } else { + /* Use 7-byte time format. */ + if ((flag & 1) && data_length >= 7) { + /* Create time. */ + file->birthtime = isodate17(data); + data += 7; + data_length -= 7; + } + if ((flag & 2) && data_length >= 7) { + /* Modify time. */ + file->mtime = isodate7(data); + data += 7; + data_length -= 7; + } + if ((flag & 4) && data_length >= 7) { + /* Access time. */ + file->atime = isodate7(data); + data += 7; + data_length -= 7; + } + if ((flag & 8) && data_length >= 7) { + /* Attribute change time. */ + file->ctime = isodate7(data); + data += 7; + data_length -= 7; + } + } +} + +static void +parse_rockridge_SL1(struct file_info *file, const unsigned char *data, + int data_length) +{ + int component_continues = 1; + + if (!file->symlink_continues) + archive_string_empty(&file->symlink); + else + archive_strcat(&file->symlink, "/"); + file->symlink_continues = 0; + + /* + * Defined flag values: + * 0: This is the last SL record for this symbolic link + * 1: this symbolic link field continues in next SL entry + * All other values are reserved. + */ + if (data_length < 1) + return; + switch(*data) { + case 0: + break; + case 1: + file->symlink_continues = 1; + break; + default: + return; + } + ++data; /* Skip flag byte. */ + --data_length; + + /* + * SL extension body stores "components". + * Basically, this is a complicated way of storing + * a POSIX path. It also interferes with using + * symlinks for storing non-path data. + * + * Each component is 2 bytes (flag and length) + * possibly followed by name data. + */ + while (data_length >= 2) { + unsigned char flag = *data++; + unsigned char nlen = *data++; + data_length -= 2; + + if (!component_continues) + archive_strcat(&file->symlink, "/"); + component_continues = 0; + + switch(flag) { + case 0: /* Usual case, this is text. */ + if (data_length < nlen) + return; + archive_strncat(&file->symlink, + (const char *)data, nlen); + break; + case 0x01: /* Text continues in next component. */ + if (data_length < nlen) + return; + archive_strncat(&file->symlink, + (const char *)data, nlen); + component_continues = 1; + break; + case 0x02: /* Current dir. */ + archive_strcat(&file->symlink, "."); + break; + case 0x04: /* Parent dir. */ + archive_strcat(&file->symlink, ".."); + break; + case 0x08: /* Root of filesystem. */ + archive_string_empty(&file->symlink); + archive_strcat(&file->symlink, "/"); + break; + case 0x10: /* Undefined (historically "volume root" */ + archive_string_empty(&file->symlink); + archive_strcat(&file->symlink, "ROOT"); + break; + case 0x20: /* Undefined (historically "hostname") */ + archive_strcat(&file->symlink, "hostname"); + break; + default: + /* TODO: issue a warning ? */ + return; + } + data += nlen; + data_length -= nlen; + } +} + + +static void release_file(struct iso9660 *iso9660, struct file_info *file) { struct file_info *parent; if (file->refcount == 0) { parent = file->parent; - if (file->name) - free(file->name); + archive_string_free(&file->name); archive_string_free(&file->symlink); free(file); if (parent != NULL) { @@ -906,7 +1111,9 @@ next_entry_seek(struct archive_read *a, /* CE area precedes actual file data? Ignore it. */ if (file->ce_offset > file->offset) { -fprintf(stderr, " *** Discarding CE data.\n"); +#if DEBUG + fprintf(stderr, " *** Discarding CE data.\n"); +#endif file->ce_offset = 0; file->ce_size = 0; } @@ -1071,17 +1278,18 @@ time_from_tm(struct tm *t) static const char * build_pathname(struct archive_string *as, struct file_info *file) { - if (file->parent != NULL && file->parent->name[0] != '\0') { + if (file->parent != NULL && archive_strlen(&file->parent->name) > 0) { build_pathname(as, file->parent); archive_strcat(as, "/"); } - if (file->name[0] == '\0') + if (archive_strlen(&file->name) == 0) archive_strcat(as, "."); else - archive_strcat(as, file->name); + archive_string_concat(as, &file->name); return (as->s); } +#if DEBUG static void dump_isodirrec(FILE *out, const unsigned char *isodirrec) { @@ -1106,3 +1314,4 @@ dump_isodirrec(FILE *out, const unsigned fprintf(out, " `%.*s'", toi(isodirrec + DR_name_len_offset, DR_name_len_size), isodirrec + DR_name_offset); } +#endif Modified: releng/7.1/lib/libarchive/archive_string.c ============================================================================== --- releng/7.1/lib/libarchive/archive_string.c Tue Dec 9 01:01:02 2008 (r185782) +++ releng/7.1/lib/libarchive/archive_string.c Tue Dec 9 04:17:44 2008 (r185783) @@ -70,6 +70,18 @@ __archive_string_copy(struct archive_str } void +__archive_string_concat(struct archive_string *dest, struct archive_string *src) +{ + if (src->length > 0) { + if (__archive_string_ensure(dest, dest->length + src->length + 1) == NULL) + __archive_errx(1, "Out of memory"); + memcpy(dest->s + dest->length, src->s, src->length); + dest->length += src->length; + dest->s[dest->length] = 0; + } +} + +void __archive_string_free(struct archive_string *as) { as->length = 0; Modified: releng/7.1/lib/libarchive/archive_string.h ============================================================================== --- releng/7.1/lib/libarchive/archive_string.h Tue Dec 9 01:01:02 2008 (r185782) +++ releng/7.1/lib/libarchive/archive_string.h Tue Dec 9 04:17:44 2008 (r185783) @@ -92,6 +92,12 @@ __archive_string_copy(struct archive_str #define archive_string_copy(dest, src) \ __archive_string_copy(dest, src) +/* Concatenate one archive_string to another */ +void +__archive_string_concat(struct archive_string *dest, struct archive_string *src); +#define archive_string_concat(dest, src) \ + __archive_string_concat(dest, src) + /* Ensure that the underlying buffer is at least as large as the request. */ struct archive_string * __archive_string_ensure(struct archive_string *, size_t); From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 04:30:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9262A106564A; Tue, 9 Dec 2008 04:30:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80D5B8FC17; Tue, 9 Dec 2008 04:30:47 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB94UlXR079918; Tue, 9 Dec 2008 04:30:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB94UlWU079916; Tue, 9 Dec 2008 04:30:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812090430.mB94UlWU079916@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 9 Dec 2008 04:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185784 - head/sys/dev/sis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 04:30:47 -0000 Author: yongari Date: Tue Dec 9 04:30:47 2008 New Revision: 185784 URL: http://svn.freebsd.org/changeset/base/185784 Log: Fix a long standing VLAN tagged frame handling bug. When VLAN tagged frame is received the hardware sets 'LONG' bit of Rx status word. It is always set when the size of received frame exceeded 1518 bytes, including CRC. This VLAN tagged frame clears 'OK' bit of Rx status word such that driver should not rely on 'OK' bit of Rx status word to pass the VLAN tagged frame to upper stack. To fix the bug, don't use SIS_CMDSTS_PKT_OK for Rx error check and introduce SIS_RXSTAT_ERROR macro that checks Rx errors. If we are configured to accept VLAN tagged frames and the received frame size is less than or equal to maximum allowed length of VLAN tagged frame, clear 'LONG' bit of Rx status word before checking Rx errors. Reported by: Vladimir Ermako < samflanker <> gmail DOT com > Tested by: Vladimir Ermako < samflanker <> gmail DOT com > Modified: head/sys/dev/sis/if_sis.c head/sys/dev/sis/if_sisreg.h Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Tue Dec 9 04:17:44 2008 (r185783) +++ head/sys/dev/sis/if_sis.c Tue Dec 9 04:30:47 2008 (r185784) @@ -1432,7 +1432,11 @@ sis_rxeof(struct sis_softc *sc) * it should simply get re-used next time this descriptor * comes up in the ring. */ - if (!(rxstat & SIS_CMDSTS_PKT_OK)) { + if ((ifp->if_capenable & IFCAP_VLAN_MTU) != 0 && + total_len <= (ETHER_MAX_LEN + ETHER_VLAN_ENCAP_LEN - + ETHER_CRC_LEN)) + rxstat &= ~SIS_RXSTAT_GIANT; + if (SIS_RXSTAT_ERROR(rxstat) != 0) { ifp->if_ierrors++; if (rxstat & SIS_RXSTAT_COLL) ifp->if_collisions++; Modified: head/sys/dev/sis/if_sisreg.h ============================================================================== --- head/sys/dev/sis/if_sisreg.h Tue Dec 9 04:17:44 2008 (r185783) +++ head/sys/dev/sis/if_sisreg.h Tue Dec 9 04:30:47 2008 (r185784) @@ -348,6 +348,11 @@ struct sis_desc { #define SIS_RXSTAT_OVERRUN 0x02000000 #define SIS_RXSTAT_RX_ABORT 0x04000000 +#define SIS_RXSTAT_ERROR(x) \ + ((x) & (SIS_RXSTAT_RX_ABORT | SIS_RXSTAT_OVERRUN | \ + SIS_RXSTAT_GIANT | SIS_RXSTAT_SYMBOLERR | SIS_RXSTAT_RUNT | \ + SIS_RXSTAT_CRCERR | SIS_RXSTAT_ALIGNERR)) + #define SIS_DSTCLASS_REJECT 0x00000000 #define SIS_DSTCLASS_UNICAST 0x00800000 #define SIS_DSTCLASS_MULTICAST 0x01000000 From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 07:42:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D68871065670 for ; Tue, 9 Dec 2008 07:42:51 +0000 (UTC) (envelope-from paul.m.saab@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id A33B28FC22 for ; Tue, 9 Dec 2008 07:42:51 +0000 (UTC) (envelope-from paul.m.saab@gmail.com) Received: by wa-out-1112.google.com with SMTP id m34so730349wag.27 for ; Mon, 08 Dec 2008 23:42:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=ymezVxnkw9w8LkCMTfSeGB3w1hfCLUUbM9T4sCOcsxA=; b=ZhToSPS7FxPPxKC4KLjRXPDA44qZa96mB/RAlSgTHUpGWMAhcEKa3/foVoNvOqJX0K W7ekpcsF61ni9/9ofIwNGz4SVBo/jHhEqMo2TEiz2qPI0LVNRaDFFjlsVkyatAnI79oz 0JwzYAmYhCilS1SJrvU2fvoHx0DaEmPpD2upY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=wm1lhVPQ/lvsIxefyoGDBDiilPblsAfPgSZnrEe3xVZd0BxPSG3dxzOZpZeQPW1b9V Si7cphrfyt3jdeEJAjG3NPjj4renTbgGadFCArHaLqprlR86zvfEyoWhbYHmnsAYSv2k xHWlBGhf828cEX9qwRxFLJIMsXWQrWz45DoDU= Received: by 10.115.32.1 with SMTP id k1mr3000534waj.66.1228807029076; Mon, 08 Dec 2008 23:17:09 -0800 (PST) Received: by 10.114.106.6 with HTTP; Mon, 8 Dec 2008 23:17:09 -0800 (PST) Message-ID: <5c0ff6a70812082317t15368b3aibcd6df8d13fcab3e@mail.gmail.com> Date: Mon, 8 Dec 2008 23:17:09 -0800 From: "Paul Saab" Sender: paul.m.saab@gmail.com To: "Luigi Rizzo" In-Reply-To: <200812031837.mB3Ib0pb098329@svn.freebsd.org> MIME-Version: 1.0 References: <200812031837.mB3Ib0pb098329@svn.freebsd.org> X-Google-Sender-Auth: f45159064888ac27 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185588 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 07:42:52 -0000 This requires all devices end in 'a' - 'h'. This breaks newfsing zfs volumes with arbitrary names, On Wed, Dec 3, 2008 at 10:37 AM, Luigi Rizzo wrote: > Author: luigi > Date: Wed Dec 3 18:36:59 2008 > New Revision: 185588 > URL: http://svn.freebsd.org/changeset/base/185588 > > Log: > Enable operation of newfs on plain files, which is useful when you > want to prepare disk images for emulators (though 'makefs' in port > can do something similar). > > This relies on: > + minor changes to pass the consistency checks even when working on a > file; > > + an additional option, '-p partition' , to specify the disk partition to > initialize; > > + some changes on the I/O routines to deal with partition offsets. > > The latter was a bit tricky to implement, see the details in newfs.h: > in newfs, I/O is done through libufs which assumes that the file > descriptor refers to the whole partition. Introducing support for > the offset in libufs would require a non-backward compatible change > in the library, to be dealt with a version bump or with symbol > versioning. > > I felt both approaches to be overkill for this specific application, > especially because there might be other changes to libufs that might > become necessary in the near future. > > So I used the following trick: > - read access is always done by calling bread() directly, so we just add > the offset in the (few) places that call bread(); > - write access is done through bwrite() and sbwrite(), which in turn > calls bwrite(). To avoid rewriting sbwrite(), we supply our own version > of bwrite() here, which takes precedence over the version in libufs. > > MFC after: 4 weeks > > Modified: > head/sbin/newfs/Makefile > head/sbin/newfs/mkfs.c > head/sbin/newfs/newfs.8 > head/sbin/newfs/newfs.c > head/sbin/newfs/newfs.h > > Modified: head/sbin/newfs/Makefile > > ============================================================================== > --- head/sbin/newfs/Makefile Wed Dec 3 18:22:36 2008 (r185587) > +++ head/sbin/newfs/Makefile Wed Dec 3 18:36:59 2008 (r185588) > @@ -1,10 +1,13 @@ > # @(#)Makefile 8.2 (Berkeley) 3/27/94 > # $FreeBSD$ > > +.PATH: ${.CURDIR}/../../sys/geom > + > PROG= newfs > DPADD= ${LIBUFS} > LDADD= -lufs > -SRCS= newfs.c mkfs.c > +SRCS= newfs.c mkfs.c geom_bsd_enc.c > + > WARNS?= 2 > MAN= newfs.8 > > > Modified: head/sbin/newfs/mkfs.c > > ============================================================================== > --- head/sbin/newfs/mkfs.c Wed Dec 3 18:22:36 2008 (r185587) > +++ head/sbin/newfs/mkfs.c Wed Dec 3 18:36:59 2008 (r185588) > @@ -459,7 +459,7 @@ mkfs(struct partition *pp, char *fsys) > * Wipe out old UFS1 superblock(s) if necessary. > */ > if (!Nflag && Oflag != 1) { > - i = bread(&disk, SBLOCK_UFS1 / disk.d_bsize, chdummy, > SBLOCKSIZE); > + i = bread(&disk, part_ofs + SBLOCK_UFS1 / disk.d_bsize, > chdummy, SBLOCKSIZE); > if (i == -1) > err(1, "can't read old UFS1 superblock: %s", > disk.d_error); > > @@ -872,7 +872,7 @@ alloc(int size, int mode) > { > int i, d, blkno, frag; > > - bread(&disk, fsbtodb(&sblock, cgtod(&sblock, 0)), (char *)&acg, > + bread(&disk, part_ofs + fsbtodb(&sblock, cgtod(&sblock, 0)), (char > *)&acg, > sblock.fs_cgsize); > if (acg.cg_magic != CG_MAGIC) { > printf("cg 0: bad magic number\n"); > @@ -925,7 +925,7 @@ iput(union dinode *ip, ino_t ino) > int c; > > c = ino_to_cg(&sblock, ino); > - bread(&disk, fsbtodb(&sblock, cgtod(&sblock, 0)), (char *)&acg, > + bread(&disk, part_ofs + fsbtodb(&sblock, cgtod(&sblock, 0)), (char > *)&acg, > sblock.fs_cgsize); > if (acg.cg_magic != CG_MAGIC) { > printf("cg 0: bad magic number\n"); > @@ -942,7 +942,7 @@ iput(union dinode *ip, ino_t ino) > exit(32); > } > d = fsbtodb(&sblock, ino_to_fsba(&sblock, ino)); > - bread(&disk, d, (char *)iobuf, sblock.fs_bsize); > + bread(&disk, part_ofs + d, (char *)iobuf, sblock.fs_bsize); > if (sblock.fs_magic == FS_UFS1_MAGIC) > ((struct ufs1_dinode *)iobuf)[ino_to_fsbo(&sblock, ino)] = > ip->dp1; > > Modified: head/sbin/newfs/newfs.8 > > ============================================================================== > --- head/sbin/newfs/newfs.8 Wed Dec 3 18:22:36 2008 (r185587) > +++ head/sbin/newfs/newfs.8 Wed Dec 3 18:36:59 2008 (r185588) > @@ -52,6 +52,7 @@ > .Op Fl i Ar bytes > .Op Fl m Ar free-space > .Op Fl o Ar optimization > +.Op Fl p Ar partition > .Op Fl r Ar reserved > .Op Fl s Ar size > .Ar special > @@ -201,6 +202,17 @@ the default is to optimize for > See > .Xr tunefs 8 > for more details on how to set this option. > +.It Fl p Ar partition > +The partition name (a..h) you want to use in case the underlying image > +is a file, so you don't have access to individual partitions through the > +filesystem. > +Can also be used with a device, e.g. > +.Nm > +.Fl p Ar f > +.Ar /dev/da1s3 > +is equivalent to > +.Nm > +.Ar /dev/da1s3f . > .It Fl r Ar reserved > The size, in sectors, of reserved space > at the end of the partition specified in > > Modified: head/sbin/newfs/newfs.c > > ============================================================================== > --- head/sbin/newfs/newfs.c Wed Dec 3 18:22:36 2008 (r185587) > +++ head/sbin/newfs/newfs.c Wed Dec 3 18:36:59 2008 (r185588) > @@ -139,6 +139,9 @@ u_char *volumelabel = NULL; /* volume la > struct uufsd disk; /* libufs disk structure */ > > static char device[MAXPATHLEN]; > +static u_char bootarea[BBSIZE]; > +static int is_file; /* work on a file, not a device */ > +static char *dkname; > static char *disktype; > static int unlabeled; > > @@ -147,6 +150,18 @@ static struct disklabel *getdisklabel(ch > static void rewritelabel(char *s, struct disklabel *lp); > static void usage(void); > > +ufs2_daddr_t part_ofs; /* partition offset in blocks, used with files */ > + > +/* > + * need to replace the library's bwrite so that sbwrite uses this one > + */ > +ssize_t > +bwrite(struct uufsd *disk, ufs2_daddr_t blockno, const void *data, size_t > size) > +{ > + return pwrite(disk->d_fd, data, size, > + (off_t)((part_ofs + blockno) * disk->d_bsize)); > +} > + > int > main(int argc, char *argv[]) > { > @@ -158,7 +173,9 @@ main(int argc, char *argv[]) > intmax_t reserved; > int ch, i; > off_t mediasize; > + char part_name; /* partition name, default to full disk */ > > + part_name = 'c'; > reserved = 0; > while ((ch = getopt(argc, argv, > "EJL:NO:RS:T:UXa:b:c:d:e:f:g:h:i:lm:no:r:s:")) != -1) > @@ -276,6 +293,11 @@ main(int argc, char *argv[]) > *cp != '\0' || reserved < 0) > errx(1, "%s: bad reserved size", optarg); > break; > + case 'p': > + is_file = 1; > + part_name = optarg[0]; > + break; > + > case 's': > errno = 0; > fssize = strtoimax(optarg, &cp, 0); > @@ -294,6 +316,8 @@ main(int argc, char *argv[]) > usage(); > > special = argv[0]; > + if (!special[0]) > + err(1, "empty file/special name"); > cp = strrchr(special, '/'); > if (cp == 0) { > /* > @@ -303,7 +327,16 @@ main(int argc, char *argv[]) > special = device; > } > > - if (ufs_disk_fillout_blank(&disk, special) == -1 || > + if (is_file) { > + /* bypass ufs_disk_fillout_blank */ > + bzero( &disk, sizeof(disk)); > + disk.d_bsize = 1; > + disk.d_name = special; > + disk.d_fd = open(special, O_RDONLY); > + if (disk.d_fd < 0 || > + (!Nflag && ufs_disk_write(&disk) == -1)) > + errx(1, "%s: ", special); > + } else if (ufs_disk_fillout_blank(&disk, special) == -1 || > (!Nflag && ufs_disk_write(&disk) == -1)) { > if (disk.d_error != NULL) > errx(1, "%s: %s", special, disk.d_error); > @@ -312,22 +345,30 @@ main(int argc, char *argv[]) > } > if (fstat(disk.d_fd, &st) < 0) > err(1, "%s", special); > - if ((st.st_mode & S_IFMT) != S_IFCHR) > - errx(1, "%s: not a character-special device", special); > + if ((st.st_mode & S_IFMT) != S_IFCHR) { > + warn("%s: not a character-special device", special); > + is_file = 1; /* assume it is a file */ > + dkname = special; > + if (sectorsize == 0) > + sectorsize = 512; > + mediasize = st.st_size; > + /* set fssize from the partition */ > + } else { > + part_name = special[strlen(special) - 1]; > + if ((part_name < 'a' || part_name > 'h') && > !isdigit(part_name)) > + errx(1, "%s: can't figure out file system partition", > + special); > > - if (sectorsize == 0) > + if (sectorsize == 0) > if (ioctl(disk.d_fd, DIOCGSECTORSIZE, §orsize) == -1) > - sectorsize = 0; /* back out on error for safety */ > - if (sectorsize && ioctl(disk.d_fd, DIOCGMEDIASIZE, &mediasize) != > -1) > + sectorsize = 0; /* back out on error for safety */ > + if (sectorsize && ioctl(disk.d_fd, DIOCGMEDIASIZE, &mediasize) > != -1) > getfssize(&fssize, special, mediasize / sectorsize, > reserved); > + } > pp = NULL; > lp = getdisklabel(special); > if (lp != NULL) { > - cp = strchr(special, '\0'); > - cp--; > - if ((*cp < 'a' || *cp > 'h') && !isdigit(*cp)) > - errx(1, "%s: can't figure out file system > partition", > - special); > + cp = &part_name; > if (isdigit(*cp)) > pp = &lp->d_partitions[RAW_PART]; > else > @@ -346,6 +387,8 @@ main(int argc, char *argv[]) > fsize = pp->p_fsize; > if (bsize == 0) > bsize = pp->p_frag * pp->p_fsize; > + if (is_file) > + part_ofs = pp->p_offset; > } > if (sectorsize <= 0) > errx(1, "%s: no default sector size", special); > @@ -414,6 +457,19 @@ getdisklabel(char *s) > static struct disklabel lab; > struct disklabel *lp; > > + if (is_file) { > + if (read(disk.d_fd, bootarea, BBSIZE) != BBSIZE) > + err(4, "cannot read bootarea"); > + if (bsd_disklabel_le_dec( > + bootarea + (0 /* labeloffset */ + > + 1 /* labelsoffset */ * sectorsize), > + &lab, MAXPARTITIONS)) > + errx(1, "no valid label found"); > + > + lp = &lab; > + return &lab; > + } > + > if (ioctl(disk.d_fd, DIOCGDINFO, (char *)&lab) != -1) > return (&lab); > unlabeled++; > @@ -432,6 +488,14 @@ rewritelabel(char *s, struct disklabel * > return; > lp->d_checksum = 0; > lp->d_checksum = dkcksum(lp); > + if (is_file) { > + bsd_disklabel_le_enc(bootarea + 0 /* labeloffset */ + > + 1 /* labelsoffset */ * sectorsize, lp); > + lseek(disk.d_fd, 0, SEEK_SET); > + if (write(disk.d_fd, bootarea, BBSIZE) != BBSIZE) > + errx(1, "cannot write label"); > + return; > + } > if (ioctl(disk.d_fd, DIOCWDINFO, (char *)lp) == -1) > warn("ioctl (WDINFO): %s: can't rewrite disk label", s); > } > @@ -467,6 +531,7 @@ usage() > fprintf(stderr, "\t-n do not create .snap directory\n"); > fprintf(stderr, "\t-m minimum free space %%\n"); > fprintf(stderr, "\t-o optimization preference (`space' or > `time')\n"); > + fprintf(stderr, "\t-p partition name (a..h)\n"); > fprintf(stderr, "\t-r reserved sectors at the end of device\n"); > fprintf(stderr, "\t-s file system size (sectors)\n"); > exit(1); > > Modified: head/sbin/newfs/newfs.h > > ============================================================================== > --- head/sbin/newfs/newfs.h Wed Dec 3 18:22:36 2008 (r185587) > +++ head/sbin/newfs/newfs.h Wed Dec 3 18:36:59 2008 (r185588) > @@ -70,4 +70,20 @@ extern int avgfilesperdir; /* expected n > extern u_char *volumelabel; /* volume label for filesystem */ > extern struct uufsd disk; /* libufs disk structure */ > > +/* > + * To override a limitation in libufs, export the offset (in sectors) of > the > + * partition on the underlying media (file or disk). The value is used as > + * an offset for all accesses to the media through bread(), which is only > + * invoked directly in this program. > + * For bwrite() we need a different approach, namely override the library > + * version with one defined here. This is because bwrite() is called also > + * by the library function sbwrite() which we cannot intercept nor want to > + * rewrite. As a consequence, the internal version of bwrite() adds the > + * partition offset itself when calling the underlying function, pwrite(). > + * > + * XXX This info really ought to go into the struct uufsd, at which point > + * we can remove the above hack. > + */ > +extern ufs2_daddr_t part_ofs; /* partition offset in blocks */ > + > void mkfs (struct partition *, char *); > From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 08:09:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CEBE1065675 for ; Tue, 9 Dec 2008 08:09:57 +0000 (UTC) (envelope-from peter@wemm.org) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id E7EA98FC18 for ; Tue, 9 Dec 2008 08:09:56 +0000 (UTC) (envelope-from peter@wemm.org) Received: by an-out-0708.google.com with SMTP id b6so624589ana.13 for ; Tue, 09 Dec 2008 00:09:55 -0800 (PST) Received: by 10.100.153.6 with SMTP id a6mr2003004ane.76.1228810195430; Tue, 09 Dec 2008 00:09:55 -0800 (PST) Received: by 10.100.211.19 with HTTP; Tue, 9 Dec 2008 00:09:55 -0800 (PST) Message-ID: Date: Tue, 9 Dec 2008 00:09:55 -0800 From: "Peter Wemm" To: "Paul Saab" In-Reply-To: <5c0ff6a70812082317t15368b3aibcd6df8d13fcab3e@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812031837.mB3Ib0pb098329@svn.freebsd.org> <5c0ff6a70812082317t15368b3aibcd6df8d13fcab3e@mail.gmail.com> Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r185588 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 08:09:57 -0000 On Mon, Dec 8, 2008 at 11:17 PM, Paul Saab wrote: > This requires all devices end in 'a' - 'h'. This breaks newfsing zfs > volumes with arbitrary names, It also would be wrong in a whole bunch of other scenarios: peter@overcee[12:07AM]~/fbp4-1132> cat /etc/fstab /dev/twed0p2 / ufs rw 1 1 /dev/twed0p3 /usr ufs rw 2 2 ... Also.. 'a' .. 'h' is wrong even for disklabel. If you're using GEOM_PART_BSD, you've got something like 20 partition letters available instead of just 8. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 09:24:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 739C8106564A; Tue, 9 Dec 2008 09:24:25 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 491178FC17; Tue, 9 Dec 2008 09:24:25 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB99OPJW085920; Tue, 9 Dec 2008 09:24:25 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB99OPIc085919; Tue, 9 Dec 2008 09:24:25 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200812090924.mB99OPIc085919@svn.freebsd.org> From: Maxim Konovalov Date: Tue, 9 Dec 2008 09:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185789 - head/lib/libc/string X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 09:24:25 -0000 Author: maxim Date: Tue Dec 9 09:24:25 2008 New Revision: 185789 URL: http://svn.freebsd.org/changeset/base/185789 Log: o Use full month name in .Dd macro. Modified: head/lib/libc/string/strdup.3 Modified: head/lib/libc/string/strdup.3 ============================================================================== --- head/lib/libc/string/strdup.3 Tue Dec 9 06:24:26 2008 (r185788) +++ head/lib/libc/string/strdup.3 Tue Dec 9 09:24:25 2008 (r185789) @@ -28,7 +28,7 @@ .\" @(#)strdup.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd Dec 5, 2008 +.Dd December 5, 2008 .Dt STRDUP 3 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 09:25:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9189106564A; Tue, 9 Dec 2008 09:25:03 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7DCD8FC28; Tue, 9 Dec 2008 09:25:03 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB99P3Ix085971; Tue, 9 Dec 2008 09:25:03 GMT (envelope-from phk@svn.freebsd.org) Received: (from phk@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB99P36A085969; Tue, 9 Dec 2008 09:25:03 GMT (envelope-from phk@svn.freebsd.org) Message-Id: <200812090925.mB99P36A085969@svn.freebsd.org> From: Poul-Henning Kamp Date: Tue, 9 Dec 2008 09:25:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185790 - head/usr.sbin/fifolog/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 09:25:03 -0000 Author: phk Date: Tue Dec 9 09:25:03 2008 New Revision: 185790 URL: http://svn.freebsd.org/changeset/base/185790 Log: Fix a cornercase during search Modified: head/usr.sbin/fifolog/lib/fifolog_int.c head/usr.sbin/fifolog/lib/fifolog_reader.c Modified: head/usr.sbin/fifolog/lib/fifolog_int.c ============================================================================== --- head/usr.sbin/fifolog/lib/fifolog_int.c Tue Dec 9 09:24:25 2008 (r185789) +++ head/usr.sbin/fifolog/lib/fifolog_int.c Tue Dec 9 09:25:03 2008 (r185790) @@ -221,9 +221,9 @@ fifolog_int_read(const struct fifolog_fi recno++; /* label sector */ i = pread(ff->fd, ff->recbuf, ff->recsize, recno * ff->recsize); if (i < 0) - return (-1); + return (-2); if (i != (int)ff->recsize) - return (-1); + return (-3); return (0); } Modified: head/usr.sbin/fifolog/lib/fifolog_reader.c ============================================================================== --- head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Dec 9 09:24:25 2008 (r185789) +++ head/usr.sbin/fifolog/lib/fifolog_reader.c Tue Dec 9 09:25:03 2008 (r185790) @@ -98,7 +98,7 @@ fifolog_reader_findsync(const struct fif assert(*o < ff->logsize); e = fifolog_int_read(ff, *o); if (e) - err(1, "Read error while looking for SYNC"); + err(1, "Read error (%d) while looking for SYNC", e); seq = be32dec(ff->recbuf); if (*o == 0 && seq == 0) return (0); @@ -113,7 +113,7 @@ fifolog_reader_findsync(const struct fif return (2); /* wraparound */ e = fifolog_int_read(ff, *o); if (e) - err(1, "Read error while looking for SYNC"); + err(1, "Read error (%d) while looking for SYNC", e); seqs = be32dec(ff->recbuf); if (seqs != seq) return (3); /* End of log */ @@ -174,8 +174,10 @@ fifolog_reader_seek(const struct fifolog continue; } e = fifolog_int_read(fr->ff, o + st); - if (e) - err(1, "Read error, duing binary search"); + if (e) { + s = st = s / 2; + continue; + } /* If not in same part, sequence won't match */ seqs = be32dec(fr->ff->recbuf); if (seqs != seq + st) { @@ -254,7 +256,7 @@ fifolog_reader_process(struct fifolog_re while (1) { e = fifolog_int_read(fr->ff, o); if (e) - err(1, "Read error"); + err(1, "Read error (%d)", e); if (++o >= fr->ff->logsize) o = 0; seq = be32dec(fr->ff->recbuf); From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 10:21:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 658181065672; Tue, 9 Dec 2008 10:21:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5408E8FC1F; Tue, 9 Dec 2008 10:21:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9ALcwc087142; Tue, 9 Dec 2008 10:21:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9ALcjX087141; Tue, 9 Dec 2008 10:21:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812091021.mB9ALcjX087141@svn.freebsd.org> From: Robert Watson Date: Tue, 9 Dec 2008 10:21:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185791 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 10:21:38 -0000 Author: rwatson Date: Tue Dec 9 10:21:38 2008 New Revision: 185791 URL: http://svn.freebsd.org/changeset/base/185791 Log: Move macros defining flags and shortcus to nested structure fields in inpcbinfo below the structure definition in order to make inpcbinfo fit on a single printed page; related style tweaks. MFC after: pretty soon Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Dec 9 09:25:03 2008 (r185790) +++ head/sys/netinet/in_pcb.h Tue Dec 9 10:21:38 2008 (r185791) @@ -1,6 +1,7 @@ /*- * Copyright (c) 1982, 1986, 1990, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -88,11 +89,11 @@ struct in_endpoints { struct in_addr_4in6 ie46_local; struct in6_addr ie6_local; } ie_dependladdr; +}; #define ie_faddr ie_dependfaddr.ie46_foreign.ia46_addr4 #define ie_laddr ie_dependladdr.ie46_local.ia46_addr4 #define ie6_faddr ie_dependfaddr.ie6_foreign #define ie6_laddr ie_dependladdr.ie6_local -}; /* * XXX The defines for inc_* are hacks and should be changed to direct @@ -152,20 +153,11 @@ struct inpcb { LIST_ENTRY(inpcb) inp_list; /* (i/p) list for all PCBs for proto */ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ - struct socket *inp_socket; /* (i) back pointer to socket */ + struct socket *inp_socket; /* (i) back pointer to socket */ struct ucred *inp_cred; /* (c) cache of socket cred */ - - u_int32_t inp_flow; /* (i) IPv6 flow information */ + u_int32_t inp_flow; /* (i) IPv6 flow information */ int inp_flags; /* (i) generic IP/datagram flags */ - u_char inp_vflag; /* (i) IP version flag (v4/v6) */ -#define INP_IPV4 0x1 -#define INP_IPV6 0x2 -#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ -#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ -#define INP_DROPPED 0x20 /* protocol drop flag */ -#define INP_SOCKREF 0x40 /* strong socket reference */ u_char inp_ip_ttl; /* (i) time to live proto */ u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ @@ -174,9 +166,9 @@ struct inpcb { void *inp_pspare[2]; /* (x) rtentry / general use */ /* Local and foreign ports, local and foreign addr. */ - struct in_conninfo inp_inc; + struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ - /* (i/p) list for PCB's local port */ + /* MAC and IPSEC policy information. */ struct label *inp_label; /* (i) MAC label */ struct inpcbpolicy *inp_sp; /* (s) for IPSEC */ @@ -184,15 +176,8 @@ struct inpcb { struct { u_char inp4_ip_tos; /* (i) type of service proto */ struct mbuf *inp4_options; /* (i) IP options */ - struct ip_moptions *inp4_moptions; /* (i) IP multicast options */ + struct ip_moptions *inp4_moptions; /* (i) IP mcast options */ } inp_depend4; -#define inp_fport inp_inc.inc_fport -#define inp_lport inp_inc.inc_lport -#define inp_faddr inp_inc.inc_faddr -#define inp_laddr inp_inc.inc_laddr -#define inp_ip_tos inp_depend4.inp4_ip_tos -#define inp_options inp_depend4.inp4_options -#define inp_moptions inp_depend4.inp4_moptions struct { /* (i) IP options */ struct mbuf *inp6_options; @@ -209,8 +194,16 @@ struct inpcb { LIST_ENTRY(inpcb) inp_portlist; /* (i/p) */ struct inpcbport *inp_phd; /* (i/p) head of this list */ #define inp_zero_size offsetof(struct inpcb, inp_gencnt) - inp_gen_t inp_gencnt; /* (c) generation count of this instance */ + inp_gen_t inp_gencnt; /* (c) generation count */ struct rwlock inp_lock; +}; +#define inp_fport inp_inc.inc_fport +#define inp_lport inp_inc.inc_lport +#define inp_faddr inp_inc.inc_faddr +#define inp_laddr inp_inc.inc_laddr +#define inp_ip_tos inp_depend4.inp4_ip_tos +#define inp_options inp_depend4.inp4_options +#define inp_moptions inp_depend4.inp4_moptions #define in6p_faddr inp_inc.inc6_faddr #define in6p_laddr inp_inc.inc6_laddr @@ -228,7 +221,7 @@ struct inpcb { #define in6p_lport inp_lport /* for KAME src sync over BSD*'s */ #define in6p_fport inp_fport /* for KAME src sync over BSD*'s */ #define in6p_ppcb inp_ppcb /* for KAME src sync over BSD*'s */ -}; + /* * The range of the generation count, as used in this implementation, is 9e19. * We would have to create 300 billion connections per second for this number @@ -384,7 +377,22 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_PCBPORTHASH(lport, mask) \ (ntohs((lport)) & (mask)) -/* flags in inp_flags: */ +/* + * Flags for inp_vflags -- historically version flags only, but now quite a + * bit more due to an overflow of inp_flag, leading to some locking ambiguity + * as some bits are stable from initial allocation, and others may change. + */ +#define INP_IPV4 0x1 +#define INP_IPV6 0x2 +#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ +#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ +#define INP_DROPPED 0x20 /* protocol drop flag */ +#define INP_SOCKREF 0x40 /* strong socket reference */ + +/* + * Flags for inp_flag. + */ #define INP_RECVOPTS 0x01 /* receive incoming IP options */ #define INP_RECVRETOPTS 0x02 /* receive IP options for reply */ #define INP_RECVDSTADDR 0x04 /* receive IP dst address */ From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 11:01:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0699E1065676; Tue, 9 Dec 2008 11:01:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E87568FC2E; Tue, 9 Dec 2008 11:01:17 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9B1HfF089079; Tue, 9 Dec 2008 11:01:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9B1Htr089077; Tue, 9 Dec 2008 11:01:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812091101.mB9B1Htr089077@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 9 Dec 2008 11:01:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185792 - in stable/7/sys: . contrib/pf dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 11:01:18 -0000 Author: yongari Date: Tue Dec 9 11:01:17 2008 New Revision: 185792 URL: http://svn.freebsd.org/changeset/base/185792 Log: MFC r185542: Add 8168D support. Submitted by: Andrew < andrewwtulloch <> gmail DOT com > Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/re/if_re.c stable/7/sys/pci/if_rlreg.h Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Tue Dec 9 10:21:38 2008 (r185791) +++ stable/7/sys/dev/re/if_re.c Tue Dec 9 11:01:17 2008 (r185792) @@ -172,7 +172,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe " + "RealTek 8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP PCIe " "Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, @@ -213,6 +213,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, { RL_HWREV_8168C_SPIN2, RL_8169, "8168C/8111C"}, { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, + { RL_HWREV_8168D, RL_8169, "8168D"}, { 0, 0, NULL } }; @@ -1225,6 +1226,7 @@ re_attach(device_t dev) case RL_HWREV_8168C: case RL_HWREV_8168C_SPIN2: case RL_HWREV_8168CP: + case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT; /* Modified: stable/7/sys/pci/if_rlreg.h ============================================================================== --- stable/7/sys/pci/if_rlreg.h Tue Dec 9 10:21:38 2008 (r185791) +++ stable/7/sys/pci/if_rlreg.h Tue Dec 9 11:01:17 2008 (r185792) @@ -157,6 +157,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 11:05:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC6A106564A; Tue, 9 Dec 2008 11:05:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C8F98FC1C; Tue, 9 Dec 2008 11:05:59 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9B5xCk089197; Tue, 9 Dec 2008 11:05:59 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9B5xbq089195; Tue, 9 Dec 2008 11:05:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812091105.mB9B5xbq089195@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 9 Dec 2008 11:05:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185793 - in releng/7.1/sys: . dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 11:05:59 -0000 Author: yongari Date: Tue Dec 9 11:05:59 2008 New Revision: 185793 URL: http://svn.freebsd.org/changeset/base/185793 Log: MFC r185542: Add 8168D support. Submitted by: Andrew < andrewwtulloch <> gmail DOT com > Approved by: re (kib) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/dev/re/if_re.c releng/7.1/sys/pci/if_rlreg.h Modified: releng/7.1/sys/dev/re/if_re.c ============================================================================== --- releng/7.1/sys/dev/re/if_re.c Tue Dec 9 11:01:17 2008 (r185792) +++ releng/7.1/sys/dev/re/if_re.c Tue Dec 9 11:05:59 2008 (r185793) @@ -172,7 +172,7 @@ static struct rl_type re_devs[] = { { RT_VENDORID, RT_DEVICEID_8101E, 0, "RealTek 8101E/8102E/8102EL PCIe 10/100baseTX" }, { RT_VENDORID, RT_DEVICEID_8168, 0, - "RealTek 8168/8168B/8168C/8168CP/8111B/8111C/8111CP PCIe " + "RealTek 8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP PCIe " "Gigabit Ethernet" }, { RT_VENDORID, RT_DEVICEID_8169, 0, "RealTek 8169/8169S/8169SB(L)/8110S/8110SB(L) Gigabit Ethernet" }, @@ -213,6 +213,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, { RL_HWREV_8168C_SPIN2, RL_8169, "8168C/8111C"}, { RL_HWREV_8168CP, RL_8169, "8168CP/8111CP"}, + { RL_HWREV_8168D, RL_8169, "8168D"}, { 0, 0, NULL } }; @@ -1225,6 +1226,7 @@ re_attach(device_t dev) case RL_HWREV_8168C: case RL_HWREV_8168C_SPIN2: case RL_HWREV_8168CP: + case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT; /* Modified: releng/7.1/sys/pci/if_rlreg.h ============================================================================== --- releng/7.1/sys/pci/if_rlreg.h Tue Dec 9 11:01:17 2008 (r185792) +++ releng/7.1/sys/pci/if_rlreg.h Tue Dec 9 11:05:59 2008 (r185793) @@ -157,6 +157,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 #define RL_HWREV_8101E 0x34000000 From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 15:49:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01CF1106564A; Tue, 9 Dec 2008 15:49:03 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E526C8FC1F; Tue, 9 Dec 2008 15:49:02 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Fn27g094679; Tue, 9 Dec 2008 15:49:02 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9Fn2Pb094678; Tue, 9 Dec 2008 15:49:02 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812091549.mB9Fn2Pb094678@svn.freebsd.org> From: Robert Watson Date: Tue, 9 Dec 2008 15:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185795 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 15:49:03 -0000 Author: rwatson Date: Tue Dec 9 15:49:02 2008 New Revision: 185795 URL: http://svn.freebsd.org/changeset/base/185795 Log: Enhance one comment relating to recent TCP locking changes, and fix a typo in another. MFC after: 6 weeks Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Dec 9 14:56:39 2008 (r185794) +++ head/sys/netinet/tcp_input.c Tue Dec 9 15:49:02 2008 (r185795) @@ -480,11 +480,11 @@ tcp_input(struct mbuf *m, int off0) /* * Locate pcb for segment, which requires a lock on tcbinfo. - * Optimisticaly acquire a global read lock unless header flags - * necessarily imply a state change. There are two cases where we - * might discover later we need a write lock despite the flags: ACKs - * moving a connection out of the syncache, and ACK relating to a - * connection in TIMEWAIT. + * Optimisticaly acquire a global read lock rather than a write lock + * unless header flags necessarily imply a state change. There are + * two cases where we might discover later we need a write lock + * despite the flags: ACKs moving a connection out of the syncache, + * and ACKs for a connection in TIMEWAIT. */ if ((thflags & (TH_SYN | TH_FIN | TH_RST)) != 0 || tcp_read_locking == 0) { @@ -1087,7 +1087,7 @@ tcp_do_segment(struct mbuf *m, struct tc * allow either a read lock or a write lock, as we may have acquired * a write lock due to a race. * - * Require a global write lock for SYN/SIN/RST segments or + * Require a global write lock for SYN/FIN/RST segments or * non-established connections; otherwise accept either a read or * write lock, as we may have conservatively acquired a write lock in * certain cases in tcp_input() (is this still true?). Currently we From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 16:20:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC4C81065670; Tue, 9 Dec 2008 16:20:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB2528FC1C; Tue, 9 Dec 2008 16:20:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9GKwQk095497; Tue, 9 Dec 2008 16:20:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9GKwCS095496; Tue, 9 Dec 2008 16:20:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812091620.mB9GKwCS095496@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Dec 2008 16:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185796 - in stable/7/sys: . contrib/pf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 16:20:59 -0000 Author: kib Date: Tue Dec 9 16:20:58 2008 New Revision: 185796 URL: http://svn.freebsd.org/changeset/base/185796 Log: MFC r185557: Prevent creation of the duplicated negative namecache entries. Approved by: re (kensmith) Requested by: jhb Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Tue Dec 9 15:49:02 2008 (r185795) +++ stable/7/sys/kern/vfs_cache.c Tue Dec 9 16:20:58 2008 (r185796) @@ -460,7 +460,7 @@ cache_enter(dvp, vp, cnp) struct vnode *vp; struct componentname *cnp; { - struct namecache *ncp; + struct namecache *ncp, *n2; struct nchashhead *ncpp; u_int32_t hash; int hold; @@ -516,8 +516,6 @@ cache_enter(dvp, vp, cnp) * name. */ if (vp) { - struct namecache *n2; - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && @@ -527,7 +525,16 @@ cache_enter(dvp, vp, cnp) return; } } - } + } else { + TAILQ_FOREACH(n2, &ncneg, nc_dst) { + if (n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } numcache++; if (!vp) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 16:30:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E01BE1065676; Tue, 9 Dec 2008 16:30:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97D4E8FC36; Tue, 9 Dec 2008 16:30:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9GUf8K095812; Tue, 9 Dec 2008 16:30:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9GUf7L095811; Tue, 9 Dec 2008 16:30:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812091630.mB9GUf7L095811@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Dec 2008 16:30:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185798 - in stable/7/sys: . contrib/pf ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 16:30:42 -0000 Author: kib Date: Tue Dec 9 16:30:41 2008 New Revision: 185798 URL: http://svn.freebsd.org/changeset/base/185798 Log: MFC r185761: Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if the dq is dirty. This ensures that up to date dq is written in the quota file and fixes assertion in dqget(). Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/ufs/ufs/ufs_quota.c Modified: stable/7/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_quota.c Tue Dec 9 16:25:46 2008 (r185797) +++ stable/7/sys/ufs/ufs/ufs_quota.c Tue Dec 9 16:30:41 2008 (r185798) @@ -1321,7 +1321,7 @@ dqrele(vp, dq) return; } DQH_UNLOCK(); - +sync: (void) dqsync(vp, dq); DQH_LOCK(); @@ -1330,6 +1330,18 @@ dqrele(vp, dq) DQH_UNLOCK(); return; } + + /* + * The dq may become dirty after it is synced but before it is + * put to the free list. Checking the DQ_MOD there without + * locking dq should be safe since no other references to the + * dq exist. + */ + if ((dq->dq_flags & DQ_MOD) != 0) { + dq->dq_cnt++; + DQH_UNLOCK(); + goto sync; + } TAILQ_INSERT_TAIL(&dqfreelist, dq, dq_freelist); DQH_UNLOCK(); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 17:33:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9878B1065670; Tue, 9 Dec 2008 17:33:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 885AB8FC08; Tue, 9 Dec 2008 17:33:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9HXuie097212; Tue, 9 Dec 2008 17:33:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9HXuBY097211; Tue, 9 Dec 2008 17:33:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812091733.mB9HXuBY097211@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Dec 2008 17:33:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185801 - in releng/7.1/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 17:33:56 -0000 Author: kib Date: Tue Dec 9 17:33:56 2008 New Revision: 185801 URL: http://svn.freebsd.org/changeset/base/185801 Log: MFC r185557: Prevent creation of the duplicated negative namecache entries. Approved by: re (kensmith) Requested by: jhb Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/kern/vfs_cache.c Modified: releng/7.1/sys/kern/vfs_cache.c ============================================================================== --- releng/7.1/sys/kern/vfs_cache.c Tue Dec 9 16:52:02 2008 (r185800) +++ releng/7.1/sys/kern/vfs_cache.c Tue Dec 9 17:33:56 2008 (r185801) @@ -460,7 +460,7 @@ cache_enter(dvp, vp, cnp) struct vnode *vp; struct componentname *cnp; { - struct namecache *ncp; + struct namecache *ncp, *n2; struct nchashhead *ncpp; u_int32_t hash; int hold; @@ -516,8 +516,6 @@ cache_enter(dvp, vp, cnp) * name. */ if (vp) { - struct namecache *n2; - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && @@ -527,7 +525,16 @@ cache_enter(dvp, vp, cnp) return; } } - } + } else { + TAILQ_FOREACH(n2, &ncneg, nc_dst) { + if (n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } numcache++; if (!vp) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 17:47:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03182106564A; Tue, 9 Dec 2008 17:47:01 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6B148FC0C; Tue, 9 Dec 2008 17:47:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Hl04s097486; Tue, 9 Dec 2008 17:47:00 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9Hl0d8097485; Tue, 9 Dec 2008 17:47:00 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812091747.mB9Hl0d8097485@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 9 Dec 2008 17:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185802 - in releng/7.1/sys: . ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 17:47:01 -0000 Author: kib Date: Tue Dec 9 17:47:00 2008 New Revision: 185802 URL: http://svn.freebsd.org/changeset/base/185802 Log: MFC r185761: Recheck the DQ_MOD after the dqh lock is relocked. Repeat dqsync() if the dq is dirty. This ensures that up to date dq is written in the quota file and fixes assertion in dqget(). Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/ufs/ufs/ufs_quota.c Modified: releng/7.1/sys/ufs/ufs/ufs_quota.c ============================================================================== --- releng/7.1/sys/ufs/ufs/ufs_quota.c Tue Dec 9 17:33:56 2008 (r185801) +++ releng/7.1/sys/ufs/ufs/ufs_quota.c Tue Dec 9 17:47:00 2008 (r185802) @@ -1321,7 +1321,7 @@ dqrele(vp, dq) return; } DQH_UNLOCK(); - +sync: (void) dqsync(vp, dq); DQH_LOCK(); @@ -1330,6 +1330,18 @@ dqrele(vp, dq) DQH_UNLOCK(); return; } + + /* + * The dq may become dirty after it is synced but before it is + * put to the free list. Checking the DQ_MOD there without + * locking dq should be safe since no other references to the + * dq exist. + */ + if ((dq->dq_flags & DQ_MOD) != 0) { + dq->dq_cnt++; + DQH_UNLOCK(); + goto sync; + } TAILQ_INSERT_TAIL(&dqfreelist, dq, dq_freelist); DQH_UNLOCK(); } From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 18:00:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F058106567E; Tue, 9 Dec 2008 18:00:55 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3558FC28; Tue, 9 Dec 2008 18:00:54 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 0DFB06D43F; Tue, 9 Dec 2008 18:00:54 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id E72E9844BD; Tue, 9 Dec 2008 19:00:53 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Konstantin Belousov References: <200812081315.mB8DFVMk061023@svn.freebsd.org> Date: Tue, 09 Dec 2008 19:00:53 +0100 In-Reply-To: <200812081315.mB8DFVMk061023@svn.freebsd.org> (Konstantin Belousov's message of "Mon, 8 Dec 2008 13:15:31 +0000 (UTC)") Message-ID: <86oczlxm7e.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185766 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 18:00:55 -0000 Konstantin Belousov writes: > Log: > Make two style changes to create new commit and document proper commit > message for r185765. Thank you! DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 19:36:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 104831065676; Tue, 9 Dec 2008 19:36:05 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F30E08FC18; Tue, 9 Dec 2008 19:36:04 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Ja4mA099663; Tue, 9 Dec 2008 19:36:04 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9Ja4ar099659; Tue, 9 Dec 2008 19:36:04 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812091936.mB9Ja4ar099659@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 9 Dec 2008 19:36:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185805 - in stable/7/sys/dev/cxgb: . common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 19:36:05 -0000 Author: gnn Date: Tue Dec 9 19:36:04 2008 New Revision: 185805 URL: http://svn.freebsd.org/changeset/base/185805 Log: MFC of 3 separate commits. Bug fix from Chelsio which addresses the issue of the device resetting when it sees only received packets. In some cases where a device only recieves data it mistakenly thinks that its transmitting side is broken and resets the device. Fix a bug with the ael1006 PHY. The bug shows up as persistent but incomplete packet loss, of between 10-30%. The fix is to put the PHY into and take it out of local loopback mode when resetting the interface. Bug fix to support N310 version of Chelsio cards (board ID 1088). Obtained from: Chelsio Inc. Approved by: re@ Modified: stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/cxgb/common/cxgb_ael1002.c stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c stable/7/sys/dev/cxgb/common/cxgb_xgmac.c stable/7/sys/dev/cxgb/cxgb_main.c Modified: stable/7/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Tue Dec 9 18:27:04 2008 (r185804) +++ stable/7/sys/dev/cxgb/common/cxgb_ael1002.c Tue Dec 9 19:36:04 2008 (r185805) @@ -209,6 +209,16 @@ static int ael1006_reset(struct cphy *ph t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out); msleep(125); t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + + /* Phy loopback work around for ael1006 */ + /* Soft reset phy by toggling loopback */ + msleep(125); + /* Put phy into local loopback */ + t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 0, 1); + msleep(125); + /* Take phy out of local loopback */ + t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 0); + return 0; } Modified: stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Tue Dec 9 18:27:04 2008 (r185804) +++ stable/7/sys/dev/cxgb/common/cxgb_t3_hw.c Tue Dec 9 19:36:04 2008 (r185805) @@ -512,6 +512,12 @@ static struct adapter_info t3_adap_info[ F_GPIO6_OUT_VAL | F_GPIO7_OUT_VAL, { S_GPIO1, S_GPIO2, S_GPIO3, S_GPIO4 }, SUPPORTED_AUI, &mi1_mdio_ops, "Chelsio T304" }, + { 0 }, + { 1, 0, 0, 0, 0, + F_GPIO1_OEN | F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO6_OEN | F_GPIO7_OEN | + F_GPIO10_OEN | F_GPIO1_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, + { S_GPIO9 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, + &mi1_mdio_ext_ops, "Chelsio N310" } }; /* Modified: stable/7/sys/dev/cxgb/common/cxgb_xgmac.c ============================================================================== --- stable/7/sys/dev/cxgb/common/cxgb_xgmac.c Tue Dec 9 18:27:04 2008 (r185804) +++ stable/7/sys/dev/cxgb/common/cxgb_xgmac.c Tue Dec 9 19:36:04 2008 (r185805) @@ -637,20 +637,15 @@ int t3b2_mac_watchdog_task(struct cmac * adapter_t *adap = mac->adapter; struct mac_stats *s = &mac->stats; unsigned int tx_mcnt = (unsigned int)s->tx_frames; - unsigned int rx_mcnt = (unsigned int)s->rx_frames; - unsigned int rx_xcnt; if (mac->multiport) { tx_mcnt = t3_read_reg(adap, A_XGM_STAT_TX_FRAME_LOW); - rx_mcnt = t3_read_reg(adap, A_XGM_STAT_RX_FRAMES_LOW); } else { tx_mcnt = (unsigned int)s->tx_frames; - rx_mcnt = (unsigned int)s->rx_frames; } status = 0; tx_xcnt = 1; /* By default tx_xcnt is making progress*/ tx_tcnt = mac->tx_tcnt; /* If tx_mcnt is progressing ignore tx_tcnt*/ - rx_xcnt = 1; /* By default rx_xcnt is making progress*/ if (tx_mcnt == mac->tx_mcnt && mac->rx_pause == s->rx_pause) { tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, A_XGM_TX_SPI4_SOP_EOP_CNT + @@ -661,11 +656,11 @@ int t3b2_mac_watchdog_task(struct cmac * tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap, A_TP_PIO_DATA))); } else { - goto rxcheck; + goto out; } } else { mac->toggle_cnt = 0; - goto rxcheck; + goto out; } if ((tx_tcnt != mac->tx_tcnt) && (mac->tx_xcnt == 0)) { @@ -678,22 +673,6 @@ int t3b2_mac_watchdog_task(struct cmac * } } else { mac->toggle_cnt = 0; - goto rxcheck; - } - -rxcheck: - if (rx_mcnt != mac->rx_mcnt) { - rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, - A_XGM_RX_SPI4_SOP_EOP_CNT + - mac->offset))) + - (s->rx_fifo_ovfl - mac->rx_ocnt); - mac->rx_ocnt = s->rx_fifo_ovfl; - } else - goto out; - - if (mac->rx_mcnt != s->rx_frames && rx_xcnt == 0 && mac->rx_xcnt == 0) { - if (!mac->multiport) - status = 2; goto out; } @@ -701,8 +680,6 @@ out: mac->tx_tcnt = tx_tcnt; mac->tx_xcnt = tx_xcnt; mac->tx_mcnt = s->tx_frames; - mac->rx_xcnt = rx_xcnt; - mac->rx_mcnt = s->rx_frames; mac->rx_pause = s->rx_pause; if (status == 1) { t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0); Modified: stable/7/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/7/sys/dev/cxgb/cxgb_main.c Tue Dec 9 18:27:04 2008 (r185804) +++ stable/7/sys/dev/cxgb/cxgb_main.c Tue Dec 9 19:36:04 2008 (r185805) @@ -298,6 +298,7 @@ struct cxgb_ident { {PCI_VENDOR_ID_CHELSIO, 0x0031, 3, "T3B20"}, {PCI_VENDOR_ID_CHELSIO, 0x0032, 1, "T3B02"}, {PCI_VENDOR_ID_CHELSIO, 0x0033, 4, "T3B04"}, + {PCI_VENDOR_ID_CHELSIO, 0x0035, 6, "N310E"}, {0, 0, 0, NULL} }; @@ -486,12 +487,14 @@ cxgb_controller_attach(device_t dev) return (ENXIO); } sc->udbs_rid = PCIR_BAR(2); - if ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->udbs_rid, RF_ACTIVE)) == NULL) { + sc->udbs_res = NULL; + if (is_offload(sc) && + ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->udbs_rid, RF_ACTIVE)) == NULL)) { device_printf(dev, "Cannot allocate BAR region 1\n"); error = ENXIO; goto out; - } + } snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", device_get_unit(dev)); From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 19:36:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E42311065670; Tue, 9 Dec 2008 19:36:50 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D37258FC0C; Tue, 9 Dec 2008 19:36:50 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9JaoiQ099712; Tue, 9 Dec 2008 19:36:50 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9JaoOo099708; Tue, 9 Dec 2008 19:36:50 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <200812091936.mB9JaoOo099708@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 9 Dec 2008 19:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185806 - in releng/7.1/sys/dev/cxgb: . common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 19:36:51 -0000 Author: gnn Date: Tue Dec 9 19:36:50 2008 New Revision: 185806 URL: http://svn.freebsd.org/changeset/base/185806 Log: MFC of 3 separate commits. Bug fix from Chelsio which addresses the issue of the device resetting when it sees only received packets. In some cases where a device only recieves data it mistakenly thinks that its transmitting side is broken and resets the device. Fix a bug with the ael1006 PHY. The bug shows up as persistent but incomplete packet loss, of between 10-30%. The fix is to put the PHY into and take it out of local loopback mode when resetting the interface. Bug fix to support N310 version of Chelsio cards (board ID 1088). Obtained from: Chelsio Inc. Approved by: re@ Modified: releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/dev/cxgb/common/cxgb_ael1002.c releng/7.1/sys/dev/cxgb/common/cxgb_t3_hw.c releng/7.1/sys/dev/cxgb/common/cxgb_xgmac.c releng/7.1/sys/dev/cxgb/cxgb_main.c Modified: releng/7.1/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- releng/7.1/sys/dev/cxgb/common/cxgb_ael1002.c Tue Dec 9 19:36:04 2008 (r185805) +++ releng/7.1/sys/dev/cxgb/common/cxgb_ael1002.c Tue Dec 9 19:36:50 2008 (r185806) @@ -195,7 +195,31 @@ int t3_ael1002_phy_prep(struct cphy *phy static int ael1006_reset(struct cphy *phy, int wait) { - return t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + u32 gpio_out; + t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + /* Hack to reset the phy correctly */ + /* Read out the current value */ + gpio_out = t3_read_reg(phy->adapter, A_T3DBG_GPIO_EN); + /* Reset the phy */ + gpio_out &= ~F_GPIO6_OUT_VAL; + t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out); + msleep(125); + /* Take the phy out of reset */ + gpio_out |= F_GPIO6_OUT_VAL; + t3_write_reg(phy->adapter, A_T3DBG_GPIO_EN, gpio_out); + msleep(125); + t3_phy_reset(phy, MDIO_DEV_PMA_PMD, wait); + + /* Phy loopback work around for ael1006 */ + /* Soft reset phy by toggling loopback */ + msleep(125); + /* Put phy into local loopback */ + t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 0, 1); + msleep(125); + /* Take phy out of local loopback */ + t3_mdio_change_bits(phy, MDIO_DEV_PMA_PMD, MII_BMCR, 1, 0); + + return 0; } static int ael1006_power_down(struct cphy *phy, int enable) Modified: releng/7.1/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- releng/7.1/sys/dev/cxgb/common/cxgb_t3_hw.c Tue Dec 9 19:36:04 2008 (r185805) +++ releng/7.1/sys/dev/cxgb/common/cxgb_t3_hw.c Tue Dec 9 19:36:50 2008 (r185806) @@ -512,6 +512,12 @@ static struct adapter_info t3_adap_info[ F_GPIO6_OUT_VAL | F_GPIO7_OUT_VAL, { S_GPIO1, S_GPIO2, S_GPIO3, S_GPIO4 }, SUPPORTED_AUI, &mi1_mdio_ops, "Chelsio T304" }, + { 0 }, + { 1, 0, 0, 0, 0, + F_GPIO1_OEN | F_GPIO2_OEN | F_GPIO4_OEN | F_GPIO6_OEN | F_GPIO7_OEN | + F_GPIO10_OEN | F_GPIO1_OUT_VAL | F_GPIO6_OUT_VAL | F_GPIO10_OUT_VAL, + { S_GPIO9 }, SUPPORTED_10000baseT_Full | SUPPORTED_AUI, + &mi1_mdio_ext_ops, "Chelsio N310" } }; /* Modified: releng/7.1/sys/dev/cxgb/common/cxgb_xgmac.c ============================================================================== --- releng/7.1/sys/dev/cxgb/common/cxgb_xgmac.c Tue Dec 9 19:36:04 2008 (r185805) +++ releng/7.1/sys/dev/cxgb/common/cxgb_xgmac.c Tue Dec 9 19:36:50 2008 (r185806) @@ -637,20 +637,15 @@ int t3b2_mac_watchdog_task(struct cmac * adapter_t *adap = mac->adapter; struct mac_stats *s = &mac->stats; unsigned int tx_mcnt = (unsigned int)s->tx_frames; - unsigned int rx_mcnt = (unsigned int)s->rx_frames; - unsigned int rx_xcnt; if (mac->multiport) { tx_mcnt = t3_read_reg(adap, A_XGM_STAT_TX_FRAME_LOW); - rx_mcnt = t3_read_reg(adap, A_XGM_STAT_RX_FRAMES_LOW); } else { tx_mcnt = (unsigned int)s->tx_frames; - rx_mcnt = (unsigned int)s->rx_frames; } status = 0; tx_xcnt = 1; /* By default tx_xcnt is making progress*/ tx_tcnt = mac->tx_tcnt; /* If tx_mcnt is progressing ignore tx_tcnt*/ - rx_xcnt = 1; /* By default rx_xcnt is making progress*/ if (tx_mcnt == mac->tx_mcnt && mac->rx_pause == s->rx_pause) { tx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, A_XGM_TX_SPI4_SOP_EOP_CNT + @@ -661,11 +656,11 @@ int t3b2_mac_watchdog_task(struct cmac * tx_tcnt = (G_TXDROPCNTCH0RCVD(t3_read_reg(adap, A_TP_PIO_DATA))); } else { - goto rxcheck; + goto out; } } else { mac->toggle_cnt = 0; - goto rxcheck; + goto out; } if ((tx_tcnt != mac->tx_tcnt) && (mac->tx_xcnt == 0)) { @@ -678,22 +673,6 @@ int t3b2_mac_watchdog_task(struct cmac * } } else { mac->toggle_cnt = 0; - goto rxcheck; - } - -rxcheck: - if (rx_mcnt != mac->rx_mcnt) { - rx_xcnt = (G_TXSPI4SOPCNT(t3_read_reg(adap, - A_XGM_RX_SPI4_SOP_EOP_CNT + - mac->offset))) + - (s->rx_fifo_ovfl - mac->rx_ocnt); - mac->rx_ocnt = s->rx_fifo_ovfl; - } else - goto out; - - if (mac->rx_mcnt != s->rx_frames && rx_xcnt == 0 && mac->rx_xcnt == 0) { - if (!mac->multiport) - status = 2; goto out; } @@ -701,8 +680,6 @@ out: mac->tx_tcnt = tx_tcnt; mac->tx_xcnt = tx_xcnt; mac->tx_mcnt = s->tx_frames; - mac->rx_xcnt = rx_xcnt; - mac->rx_mcnt = s->rx_frames; mac->rx_pause = s->rx_pause; if (status == 1) { t3_write_reg(adap, A_XGM_TX_CTRL + mac->offset, 0); Modified: releng/7.1/sys/dev/cxgb/cxgb_main.c ============================================================================== --- releng/7.1/sys/dev/cxgb/cxgb_main.c Tue Dec 9 19:36:04 2008 (r185805) +++ releng/7.1/sys/dev/cxgb/cxgb_main.c Tue Dec 9 19:36:50 2008 (r185806) @@ -289,6 +289,7 @@ struct cxgb_ident { {PCI_VENDOR_ID_CHELSIO, 0x0031, 3, "T3B20"}, {PCI_VENDOR_ID_CHELSIO, 0x0032, 1, "T3B02"}, {PCI_VENDOR_ID_CHELSIO, 0x0033, 4, "T3B04"}, + {PCI_VENDOR_ID_CHELSIO, 0x0035, 6, "N310E"}, {0, 0, 0, NULL} }; @@ -472,12 +473,14 @@ cxgb_controller_attach(device_t dev) return (ENXIO); } sc->udbs_rid = PCIR_BAR(2); - if ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, - &sc->udbs_rid, RF_ACTIVE)) == NULL) { + sc->udbs_res = NULL; + if (is_offload(sc) && + ((sc->udbs_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, + &sc->udbs_rid, RF_ACTIVE)) == NULL)) { device_printf(dev, "Cannot allocate BAR region 1\n"); error = ENXIO; goto out; - } + } snprintf(sc->lockbuf, ADAPTER_LOCK_NAME_LEN, "cxgb controller lock %d", device_get_unit(dev)); From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 19:44:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 24D5C1065672; Tue, 9 Dec 2008 19:44:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 151FD8FC18; Tue, 9 Dec 2008 19:44:54 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Jir1l099893; Tue, 9 Dec 2008 19:44:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9JirJ6099892; Tue, 9 Dec 2008 19:44:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812091944.mB9JirJ6099892@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 9 Dec 2008 19:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185807 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 19:44:54 -0000 Author: bz Date: Tue Dec 9 19:44:53 2008 New Revision: 185807 URL: http://svn.freebsd.org/changeset/base/185807 Log: Fix a bug introduced in r185747: rather than dereferencing an uninitialized *rt to something undefined, use the fibnum that came in as function argument. Found with: Coverity Prevent(tm) CID: 4168 Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Tue Dec 9 19:36:50 2008 (r185806) +++ head/sys/net/route.c Tue Dec 9 19:44:53 2008 (r185807) @@ -513,7 +513,7 @@ rtredirect_fib(struct sockaddr *dst, struct rt_addrinfo info; struct ifaddr *ifa; struct radix_node_head *rnh = - V_rt_tables[rt->rt_fibnum][dst->sa_family]; + V_rt_tables[fibnum][dst->sa_family]; /* verify the gateway is directly reachable */ if ((ifa = ifa_ifwithnet(gateway)) == NULL) { From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 20:05:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E0571065670; Tue, 9 Dec 2008 20:05:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6AA8FC08; Tue, 9 Dec 2008 20:05:58 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9K5w4w000461; Tue, 9 Dec 2008 20:05:58 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9K5wCr000460; Tue, 9 Dec 2008 20:05:58 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812092005.mB9K5wCr000460@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 9 Dec 2008 20:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185808 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 20:05:58 -0000 Author: bz Date: Tue Dec 9 20:05:58 2008 New Revision: 185808 URL: http://svn.freebsd.org/changeset/base/185808 Log: Add rwlock.h (and lock.h for that) to keep no-INET kernels compiling after RADIX_NODE_HEAD_{,UN}LOCK() were added. Must have been "learned" by pollution before (most likely: route.h -> radix.h -> rwlock.h) Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Dec 9 19:44:53 2008 (r185807) +++ head/sys/net/if.c Tue Dec 9 20:05:58 2008 (r185808) @@ -50,6 +50,8 @@ #include #include #include +#include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 21:09:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7B6B1065672; Tue, 9 Dec 2008 21:09:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E2CF8FC1B; Tue, 9 Dec 2008 21:09:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9L950W001795; Tue, 9 Dec 2008 21:09:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9L95BG001794; Tue, 9 Dec 2008 21:09:05 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812092109.mB9L95BG001794@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 9 Dec 2008 21:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185810 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 21:09:05 -0000 Author: bz Date: Tue Dec 9 21:09:05 2008 New Revision: 185810 URL: http://svn.freebsd.org/changeset/base/185810 Log: It does not make much sense to include net/route.h twice. Remove one #include. Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Tue Dec 9 20:59:55 2008 (r185809) +++ head/sys/net/if.c Tue Dec 9 21:09:05 2008 (r185810) @@ -1343,8 +1343,6 @@ done: return (ifa); } -#include - /* * Default action when installing a route with a Link Level gateway. * Lookup an appropriate real ifa to point to. From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 21:26:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D2F01065672; Tue, 9 Dec 2008 21:26:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 39EE98FC1E; Tue, 9 Dec 2008 21:26:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mB9LPpFt014957; Tue, 9 Dec 2008 16:25:57 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Kostik Belousov Date: Tue, 9 Dec 2008 16:00:30 -0500 User-Agent: KMail/1.9.7 References: <200812071325.mB7DP64P026630@svn.freebsd.org> <200812081141.39800.jhb@freebsd.org> <20081208194229.GX2038@deviant.kiev.zoral.com.ua> In-Reply-To: <20081208194229.GX2038@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812091600.30942.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Tue, 09 Dec 2008 16:25:57 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8738/Tue Dec 9 14:31:40 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185739 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 21:26:03 -0000 On Monday 08 December 2008 02:42:29 pm Kostik Belousov wrote: > On Mon, Dec 08, 2008 at 11:41:39AM -0500, John Baldwin wrote: > > On Sunday 07 December 2008 08:25:06 am Konstantin Belousov wrote: > > > Author: kib > > > Date: Sun Dec 7 13:25:06 2008 > > > New Revision: 185739 > > > URL: http://svn.freebsd.org/changeset/base/185739 > > > > > > Log: > > > Improve usefulness of the panic by printing the pointer to the problematic > > > dquot. In-tree gdb is often unable to get the dq value, so supply it in > > > panic message. > > > > Even in userland I find gdb to be an epic fail for handling local > > variables if inlined functions are involved. I haven't tried a newer > > gdb from ports to see if it fares better in that case. > > I have locally built 6.8 exactly for this purposes, made by configure;make. > I can confirm that its dwarf handling is _much_ better then in-tree gdb. Hmm, I wonder what it would take to update our in-tree gdb. Is 6.8 gplv3? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 21:34:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC5281065677; Tue, 9 Dec 2008 21:34:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CAF568FC08; Tue, 9 Dec 2008 21:34:22 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9LYM3Z002371; Tue, 9 Dec 2008 21:34:22 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9LYM2J002370; Tue, 9 Dec 2008 21:34:22 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200812092134.mB9LYM2J002370@svn.freebsd.org> From: Marius Strobl Date: Tue, 9 Dec 2008 21:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185812 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 21:34:23 -0000 Author: marius Date: Tue Dec 9 21:34:22 2008 New Revision: 185812 URL: http://svn.freebsd.org/changeset/base/185812 Log: - Limit BCM5701 B5 to 32-bit mode as a workaround for a bug which causes data corruption in combination with certain bridges. Information about this problem was kindly provided by davidch. [1] - As BGE_FLAG_PCIX is meant to indicate that the controller is in PCI-X mode, revert to the pre __FreeBSD_version 602101 method of reading the bus mode register rather than checking the mere existence of a PCI-X capability, which is also there when the NIC f.e. is put into a 32-bit slot causing it not to be in PCI-X mode. Setting BGE_FLAG_PCIX inappropriately could cause the NIC to be tuned incorrectly. PR: 128833 [1] Reviewed by: jhb MFC after: 3 days Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Dec 9 21:10:09 2008 (r185811) +++ head/sys/dev/bge/if_bge.c Tue Dec 9 21:34:22 2008 (r185812) @@ -1370,6 +1370,16 @@ bge_chipinit(struct bge_softc *sc) BGE_MODECTL_TX_NO_PHDR_CSUM); /* + * BCM5701 B5 have a bug causing data corruption when using + * 64-bit DMA reads, which can be terminated early and then + * completed later as 32-bit accesses, in combination with + * certain bridges. + */ + if (sc->bge_asicrev == BGE_ASICREV_BCM5701 && + sc->bge_chipid == BGE_CHIPID_BCM5701_B5) + BGE_SETBIT(sc, BGE_MODE_CTL, BGE_MODECTL_FORCE_PCI32); + + /* * Tell the firmware the driver is running */ if (sc->bge_asf_mode & ASF_STACKUP) @@ -2462,26 +2472,21 @@ bge_attach(device_t dev) */ if (reg != 0) sc->bge_flags |= BGE_FLAG_PCIE; - } else if (pci_find_extcap(dev, PCIY_PCIX, ®) == 0) { - if (reg != 0) - sc->bge_flags |= BGE_FLAG_PCIX; - } - #else if (BGE_IS_5705_PLUS(sc)) { reg = pci_read_config(dev, BGE_PCIE_CAPID_REG, 4); if ((reg & 0xFF) == BGE_PCIE_CAPID) sc->bge_flags |= BGE_FLAG_PCIE; +#endif } else { /* * Check if the device is in PCI-X Mode. * (This bit is not valid on PCI Express controllers.) */ - if ((pci_read_config(sc->bge_dev, BGE_PCI_PCISTATE, 4) & + if ((pci_read_config(dev, BGE_PCI_PCISTATE, 4) & BGE_PCISTATE_PCI_BUSMODE) == 0) sc->bge_flags |= BGE_FLAG_PCIX; } -#endif #if __FreeBSD_version > 602105 { From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 21:41:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 307361065676; Tue, 9 Dec 2008 21:41:56 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id 0F0C88FC1A; Tue, 9 Dec 2008 21:41:56 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id mB9LftG1078795; Tue, 9 Dec 2008 13:41:55 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id mB9Lftl7078794; Tue, 9 Dec 2008 13:41:55 -0800 (PST) (envelope-from sgk) Date: Tue, 9 Dec 2008 13:41:55 -0800 From: Steve Kargl To: John Baldwin Message-ID: <20081209214155.GA78604@troutmask.apl.washington.edu> References: <200812071325.mB7DP64P026630@svn.freebsd.org> <200812081141.39800.jhb@freebsd.org> <20081208194229.GX2038@deviant.kiev.zoral.com.ua> <200812091600.30942.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812091600.30942.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: Kostik Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185739 - head/sys/ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 21:41:56 -0000 On Tue, Dec 09, 2008 at 04:00:30PM -0500, John Baldwin wrote: > > Hmm, I wonder what it would take to update our in-tree gdb. Is 6.8 gplv3? > gdb-6.8 distribution includes COPYING3 and COPYING3.LIB. grep "either version 3" *.[ch] amd64fbsd-nat.c: the Free Software Foundation; either version 3 of the License, or amd64fbsd-tdep.c: the Free Software Foundation; either version 3 of the License, or -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Dec 9 23:57:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C16E31065672; Tue, 9 Dec 2008 23:57:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD07B8FC12; Tue, 9 Dec 2008 23:57:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mB9Nv9Jp004939; Tue, 9 Dec 2008 23:57:09 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mB9Nv9JI004938; Tue, 9 Dec 2008 23:57:09 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812092357.mB9Nv9JI004938@svn.freebsd.org> From: Robert Watson Date: Tue, 9 Dec 2008 23:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185813 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2008 23:57:09 -0000 Author: rwatson Date: Tue Dec 9 23:57:09 2008 New Revision: 185813 URL: http://svn.freebsd.org/changeset/base/185813 Log: Update comment on INP_TIMEWAIT to say what it's about, as we caution regarding the misplacement of flags in inp_vflag in an earlier comment. MFC after: pretty soon Modified: head/sys/netinet/in_pcb.h Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Tue Dec 9 21:34:22 2008 (r185812) +++ head/sys/netinet/in_pcb.h Tue Dec 9 23:57:09 2008 (r185813) @@ -385,7 +385,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_IPV4 0x1 #define INP_IPV6 0x2 #define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_TIMEWAIT 0x8 /* inpcb in TIMEWAIT, ppcb is tcptw */ #define INP_ONESBCAST 0x10 /* send all-ones broadcast */ #define INP_DROPPED 0x20 /* protocol drop flag */ #define INP_SOCKREF 0x40 /* strong socket reference */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 00:08:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B81106564A; Wed, 10 Dec 2008 00:08:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C90C8FC1A; Wed, 10 Dec 2008 00:08:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA08PtJ005204; Wed, 10 Dec 2008 00:08:25 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA08PwQ005203; Wed, 10 Dec 2008 00:08:25 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812100008.mBA08PwQ005203@svn.freebsd.org> From: Robert Watson Date: Wed, 10 Dec 2008 00:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185814 - in stable/7/sys: . contrib/pf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 00:08:25 -0000 Author: rwatson Date: Wed Dec 10 00:08:25 2008 New Revision: 185814 URL: http://svn.freebsd.org/changeset/base/185814 Log: Merge r185791 from head to stable/7: Move macros defining flags and shortcuts to nested structure fields in inpcbinfo below the structure definition in order to make inpcbinfo fit on a single printed page; related style tweaks. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/netinet/in_pcb.h Modified: stable/7/sys/netinet/in_pcb.h ============================================================================== --- stable/7/sys/netinet/in_pcb.h Tue Dec 9 23:57:09 2008 (r185813) +++ stable/7/sys/netinet/in_pcb.h Wed Dec 10 00:08:25 2008 (r185814) @@ -1,6 +1,7 @@ /*- * Copyright (c) 1982, 1986, 1990, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -88,11 +89,11 @@ struct in_endpoints { struct in_addr_4in6 ie46_local; struct in6_addr ie6_local; } ie_dependladdr; +}; #define ie_faddr ie_dependfaddr.ie46_foreign.ia46_addr4 #define ie_laddr ie_dependladdr.ie46_local.ia46_addr4 #define ie6_faddr ie_dependfaddr.ie6_foreign #define ie6_laddr ie_dependladdr.ie6_local -}; /* * XXX The defines for inc_* are hacks and should be changed to direct @@ -152,19 +153,10 @@ struct inpcb { LIST_ENTRY(inpcb) inp_list; /* (i/p) list for all PCBs for proto */ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ - struct socket *inp_socket; /* (i) back pointer to socket */ - - u_int32_t inp_flow; /* (i) IPv6 flow information */ + struct socket *inp_socket; /* (i) back pointer to socket */ + u_int32_t inp_flow; /* (i) IPv6 flow information */ int inp_flags; /* (i) generic IP/datagram flags */ - u_char inp_vflag; /* (i) IP version flag (v4/v6) */ -#define INP_IPV4 0x1 -#define INP_IPV6 0x2 -#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ -#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ -#define INP_DROPPED 0x20 /* protocol drop flag */ -#define INP_SOCKREF 0x40 /* strong socket reference */ u_char inp_ip_ttl; /* (i) time to live proto */ u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ @@ -173,9 +165,9 @@ struct inpcb { struct ucred *inp_cred; /* (c) cache of socket cred */ /* Local and foreign ports, local and foreign addr. */ - struct in_conninfo inp_inc; + struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ - /* (i/p) list for PCB's local port */ + /* MAC and IPSEC policy information. */ struct label *inp_label; /* (i) MAC label */ struct inpcbpolicy *inp_sp; /* (s) for IPSEC */ @@ -183,15 +175,8 @@ struct inpcb { struct { u_char inp4_ip_tos; /* (i) type of service proto */ struct mbuf *inp4_options; /* (i) IP options */ - struct ip_moptions *inp4_moptions; /* (i) IP multicast options */ + struct ip_moptions *inp4_moptions; /* (i) IP mcast options */ } inp_depend4; -#define inp_fport inp_inc.inc_fport -#define inp_lport inp_inc.inc_lport -#define inp_faddr inp_inc.inc_faddr -#define inp_laddr inp_inc.inc_laddr -#define inp_ip_tos inp_depend4.inp4_ip_tos -#define inp_options inp_depend4.inp4_options -#define inp_moptions inp_depend4.inp4_moptions struct { /* (i) IP options */ struct mbuf *inp6_options; @@ -208,8 +193,16 @@ struct inpcb { LIST_ENTRY(inpcb) inp_portlist; /* (i/p) */ struct inpcbport *inp_phd; /* (i/p) head of this list */ #define inp_zero_size offsetof(struct inpcb, inp_gencnt) - inp_gen_t inp_gencnt; /* (c) generation count of this instance */ + inp_gen_t inp_gencnt; /* (c) generation count */ struct rwlock inp_lock; +}; +#define inp_fport inp_inc.inc_fport +#define inp_lport inp_inc.inc_lport +#define inp_faddr inp_inc.inc_faddr +#define inp_laddr inp_inc.inc_laddr +#define inp_ip_tos inp_depend4.inp4_ip_tos +#define inp_options inp_depend4.inp4_options +#define inp_moptions inp_depend4.inp4_moptions #define in6p_faddr inp_inc.inc6_faddr #define in6p_laddr inp_inc.inc6_laddr @@ -227,7 +220,7 @@ struct inpcb { #define in6p_lport inp_lport /* for KAME src sync over BSD*'s */ #define in6p_fport inp_fport /* for KAME src sync over BSD*'s */ #define in6p_ppcb inp_ppcb /* for KAME src sync over BSD*'s */ -}; + /* * The range of the generation count, as used in this implementation, is 9e19. * We would have to create 300 billion connections per second for this number @@ -409,7 +402,22 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_PCBPORTHASH(lport, mask) \ (ntohs((lport)) & (mask)) -/* flags in inp_flags: */ +/* + * Flags for inp_vflags -- historically version flags only, but now quite a + * bit more due to an overflow of inp_flag, leading to some locking ambiguity + * as some bits are stable from initial allocation, and others may change. + */ +#define INP_IPV4 0x1 +#define INP_IPV6 0x2 +#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ +#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ +#define INP_DROPPED 0x20 /* protocol drop flag */ +#define INP_SOCKREF 0x40 /* strong socket reference */ + +/* + * Flags for inp_flag. + */ #define INP_RECVOPTS 0x01 /* receive incoming IP options */ #define INP_RECVRETOPTS 0x02 /* receive IP options for reply */ #define INP_RECVDSTADDR 0x04 /* receive IP dst address */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 02:32:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7D871065672; Wed, 10 Dec 2008 02:32:06 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3DCA8FC08; Wed, 10 Dec 2008 02:32:06 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA2W6Gi010402; Wed, 10 Dec 2008 02:32:06 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA2W6i0010401; Wed, 10 Dec 2008 02:32:06 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200812100232.mBA2W6i0010401@svn.freebsd.org> From: David Schultz Date: Wed, 10 Dec 2008 02:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185825 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 02:32:07 -0000 Author: das Date: Wed Dec 10 02:32:06 2008 New Revision: 185825 URL: http://svn.freebsd.org/changeset/base/185825 Log: Move the xprintf hook to where it belongs; it shouldn't be in the middle of vfprintf's variable declarations. Modified: head/lib/libc/stdio/vfprintf.c Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Wed Dec 10 02:24:50 2008 (r185824) +++ head/lib/libc/stdio/vfprintf.c Wed Dec 10 02:32:06 2008 (r185825) @@ -396,12 +396,6 @@ __vfprintf(FILE *fp, const char *fmt0, v char sign; /* sign prefix (' ', '+', '-', or \0) */ char thousands_sep; /* locale specific thousands separator */ const char *grouping; /* locale specific numeric grouping rules */ - - if (__use_xprintf == 0 && getenv("USE_XPRINTF")) - __use_xprintf = 1; - if (__use_xprintf > 0) - return (__xvprintf(fp, fmt0, ap)); - #ifndef NO_FLOATING_POINT /* * We can decompose the printed representation of floating @@ -568,6 +562,10 @@ __vfprintf(FILE *fp, const char *fmt0, v val = GETARG (int); \ } + if (__use_xprintf == 0 && getenv("USE_XPRINTF")) + __use_xprintf = 1; + if (__use_xprintf > 0) + return (__xvprintf(fp, fmt0, ap)); thousands_sep = '\0'; grouping = NULL; From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 08:22:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B852B1065677; Wed, 10 Dec 2008 08:22:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A45C38FC17; Wed, 10 Dec 2008 08:22:51 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA8Mp3W023108; Wed, 10 Dec 2008 08:22:51 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA8MpI1023107; Wed, 10 Dec 2008 08:22:51 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812100822.mBA8MpI1023107@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Dec 2008 08:22:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185844 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 08:22:51 -0000 Author: kmacy Date: Wed Dec 10 08:22:51 2008 New Revision: 185844 URL: http://svn.freebsd.org/changeset/base/185844 Log: don't reference if_addr_mtx directly Modified: head/sys/netinet/ip_fw_nat.c Modified: head/sys/netinet/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ip_fw_nat.c Wed Dec 10 08:01:10 2008 (r185843) +++ head/sys/netinet/ip_fw_nat.c Wed Dec 10 08:22:51 2008 (r185844) @@ -91,7 +91,7 @@ ifaddr_change(void *arg __unused, struct LIST_FOREACH(ptr, &V_layer3_chain.nat, _next) { /* ...using nic 'ifp->if_xname' as dynamic alias address. */ if (strncmp(ptr->if_name, ifp->if_xname, IF_NAMESIZE) == 0) { - mtx_lock(&ifp->if_addr_mtx); + IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrlist, ifa_list) { if (ifa->ifa_addr == NULL) continue; @@ -101,7 +101,7 @@ ifaddr_change(void *arg __unused, struct (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); } - mtx_unlock(&ifp->if_addr_mtx); + IF_ADDR_LOCK(ifp); } } IPFW_WUNLOCK(&V_layer3_chain); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 08:23:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F03C1065672; Wed, 10 Dec 2008 08:23:48 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7CC8FC19; Wed, 10 Dec 2008 08:23:48 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA8NmDO023169; Wed, 10 Dec 2008 08:23:48 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA8NmKh023168; Wed, 10 Dec 2008 08:23:48 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812100823.mBA8NmKh023168@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Dec 2008 08:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185845 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 08:23:48 -0000 Author: kmacy Date: Wed Dec 10 08:23:47 2008 New Revision: 185845 URL: http://svn.freebsd.org/changeset/base/185845 Log: unlock when done Modified: head/sys/netinet/ip_fw_nat.c Modified: head/sys/netinet/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ip_fw_nat.c Wed Dec 10 08:22:51 2008 (r185844) +++ head/sys/netinet/ip_fw_nat.c Wed Dec 10 08:23:47 2008 (r185845) @@ -101,7 +101,7 @@ ifaddr_change(void *arg __unused, struct (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); } - IF_ADDR_LOCK(ifp); + IF_ADDR_UNLOCK(ifp); } } IPFW_WUNLOCK(&V_layer3_chain); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 08:55:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51AE71065670; Wed, 10 Dec 2008 08:55:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9B28FC0C; Wed, 10 Dec 2008 08:55:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA8tDK8023955; Wed, 10 Dec 2008 08:55:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA8tDA5023954; Wed, 10 Dec 2008 08:55:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812100855.mBA8tDA5023954@svn.freebsd.org> From: Robert Watson Date: Wed, 10 Dec 2008 08:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185848 - in releng/7.1/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 08:55:13 -0000 Author: rwatson Date: Wed Dec 10 08:55:12 2008 New Revision: 185848 URL: http://svn.freebsd.org/changeset/base/185848 Log: Merge r185814 from stable/7 to releng/7.1: Merge r185791 from head to stable/7: Move macros defining flags and shortcuts to nested structure fields in inpcbinfo below the structure definition in order to make inpcbinfo fit on a single printed page; related style tweaks. Approved by: re (kib) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/netinet/in_pcb.h Modified: releng/7.1/sys/netinet/in_pcb.h ============================================================================== --- releng/7.1/sys/netinet/in_pcb.h Wed Dec 10 08:29:42 2008 (r185847) +++ releng/7.1/sys/netinet/in_pcb.h Wed Dec 10 08:55:12 2008 (r185848) @@ -1,6 +1,7 @@ /*- * Copyright (c) 1982, 1986, 1990, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -88,11 +89,11 @@ struct in_endpoints { struct in_addr_4in6 ie46_local; struct in6_addr ie6_local; } ie_dependladdr; +}; #define ie_faddr ie_dependfaddr.ie46_foreign.ia46_addr4 #define ie_laddr ie_dependladdr.ie46_local.ia46_addr4 #define ie6_faddr ie_dependfaddr.ie6_foreign #define ie6_laddr ie_dependladdr.ie6_local -}; /* * XXX The defines for inc_* are hacks and should be changed to direct @@ -152,19 +153,10 @@ struct inpcb { LIST_ENTRY(inpcb) inp_list; /* (i/p) list for all PCBs for proto */ void *inp_ppcb; /* (i) pointer to per-protocol pcb */ struct inpcbinfo *inp_pcbinfo; /* (c) PCB list info */ - struct socket *inp_socket; /* (i) back pointer to socket */ - - u_int32_t inp_flow; /* (i) IPv6 flow information */ + struct socket *inp_socket; /* (i) back pointer to socket */ + u_int32_t inp_flow; /* (i) IPv6 flow information */ int inp_flags; /* (i) generic IP/datagram flags */ - u_char inp_vflag; /* (i) IP version flag (v4/v6) */ -#define INP_IPV4 0x1 -#define INP_IPV6 0x2 -#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ -#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ -#define INP_DROPPED 0x20 /* protocol drop flag */ -#define INP_SOCKREF 0x40 /* strong socket reference */ u_char inp_ip_ttl; /* (i) time to live proto */ u_char inp_ip_p; /* (c) protocol proto */ u_char inp_ip_minttl; /* (i) minimum TTL or drop */ @@ -173,9 +165,9 @@ struct inpcb { struct ucred *inp_cred; /* (c) cache of socket cred */ /* Local and foreign ports, local and foreign addr. */ - struct in_conninfo inp_inc; + struct in_conninfo inp_inc; /* (i/p) list for PCB's local port */ - /* (i/p) list for PCB's local port */ + /* MAC and IPSEC policy information. */ struct label *inp_label; /* (i) MAC label */ struct inpcbpolicy *inp_sp; /* (s) for IPSEC */ @@ -183,15 +175,8 @@ struct inpcb { struct { u_char inp4_ip_tos; /* (i) type of service proto */ struct mbuf *inp4_options; /* (i) IP options */ - struct ip_moptions *inp4_moptions; /* (i) IP multicast options */ + struct ip_moptions *inp4_moptions; /* (i) IP mcast options */ } inp_depend4; -#define inp_fport inp_inc.inc_fport -#define inp_lport inp_inc.inc_lport -#define inp_faddr inp_inc.inc_faddr -#define inp_laddr inp_inc.inc_laddr -#define inp_ip_tos inp_depend4.inp4_ip_tos -#define inp_options inp_depend4.inp4_options -#define inp_moptions inp_depend4.inp4_moptions struct { /* (i) IP options */ struct mbuf *inp6_options; @@ -208,8 +193,16 @@ struct inpcb { LIST_ENTRY(inpcb) inp_portlist; /* (i/p) */ struct inpcbport *inp_phd; /* (i/p) head of this list */ #define inp_zero_size offsetof(struct inpcb, inp_gencnt) - inp_gen_t inp_gencnt; /* (c) generation count of this instance */ + inp_gen_t inp_gencnt; /* (c) generation count */ struct rwlock inp_lock; +}; +#define inp_fport inp_inc.inc_fport +#define inp_lport inp_inc.inc_lport +#define inp_faddr inp_inc.inc_faddr +#define inp_laddr inp_inc.inc_laddr +#define inp_ip_tos inp_depend4.inp4_ip_tos +#define inp_options inp_depend4.inp4_options +#define inp_moptions inp_depend4.inp4_moptions #define in6p_faddr inp_inc.inc6_faddr #define in6p_laddr inp_inc.inc6_laddr @@ -227,7 +220,7 @@ struct inpcb { #define in6p_lport inp_lport /* for KAME src sync over BSD*'s */ #define in6p_fport inp_fport /* for KAME src sync over BSD*'s */ #define in6p_ppcb inp_ppcb /* for KAME src sync over BSD*'s */ -}; + /* * The range of the generation count, as used in this implementation, is 9e19. * We would have to create 300 billion connections per second for this number @@ -409,7 +402,22 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_PCBPORTHASH(lport, mask) \ (ntohs((lport)) & (mask)) -/* flags in inp_flags: */ +/* + * Flags for inp_vflags -- historically version flags only, but now quite a + * bit more due to an overflow of inp_flag, leading to some locking ambiguity + * as some bits are stable from initial allocation, and others may change. + */ +#define INP_IPV4 0x1 +#define INP_IPV6 0x2 +#define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ +#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_ONESBCAST 0x10 /* send all-ones broadcast */ +#define INP_DROPPED 0x20 /* protocol drop flag */ +#define INP_SOCKREF 0x40 /* strong socket reference */ + +/* + * Flags for inp_flag. + */ #define INP_RECVOPTS 0x01 /* receive incoming IP options */ #define INP_RECVRETOPTS 0x02 /* receive IP options for reply */ #define INP_RECVDSTADDR 0x04 /* receive IP dst address */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 09:21:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BF721065673; Wed, 10 Dec 2008 09:21:52 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A0C28FC13; Wed, 10 Dec 2008 09:21:52 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBA9Lq7X024438; Wed, 10 Dec 2008 09:21:52 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBA9LqtA024436; Wed, 10 Dec 2008 09:21:52 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812100921.mBA9LqtA024436@svn.freebsd.org> From: Kip Macy Date: Wed, 10 Dec 2008 09:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185849 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 09:21:52 -0000 Author: kmacy Date: Wed Dec 10 09:21:52 2008 New Revision: 185849 URL: http://svn.freebsd.org/changeset/base/185849 Log: fix a reported panic when adding a route and one hit here when deleting a route - pass RTF_RNH_LOCKED to rtalloc1_fib in 2 cases where the lock is held - make sure the rnh lock is held across rt_setgate and rt_getifa_fib Modified: head/sys/net/route.c head/sys/net/rtsock.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Wed Dec 10 08:55:12 2008 (r185848) +++ head/sys/net/route.c Wed Dec 10 09:21:52 2008 (r185849) @@ -680,7 +680,7 @@ ifa_ifwithroute_fib(int flags, struct so if (ifa == NULL) ifa = ifa_ifwithnet(gateway); if (ifa == NULL) { - struct rtentry *rt = rtalloc1_fib(gateway, 0, 0UL, fibnum); + struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum); if (rt == NULL) return (NULL); /* @@ -1161,7 +1161,7 @@ deldone: * then we just blow it away and retry the insertion * of the new one. */ - rt2 = rtalloc1_fib(dst, 0, 0, fibnum); + rt2 = rtalloc1_fib(dst, 0, RTF_RNH_LOCKED, fibnum); if (rt2 && rt2->rt_parent) { rtexpunge(rt2); RT_UNLOCK(rt2); Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Wed Dec 10 08:55:12 2008 (r185848) +++ head/sys/net/rtsock.c Wed Dec 10 09:21:52 2008 (r185849) @@ -672,9 +672,11 @@ route_output(struct mbuf *m, struct sock !sa_equal(info.rti_info[RTAX_IFA], rt->rt_ifa->ifa_addr))) { RT_UNLOCK(rt); + RADIX_NODE_HEAD_LOCK(rnh); if ((error = rt_getifa_fib(&info, rt->rt_fibnum)) != 0) senderr(error); + RADIX_NODE_HEAD_UNLOCK(rnh); RT_LOCK(rt); } if (info.rti_ifa != NULL && @@ -686,8 +688,14 @@ route_output(struct mbuf *m, struct sock IFAFREE(rt->rt_ifa); } if (info.rti_info[RTAX_GATEWAY] != NULL) { - if ((error = rt_setgate(rt, rt_key(rt), - info.rti_info[RTAX_GATEWAY])) != 0) { + RT_UNLOCK(rt); + RADIX_NODE_HEAD_LOCK(rnh); + RT_LOCK(rt); + + error = rt_setgate(rt, rt_key(rt), + info.rti_info[RTAX_GATEWAY]); + RADIX_NODE_HEAD_UNLOCK(rnh); + if (error != 0) { RT_UNLOCK(rt); senderr(error); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 10:46:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B45471065680; Wed, 10 Dec 2008 10:46:34 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4FA78FC1B; Wed, 10 Dec 2008 10:46:34 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAAkYH5026189; Wed, 10 Dec 2008 10:46:34 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAAkYk5026188; Wed, 10 Dec 2008 10:46:34 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200812101046.mBAAkYk5026188@svn.freebsd.org> From: Doug Rabson Date: Wed, 10 Dec 2008 10:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185852 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 10:46:34 -0000 Author: dfr Date: Wed Dec 10 10:46:34 2008 New Revision: 185852 URL: http://svn.freebsd.org/changeset/base/185852 Log: Don't get confused if we encounter a device which is part of a raidz or raidz2 pool while probing for vdevs. PR: 129539 Submitted by: Paul Wootton (paul at fletchermoorland dot co dot uk) Modified: head/sys/boot/zfs/zfsimpl.c Modified: head/sys/boot/zfs/zfsimpl.c ============================================================================== --- head/sys/boot/zfs/zfsimpl.c Wed Dec 10 10:21:54 2008 (r185851) +++ head/sys/boot/zfs/zfsimpl.c Wed Dec 10 10:46:34 2008 (r185852) @@ -623,7 +623,7 @@ vdev_probe(vdev_read_t *read, void *read uint64_t pool_txg, pool_guid; const char *pool_name; const unsigned char *vdevs; - int i; + int i, rc; char upbuf[1024]; const struct uberblock *up; @@ -723,7 +723,9 @@ vdev_probe(vdev_read_t *read, void *read DATA_TYPE_NVLIST, 0, &vdevs)) { return (EIO); } - vdev_init_from_nvlist(vdevs, &top_vdev); + rc = vdev_init_from_nvlist(vdevs, &top_vdev); + if (rc) + return (rc); /* * Add the toplevel vdev to the pool if its not already there. From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 10:46:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19E4A1065676; Wed, 10 Dec 2008 10:46:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 097D38FC13; Wed, 10 Dec 2008 10:46:59 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAAkwXG026231; Wed, 10 Dec 2008 10:46:58 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAAkwcu026230; Wed, 10 Dec 2008 10:46:58 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812101046.mBAAkwcu026230@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 10 Dec 2008 10:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185853 - stable/6/sys/i386/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 10:46:59 -0000 Author: sobomax Date: Wed Dec 10 10:46:58 2008 New Revision: 185853 URL: http://svn.freebsd.org/changeset/base/185853 Log: MFC: Add Pentium D cores into the list that can't handle 12.5% and 25% throttle. Also, fix logic error which makes detection always negative while I am here (already fixed in current). Modified: stable/6/sys/i386/cpufreq/p4tcc.c Modified: stable/6/sys/i386/cpufreq/p4tcc.c ============================================================================== --- stable/6/sys/i386/cpufreq/p4tcc.c Wed Dec 10 10:46:34 2008 (r185852) +++ stable/6/sys/i386/cpufreq/p4tcc.c Wed Dec 10 10:46:58 2008 (r185853) @@ -164,7 +164,7 @@ p4tcc_attach(device_t dev) */ sc->auto_mode = TRUE; - switch (cpu_id & 0xf) { + switch (cpu_id & 0xff) { case 0x22: case 0x24: case 0x25: @@ -180,9 +180,11 @@ p4tcc_attach(device_t dev) case 0x0a: case 0x12: case 0x13: - /* + case 0x62: /* Pentium D B1: errata AA21 */ + case 0x64: /* Pentium D C1: errata AA21 */ + case 0x65: /* Pentium D D0: errata AA21 */ /* * These CPU models hang when set to 12.5% or 25%. - * See Errata N44 and P18l. + * See Errata N44, P18l and AA21. */ sc->set_count -= 2; break; From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 10:50:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B00106564A; Wed, 10 Dec 2008 10:50:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4594F8FC1A; Wed, 10 Dec 2008 10:50:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAAoJFo026340; Wed, 10 Dec 2008 10:50:19 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAAoJR2026339; Wed, 10 Dec 2008 10:50:19 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812101050.mBAAoJR2026339@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 10 Dec 2008 10:50:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185854 - stable/6/sys/i386/cpufreq X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 10:50:19 -0000 Author: sobomax Date: Wed Dec 10 10:50:19 2008 New Revision: 185854 URL: http://svn.freebsd.org/changeset/base/185854 Log: Fix misplaced /* slipped in the previous commit. Modified: stable/6/sys/i386/cpufreq/p4tcc.c Modified: stable/6/sys/i386/cpufreq/p4tcc.c ============================================================================== --- stable/6/sys/i386/cpufreq/p4tcc.c Wed Dec 10 10:46:58 2008 (r185853) +++ stable/6/sys/i386/cpufreq/p4tcc.c Wed Dec 10 10:50:19 2008 (r185854) @@ -182,7 +182,8 @@ p4tcc_attach(device_t dev) case 0x13: case 0x62: /* Pentium D B1: errata AA21 */ case 0x64: /* Pentium D C1: errata AA21 */ - case 0x65: /* Pentium D D0: errata AA21 */ /* + case 0x65: /* Pentium D D0: errata AA21 */ + /* * These CPU models hang when set to 12.5% or 25%. * See Errata N44, P18l and AA21. */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 11:03:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA8441065676; Wed, 10 Dec 2008 11:03:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB1EA8FC1A; Wed, 10 Dec 2008 11:03:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAB3Ghq028619; Wed, 10 Dec 2008 11:03:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAB3Gui028618; Wed, 10 Dec 2008 11:03:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812101103.mBAB3Gui028618@svn.freebsd.org> From: Robert Watson Date: Wed, 10 Dec 2008 11:03:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185855 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 11:03:17 -0000 Author: rwatson Date: Wed Dec 10 11:03:16 2008 New Revision: 185855 URL: http://svn.freebsd.org/changeset/base/185855 Log: Move flag definitions for t_flags and t_oobflags below the definition of struct tcpcb so that the structure definition is a bit more vertically compact. Can't yet fit it on one printed page, though. MFC after: pretty soon Modified: head/sys/netinet/tcp_var.h Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Wed Dec 10 10:50:19 2008 (r185854) +++ head/sys/netinet/tcp_var.h Wed Dec 10 11:03:16 2008 (r185855) @@ -101,32 +101,6 @@ struct tcpcb { struct inpcb *t_inpcb; /* back pointer to internet pcb */ int t_state; /* state of this connection */ u_int t_flags; -#define TF_ACKNOW 0x000001 /* ack peer immediately */ -#define TF_DELACK 0x000002 /* ack, but try to delay it */ -#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ -#define TF_NOOPT 0x000008 /* don't use tcp options */ -#define TF_SENTFIN 0x000010 /* have sent FIN */ -#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ -#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ -#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ -#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ -#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ -#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ -#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ -#define TF_NOPUSH 0x001000 /* don't push */ -#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ -#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ -#define TF_LASTIDLE 0x040000 /* connection was previously idle */ -#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ -#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ -#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ -#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ -#define TF_FORCEDATA 0x800000 /* force out a byte */ -#define TF_TSO 0x1000000 /* TSO enabled on this connection */ -#define TF_TOE 0x2000000 /* this connection is offloaded */ -#define TF_ECN_PERMIT 0x4000000 /* connection ECN-ready */ -#define TF_ECN_SND_CWR 0x8000000 /* ECN CWR in queue */ -#define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */ tcp_seq snd_una; /* send unacknowledged */ tcp_seq snd_max; /* highest sequence number sent; @@ -180,8 +154,6 @@ struct tcpcb { /* out-of-band data */ char t_oobflags; /* have some */ char t_iobc; /* input character */ -#define TCPOOB_HAVEDATA 0x01 -#define TCPOOB_HADDATA 0x02 /* RFC 1323 variables */ u_char snd_scale; /* window scaling for send window */ u_char rcv_scale; /* window scaling for recv window */ @@ -215,10 +187,46 @@ struct tcpcb { void *t_toe; /* TOE pcb pointer */ }; +/* + * Flags and utility macros for the t_flags field. + */ +#define TF_ACKNOW 0x000001 /* ack peer immediately */ +#define TF_DELACK 0x000002 /* ack, but try to delay it */ +#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ +#define TF_NOOPT 0x000008 /* don't use tcp options */ +#define TF_SENTFIN 0x000010 /* have sent FIN */ +#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ +#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ +#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ +#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ +#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ +#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ +#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ +#define TF_NOPUSH 0x001000 /* don't push */ +#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ +#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ +#define TF_LASTIDLE 0x040000 /* connection was previously idle */ +#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ +#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ +#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ +#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ +#define TF_FORCEDATA 0x800000 /* force out a byte */ +#define TF_TSO 0x1000000 /* TSO enabled on this connection */ +#define TF_TOE 0x2000000 /* this connection is offloaded */ +#define TF_ECN_PERMIT 0x4000000 /* connection ECN-ready */ +#define TF_ECN_SND_CWR 0x8000000 /* ECN CWR in queue */ +#define TF_ECN_SND_ECE 0x10000000 /* ECN ECE in queue */ + #define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY) #define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY #define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY +/* + * Flags for the t_oobflags field. + */ +#define TCPOOB_HAVEDATA 0x01 +#define TCPOOB_HADDATA 0x02 + #ifdef TCP_SIGNATURE /* * Defines which are needed by the xform_tcp module and tcp_[in|out]put From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 11:09:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B09A21065679; Wed, 10 Dec 2008 11:09:31 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0D3C8FC1B; Wed, 10 Dec 2008 11:09:31 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAB9VL6028856; Wed, 10 Dec 2008 11:09:31 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAB9VnV028855; Wed, 10 Dec 2008 11:09:31 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200812101109.mBAB9VnV028855@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 10 Dec 2008 11:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185856 - stable/6/usr.sbin/mergemaster X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 11:09:31 -0000 Author: sobomax Date: Wed Dec 10 11:09:31 2008 New Revision: 185856 URL: http://svn.freebsd.org/changeset/base/185856 Log: MFC: automatically upgrade files that only differ in CVS Id tag. Modified: stable/6/usr.sbin/mergemaster/ (props changed) stable/6/usr.sbin/mergemaster/mergemaster.sh Modified: stable/6/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- stable/6/usr.sbin/mergemaster/mergemaster.sh Wed Dec 10 11:03:16 2008 (r185855) +++ stable/6/usr.sbin/mergemaster/mergemaster.sh Wed Dec 10 11:09:31 2008 (r185856) @@ -947,6 +947,25 @@ for COMPFILE in `find . -type f -size +0 echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; + + *) + tempfoo=`basename $0` + TMPFILE1=`mktemp -t ${tempfoo}` || break + TMPFILE2=`mktemp -t ${tempfoo}` || break + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" + sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" + if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ + /dev/null 2>&1; then + echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" + if mm_install "${COMPFILE}"; then + echo " *** ${COMPFILE} upgraded successfully" + echo '' + else + echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" + fi + fi + rm -f "${TMPFILE1}" "${TMPFILE2}" + ;; esac ;; esac From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 11:11:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8E5C1065676; Wed, 10 Dec 2008 11:11:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0F338FC13; Wed, 10 Dec 2008 11:11:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBABBhVd028962; Wed, 10 Dec 2008 11:11:43 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBABBhYJ028961; Wed, 10 Dec 2008 11:11:43 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812101111.mBABBhYJ028961@svn.freebsd.org> From: Robert Watson Date: Wed, 10 Dec 2008 11:11:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185857 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 11:11:43 -0000 Author: rwatson Date: Wed Dec 10 11:11:43 2008 New Revision: 185857 URL: http://svn.freebsd.org/changeset/base/185857 Log: Move syncache flag definitions below data structure, compress some vertical whitespace. MFC after: pretty soon Modified: head/sys/netinet/tcp_syncache.h Modified: head/sys/netinet/tcp_syncache.h ============================================================================== --- head/sys/netinet/tcp_syncache.h Wed Dec 10 11:09:31 2008 (r185856) +++ head/sys/netinet/tcp_syncache.h Wed Dec 10 11:11:43 2008 (r185857) @@ -56,7 +56,6 @@ struct syncache { struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ - u_int32_t sc_tsreflect; /* timestamp to reflect */ u_int32_t sc_ts; /* our timestamp to send */ u_int32_t sc_tsoff; /* ts offset w/ syncookies */ @@ -64,7 +63,6 @@ struct syncache { tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ struct mbuf *sc_ipopts; /* source route */ - u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* IPv4 TTL */ @@ -72,14 +70,6 @@ struct syncache { u_int8_t sc_requested_s_scale:4, sc_requested_r_scale:4; u_int16_t sc_flags; -#define SCF_NOOPT 0x01 /* no TCP options */ -#define SCF_WINSCALE 0x02 /* negotiated window scaling */ -#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ - /* MSS is implicit */ -#define SCF_UNREACH 0x10 /* icmp unreachable received */ -#define SCF_SIGNATURE 0x20 /* send MD5 digests */ -#define SCF_SACK 0x80 /* send SACK option */ -#define SCF_ECN 0x100 /* send ECN setup packet */ #ifndef TCP_OFFLOAD_DISABLE struct toe_usrreqs *sc_tu; /* TOE operations */ void *sc_toepcb; /* TOE protocol block */ @@ -90,6 +80,18 @@ struct syncache { struct ucred *sc_cred; /* cred cache for jail checks */ }; +/* + * Flags for the sc_flags field. + */ +#define SCF_NOOPT 0x01 /* no TCP options */ +#define SCF_WINSCALE 0x02 /* negotiated window scaling */ +#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ + /* MSS is implicit */ +#define SCF_UNREACH 0x10 /* icmp unreachable received */ +#define SCF_SIGNATURE 0x20 /* send MD5 digests */ +#define SCF_SACK 0x80 /* send SACK option */ +#define SCF_ECN 0x100 /* send ECN setup packet */ + #define SYNCOOKIE_SECRET_SIZE 8 /* dwords */ #define SYNCOOKIE_LIFETIME 16 /* seconds */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 13:24:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E604E1065678; Wed, 10 Dec 2008 13:24:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D68BA8FC14; Wed, 10 Dec 2008 13:24:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBADOc7s031435; Wed, 10 Dec 2008 13:24:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBADOcR3031434; Wed, 10 Dec 2008 13:24:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812101324.mBADOcR3031434@svn.freebsd.org> From: Robert Watson Date: Wed, 10 Dec 2008 13:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185858 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 13:24:39 -0000 Author: rwatson Date: Wed Dec 10 13:24:38 2008 New Revision: 185858 URL: http://svn.freebsd.org/changeset/base/185858 Log: Remove inconsistent white space from in_pcballoc(). MFC after: pretty soon Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Wed Dec 10 11:11:43 2008 (r185857) +++ head/sys/netinet/in_pcb.c Wed Dec 10 13:24:38 2008 (r185858) @@ -212,7 +212,6 @@ in_pcballoc(struct socket *so, struct in mac_inpcb_create(so, inp); SOCK_UNLOCK(so); #endif - #ifdef IPSEC error = ipsec_init_policy(so, &inp->inp_sp); if (error != 0) { @@ -239,7 +238,6 @@ in_pcballoc(struct socket *so, struct in INP_WLOCK(inp); inp->inp_gencnt = ++pcbinfo->ipi_gencnt; inp->inp_refcount = 1; /* Reference from the inpcbinfo */ - #if defined(IPSEC) || defined(MAC) out: if (error != 0) { From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 14:49:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B891106564A; Wed, 10 Dec 2008 14:49:55 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C67B8FC17; Wed, 10 Dec 2008 14:49:55 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAEntRk033108; Wed, 10 Dec 2008 14:49:55 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAEntQs033107; Wed, 10 Dec 2008 14:49:55 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200812101449.mBAEntQs033107@svn.freebsd.org> From: Doug Rabson Date: Wed, 10 Dec 2008 14:49:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185860 - head/sys/nfsserver X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 14:49:55 -0000 Author: dfr Date: Wed Dec 10 14:49:54 2008 New Revision: 185860 URL: http://svn.freebsd.org/changeset/base/185860 Log: We need to pass a structure with enough space for an NFSv2 filehandle to nfs_srvmtofh_xx otherwise bad things happen when an NFSv2 client tries to make a request. Modified: head/sys/nfsserver/nfs_fha.c Modified: head/sys/nfsserver/nfs_fha.c ============================================================================== --- head/sys/nfsserver/nfs_fha.c Wed Dec 10 14:06:08 2008 (r185859) +++ head/sys/nfsserver/nfs_fha.c Wed Dec 10 14:49:54 2008 (r185860) @@ -162,7 +162,7 @@ static void fha_extract_info(struct svc_req *req, struct fha_info *i) { struct mbuf *md = req->rq_args; - fhandle_t fh; + nfsfh_t fh; caddr_t dpos = mtod(md, caddr_t); static u_int64_t random_fh = 0; int error; @@ -205,11 +205,11 @@ fha_extract_info(struct svc_req *req, st goto out; /* Grab the filehandle. */ - error = nfsm_srvmtofh_xx(&fh, v3, &md, &dpos); + error = nfsm_srvmtofh_xx(&fh.fh_generic, v3, &md, &dpos); if (error) goto out; - i->fh = *(const u_int64_t *)(fh.fh_fid.fid_data); + i->fh = *(const u_int64_t *)(fh.fh_generic.fh_fid.fid_data); /* Content ourselves with zero offset for all but reads. */ if (procnum != NFSPROC_READ) From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 16:11:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B149E1065677; Wed, 10 Dec 2008 16:11:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1C968FC39; Wed, 10 Dec 2008 16:11:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAGB9Pf035736; Wed, 10 Dec 2008 16:11:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAGB9ik035734; Wed, 10 Dec 2008 16:11:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101611.mBAGB9ik035734@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 16:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185864 - in head/sys: compat/linprocfs fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 16:11:09 -0000 Author: kib Date: Wed Dec 10 16:11:09 2008 New Revision: 185864 URL: http://svn.freebsd.org/changeset/base/185864 Log: Relock user map earlier, to have the lock held when break leaves the loop earlier due to sbuf error. Pointy hat to: me Submitted by: dchagin Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Wed Dec 10 16:02:54 2008 (r185863) +++ head/sys/compat/linprocfs/linprocfs.c Wed Dec 10 16:11:09 2008 (r185864) @@ -969,11 +969,11 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) ); if (freename) free(freename, M_TEMP); + vm_map_lock_read(map); if (error == -1) { error = 0; break; } - vm_map_lock_read(map); if (last_timestamp + 1 != map->timestamp) { /* * Look again for the entry because the map was Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Wed Dec 10 16:02:54 2008 (r185863) +++ head/sys/fs/procfs/procfs_map.c Wed Dec 10 16:11:09 2008 (r185864) @@ -219,12 +219,11 @@ procfs_doprocmap(PFS_FILL_ARGS) if (freepath != NULL) free(freepath, M_TEMP); - + vm_map_lock_read(map); if (error == -1) { error = 0; break; } - vm_map_lock_read(map); if (last_timestamp + 1 != map->timestamp) { /* * Look again for the entry because the map was From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 17:00:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8136510656D5; Wed, 10 Dec 2008 17:00:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7093E8FC2E; Wed, 10 Dec 2008 17:00:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAH0Epj036978; Wed, 10 Dec 2008 17:00:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAH0Ehq036977; Wed, 10 Dec 2008 17:00:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101700.mBAH0Ehq036977@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 17:00:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185866 - in stable/7/sys: . contrib/pf dev/cxgb fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 17:00:14 -0000 Author: kib Date: Wed Dec 10 17:00:14 2008 New Revision: 185866 URL: http://svn.freebsd.org/changeset/base/185866 Log: MFC r185335: In null_lookup(), do the needed cleanup instead of panicing saying the cleanup is needed. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/fs/nullfs/null_vnops.c Modified: stable/7/sys/fs/nullfs/null_vnops.c ============================================================================== --- stable/7/sys/fs/nullfs/null_vnops.c Wed Dec 10 16:20:49 2008 (r185865) +++ stable/7/sys/fs/nullfs/null_vnops.c Wed Dec 10 17:00:14 2008 (r185866) @@ -365,11 +365,10 @@ null_lookup(struct vop_lookup_args *ap) vrele(lvp); } else { error = null_nodeget(dvp->v_mount, lvp, &vp); - if (error) { - /* XXX Cleanup needed... */ - panic("null_nodeget failed"); - } - *ap->a_vpp = vp; + if (error) + vput(lvp); + else + *ap->a_vpp = vp; } } return (error); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 17:07:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D83B810656A4; Wed, 10 Dec 2008 17:07:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C81508FC17; Wed, 10 Dec 2008 17:07:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAH7DJU037148; Wed, 10 Dec 2008 17:07:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAH7Dcf037147; Wed, 10 Dec 2008 17:07:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101707.mBAH7Dcf037147@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 17:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185867 - in stable/7/sys: . contrib/pf dev/cxgb ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 17:07:14 -0000 Author: kib Date: Wed Dec 10 17:07:13 2008 New Revision: 185867 URL: http://svn.freebsd.org/changeset/base/185867 Log: MFC r185739: Improve usefulness of the panic by printing the pointer to the problematic dquot. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/ufs/ufs/ufs_quota.c Modified: stable/7/sys/ufs/ufs/ufs_quota.c ============================================================================== --- stable/7/sys/ufs/ufs/ufs_quota.c Wed Dec 10 17:00:14 2008 (r185866) +++ stable/7/sys/ufs/ufs/ufs_quota.c Wed Dec 10 17:07:13 2008 (r185867) @@ -1207,7 +1207,7 @@ hfound: DQI_LOCK(dq); return (EUSERS); } if (dq->dq_cnt || (dq->dq_flags & DQ_MOD)) - panic("dqget: free dquot isn't"); + panic("dqget: free dquot isn't %p", dq); TAILQ_REMOVE(&dqfreelist, dq, dq_freelist); if (dq->dq_ump != NULL) LIST_REMOVE(dq, dq_hash); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 17:16:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53CB5106564A; Wed, 10 Dec 2008 17:16:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 444AF8FC2C; Wed, 10 Dec 2008 17:16:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAHGBaP037368; Wed, 10 Dec 2008 17:16:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAHGBRo037367; Wed, 10 Dec 2008 17:16:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101716.mBAHGBRo037367@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 17:16:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185868 - in releng/7.1/sys: . contrib/pf dev/cxgb fs/nullfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 17:16:11 -0000 Author: kib Date: Wed Dec 10 17:16:11 2008 New Revision: 185868 URL: http://svn.freebsd.org/changeset/base/185868 Log: MFC r185335: In null_lookup(), do the needed cleanup instead of panicing saying the cleanup is needed. Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/fs/nullfs/null_vnops.c Modified: releng/7.1/sys/fs/nullfs/null_vnops.c ============================================================================== --- releng/7.1/sys/fs/nullfs/null_vnops.c Wed Dec 10 17:07:13 2008 (r185867) +++ releng/7.1/sys/fs/nullfs/null_vnops.c Wed Dec 10 17:16:11 2008 (r185868) @@ -365,11 +365,10 @@ null_lookup(struct vop_lookup_args *ap) vrele(lvp); } else { error = null_nodeget(dvp->v_mount, lvp, &vp); - if (error) { - /* XXX Cleanup needed... */ - panic("null_nodeget failed"); - } - *ap->a_vpp = vp; + if (error) + vput(lvp); + else + *ap->a_vpp = vp; } } return (error); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 17:20:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98F741065676; Wed, 10 Dec 2008 17:20:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 899FC8FC22; Wed, 10 Dec 2008 17:20:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAHKdhw037502; Wed, 10 Dec 2008 17:20:39 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAHKdxC037501; Wed, 10 Dec 2008 17:20:39 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812101720.mBAHKdxC037501@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 10 Dec 2008 17:20:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185869 - in releng/7.1/sys: . contrib/pf dev/cxgb ufs/ufs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 17:20:39 -0000 Author: kib Date: Wed Dec 10 17:20:39 2008 New Revision: 185869 URL: http://svn.freebsd.org/changeset/base/185869 Log: MFC r185739: Improve usefulness of the panic by printing the pointer to the problematic dquot. Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/ufs/ufs/ufs_quota.c Modified: releng/7.1/sys/ufs/ufs/ufs_quota.c ============================================================================== --- releng/7.1/sys/ufs/ufs/ufs_quota.c Wed Dec 10 17:16:11 2008 (r185868) +++ releng/7.1/sys/ufs/ufs/ufs_quota.c Wed Dec 10 17:20:39 2008 (r185869) @@ -1207,7 +1207,7 @@ hfound: DQI_LOCK(dq); return (EUSERS); } if (dq->dq_cnt || (dq->dq_flags & DQ_MOD)) - panic("dqget: free dquot isn't"); + panic("dqget: free dquot isn't %p", dq); TAILQ_REMOVE(&dqfreelist, dq, dq_freelist); if (dq->dq_ump != NULL) LIST_REMOVE(dq, dq_hash); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 19:31:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ED7C1065675; Wed, 10 Dec 2008 19:31:13 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4661A8FC1B; Wed, 10 Dec 2008 19:31:13 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAJVD5A040457; Wed, 10 Dec 2008 19:31:13 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAJVD1X040456; Wed, 10 Dec 2008 19:31:13 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812101931.mBAJVD1X040456@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 19:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185871 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 19:31:13 -0000 Author: mlaier Date: Wed Dec 10 19:31:11 2008 New Revision: 185871 URL: http://svn.freebsd.org/changeset/base/185871 Log: Unlock pf userland vendor area Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Wed Dec 10 18:13:30 2008 (r185870) +++ svnadmin/conf/paths Wed Dec 10 19:31:11 2008 (r185871) @@ -51,6 +51,7 @@ ^vendor/netcat ^vendor/ntp ^vendor/openbsm +^vendor/pf ^vendor/sendmail ^vendor/tcsh ^vendor/top From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 19:31:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E10CE1065670; Wed, 10 Dec 2008 19:31:42 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE2FD8FC1F; Wed, 10 Dec 2008 19:31:42 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAJVgfs040506; Wed, 10 Dec 2008 19:31:42 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAJVg23040505; Wed, 10 Dec 2008 19:31:42 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812101931.mBAJVg23040505@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 19:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185872 - in vendor/pf: 3.4/authpf 3.4/contrib 3.4/ftp-proxy 3.4/man 3.4/pfctl 3.4/pflogd 3.5.001/contrib 3.5.001/pfctl 3.5/authpf 3.5/contrib 3.5/ftp-proxy 3.5/man 3.5/pfctl 3.5/pflogd... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 19:31:43 -0000 Author: mlaier Date: Wed Dec 10 19:31:42 2008 New Revision: 185872 URL: http://svn.freebsd.org/changeset/base/185872 Log: Flatten out the pf userland vendor area Added: vendor/pf/3.4/authpf/ - copied from r185870, vendor/pf/3.4/contrib/pf/authpf/ vendor/pf/3.4/ftp-proxy/ - copied from r185870, vendor/pf/3.4/contrib/pf/ftp-proxy/ vendor/pf/3.4/man/ - copied from r185870, vendor/pf/3.4/contrib/pf/man/ vendor/pf/3.4/pfctl/ - copied from r185870, vendor/pf/3.4/contrib/pf/pfctl/ vendor/pf/3.4/pflogd/ - copied from r185870, vendor/pf/3.4/contrib/pf/pflogd/ vendor/pf/3.5.001/pfctl/ - copied from r185870, vendor/pf/3.5.001/contrib/pf/pfctl/ vendor/pf/3.5/authpf/ - copied from r185870, vendor/pf/3.5/contrib/pf/authpf/ vendor/pf/3.5/ftp-proxy/ - copied from r185870, vendor/pf/3.5/contrib/pf/ftp-proxy/ vendor/pf/3.5/man/ - copied from r185870, vendor/pf/3.5/contrib/pf/man/ vendor/pf/3.5/pfctl/ - copied from r185870, vendor/pf/3.5/contrib/pf/pfctl/ vendor/pf/3.5/pflogd/ - copied from r185870, vendor/pf/3.5/contrib/pf/pflogd/ vendor/pf/3.7/authpf/ - copied from r185870, vendor/pf/3.7/contrib/pf/authpf/ vendor/pf/3.7/ftp-proxy/ - copied from r185870, vendor/pf/3.7/contrib/pf/ftp-proxy/ vendor/pf/3.7/man/ - copied from r185870, vendor/pf/3.7/contrib/pf/man/ vendor/pf/3.7/pfctl/ - copied from r185870, vendor/pf/3.7/contrib/pf/pfctl/ vendor/pf/3.7/pflogd/ - copied from r185870, vendor/pf/3.7/contrib/pf/pflogd/ vendor/pf/4.1/authpf/ - copied from r185870, vendor/pf/4.1/contrib/pf/authpf/ vendor/pf/4.1/ftp-proxy/ - copied from r185870, vendor/pf/4.1/contrib/pf/ftp-proxy/ vendor/pf/4.1/libevent/ - copied from r185870, vendor/pf/4.1/contrib/pf/libevent/ vendor/pf/4.1/man/ - copied from r185870, vendor/pf/4.1/contrib/pf/man/ vendor/pf/4.1/pfctl/ - copied from r185870, vendor/pf/4.1/contrib/pf/pfctl/ vendor/pf/4.1/pflogd/ - copied from r185870, vendor/pf/4.1/contrib/pf/pflogd/ vendor/pf/4.1/tftp-proxy/ - copied from r185870, vendor/pf/4.1/contrib/pf/tftp-proxy/ vendor/pf/dist/authpf/ - copied from r185870, vendor/pf/dist/contrib/pf/authpf/ vendor/pf/dist/ftp-proxy/ - copied from r185870, vendor/pf/dist/contrib/pf/ftp-proxy/ vendor/pf/dist/libevent/ - copied from r185870, vendor/pf/dist/contrib/pf/libevent/ vendor/pf/dist/man/ - copied from r185870, vendor/pf/dist/contrib/pf/man/ vendor/pf/dist/pfctl/ - copied from r185870, vendor/pf/dist/contrib/pf/pfctl/ vendor/pf/dist/pflogd/ - copied from r185870, vendor/pf/dist/contrib/pf/pflogd/ vendor/pf/dist/tftp-proxy/ - copied from r185870, vendor/pf/dist/contrib/pf/tftp-proxy/ Deleted: vendor/pf/3.4/contrib/ vendor/pf/3.5.001/contrib/ vendor/pf/3.5/contrib/ vendor/pf/3.7/contrib/ vendor/pf/4.1/contrib/ vendor/pf/dist/contrib/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 19:33:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 576221065673; Wed, 10 Dec 2008 19:33:11 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 430558FC25; Wed, 10 Dec 2008 19:33:11 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAJXBRa040583; Wed, 10 Dec 2008 19:33:11 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAJXBWM040582; Wed, 10 Dec 2008 19:33:11 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812101933.mBAJXBWM040582@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 19:33:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185873 - in vendor/pf: 3.4/authpf 3.4/ftp-proxy 3.4/man 3.4/pfctl 3.4/pflogd 3.5.001/pfctl 3.5/authpf 3.5/ftp-proxy 3.5/man 3.5/pfctl 3.5/pflogd 3.7/authpf 3.7/ftp-proxy 3.7/man 3.7/pf... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 19:33:11 -0000 Author: mlaier Date: Wed Dec 10 19:33:10 2008 New Revision: 185873 URL: http://svn.freebsd.org/changeset/base/185873 Log: No keyword expansion in vendor code, please. Modified: vendor/pf/3.4/authpf/authpf.8 (props changed) vendor/pf/3.4/authpf/authpf.c (props changed) vendor/pf/3.4/authpf/pathnames.h (props changed) vendor/pf/3.4/ftp-proxy/ftp-proxy.8 (props changed) vendor/pf/3.4/ftp-proxy/ftp-proxy.c (props changed) vendor/pf/3.4/ftp-proxy/getline.c (props changed) vendor/pf/3.4/ftp-proxy/util.c (props changed) vendor/pf/3.4/ftp-proxy/util.h (props changed) vendor/pf/3.4/man/pf.4 (props changed) vendor/pf/3.4/man/pf.conf.5 (props changed) vendor/pf/3.4/man/pf.os.5 (props changed) vendor/pf/3.4/man/pflog.4 (props changed) vendor/pf/3.4/man/pfsync.4 (props changed) vendor/pf/3.4/pfctl/parse.y (props changed) vendor/pf/3.4/pfctl/pf_print_state.c (props changed) vendor/pf/3.4/pfctl/pfctl.8 (props changed) vendor/pf/3.4/pfctl/pfctl.c (props changed) vendor/pf/3.4/pfctl/pfctl.h (props changed) vendor/pf/3.4/pfctl/pfctl_altq.c (props changed) vendor/pf/3.4/pfctl/pfctl_osfp.c (props changed) vendor/pf/3.4/pfctl/pfctl_parser.c (props changed) vendor/pf/3.4/pfctl/pfctl_parser.h (props changed) vendor/pf/3.4/pfctl/pfctl_qstats.c (props changed) vendor/pf/3.4/pfctl/pfctl_radix.c (props changed) vendor/pf/3.4/pfctl/pfctl_table.c (props changed) vendor/pf/3.4/pflogd/pflogd.8 (props changed) vendor/pf/3.4/pflogd/pflogd.c (props changed) vendor/pf/3.4/pflogd/pidfile.c (props changed) vendor/pf/3.4/pflogd/pidfile.h (props changed) vendor/pf/3.5.001/pfctl/parse.y (props changed) vendor/pf/3.5.001/pfctl/pf_print_state.c (props changed) vendor/pf/3.5.001/pfctl/pfctl.8 (props changed) vendor/pf/3.5.001/pfctl/pfctl.c (props changed) vendor/pf/3.5.001/pfctl/pfctl.h (props changed) vendor/pf/3.5.001/pfctl/pfctl_altq.c (props changed) vendor/pf/3.5.001/pfctl/pfctl_osfp.c (props changed) vendor/pf/3.5.001/pfctl/pfctl_parser.c (props changed) vendor/pf/3.5.001/pfctl/pfctl_parser.h (props changed) vendor/pf/3.5.001/pfctl/pfctl_qstats.c (props changed) vendor/pf/3.5.001/pfctl/pfctl_radix.c (props changed) vendor/pf/3.5.001/pfctl/pfctl_table.c (props changed) vendor/pf/3.5/authpf/authpf.8 (props changed) vendor/pf/3.5/authpf/authpf.c (props changed) vendor/pf/3.5/authpf/pathnames.h (props changed) vendor/pf/3.5/ftp-proxy/ftp-proxy.8 (props changed) vendor/pf/3.5/ftp-proxy/ftp-proxy.c (props changed) vendor/pf/3.5/ftp-proxy/getline.c (props changed) vendor/pf/3.5/ftp-proxy/util.c (props changed) vendor/pf/3.5/ftp-proxy/util.h (props changed) vendor/pf/3.5/man/pf.4 (props changed) vendor/pf/3.5/man/pf.conf.5 (props changed) vendor/pf/3.5/man/pf.os.5 (props changed) vendor/pf/3.5/man/pflog.4 (props changed) vendor/pf/3.5/man/pfsync.4 (props changed) vendor/pf/3.5/pfctl/parse.y (props changed) vendor/pf/3.5/pfctl/pf_print_state.c (props changed) vendor/pf/3.5/pfctl/pfctl.8 (props changed) vendor/pf/3.5/pfctl/pfctl.c (props changed) vendor/pf/3.5/pfctl/pfctl.h (props changed) vendor/pf/3.5/pfctl/pfctl_altq.c (props changed) vendor/pf/3.5/pfctl/pfctl_osfp.c (props changed) vendor/pf/3.5/pfctl/pfctl_parser.c (props changed) vendor/pf/3.5/pfctl/pfctl_parser.h (props changed) vendor/pf/3.5/pfctl/pfctl_qstats.c (props changed) vendor/pf/3.5/pfctl/pfctl_radix.c (props changed) vendor/pf/3.5/pfctl/pfctl_table.c (props changed) vendor/pf/3.5/pflogd/pflogd.8 (props changed) vendor/pf/3.5/pflogd/pflogd.c (props changed) vendor/pf/3.5/pflogd/pflogd.h (props changed) vendor/pf/3.5/pflogd/pidfile.c (props changed) vendor/pf/3.5/pflogd/pidfile.h (props changed) vendor/pf/3.5/pflogd/privsep.c (props changed) vendor/pf/3.5/pflogd/privsep_fdpass.c (props changed) vendor/pf/3.7/authpf/authpf.8 (props changed) vendor/pf/3.7/authpf/authpf.c (props changed) vendor/pf/3.7/authpf/pathnames.h (props changed) vendor/pf/3.7/ftp-proxy/ftp-proxy.8 (props changed) vendor/pf/3.7/ftp-proxy/ftp-proxy.c (props changed) vendor/pf/3.7/ftp-proxy/getline.c (props changed) vendor/pf/3.7/ftp-proxy/util.c (props changed) vendor/pf/3.7/ftp-proxy/util.h (props changed) vendor/pf/3.7/man/pf.4 (props changed) vendor/pf/3.7/man/pf.conf.5 (props changed) vendor/pf/3.7/man/pf.os.5 (props changed) vendor/pf/3.7/man/pflog.4 (props changed) vendor/pf/3.7/man/pfsync.4 (props changed) vendor/pf/3.7/pfctl/parse.y (props changed) vendor/pf/3.7/pfctl/pf_print_state.c (props changed) vendor/pf/3.7/pfctl/pfctl.8 (props changed) vendor/pf/3.7/pfctl/pfctl.c (props changed) vendor/pf/3.7/pfctl/pfctl.h (props changed) vendor/pf/3.7/pfctl/pfctl_altq.c (props changed) vendor/pf/3.7/pfctl/pfctl_optimize.c (props changed) vendor/pf/3.7/pfctl/pfctl_osfp.c (props changed) vendor/pf/3.7/pfctl/pfctl_parser.c (props changed) vendor/pf/3.7/pfctl/pfctl_parser.h (props changed) vendor/pf/3.7/pfctl/pfctl_qstats.c (props changed) vendor/pf/3.7/pfctl/pfctl_radix.c (props changed) vendor/pf/3.7/pfctl/pfctl_table.c (props changed) vendor/pf/3.7/pflogd/pflogd.8 (props changed) vendor/pf/3.7/pflogd/pflogd.c (props changed) vendor/pf/3.7/pflogd/pflogd.h (props changed) vendor/pf/3.7/pflogd/pidfile.c (props changed) vendor/pf/3.7/pflogd/pidfile.h (props changed) vendor/pf/3.7/pflogd/privsep.c (props changed) vendor/pf/3.7/pflogd/privsep_fdpass.c (props changed) vendor/pf/4.1/authpf/authpf.8 (props changed) vendor/pf/4.1/authpf/authpf.c (props changed) vendor/pf/4.1/authpf/pathnames.h (props changed) vendor/pf/4.1/ftp-proxy/filter.c (props changed) vendor/pf/4.1/ftp-proxy/filter.h (props changed) vendor/pf/4.1/ftp-proxy/ftp-proxy.8 (props changed) vendor/pf/4.1/ftp-proxy/ftp-proxy.c (props changed) vendor/pf/4.1/libevent/buffer.c (props changed) vendor/pf/4.1/libevent/evbuffer.c (props changed) vendor/pf/4.1/libevent/event-internal.h (props changed) vendor/pf/4.1/libevent/event.c (props changed) vendor/pf/4.1/libevent/event.h (props changed) vendor/pf/4.1/libevent/evsignal.h (props changed) vendor/pf/4.1/libevent/kqueue.c (props changed) vendor/pf/4.1/libevent/log.c (props changed) vendor/pf/4.1/libevent/log.h (props changed) vendor/pf/4.1/libevent/poll.c (props changed) vendor/pf/4.1/libevent/select.c (props changed) vendor/pf/4.1/libevent/signal.c (props changed) vendor/pf/4.1/man/pf.4 (props changed) vendor/pf/4.1/man/pf.conf.5 (props changed) vendor/pf/4.1/man/pf.os.5 (props changed) vendor/pf/4.1/man/pflog.4 (props changed) vendor/pf/4.1/man/pfsync.4 (props changed) vendor/pf/4.1/pfctl/parse.y (props changed) vendor/pf/4.1/pfctl/pf_print_state.c (props changed) vendor/pf/4.1/pfctl/pfctl.8 (props changed) vendor/pf/4.1/pfctl/pfctl.c (props changed) vendor/pf/4.1/pfctl/pfctl.h (props changed) vendor/pf/4.1/pfctl/pfctl_altq.c (props changed) vendor/pf/4.1/pfctl/pfctl_optimize.c (props changed) vendor/pf/4.1/pfctl/pfctl_osfp.c (props changed) vendor/pf/4.1/pfctl/pfctl_parser.c (props changed) vendor/pf/4.1/pfctl/pfctl_parser.h (props changed) vendor/pf/4.1/pfctl/pfctl_qstats.c (props changed) vendor/pf/4.1/pfctl/pfctl_radix.c (props changed) vendor/pf/4.1/pfctl/pfctl_table.c (props changed) vendor/pf/4.1/pflogd/pflogd.8 (props changed) vendor/pf/4.1/pflogd/pflogd.c (props changed) vendor/pf/4.1/pflogd/pflogd.h (props changed) vendor/pf/4.1/pflogd/privsep.c (props changed) vendor/pf/4.1/pflogd/privsep_fdpass.c (props changed) vendor/pf/4.1/tftp-proxy/filter.c (props changed) vendor/pf/4.1/tftp-proxy/filter.h (props changed) vendor/pf/4.1/tftp-proxy/tftp-proxy.8 (props changed) vendor/pf/4.1/tftp-proxy/tftp-proxy.c (props changed) vendor/pf/dist/authpf/authpf.8 (props changed) vendor/pf/dist/authpf/authpf.c (props changed) vendor/pf/dist/authpf/pathnames.h (props changed) vendor/pf/dist/ftp-proxy/filter.c (props changed) vendor/pf/dist/ftp-proxy/filter.h (props changed) vendor/pf/dist/ftp-proxy/ftp-proxy.8 (props changed) vendor/pf/dist/ftp-proxy/ftp-proxy.c (props changed) vendor/pf/dist/ftp-proxy/getline.c (props changed) vendor/pf/dist/ftp-proxy/util.c (props changed) vendor/pf/dist/ftp-proxy/util.h (props changed) vendor/pf/dist/libevent/buffer.c (props changed) vendor/pf/dist/libevent/evbuffer.c (props changed) vendor/pf/dist/libevent/event-internal.h (props changed) vendor/pf/dist/libevent/event.c (props changed) vendor/pf/dist/libevent/event.h (props changed) vendor/pf/dist/libevent/evsignal.h (props changed) vendor/pf/dist/libevent/kqueue.c (props changed) vendor/pf/dist/libevent/log.c (props changed) vendor/pf/dist/libevent/log.h (props changed) vendor/pf/dist/libevent/poll.c (props changed) vendor/pf/dist/libevent/select.c (props changed) vendor/pf/dist/libevent/signal.c (props changed) vendor/pf/dist/man/pf.4 (props changed) vendor/pf/dist/man/pf.conf.5 (props changed) vendor/pf/dist/man/pf.os.5 (props changed) vendor/pf/dist/man/pflog.4 (props changed) vendor/pf/dist/man/pfsync.4 (props changed) vendor/pf/dist/pfctl/parse.y (props changed) vendor/pf/dist/pfctl/pf_print_state.c (props changed) vendor/pf/dist/pfctl/pfctl.8 (props changed) vendor/pf/dist/pfctl/pfctl.c (props changed) vendor/pf/dist/pfctl/pfctl.h (props changed) vendor/pf/dist/pfctl/pfctl_altq.c (props changed) vendor/pf/dist/pfctl/pfctl_optimize.c (props changed) vendor/pf/dist/pfctl/pfctl_osfp.c (props changed) vendor/pf/dist/pfctl/pfctl_parser.c (props changed) vendor/pf/dist/pfctl/pfctl_parser.h (props changed) vendor/pf/dist/pfctl/pfctl_qstats.c (props changed) vendor/pf/dist/pfctl/pfctl_radix.c (props changed) vendor/pf/dist/pfctl/pfctl_table.c (props changed) vendor/pf/dist/pflogd/pflogd.8 (props changed) vendor/pf/dist/pflogd/pflogd.c (props changed) vendor/pf/dist/pflogd/pflogd.h (props changed) vendor/pf/dist/pflogd/pidfile.c (props changed) vendor/pf/dist/pflogd/pidfile.h (props changed) vendor/pf/dist/pflogd/privsep.c (props changed) vendor/pf/dist/pflogd/privsep_fdpass.c (props changed) vendor/pf/dist/tftp-proxy/filter.c (props changed) vendor/pf/dist/tftp-proxy/filter.h (props changed) vendor/pf/dist/tftp-proxy/tftp-proxy.8 (props changed) vendor/pf/dist/tftp-proxy/tftp-proxy.c (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 19:45:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BF521065673; Wed, 10 Dec 2008 19:45:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C3938FC2B; Wed, 10 Dec 2008 19:45:58 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAJjwsY040854; Wed, 10 Dec 2008 19:45:58 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAJjwn2040853; Wed, 10 Dec 2008 19:45:58 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812101945.mBAJjwn2040853@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Dec 2008 19:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185874 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 19:45:58 -0000 Author: jhb Date: Wed Dec 10 19:45:58 2008 New Revision: 185874 URL: http://svn.freebsd.org/changeset/base/185874 Log: Rather than using a char array with explicit assumptions about the layout of 'struct osigevent' in 'struct aiocb', use int and void pointer spare members that are identical to 'struct osigevent'. MFC after: 1 month Modified: head/sys/sys/aio.h Modified: head/sys/sys/aio.h ============================================================================== --- head/sys/sys/aio.h Wed Dec 10 19:33:10 2008 (r185873) +++ head/sys/sys/aio.h Wed Dec 10 19:45:58 2008 (r185874) @@ -69,7 +69,8 @@ typedef struct aiocb { off_t aio_offset; /* File offset for I/O */ volatile void *aio_buf; /* I/O buffer in process space */ size_t aio_nbytes; /* Number of bytes for I/O */ - char __spare__[sizeof(int) * 2 + sizeof(void *)]; /* osigevent. */ + int __spare__[2]; + void *__spare2__; int aio_lio_opcode; /* LIO opcode */ int aio_reqprio; /* Request priority -- ignored */ struct __aiocb_private _aiocb_private; From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:44:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A9781065670; Wed, 10 Dec 2008 20:44:19 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FD0B8FC1B; Wed, 10 Dec 2008 20:44:19 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKiIfB042006; Wed, 10 Dec 2008 20:44:18 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKiIBr042005; Wed, 10 Dec 2008 20:44:18 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102044.mBAKiIBr042005@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 20:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185875 - head/contrib/pf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:44:19 -0000 Author: mlaier Date: Wed Dec 10 20:44:18 2008 New Revision: 185875 URL: http://svn.freebsd.org/changeset/base/185875 Log: Bootstrap mergeinfo on pf userland Modified: head/contrib/pf/ (props changed) From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:54:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9071A106564A; Wed, 10 Dec 2008 20:54:38 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B8E38FC1A; Wed, 10 Dec 2008 20:54:38 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKscca042256; Wed, 10 Dec 2008 20:54:38 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKsb8n042234; Wed, 10 Dec 2008 20:54:37 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102054.mBAKsb8n042234@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 20:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185876 - in vendor/pf/dist: authpf ftp-proxy man pfctl pflogd tftp-proxy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:54:38 -0000 Author: mlaier Date: Wed Dec 10 20:54:37 2008 New Revision: 185876 URL: http://svn.freebsd.org/changeset/base/185876 Log: Import OPENBSD_4_2_BASE Added: vendor/pf/dist/authpf/Makefile (contents, props changed) vendor/pf/dist/ftp-proxy/Makefile (contents, props changed) vendor/pf/dist/pfctl/Makefile (contents, props changed) vendor/pf/dist/pflogd/Makefile (contents, props changed) vendor/pf/dist/tftp-proxy/Makefile (contents, props changed) Deleted: vendor/pf/dist/ftp-proxy/getline.c vendor/pf/dist/ftp-proxy/util.c vendor/pf/dist/ftp-proxy/util.h vendor/pf/dist/pflogd/pidfile.c vendor/pf/dist/pflogd/pidfile.h Modified: vendor/pf/dist/authpf/authpf.8 vendor/pf/dist/ftp-proxy/filter.c vendor/pf/dist/ftp-proxy/filter.h vendor/pf/dist/ftp-proxy/ftp-proxy.8 vendor/pf/dist/ftp-proxy/ftp-proxy.c vendor/pf/dist/man/pf.4 vendor/pf/dist/man/pf.conf.5 vendor/pf/dist/man/pf.os.5 vendor/pf/dist/man/pflog.4 vendor/pf/dist/man/pfsync.4 vendor/pf/dist/pfctl/parse.y vendor/pf/dist/pfctl/pf_print_state.c vendor/pf/dist/pfctl/pfctl.8 vendor/pf/dist/pfctl/pfctl.c vendor/pf/dist/pfctl/pfctl.h vendor/pf/dist/pfctl/pfctl_altq.c vendor/pf/dist/pflogd/pflogd.8 vendor/pf/dist/pflogd/pflogd.c vendor/pf/dist/tftp-proxy/filter.c vendor/pf/dist/tftp-proxy/tftp-proxy.8 Added: vendor/pf/dist/authpf/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pf/dist/authpf/Makefile Wed Dec 10 20:54:37 2008 (r185876) @@ -0,0 +1,11 @@ +# $OpenBSD: Makefile,v 1.12 2004/04/25 19:24:52 deraadt Exp $ + +PROG= authpf +MAN= authpf.8 +BINOWN= root +BINGRP= authpf +BINMODE= 6555 +SRCS= authpf.c +CFLAGS+= -Wall + +.include Modified: vendor/pf/dist/authpf/authpf.8 ============================================================================== --- vendor/pf/dist/authpf/authpf.8 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/authpf/authpf.8 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: authpf.8,v 1.43 2007/02/24 17:21:04 beck Exp $ +.\" $OpenBSD: authpf.8,v 1.44 2007/05/31 19:20:22 jmc Exp $ .\" .\" Copyright (c) 1998-2007 Bob Beck (beck@openbsd.org>. All rights reserved. .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd January 10, 2002 +.Dd $Mdocdate$ .Dt AUTHPF 8 .Os .Sh NAME Added: vendor/pf/dist/ftp-proxy/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pf/dist/ftp-proxy/Makefile Wed Dec 10 20:54:37 2008 (r185876) @@ -0,0 +1,13 @@ +# $OpenBSD: Makefile,v 1.3 2006/11/26 11:31:13 deraadt Exp $ + +PROG= ftp-proxy +SRCS= ftp-proxy.c filter.c +MAN= ftp-proxy.8 + +CFLAGS+= -I${.CURDIR} +CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith \ + -Wno-uninitialized +LDADD+= -levent +DPADD+= ${LIBEVENT} + +.include Modified: vendor/pf/dist/ftp-proxy/filter.c ============================================================================== --- vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.5 2006/12/01 07:31:21 camield Exp $ */ +/* $OpenBSD: filter.c,v 1.6 2007/08/01 09:31:41 henning Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -53,7 +53,7 @@ static struct pfioc_rule pfr; static struct pfioc_trans pft; static struct pfioc_trans_e pfte[TRANS_SIZE]; static int dev, rule_log; -static char *qname; +static char *qname, *tagname; int add_filter(u_int32_t id, u_int8_t dir, struct sockaddr *src, @@ -159,11 +159,12 @@ do_rollback(void) } void -init_filter(char *opt_qname, int opt_verbose) +init_filter(char *opt_qname, char *opt_tagname, int opt_verbose) { struct pf_status status; qname = opt_qname; + tagname = opt_tagname; if (opt_verbose == 1) rule_log = PF_LOG; @@ -276,6 +277,8 @@ prepare_rule(u_int32_t id, int rs_num, s } pfr.rule.dst.port_op = PF_OP_EQ; pfr.rule.dst.port[0] = htons(d_port); + if (tagname != NULL) + strlcpy(pfr.rule.tagname, tagname, sizeof pfr.rule.tagname); switch (rs_num) { case PF_RULESET_FILTER: Modified: vendor/pf/dist/ftp-proxy/filter.h ============================================================================== --- vendor/pf/dist/ftp-proxy/filter.h Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/ftp-proxy/filter.h Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.h,v 1.3 2005/06/07 14:12:07 camield Exp $ */ +/* $OpenBSD: filter.h,v 1.4 2007/08/01 09:31:41 henning Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -26,6 +26,6 @@ int add_rdr(u_int32_t, struct sockaddr * struct sockaddr *, u_int16_t); int do_commit(void); int do_rollback(void); -void init_filter(char *, int); +void init_filter(char *, char *, int); int prepare_commit(u_int32_t); int server_lookup(struct sockaddr *, struct sockaddr *, struct sockaddr *); Modified: vendor/pf/dist/ftp-proxy/ftp-proxy.8 ============================================================================== --- vendor/pf/dist/ftp-proxy/ftp-proxy.8 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/ftp-proxy/ftp-proxy.8 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftp-proxy.8,v 1.7 2006/12/30 13:01:54 camield Exp $ +.\" $OpenBSD: ftp-proxy.8,v 1.10 2007/08/01 15:45:41 jmc Exp $ .\" .\" Copyright (c) 2004, 2005 Camiel Dobbelaar, .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd November 28, 2004 +.Dd $Mdocdate$ .Dt FTP-PROXY 8 .Os .Sh NAME @@ -22,6 +22,7 @@ .Nd Internet File Transfer Protocol proxy daemon .Sh SYNOPSIS .Nm ftp-proxy +.Bk -words .Op Fl 6Adrv .Op Fl a Ar address .Op Fl b Ar address @@ -31,7 +32,9 @@ .Op Fl p Ar port .Op Fl q Ar queue .Op Fl R Ar address +.Op Fl T Ar tag .Op Fl t Ar timeout +.Ek .Sh DESCRIPTION .Nm is a proxy for the Internet File Transfer Protocol. @@ -128,6 +131,10 @@ connections to another proxy. .It Fl r Rewrite sourceport to 20 in active mode to suit ancient clients that insist on this RFC property. +.It Fl T Ar tag +Automatically tag packets passing through the +.Xr pf 4 +rule with the name supplied. .It Fl t Ar timeout Number of seconds that the control connection can be idle, before the proxy will disconnect. Modified: vendor/pf/dist/ftp-proxy/ftp-proxy.c ============================================================================== --- vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.13 2006/12/30 13:24:00 camield Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.15 2007/08/15 15:18:02 camield Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -102,6 +102,7 @@ u_int16_t pick_proxy_port(void); void proxy_reply(int, struct sockaddr *, u_int16_t); void server_error(struct bufferevent *, short, void *); int server_parse(struct session *s); +int allow_data_connection(struct session *s); void server_read(struct bufferevent *, void *); const char *sock_ntop(struct sockaddr *); void usage(void); @@ -113,7 +114,7 @@ char ntop_buf[NTOP_BUFS][INET6_ADDRSTRLE struct sockaddr_storage fixed_server_ss, fixed_proxy_ss; char *fixed_server, *fixed_server_port, *fixed_proxy, *listen_ip, *listen_port, - *qname; + *qname, *tagname; int anonymous_only, daemonize, id_count, ipv6_mode, loglevel, max_sessions, rfc_mode, session_count, timeout, verbose; extern char *__progname; @@ -149,8 +150,19 @@ client_parse(struct session *s) return (1); if (linebuf[0] == 'P' || linebuf[0] == 'p' || - linebuf[0] == 'E' || linebuf[0] == 'e') - return (client_parse_cmd(s)); + linebuf[0] == 'E' || linebuf[0] == 'e') { + if (!client_parse_cmd(s)) + return (0); + + /* + * Allow active mode connections immediately, instead of + * waiting for a positive reply from the server. Some + * rare servers/proxies try to probe or setup the data + * connection before an actual transfer request. + */ + if (s->cmd == CMD_PORT || s->cmd == CMD_EPRT) + return (allow_data_connection(s)); + } if (anonymous_only && (linebuf[0] == 'U' || linebuf[0] == 'u')) return (client_parse_anon(s)); @@ -588,6 +600,7 @@ main(int argc, char *argv[]) max_sessions = 100; qname = NULL; rfc_mode = 0; + tagname = NULL; timeout = 24 * 3600; verbose = 0; @@ -595,7 +608,7 @@ main(int argc, char *argv[]) id_count = 1; session_count = 0; - while ((ch = getopt(argc, argv, "6Aa:b:D:dm:P:p:q:R:rt:v")) != -1) { + while ((ch = getopt(argc, argv, "6Aa:b:D:dm:P:p:q:R:rT:t:v")) != -1) { switch (ch) { case '6': ipv6_mode = 1; @@ -640,6 +653,11 @@ main(int argc, char *argv[]) case 'r': rfc_mode = 1; break; + case 'T': + if (strlen(optarg) >= PF_TAG_NAME_SIZE) + errx(1, "tagname too long"); + tagname = optarg; + break; case 't': timeout = strtonum(optarg, 0, 86400, &errstr); if (errstr) @@ -720,7 +738,7 @@ main(int argc, char *argv[]) freeaddrinfo(res); /* Initialize pf. */ - init_filter(qname, verbose); + init_filter(qname, tagname, verbose); if (daemonize) { if (daemon(0, 0) == -1) @@ -888,12 +906,26 @@ server_error(struct bufferevent *bufev, int server_parse(struct session *s) { - struct sockaddr *client_sa, *orig_sa, *proxy_sa, *server_sa; - int prepared = 0; - if (s->cmd == CMD_NONE || linelen < 4 || linebuf[0] != '2') goto out; + if ((s->cmd == CMD_PASV && strncmp("227 ", linebuf, 4) == 0) || + (s->cmd == CMD_EPSV && strncmp("229 ", linebuf, 4) == 0)) + return (allow_data_connection(s)); + + out: + s->cmd = CMD_NONE; + s->port = 0; + + return (1); +} + +int +allow_data_connection(struct session *s) +{ + struct sockaddr *client_sa, *orig_sa, *proxy_sa, *server_sa; + int prepared = 0; + /* * The pf rules below do quite some NAT rewriting, to keep up * appearances. Points to keep in mind: @@ -918,8 +950,7 @@ server_parse(struct session *s) orig_sa = sstosa(&s->server_ss); /* Passive modes. */ - if ((s->cmd == CMD_PASV && strncmp("227 ", linebuf, 4) == 0) || - (s->cmd == CMD_EPSV && strncmp("229 ", linebuf, 4) == 0)) { + if (s->cmd == CMD_PASV || s->cmd == CMD_EPSV) { s->port = parse_port(s->cmd); if (s->port < MIN_PORT) { logmsg(LOG_CRIT, "#%d bad port in '%s'", s->id, @@ -960,8 +991,7 @@ server_parse(struct session *s) } /* Active modes. */ - if ((s->cmd == CMD_PORT || s->cmd == CMD_EPRT) && - strncmp("200 ", linebuf, 4) == 0) { + if (s->cmd == CMD_PORT || s->cmd == CMD_EPRT) { logmsg(LOG_INFO, "#%d active: server to client port %d" " via port %d", s->id, s->port, s->proxy_port); @@ -1011,7 +1041,6 @@ server_parse(struct session *s) goto fail; } - out: s->cmd = CMD_NONE; s->port = 0; @@ -1088,6 +1117,6 @@ usage(void) { fprintf(stderr, "usage: %s [-6Adrv] [-a address] [-b address]" " [-D level] [-m maxsessions]\n [-P port]" - " [-p port] [-q queue] [-R address] [-t timeout]\n", __progname); + " [-p port] [-q queue] [-R address] [-T tag] [-t timeout]\n", __progname); exit(1); } Modified: vendor/pf/dist/man/pf.4 ============================================================================== --- vendor/pf/dist/man/pf.4 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/man/pf.4 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pf.4,v 1.58 2007/02/09 11:39:06 henning Exp $ +.\" $OpenBSD: pf.4,v 1.59 2007/05/31 19:19:51 jmc Exp $ .\" .\" Copyright (C) 2001, Kjell Wooding. All rights reserved. .\" @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 24, 2001 +.Dd $Mdocdate$ .Dt PF 4 .Os .Sh NAME Modified: vendor/pf/dist/man/pf.conf.5 ============================================================================== --- vendor/pf/dist/man/pf.conf.5 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/man/pf.conf.5 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pf.conf.5,v 1.376 2006/12/01 07:23:26 camield Exp $ +.\" $OpenBSD: pf.conf.5,v 1.383 2007/07/17 16:27:38 jmc Exp $ .\" .\" Copyright (c) 2002, Daniel Hartmeier .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 19, 2002 +.Dd $Mdocdate: June 26 2007 $ .Dt PF.CONF 5 .Os .Sh NAME @@ -402,9 +402,10 @@ set limit { states 20000, frags 20000, s .Bl -tag -width xxxxxxxx -compact .It Ar none Disable the ruleset optimizer. -This is the default behaviour. .It Ar basic -Enable basic ruleset optimization, which does four things to improve the +Enable basic ruleset optimization. +This is the default behaviour. +Basic ruleset optimization does four things to improve the performance of ruleset evaluations: .Pp .Bl -enum -compact @@ -1247,7 +1248,7 @@ block all .Ed .It Ar pass The packet is passed; -state is created state unless the +state is created unless the .Ar no state option is specified. .El @@ -1418,7 +1419,8 @@ This rule applies only to packets with t addresses and ports. .Pp Addresses can be specified in CIDR notation (matching netblocks), as -symbolic host names or interface names, or as any of the following keywords: +symbolic host names, interface names or interface group names, or as any +of the following keywords: .Pp .Bl -tag -width xxxxxxxxxxxxxx -compact .It Ar any @@ -1440,7 +1442,7 @@ the route back to the packet's source ad Any address that matches the given table. .El .Pp -Interface names can have modifiers appended: +Interface names and interface group names can have modifiers appended: .Pp .Bl -tag -width xxxxxxxxxxxx -compact .It Ar :network @@ -1603,7 +1605,7 @@ Flags not specified in are ignored. For stateful connections, the default is .Ar flags S/SA . -To indicate that flags should not be checkd at all, specify +To indicate that flags should not be checked at all, specify .Ar flags any . The flags are: (F)IN, (S)YN, (R)ST, (P)USH, (A)CK, (U)RG, (E)CE, and C(W)R. .Bl -tag -width Fl @@ -1687,13 +1689,14 @@ pass all tos 0x10 pass all tos 16 .Ed .It Ar allow-opts -By default, packets which contain IP options are blocked. +By default, IPv4 packets with IP options or IPv6 packets with routing +extension headers are blocked. When .Ar allow-opts is specified for a .Ar pass rule, packets that pass the filter based on that rule (last matching) -do so even if they contain IP options. +do so even if they contain IP options or routing extension headers. For packets that match state, the rule that initially created the state is used. The implicit @@ -1914,7 +1917,7 @@ pool options. Note that by default these associations are destroyed as soon as there are no longer states which refer to them; in order to make the mappings last beyond the lifetime of the states, increase the global options with -.Ar set timeout source-track +.Ar set timeout src.track . See .Sx STATEFUL TRACKING OPTIONS for more ways to control the source tracking. @@ -2759,7 +2762,7 @@ option = "set" ( [ "timeout" ( t [ "state-policy" ( "if-bound" | "floating" ) ] [ "require-order" ( "yes" | "no" ) ] [ "fingerprints" filename ] | - [ "skip on" ( interface-name | "{" interface-list "}" ) ] | + [ "skip on" ifspec ] | [ "debug" ( "none" | "urgent" | "misc" | "loud" ) ] ) pf-rule = action [ ( "in" | "out" ) ] @@ -2801,8 +2804,7 @@ rdr-rule = [ "no" ] "rdr" [ "pass" [ portspec ] [ pooltype ] ] antispoof-rule = "antispoof" [ "log" ] [ "quick" ] - "for" ( interface-name | "{" interface-list "}" ) - [ af ] [ "label" string ] + "for" ifspec [ af ] [ "label" string ] table-rule = "table" "\*(Lt" string "\*(Gt" [ tableopts-list ] tableopts-list = tableopts-list tableopts | tableopts @@ -2810,8 +2812,8 @@ tableopts = "persist" | "const" | " "{" [ tableaddr-list ] "}" tableaddr-list = tableaddr-list [ "," ] tableaddr-spec | tableaddr-spec tableaddr-spec = [ "!" ] tableaddr [ "/" mask-bits ] -tableaddr = hostname | ipv4-dotted-quad | ipv6-coloned-hex | - interface-name | "self" +tableaddr = hostname | ifspec | "self" | + ipv4-dotted-quad | ipv6-coloned-hex altq-rule = "altq on" interface-name queueopts-list "queue" subqueue @@ -2842,8 +2844,10 @@ return = "drop" | "return" | "re icmpcode = ( icmp-code-name | icmp-code-number ) icmp6code = ( icmp6-code-name | icmp6-code-number ) -ifspec = ( [ "!" ] interface-name ) | "{" interface-list "}" -interface-list = [ "!" ] interface-name [ [ "," ] interface-list ] +ifspec = ( [ "!" ] ( interface-name | interface-group ) ) | + "{" interface-list "}" +interface-list = [ "!" ] ( interface-name | interface-group ) + [ [ "," ] interface-list ] route = ( "route-to" | "reply-to" | "dup-to" ) ( routehost | "{" routehost-list "}" ) [ pooltype ] @@ -2863,8 +2867,9 @@ ipspec = "any" | host | "{" host host = [ "!" ] ( address [ "/" mask-bits ] | "\*(Lt" string "\*(Gt" ) redirhost = address [ "/" mask-bits ] routehost = "(" interface-name [ address [ "/" mask-bits ] ] ")" -address = ( interface-name | "(" interface-name ")" | hostname | - ipv4-dotted-quad | ipv6-coloned-hex ) +address = ( interface-name | interface-group | + "(" ( interface-name | interface-group ) ")" | + hostname | ipv4-dotted-quad | ipv6-coloned-hex ) host-list = host [ [ "," ] host-list ] redirhost-list = redirhost [ [ "," ] redirhost-list ] routehost-list = routehost [ [ "," ] routehost-list ] Modified: vendor/pf/dist/man/pf.os.5 ============================================================================== --- vendor/pf/dist/man/pf.os.5 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/man/pf.os.5 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pf.os.5,v 1.7 2005/11/16 20:07:18 stevesk Exp $ +.\" $OpenBSD: pf.os.5,v 1.8 2007/05/31 19:19:58 jmc Exp $ .\" .\" Copyright (c) 2003 Mike Frantzen .\" @@ -13,7 +13,7 @@ .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -.Dd August 18, 2003 +.Dd $Mdocdate$ .Dt PF.OS 5 .Os .Sh NAME Modified: vendor/pf/dist/man/pflog.4 ============================================================================== --- vendor/pf/dist/man/pflog.4 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/man/pflog.4 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pflog.4,v 1.9 2006/10/25 12:51:31 jmc Exp $ +.\" $OpenBSD: pflog.4,v 1.10 2007/05/31 19:19:51 jmc Exp $ .\" .\" Copyright (c) 2001 Tobias Weingartner .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 10, 2001 +.Dd $Mdocdate$ .Dt PFLOG 4 .Os .Sh NAME Modified: vendor/pf/dist/man/pfsync.4 ============================================================================== --- vendor/pf/dist/man/pfsync.4 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/man/pfsync.4 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pfsync.4,v 1.24 2006/10/23 07:05:49 jmc Exp $ +.\" $OpenBSD: pfsync.4,v 1.25 2007/05/31 19:19:51 jmc Exp $ .\" .\" Copyright (c) 2002 Michael Shalayeff .\" Copyright (c) 2003-2004 Ryan McBride @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 29, 2002 +.Dd $Mdocdate$ .Dt PFSYNC 4 .Os .Sh NAME Added: vendor/pf/dist/pfctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pf/dist/pfctl/Makefile Wed Dec 10 20:54:37 2008 (r185876) @@ -0,0 +1,18 @@ +# $OpenBSD: Makefile,v 1.19 2006/12/24 18:52:43 miod Exp $ + +PROG= pfctl +SRCS= pfctl.c parse.y pfctl_parser.c pf_print_state.c pfctl_altq.c +SRCS+= pfctl_osfp.c pfctl_radix.c pfctl_table.c pfctl_qstats.c +SRCS+= pfctl_optimize.c pf_ruleset.c +CFLAGS+= -Wall -Wmissing-prototypes -Wno-uninitialized +CFLAGS+= -Wstrict-prototypes -I${.CURDIR} +YFLAGS= +MAN= pfctl.8 + +# Ruleset and Anchor handling +.PATH: ${.CURDIR}/../../sys/net + +LDADD+= -lm +DPADD+= ${LIBM} + +.include Modified: vendor/pf/dist/pfctl/parse.y ============================================================================== --- vendor/pf/dist/pfctl/parse.y Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/parse.y Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.517 2007/02/03 23:26:40 dhartmei Exp $ */ +/* $OpenBSD: parse.y,v 1.519 2007/06/21 19:30:03 henning Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -425,7 +425,7 @@ typedef struct { %type tos not yesno %type no dir af fragcache optimizer %type sourcetrack flush unaryop statelock -%type action nataction natpass scrubaction +%type action nataction natpasslog scrubaction %type flags flag blockspec %type port rport %type hashkey @@ -3439,12 +3439,13 @@ redirection : /* empty */ { $$ = NULL; } ; -natpass : /* empty */ { $$.b1 = $$.b2 = 0; } - | PASS { $$.b1 = 1; $$.b2 = 0; } +natpasslog : /* empty */ { $$.b1 = $$.b2 = 0; $$.w2 = 0; } + | PASS { $$.b1 = 1; $$.b2 = 0; $$.w2 = 0; } | PASS log { $$.b1 = 1; $$.b2 = $2.log; $$.w2 = $2.logif; } + | log { $$.b1 = 0; $$.b2 = $1.log; $$.w2 = $1.logif; } ; -nataction : no NAT natpass { +nataction : no NAT natpasslog { if ($1 && $3.b1) { yyerror("\"pass\" not valid with \"no\""); YYERROR; @@ -3457,7 +3458,7 @@ nataction : no NAT natpass { $$.w = $3.b2; $$.w2 = $3.w2; } - | no RDR natpass { + | no RDR natpasslog { if ($1 && $3.b1) { yyerror("\"pass\" not valid with \"no\""); YYERROR; @@ -3631,7 +3632,7 @@ natrule : nataction interface af proto } ; -binatrule : no BINAT natpass interface af proto FROM host TO ipspec tag +binatrule : no BINAT natpasslog interface af proto FROM host TO ipspec tag tagged rtable redirection { struct pf_rule binat; Modified: vendor/pf/dist/pfctl/pf_print_state.c ============================================================================== --- vendor/pf/dist/pfctl/pf_print_state.c Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/pf_print_state.c Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_print_state.c,v 1.44 2007/03/01 17:20:53 deraadt Exp $ */ +/* $OpenBSD: pf_print_state.c,v 1.45 2007/05/31 04:13:37 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -151,7 +151,7 @@ print_name(struct pf_addr *addr, sa_fami } void -print_host(struct pf_state_host *h, sa_family_t af, int opts) +print_host(struct pfsync_state_host *h, sa_family_t af, int opts) { u_int16_t p = ntohs(h->port); @@ -180,7 +180,7 @@ print_host(struct pf_state_host *h, sa_f } void -print_seq(struct pf_state_peer *p) +print_seq(struct pfsync_state_peer *p) { if (p->seqdiff) printf("[%u + %u](+%u)", p->seqlo, p->seqhi - p->seqlo, @@ -190,9 +190,9 @@ print_seq(struct pf_state_peer *p) } void -print_state(struct pf_state *s, int opts) +print_state(struct pfsync_state *s, int opts) { - struct pf_state_peer *src, *dst; + struct pfsync_state_peer *src, *dst; struct protoent *p; int min, sec; @@ -203,7 +203,7 @@ print_state(struct pf_state *s, int opts src = &s->dst; dst = &s->src; } - printf("%s ", s->u.ifname); + printf("%s ", s->ifname); if ((p = getprotobynumber(s->proto)) != NULL) printf("%s ", p->p_name); else @@ -278,20 +278,23 @@ print_state(struct pf_state *s, int opts s->expire /= 60; printf(", expires in %.2u:%.2u:%.2u", s->expire, min, sec); printf(", %llu:%llu pkts, %llu:%llu bytes", - s->packets[0], s->packets[1], s->bytes[0], s->bytes[1]); - if (s->anchor.nr != -1) - printf(", anchor %u", s->anchor.nr); - if (s->rule.nr != -1) - printf(", rule %u", s->rule.nr); - if (s->src_node != NULL) + pf_state_counter_from_pfsync(s->packets[0]), + pf_state_counter_from_pfsync(s->packets[1]), + pf_state_counter_from_pfsync(s->bytes[0]), + pf_state_counter_from_pfsync(s->bytes[1])); + if (s->anchor != -1) + printf(", anchor %u", s->anchor); + if (s->rule != -1) + printf(", rule %u", s->rule); + if (s->sync_flags & PFSYNC_FLAG_SRCNODE) printf(", source-track"); - if (s->nat_src_node != NULL) + if (s->sync_flags & PFSYNC_FLAG_NATSRCNODE) printf(", sticky-address"); printf("\n"); } if (opts & PF_OPT_VERBOSE2) { printf(" id: %016llx creatorid: %08x%s\n", - betoh64(s->id), ntohl(s->creatorid), + pf_state_counter_from_pfsync(s->id), ntohl(s->creatorid), ((s->sync_flags & PFSTATE_NOSYNC) ? " (no-sync)" : "")); } } Modified: vendor/pf/dist/pfctl/pfctl.8 ============================================================================== --- vendor/pf/dist/pfctl/pfctl.8 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/pfctl.8 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pfctl.8,v 1.128 2007/01/30 21:01:56 jmc Exp $ +.\" $OpenBSD: pfctl.8,v 1.133 2007/07/01 11:38:51 henning Exp $ .\" .\" Copyright (c) 2001 Kjell Wooding. All rights reserved. .\" @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd November 20, 2002 +.Dd $Mdocdate: May 31 2007 $ .Dt PFCTL 8 .Os .Sh NAME @@ -42,14 +42,14 @@ .Op Fl i Ar interface .Op Fl K Ar host | network .Op Fl k Ar host | network -.Op Fl o Op Ar level +.Op Fl o Ar level .Op Fl p Ar device .Op Fl s Ar modifier -.Oo -.Fl t Ar table +.Xo +.Oo Fl t Ar table .Fl T Ar command -.Op Ar address ... -.Oc +.Op Ar address ... Oc +.Xc .Op Fl x Ar level .Ek .Sh DESCRIPTION @@ -209,7 +209,7 @@ Flush the NAT rules. Flush the queue rules. .It Fl F Cm rules Flush the filter rules. -.It Fl F Cm state +.It Fl F Cm states Flush the state table (NAT and filter). .It Fl F Cm Sources Flush the source tracking table. @@ -296,58 +296,20 @@ Do not actually load rules, just parse t .It Fl O Load only the options present in the rule file. Other rules and options are ignored. -.It Fl o Op Ar level -Control the ruleset optimizer. -The ruleset optimizer attempts to improve rulesets by removing rule -duplication and making better use of rule ordering. +.It Fl o Ar level +Control the ruleset optimizer, overriding any rule file settings. .Pp .Bl -tag -width xxxxxxxxxxxx -compact .It Fl o Cm none Disable the ruleset optimizer. .It Fl o Cm basic Enable basic ruleset optimizations. +This is the default behaviour. .It Fl o Cm profile Enable basic ruleset optimizations with profiling. .El -.Pp -.Cm basic -optimization does does four things: -.Pp -.Bl -enum -compact -.It -remove duplicate rules -.It -remove rules that are a subset of another rule -.It -combine multiple rules into a table when advantageous -.It -re-order the rules to improve evaluation performance -.El -.Pp -If -.Cm profile -is specified, the currently loaded ruleset will be examined as a feedback -profile to tailor the optimization of the -.Ar quick -rules to the actual network behavior. -.Pp -It is important to note that the ruleset optimizer will modify the ruleset -to improve performance. -A side effect of the ruleset modification is that per-rule accounting -statistics will have different meanings than before. -If per-rule accounting is important for billing purposes or whatnot, either -the ruleset optimizer should not be used or a -.Ar label -field should be added to all of the accounting rules to act as optimization -barriers. -.Pp -To retain compatibility with previous behaviour, a single -.Fl o -without any options will enable -.Cm basic -optimizations, and a second -.Fl o -will enable profiling. +For further information on the ruleset optimizer, see +.Xr pf.conf 5 . .It Fl p Ar device Use the device file .Ar device @@ -402,7 +364,7 @@ If .Fl v is specified, all anchors attached under the target anchor will be displayed recursively. -.It Fl s Cm state +.It Fl s Cm states Show the contents of the state table. .It Fl s Cm Sources Show the contents of the source tracking table. Modified: vendor/pf/dist/pfctl/pfctl.c ============================================================================== --- vendor/pf/dist/pfctl/pfctl.c Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/pfctl.c Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.c,v 1.262 2007/03/01 17:20:53 deraadt Exp $ */ +/* $OpenBSD: pfctl.c,v 1.268 2007/06/30 18:25:08 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -201,11 +201,11 @@ static const struct { static const char *clearopt_list[] = { "nat", "queue", "rules", "Sources", - "state", "info", "Tables", "osfp", "all", NULL + "states", "info", "Tables", "osfp", "all", NULL }; static const char *showopt_list[] = { - "nat", "queue", "rules", "Anchors", "Sources", "state", "info", + "nat", "queue", "rules", "Anchors", "Sources", "states", "info", "Interfaces", "labels", "timeouts", "memory", "Tables", "osfp", "all", NULL }; @@ -220,7 +220,7 @@ static const char *debugopt_list[] = { }; static const char *optiopt_list[] = { - "o", "none", "basic", "profile", NULL + "none", "basic", "profile", NULL }; void @@ -231,8 +231,8 @@ usage(void) fprintf(stderr, "usage: %s [-AdeghmNnOqRrvz] ", __progname); fprintf(stderr, "[-a anchor] [-D macro=value] [-F modifier]\n"); fprintf(stderr, "\t[-f file] [-i interface] [-K host | network] "); - fprintf(stderr, "[-k host | network ]\n"); - fprintf(stderr, "\t[-o [level]] [-p device] [-s modifier ]\n"); + fprintf(stderr, "[-k host | network]\n"); + fprintf(stderr, "\t[-o level] [-p device] [-s modifier]\n"); fprintf(stderr, "\t[-t table -T command [address ...]] [-x level]\n"); exit(1); } @@ -998,7 +998,7 @@ int pfctl_show_states(int dev, const char *iface, int opts) { struct pfioc_states ps; - struct pf_state *p; + struct pfsync_state *p; char *inbuf = NULL, *newinbuf = NULL; unsigned len = 0; int i, dotitle = (opts & PF_OPT_SHOWALL); @@ -1029,7 +1029,7 @@ pfctl_show_states(int dev, const char *i } p = ps.ps_states; for (i = 0; i < ps.ps_len; i += sizeof(*p), p++) { - if (iface != NULL && strcmp(p->u.ifname, iface)) + if (iface != NULL && strcmp(p->ifname, iface)) continue; if (dotitle) { pfctl_print_title("STATES:"); @@ -1954,7 +1954,7 @@ main(int argc, char *argv[]) int ch; int mode = O_RDONLY; int opts = 0; - int optimize = 0; + int optimize = PF_OPTIMIZE_BASIC; char anchorname[MAXPATHLEN]; char *path; FILE *fin = NULL; @@ -1963,7 +1963,7 @@ main(int argc, char *argv[]) usage(); while ((ch = getopt(argc, argv, - "a:AdD:eqf:F:ghi:k:K:mnNOo::p:rRs:t:T:vx:z")) != -1) { + "a:AdD:eqf:F:ghi:k:K:mnNOo:p:rRs:t:T:vx:z")) != -1) { switch (ch) { case 'a': anchoropt = optarg; @@ -2039,24 +2039,11 @@ main(int argc, char *argv[]) loadopt |= PFCTL_FLAG_FILTER; break; case 'o': - if (optarg) { - optiopt = pfctl_lookup_option(optarg, - optiopt_list); - if (optiopt == NULL) { - warnx("Unknown optimization '%s'", - optarg); - usage(); - } - } - if (opts & PF_OPT_OPTIMIZE) { - if (optiopt != NULL) { - warnx("Cannot specify -o multiple times" - "with optimizer level"); - usage(); - } - optimize |= PF_OPTIMIZE_PROFILE; + optiopt = pfctl_lookup_option(optarg, optiopt_list); + if (optiopt == NULL) { + warnx("Unknown optimization '%s'", optarg); + usage(); } - optimize |= PF_OPTIMIZE_BASIC; opts |= PF_OPT_OPTIMIZE; break; case 'O': Modified: vendor/pf/dist/pfctl/pfctl.h ============================================================================== --- vendor/pf/dist/pfctl/pfctl.h Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/pfctl.h Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl.h,v 1.40 2007/02/09 11:25:27 henning Exp $ */ +/* $OpenBSD: pfctl.h,v 1.41 2007/05/31 04:13:37 mcbride Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -112,9 +112,9 @@ struct pf_altq *pfaltq_lookup(const char char *rate2str(double); void print_addr(struct pf_addr_wrap *, sa_family_t, int); -void print_host(struct pf_state_host *, sa_family_t, int); -void print_seq(struct pf_state_peer *); -void print_state(struct pf_state *, int); +void print_host(struct pfsync_state_host *, sa_family_t, int); +void print_seq(struct pfsync_state_peer *); +void print_state(struct pfsync_state *, int); int unmask(struct pf_addr *, sa_family_t); int pfctl_cmdline_symset(char *); Modified: vendor/pf/dist/pfctl/pfctl_altq.c ============================================================================== --- vendor/pf/dist/pfctl/pfctl_altq.c Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pfctl/pfctl_altq.c Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_altq.c,v 1.91 2006/11/28 00:08:50 henning Exp $ */ +/* $OpenBSD: pfctl_altq.c,v 1.92 2007/05/27 05:15:17 claudio Exp $ */ /* * Copyright (c) 2002 @@ -1091,8 +1091,6 @@ getifspeed(char *ifname) ifr.ifr_data = (caddr_t)&ifrdat; if (ioctl(s, SIOCGIFDATA, (caddr_t)&ifr) == -1) err(1, "SIOCGIFDATA"); - if (shutdown(s, SHUT_RDWR) == -1) - err(1, "shutdown"); if (close(s)) err(1, "close"); return ((u_int32_t)ifrdat.ifi_baudrate); @@ -1112,8 +1110,6 @@ getifmtu(char *ifname) errx(1, "getifmtu: strlcpy"); if (ioctl(s, SIOCGIFMTU, (caddr_t)&ifr) == -1) err(1, "SIOCGIFMTU"); - if (shutdown(s, SHUT_RDWR) == -1) - err(1, "shutdown"); if (close(s)) err(1, "close"); if (ifr.ifr_mtu > 0) Added: vendor/pf/dist/pflogd/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/pf/dist/pflogd/Makefile Wed Dec 10 20:54:37 2008 (r185876) @@ -0,0 +1,11 @@ +# $OpenBSD: Makefile,v 1.7 2006/11/26 11:31:08 deraadt Exp $ + +CFLAGS+=-Wall -Wmissing-prototypes -Wshadow +LDADD+= -lpcap -lutil +DPADD+= ${LIBPCAP} ${LIBUTIL} + +PROG= pflogd +SRCS= pflogd.c privsep.c privsep_fdpass.c +MAN= pflogd.8 + +.include Modified: vendor/pf/dist/pflogd/pflogd.8 ============================================================================== --- vendor/pf/dist/pflogd/pflogd.8 Wed Dec 10 20:44:18 2008 (r185875) +++ vendor/pf/dist/pflogd/pflogd.8 Wed Dec 10 20:54:37 2008 (r185876) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pflogd.8,v 1.32 2006/12/08 10:26:38 joel Exp $ +.\" $OpenBSD: pflogd.8,v 1.35 2007/05/31 19:19:47 jmc Exp $ .\" .\" Copyright (c) 2001 Can Erkin Acar. All rights reserved. .\" @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 9, 2001 +.Dd $Mdocdate$ .Dt PFLOGD 8 .Os .Sh NAME @@ -32,12 +32,15 @@ .Nd packet filter logging daemon .Sh SYNOPSIS .Nm pflogd +.Bk -words .Op Fl Dx .Op Fl d Ar delay .Op Fl f Ar filename .Op Fl i Ar interface +.Op Fl p Ar pidfile .Op Fl s Ar snaplen .Op Ar expression +.Ek .Sh DESCRIPTION .Nm is a background daemon which reads packets logged by @@ -114,6 +117,14 @@ By default, .Nm will use .Ar pflog0 . +.It Fl p Ar pidfile +Writes a file containing the process ID of the program. +The file name has the form +.Pa /var/run/pidname.pid . +If the option is not given, +.Ar pidfile +defaults to +.Pa pflogd . *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:55:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78A2B1065690; Wed, 10 Dec 2008 20:55:44 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D81D8FC14; Wed, 10 Dec 2008 20:55:44 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKtiie042329; Wed, 10 Dec 2008 20:55:44 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKtirT042328; Wed, 10 Dec 2008 20:55:44 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102055.mBAKtirT042328@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 20:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185877 - vendor/pf/4.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:55:44 -0000 Author: mlaier Date: Wed Dec 10 20:55:44 2008 New Revision: 185877 URL: http://svn.freebsd.org/changeset/base/185877 Log: Tag for pf 4.2 Added: vendor/pf/4.2/ - copied from r185876, vendor/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:56:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CF8B1065675; Wed, 10 Dec 2008 20:56:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88E0A8FC16; Wed, 10 Dec 2008 20:56:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKuJlB042382; Wed, 10 Dec 2008 20:56:19 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKuJ97042379; Wed, 10 Dec 2008 20:56:19 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812102056.mBAKuJ97042379@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Dec 2008 20:56:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185878 - in head/sys: compat/freebsd32 kern modules/aio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:56:19 -0000 Author: jhb Date: Wed Dec 10 20:56:19 2008 New Revision: 185878 URL: http://svn.freebsd.org/changeset/base/185878 Log: - Add 32-bit compat system calls for VFS_AIO. The system calls live in the aio code and are registered via the recently added SYSCALL32_*() helpers. - Since the aio code likes to invoke fuword and suword a lot down in the "bowels" of system calls, add a structure holding a set of operations for things like storing errors, copying in the aiocb structure, storing status, etc. The 32-bit system calls use a separate operations vector to handle fuword32 vs fuword, etc. Also, the oldsigevent handling is now done by having seperate operation vectors with different aiocb copyin routines. - Split out kern_foo() functions for the various AIO system calls so the 32-bit front ends can manage things like copying in and converting timespec structures, etc. - For both the native and 32-bit aio_suspend() and lio_listio() calls, just use copyin() to read the array of aiocb pointers instead of using a for loop that iterated over fuword/fuword32. The error handling in the old case was incomplete (lio_listio() just ignored any aiocb's that it got an EFAULT trying to read rather than reporting an error), and possibly slower. MFC after: 1 month Modified: head/sys/compat/freebsd32/syscalls.master head/sys/kern/vfs_aio.c head/sys/modules/aio/Makefile Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Wed Dec 10 20:55:44 2008 (r185877) +++ head/sys/compat/freebsd32/syscalls.master Wed Dec 10 20:56:19 2008 (r185878) @@ -454,9 +454,13 @@ u_int nfds, int timeout); } 253 AUE_ISSETUGID NOPROTO { int issetugid(void); } 254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); } -255 AUE_NULL UNIMPL nosys -256 AUE_NULL UNIMPL nosys -257 AUE_NULL UNIMPL nosys +255 AUE_NULL NOSTD { int freebsd32_aio_read( \ + struct aiocb32 *aiocbp); } +256 AUE_NULL NOSTD { int freebsd32_aio_write( \ + struct aiocb32 *aiocbp); } +257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \ + struct aiocb32 * const *acb_list, \ + int nent, struct sigevent *sig); } 258 AUE_NULL UNIMPL nosys 259 AUE_NULL UNIMPL nosys 260 AUE_NULL UNIMPL nosys @@ -535,13 +539,22 @@ 312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \ gid_t sgid); } 313 AUE_NULL OBSOL signanosleep -314 AUE_NULL UNIMPL aio_return -315 AUE_NULL UNIMPL aio_suspend -316 AUE_NULL UNIMPL aio_cancel -317 AUE_NULL UNIMPL aio_error -318 AUE_NULL UNIMPL aio_read -319 AUE_NULL UNIMPL aio_write -320 AUE_NULL UNIMPL lio_listio +314 AUE_NULL NOSTD { int freebsd32_aio_return( \ + struct aiocb32 *aiocbp); } +315 AUE_NULL NOSTD { int freebsd32_aio_suspend( \ + struct aiocb32 * const * aiocbp, int nent, \ + const struct timespec32 *timeout); } +316 AUE_NULL NOSTD { int freebsd32_aio_cancel(int fd, \ + struct aiocb32 *aiocbp); } +317 AUE_NULL NOSTD { int freebsd32_aio_error( \ + struct aiocb32 *aiocbp); } +318 AUE_NULL NOSTD { int freebsd32_oaio_read( \ + struct oaiocb32 *aiocbp); } +319 AUE_NULL NOSTD { int freebsd32_oaio_write( \ + struct oaiocb32 *aiocbp); } +320 AUE_NULL NOSTD { int freebsd32_olio_listio(int mode, \ + struct oaiocb32 * const *acb_list, \ + int nent, struct osigevent32 *sig); } 321 AUE_NULL NOPROTO { int yield(void); } 322 AUE_NULL OBSOL thr_sleep 323 AUE_NULL OBSOL thr_wakeup @@ -618,7 +631,9 @@ 358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \ const char *path, int attrnamespace, \ const char *attrname); } -359 AUE_NULL UNIMPL aio_waitcomplete +359 AUE_NULL NOSTD { int freebsd32_aio_waitcomplete( \ + struct aiocb32 **aiocbp, \ + struct timespec32 *timeout); } 360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ uid_t *suid); } 361 AUE_GETRESGID NOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \ @@ -766,7 +781,8 @@ 462 AUE_NULL UNIMPL kmq_unlink 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } -465 AUE_NULL UNIMPL aio_fsync +465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \ + struct aiocb32 *aiocbp); } 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ lwpid_t lwpid, struct rtprio *rtp); } 467 AUE_NULL UNIMPL nosys Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Wed Dec 10 20:55:44 2008 (r185877) +++ head/sys/kern/vfs_aio.c Wed Dec 10 20:56:19 2008 (r185878) @@ -21,6 +21,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -121,6 +123,8 @@ static uint64_t jobseqno; FEATURE(aio, "Asynchronous I/O"); +static MALLOC_DEFINE(M_LIO, "lio", "listio aio control block list"); + static SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management"); static int max_aio_procs = MAX_AIO_PROCS; @@ -308,6 +312,20 @@ struct kaioinfo { #define KAIO_RUNDOWN 0x1 /* process is being run down */ #define KAIO_WAKEUP 0x2 /* wakeup process when there is a significant event */ +/* + * Operations used to interact with userland aio control blocks. + * Different ABIs provide their own operations. + */ +struct aiocb_ops { + int (*copyin)(struct aiocb *ujob, struct aiocb *kjob); + long (*fetch_status)(struct aiocb *ujob); + long (*fetch_error)(struct aiocb *ujob); + int (*store_status)(struct aiocb *ujob, long status); + int (*store_error)(struct aiocb *ujob, long error); + int (*store_kernelinfo)(struct aiocb *ujob, long jobref); + int (*store_aiocb)(struct aiocb **ujobp, struct aiocb *ujob); +}; + static TAILQ_HEAD(,aiothreadlist) aio_freeproc; /* (c) Idle daemons */ static struct sema aio_newproc_sem; static struct mtx aio_job_mtx; @@ -321,7 +339,7 @@ static int aio_free_entry(struct aiocbli static void aio_process(struct aiocblist *aiocbe); static int aio_newproc(int *); int aio_aqueue(struct thread *td, struct aiocb *job, - struct aioliojob *lio, int type, int osigev); + struct aioliojob *lio, int type, struct aiocb_ops *ops); static void aio_physwakeup(struct buf *bp); static void aio_proc_rundown(void *arg, struct proc *p); static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); @@ -333,7 +351,6 @@ static int aio_unload(void); static void aio_bio_done_notify(struct proc *userp, struct aiocblist *aiocbe, int type); #define DONE_BUF 1 #define DONE_QUEUE 2 -static int do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev); static int aio_kick(struct proc *userp); static void aio_kick_nowait(struct proc *userp); static void aio_kick_helper(void *context, int pending); @@ -1322,13 +1339,122 @@ aio_swake_cb(struct socket *so, struct s SOCKBUF_UNLOCK(sb); } +static int +convert_old_sigevent(struct osigevent *osig, struct sigevent *nsig) +{ + + /* + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are + * supported by AIO with the old sigevent structure. + */ + nsig->sigev_notify = osig->sigev_notify; + switch (nsig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_SIGNAL: + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; + break; + case SIGEV_KEVENT: + nsig->sigev_notify_kqueue = + osig->__sigev_u.__sigev_notify_kqueue; + nsig->sigev_value.sival_ptr = osig->sigev_value.sival_ptr; + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) +{ + struct oaiocb *ojob; + int error; + + bzero(kjob, sizeof(struct aiocb)); + error = copyin(ujob, kjob, sizeof(struct oaiocb)); + if (error) + return (error); + ojob = (struct oaiocb *)kjob; + return (convert_old_sigevent(&ojob->aio_sigevent, &kjob->aio_sigevent)); +} + +static int +aiocb_copyin(struct aiocb *ujob, struct aiocb *kjob) +{ + + return (copyin(ujob, kjob, sizeof(struct aiocb))); +} + +static long +aiocb_fetch_status(struct aiocb *ujob) +{ + + return (fuword(&ujob->_aiocb_private.status)); +} + +static long +aiocb_fetch_error(struct aiocb *ujob) +{ + + return (fuword(&ujob->_aiocb_private.error)); +} + +static int +aiocb_store_status(struct aiocb *ujob, long status) +{ + + return (suword(&ujob->_aiocb_private.status, status)); +} + +static int +aiocb_store_error(struct aiocb *ujob, long error) +{ + + return (suword(&ujob->_aiocb_private.error, error)); +} + +static int +aiocb_store_kernelinfo(struct aiocb *ujob, long jobref) +{ + + return (suword(&ujob->_aiocb_private.kernelinfo, jobref)); +} + +static int +aiocb_store_aiocb(struct aiocb **ujobp, struct aiocb *ujob) +{ + + return (suword(ujobp, (long)ujob)); +} + +static struct aiocb_ops aiocb_ops = { + .copyin = aiocb_copyin, + .fetch_status = aiocb_fetch_status, + .fetch_error = aiocb_fetch_error, + .store_status = aiocb_store_status, + .store_error = aiocb_store_error, + .store_kernelinfo = aiocb_store_kernelinfo, + .store_aiocb = aiocb_store_aiocb, +}; + +static struct aiocb_ops aiocb_ops_osigevent = { + .copyin = aiocb_copyin_old_sigevent, + .fetch_status = aiocb_fetch_status, + .fetch_error = aiocb_fetch_error, + .store_status = aiocb_store_status, + .store_error = aiocb_store_error, + .store_kernelinfo = aiocb_store_kernelinfo, + .store_aiocb = aiocb_store_aiocb, +}; + /* * Queue a new AIO request. Choosing either the threaded or direct physio VCHR * technique is done in this code. */ int aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj, - int type, int oldsigev) + int type, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct file *fp; @@ -1347,13 +1473,13 @@ aio_aqueue(struct thread *td, struct aio ki = p->p_aioinfo; - suword(&job->_aiocb_private.status, -1); - suword(&job->_aiocb_private.error, 0); - suword(&job->_aiocb_private.kernelinfo, -1); + ops->store_status(job, -1); + ops->store_error(job, 0); + ops->store_kernelinfo(job, -1); if (num_queue_count >= max_queue_count || ki->kaio_count >= ki->kaio_qallowed_count) { - suword(&job->_aiocb_private.error, EAGAIN); + ops->store_error(job, EAGAIN); return (EAGAIN); } @@ -1362,16 +1488,9 @@ aio_aqueue(struct thread *td, struct aio aiocbe->outputcharge = 0; knlist_init(&aiocbe->klist, AIO_MTX(ki), NULL, NULL, NULL); - if (oldsigev) { - bzero(&aiocbe->uaiocb, sizeof(struct aiocb)); - error = copyin(job, &aiocbe->uaiocb, sizeof(struct oaiocb)); - bcopy(&aiocbe->uaiocb.__spare__, &aiocbe->uaiocb.aio_sigevent, - sizeof(struct osigevent)); - } else { - error = copyin(job, &aiocbe->uaiocb, sizeof(struct aiocb)); - } + error = ops->copyin(job, &aiocbe->uaiocb); if (error) { - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); uma_zfree(aiocb_zone, aiocbe); return (error); } @@ -1380,11 +1499,11 @@ aio_aqueue(struct thread *td, struct aio aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_SIGNAL && aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_THREAD_ID && aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_NONE) { - suword(&job->_aiocb_private.error, EINVAL); + ops->store_error(job, EINVAL); uma_zfree(aiocb_zone, aiocbe); return (EINVAL); } - + if ((aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) && !_SIG_VALID(aiocbe->uaiocb.aio_sigevent.sigev_signo)) { @@ -1416,7 +1535,7 @@ aio_aqueue(struct thread *td, struct aio } if (error) { uma_zfree(aiocb_zone, aiocbe); - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); return (error); } @@ -1436,7 +1555,7 @@ aio_aqueue(struct thread *td, struct aio jid = jobrefid++; aiocbe->seqno = jobseqno++; mtx_unlock(&aio_job_mtx); - error = suword(&job->_aiocb_private.kernelinfo, jid); + error = ops->store_kernelinfo(job, jid); if (error) { error = EINVAL; goto aqueue_fail; @@ -1467,12 +1586,12 @@ aqueue_fail: if (error) { fdrop(fp, td); uma_zfree(aiocb_zone, aiocbe); - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); goto done; } no_kqueue: - suword(&job->_aiocb_private.error, EINPROGRESS); + ops->store_error(job, EINPROGRESS); aiocbe->uaiocb._aiocb_private.error = EINPROGRESS; aiocbe->userproc = p; aiocbe->cred = crhold(td->td_ucred); @@ -1528,7 +1647,7 @@ no_kqueue: #if 0 if (error > 0) { aiocbe->uaiocb._aiocb_private.error = error; - suword(&job->_aiocb_private.error, error); + ops->store_error(job, error); goto done; } #endif @@ -1643,19 +1762,17 @@ aio_kick_helper(void *context, int pendi * Support the aio_return system call, as a side-effect, kernel resources are * released. */ -int -aio_return(struct thread *td, struct aio_return_args *uap) +static int +kern_aio_return(struct thread *td, struct aiocb *uaiocb, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct aiocblist *cb; - struct aiocb *uaiocb; struct kaioinfo *ki; int status, error; ki = p->p_aioinfo; if (ki == NULL) return (EINVAL); - uaiocb = uap->aiocbp; AIO_LOCK(ki); TAILQ_FOREACH(cb, &ki->kaio_done, plist) { if (cb->uuaiocb == uaiocb) @@ -1675,8 +1792,8 @@ aio_return(struct thread *td, struct aio } aio_free_entry(cb); AIO_UNLOCK(ki); - suword(&uaiocb->_aiocb_private.error, error); - suword(&uaiocb->_aiocb_private.status, status); + ops->store_error(uaiocb, error); + ops->store_status(uaiocb, status); } else { error = EINVAL; AIO_UNLOCK(ki); @@ -1684,37 +1801,32 @@ aio_return(struct thread *td, struct aio return (error); } +int +aio_return(struct thread *td, struct aio_return_args *uap) +{ + + return (kern_aio_return(td, uap->aiocbp, &aiocb_ops)); +} + /* * Allow a process to wakeup when any of the I/O requests are completed. */ -int -aio_suspend(struct thread *td, struct aio_suspend_args *uap) +static int +kern_aio_suspend(struct thread *td, int njoblist, struct aiocb **ujoblist, + struct timespec *ts) { struct proc *p = td->td_proc; struct timeval atv; - struct timespec ts; - struct aiocb *const *cbptr, *cbp; struct kaioinfo *ki; struct aiocblist *cb, *cbfirst; - struct aiocb **ujoblist; - int njoblist; - int error; - int timo; - int i; - - if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) - return (EINVAL); + int error, i, timo; timo = 0; - if (uap->timeout) { - /* Get timespec struct. */ - if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) - return (error); - - if (ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000) + if (ts) { + if (ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) return (EINVAL); - TIMESPEC_TO_TIMEVAL(&atv, &ts); + TIMESPEC_TO_TIMEVAL(&atv, ts); if (itimerfix(&atv)) return (EINVAL); timo = tvtohz(&atv); @@ -1724,22 +1836,8 @@ aio_suspend(struct thread *td, struct ai if (ki == NULL) return (EAGAIN); - njoblist = 0; - ujoblist = uma_zalloc(aiol_zone, M_WAITOK); - cbptr = uap->aiocbp; - - for (i = 0; i < uap->nent; i++) { - cbp = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); - if (cbp == 0) - continue; - ujoblist[njoblist] = cbp; - njoblist++; - } - - if (njoblist == 0) { - uma_zfree(aiol_zone, ujoblist); + if (njoblist == 0) return (0); - } AIO_LOCK(ki); for (;;) { @@ -1769,6 +1867,31 @@ aio_suspend(struct thread *td, struct ai } RETURN: AIO_UNLOCK(ki); + return (error); +} + +int +aio_suspend(struct thread *td, struct aio_suspend_args *uap) +{ + struct timespec ts, *tsp; + struct aiocb **ujoblist; + int error; + + if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->timeout) { + /* Get timespec struct. */ + if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) + return (error); + tsp = &ts; + } else + tsp = NULL; + + ujoblist = uma_zalloc(aiol_zone, M_WAITOK); + error = copyin(uap->aiocbp, ujoblist, uap->nent * sizeof(ujoblist[0])); + if (error == 0) + error = kern_aio_suspend(td, uap->nent, ujoblist, tsp); uma_zfree(aiol_zone, ujoblist); return (error); } @@ -1876,8 +1999,8 @@ done: * only. For a user mode async implementation, it would be best to do it in * a userland subroutine. */ -int -aio_error(struct thread *td, struct aio_error_args *uap) +static int +kern_aio_error(struct thread *td, struct aiocb *aiocbp, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct aiocblist *cb; @@ -1892,7 +2015,7 @@ aio_error(struct thread *td, struct aio_ AIO_LOCK(ki); TAILQ_FOREACH(cb, &ki->kaio_all, allist) { - if (cb->uuaiocb == uap->aiocbp) { + if (cb->uuaiocb == aiocbp) { if (cb->jobstate == JOBST_JOBFINISHED) td->td_retval[0] = cb->uaiocb._aiocb_private.error; @@ -1907,9 +2030,9 @@ aio_error(struct thread *td, struct aio_ /* * Hack for failure of aio_aqueue. */ - status = fuword(&uap->aiocbp->_aiocb_private.status); + status = ops->fetch_status(aiocbp); if (status == -1) { - td->td_retval[0] = fuword(&uap->aiocbp->_aiocb_private.error); + td->td_retval[0] = ops->fetch_error(aiocbp); return (0); } @@ -1917,19 +2040,27 @@ aio_error(struct thread *td, struct aio_ return (0); } +int +aio_error(struct thread *td, struct aio_error_args *uap) +{ + + return (kern_aio_error(td, uap->aiocbp, &aiocb_ops)); +} + /* syscall - asynchronous read from a file (REALTIME) */ int oaio_read(struct thread *td, struct oaio_read_args *uap) { - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, 1); + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, + &aiocb_ops_osigevent)); } int aio_read(struct thread *td, struct aio_read_args *uap) { - return aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, 0); + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, &aiocb_ops)); } /* syscall - asynchronous write to a file (REALTIME) */ @@ -1937,47 +2068,34 @@ int oaio_write(struct thread *td, struct oaio_write_args *uap) { - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, 1); + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, + &aiocb_ops_osigevent)); } int aio_write(struct thread *td, struct aio_write_args *uap) { - return aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, 0); -} - -/* syscall - list directed I/O (REALTIME) */ -int -olio_listio(struct thread *td, struct olio_listio_args *uap) -{ - return do_lio_listio(td, (struct lio_listio_args *)uap, 1); -} - -/* syscall - list directed I/O (REALTIME) */ -int -lio_listio(struct thread *td, struct lio_listio_args *uap) -{ - return do_lio_listio(td, uap, 0); + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, &aiocb_ops)); } static int -do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev) +kern_lio_listio(struct thread *td, int mode, struct aiocb * const *uacb_list, + struct aiocb **acb_list, int nent, struct sigevent *sig, + struct aiocb_ops *ops) { struct proc *p = td->td_proc; - struct aiocb *iocb, * const *cbptr; + struct aiocb *iocb; struct kaioinfo *ki; struct aioliojob *lj; struct kevent kev; - int nent; int error; int nerror; int i; - if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + if ((mode != LIO_NOWAIT) && (mode != LIO_WAIT)) return (EINVAL); - nent = uap->nent; if (nent < 0 || nent > AIO_LISTIO_MAX) return (EINVAL); @@ -1996,21 +2114,13 @@ do_lio_listio(struct thread *td, struct /* * Setup signal. */ - if (uap->sig && (uap->mode == LIO_NOWAIT)) { - bzero(&lj->lioj_signal, sizeof(&lj->lioj_signal)); - error = copyin(uap->sig, &lj->lioj_signal, - oldsigev ? sizeof(struct osigevent) : - sizeof(struct sigevent)); - if (error) { - uma_zfree(aiolio_zone, lj); - return (error); - } - + if (sig && (mode == LIO_NOWAIT)) { + bcopy(sig, &lj->lioj_signal, sizeof(lj->lioj_signal)); if (lj->lioj_signal.sigev_notify == SIGEV_KEVENT) { /* Assume only new style KEVENT */ kev.filter = EVFILT_LIO; kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1; - kev.ident = (uintptr_t)uap->acb_list; /* something unique */ + kev.ident = (uintptr_t)uacb_list; /* something unique */ kev.data = (intptr_t)lj; /* pass user defined sigval data */ kev.udata = lj->lioj_signal.sigev_value.sival_ptr; @@ -2050,11 +2160,10 @@ do_lio_listio(struct thread *td, struct * Get pointers to the list of I/O requests. */ nerror = 0; - cbptr = uap->acb_list; - for (i = 0; i < uap->nent; i++) { - iocb = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); - if (((intptr_t)iocb != -1) && ((intptr_t)iocb != 0)) { - error = aio_aqueue(td, iocb, lj, LIO_NOP, oldsigev); + for (i = 0; i < nent; i++) { + iocb = acb_list[i]; + if (iocb != NULL) { + error = aio_aqueue(td, iocb, lj, LIO_NOP, ops); if (error != 0) nerror++; } @@ -2062,7 +2171,7 @@ do_lio_listio(struct thread *td, struct error = 0; AIO_LOCK(ki); - if (uap->mode == LIO_WAIT) { + if (mode == LIO_WAIT) { while (lj->lioj_count - 1 != lj->lioj_finished_count) { ki->kaio_flags |= KAIO_WAKEUP; error = msleep(&p->p_aioinfo, AIO_MTX(ki), @@ -2105,6 +2214,75 @@ do_lio_listio(struct thread *td, struct return (error); } +/* syscall - list directed I/O (REALTIME) */ +int +olio_listio(struct thread *td, struct olio_listio_args *uap) +{ + struct aiocb **acb_list; + struct sigevent *sigp, sig; + struct osigevent osig; + int error, nent; + + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + return (EINVAL); + + nent = uap->nent; + if (nent < 0 || nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->sig && (uap->mode == LIO_NOWAIT)) { + error = copyin(uap->sig, &osig, sizeof(osig)); + if (error) + return (error); + error = convert_old_sigevent(&osig, &sig); + if (error) + return (error); + sigp = &sig; + } else + sigp = NULL; + + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); + if (error == 0) + error = kern_lio_listio(td, uap->mode, + (struct aiocb * const *)uap->acb_list, acb_list, nent, sigp, + &aiocb_ops_osigevent); + free(acb_list, M_LIO); + return (error); +} + +/* syscall - list directed I/O (REALTIME) */ +int +lio_listio(struct thread *td, struct lio_listio_args *uap) +{ + struct aiocb **acb_list; + struct sigevent *sigp, sig; + int error, nent; + + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) + return (EINVAL); + + nent = uap->nent; + if (nent < 0 || nent > AIO_LISTIO_MAX) + return (EINVAL); + + if (uap->sig && (uap->mode == LIO_NOWAIT)) { + error = copyin(uap->sig, &sig, sizeof(sig)); + if (error) + return (error); + sigp = &sig; + } else + sigp = NULL; + + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); + if (error == 0) + error = kern_lio_listio(td, uap->mode, uap->acb_list, acb_list, + nent, sigp, &aiocb_ops); + free(acb_list, M_LIO); + return (error); +} + /* * Called from interrupt thread for physio, we should return as fast * as possible, so we schedule a biohelper task. @@ -2156,30 +2334,25 @@ biohelper(void *context, int pending) } /* syscall - wait for the next completion of an aio request */ -int -aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) +static int +kern_aio_waitcomplete(struct thread *td, struct aiocb **aiocbp, + struct timespec *ts, struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct timeval atv; - struct timespec ts; struct kaioinfo *ki; struct aiocblist *cb; struct aiocb *uuaiocb; int error, status, timo; - suword(uap->aiocbp, (long)NULL); + ops->store_aiocb(aiocbp, NULL); timo = 0; - if (uap->timeout) { - /* Get timespec struct. */ - error = copyin(uap->timeout, &ts, sizeof(ts)); - if (error) - return (error); - - if ((ts.tv_nsec < 0) || (ts.tv_nsec >= 1000000000)) + if (ts) { + if ((ts->tv_nsec < 0) || (ts->tv_nsec >= 1000000000)) return (EINVAL); - TIMESPEC_TO_TIMEVAL(&atv, &ts); + TIMESPEC_TO_TIMEVAL(&atv, ts); if (itimerfix(&atv)) return (EINVAL); timo = tvtohz(&atv); @@ -2217,9 +2390,9 @@ aio_waitcomplete(struct thread *td, stru } aio_free_entry(cb); AIO_UNLOCK(ki); - suword(uap->aiocbp, (long)uuaiocb); - suword(&uuaiocb->_aiocb_private.error, error); - suword(&uuaiocb->_aiocb_private.status, status); + ops->store_aiocb(aiocbp, uuaiocb); + ops->store_error(uuaiocb, error); + ops->store_status(uuaiocb, status); } else AIO_UNLOCK(ki); @@ -2227,17 +2400,43 @@ aio_waitcomplete(struct thread *td, stru } int -aio_fsync(struct thread *td, struct aio_fsync_args *uap) +aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) +{ + struct timespec ts, *tsp; + int error; + + if (uap->timeout) { + /* Get timespec struct. */ + error = copyin(uap->timeout, &ts, sizeof(ts)); + if (error) + return (error); + tsp = &ts; + } else + tsp = NULL; + + return (kern_aio_waitcomplete(td, uap->aiocbp, tsp, &aiocb_ops)); +} + +static int +kern_aio_fsync(struct thread *td, int op, struct aiocb *aiocbp, + struct aiocb_ops *ops) { struct proc *p = td->td_proc; struct kaioinfo *ki; - if (uap->op != O_SYNC) /* XXX lack of O_DSYNC */ + if (op != O_SYNC) /* XXX lack of O_DSYNC */ return (EINVAL); ki = p->p_aioinfo; if (ki == NULL) aio_init_aioinfo(p); - return aio_aqueue(td, uap->aiocbp, NULL, LIO_SYNC, 0); + return (aio_aqueue(td, aiocbp, NULL, LIO_SYNC, ops)); +} + +int +aio_fsync(struct thread *td, struct aio_fsync_args *uap) +{ + + return (kern_aio_fsync(td, uap->op, uap->aiocbp, &aiocb_ops)); } /* kqueue attach function */ @@ -2325,3 +2524,433 @@ filt_lio(struct knote *kn, long hint) return (lj->lioj_flags & LIOJ_KEVENT_POSTED); } + +#ifdef COMPAT_IA32 +#include +#include +#include +#include +#include +#include +#include + +struct __aiocb_private32 { + int32_t status; + int32_t error; + uint32_t kernelinfo; +}; + +typedef struct oaiocb32 { + int aio_fildes; /* File descriptor */ + uint64_t aio_offset __packed; /* File offset for I/O */ + uint32_t aio_buf; /* I/O buffer in process space */ + uint32_t aio_nbytes; /* Number of bytes for I/O */ + struct osigevent32 aio_sigevent; /* Signal to deliver */ + int aio_lio_opcode; /* LIO opcode */ + int aio_reqprio; /* Request priority -- ignored */ + struct __aiocb_private32 _aiocb_private; +} oaiocb32_t; + +typedef struct aiocb32 { + int32_t aio_fildes; /* File descriptor */ + uint64_t aio_offset __packed; /* File offset for I/O */ + uint32_t aio_buf; /* I/O buffer in process space */ + uint32_t aio_nbytes; /* Number of bytes for I/O */ + int __spare__[2]; + uint32_t __spare2__; + int aio_lio_opcode; /* LIO opcode */ + int aio_reqprio; /* Request priority -- ignored */ + struct __aiocb_private32 _aiocb_private; + struct sigevent32 aio_sigevent; /* Signal to deliver */ +} aiocb32_t; + +static int +convert_old_sigevent32(struct osigevent32 *osig, struct sigevent *nsig) +{ + + /* + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are + * supported by AIO with the old sigevent structure. + */ + CP(*osig, *nsig, sigev_notify); + switch (nsig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_SIGNAL: + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; + break; + case SIGEV_KEVENT: + nsig->sigev_notify_kqueue = + osig->__sigev_u.__sigev_notify_kqueue; + PTRIN_CP(*osig, *nsig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb32_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) +{ + struct oaiocb32 job32; + int error; + + bzero(kjob, sizeof(struct aiocb)); + error = copyin(ujob, &job32, sizeof(job32)); + if (error) + return (error); + + CP(job32, *kjob, aio_fildes); + CP(job32, *kjob, aio_offset); + PTRIN_CP(job32, *kjob, aio_buf); + CP(job32, *kjob, aio_nbytes); + CP(job32, *kjob, aio_lio_opcode); + CP(job32, *kjob, aio_reqprio); + CP(job32, *kjob, _aiocb_private.status); + CP(job32, *kjob, _aiocb_private.error); + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); + return (convert_old_sigevent32(&job32.aio_sigevent, + &kjob->aio_sigevent)); +} + +static int +convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig) +{ + + CP(*sig32, *sig, sigev_notify); + switch (sig->sigev_notify) { + case SIGEV_NONE: + break; + case SIGEV_THREAD_ID: + CP(*sig32, *sig, sigev_notify_thread_id); + /* FALLTHROUGH */ + case SIGEV_SIGNAL: + CP(*sig32, *sig, sigev_signo); + break; + case SIGEV_KEVENT: + CP(*sig32, *sig, sigev_notify_kqueue); + PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr); + break; + default: + return (EINVAL); + } + return (0); +} + +static int +aiocb32_copyin(struct aiocb *ujob, struct aiocb *kjob) +{ + struct aiocb32 job32; + int error; + + error = copyin(ujob, &job32, sizeof(job32)); + if (error) + return (error); + CP(job32, *kjob, aio_fildes); + CP(job32, *kjob, aio_offset); + PTRIN_CP(job32, *kjob, aio_buf); + CP(job32, *kjob, aio_nbytes); + CP(job32, *kjob, aio_lio_opcode); + CP(job32, *kjob, aio_reqprio); + CP(job32, *kjob, _aiocb_private.status); + CP(job32, *kjob, _aiocb_private.error); + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); + return (convert_sigevent32(&job32.aio_sigevent, &kjob->aio_sigevent)); +} + +static long +aiocb32_fetch_status(struct aiocb *ujob) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (fuword32(&ujob32->_aiocb_private.status)); +} + +static long +aiocb32_fetch_error(struct aiocb *ujob) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (fuword32(&ujob32->_aiocb_private.error)); +} + +static int +aiocb32_store_status(struct aiocb *ujob, long status) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; + return (suword32(&ujob32->_aiocb_private.status, status)); +} + +static int +aiocb32_store_error(struct aiocb *ujob, long error) +{ + struct aiocb32 *ujob32; + + ujob32 = (struct aiocb32 *)ujob; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:57:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3648F106564A; Wed, 10 Dec 2008 20:57:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 237378FC1A; Wed, 10 Dec 2008 20:57:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKvHk9042443; Wed, 10 Dec 2008 20:57:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKvHXq042439; Wed, 10 Dec 2008 20:57:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812102057.mBAKvHXq042439@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Dec 2008 20:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185879 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:57:17 -0000 Author: jhb Date: Wed Dec 10 20:57:16 2008 New Revision: 185879 URL: http://svn.freebsd.org/changeset/base/185879 Log: Regen. Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Wed Dec 10 20:56:19 2008 (r185878) +++ head/sys/compat/freebsd32/freebsd32_proto.h Wed Dec 10 20:57:16 2008 (r185879) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185435 2008-11-29 14:32:14Z bz + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185878 2008-12-10 20:56:19Z jhb */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -215,6 +215,18 @@ struct freebsd32_nanosleep_args { char rqtp_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * rqtp; char rqtp_r_[PADR_(const struct timespec32 *)]; char rmtp_l_[PADL_(struct timespec32 *)]; struct timespec32 * rmtp; char rmtp_r_[PADR_(struct timespec32 *)]; }; +struct freebsd32_aio_read_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_write_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_lio_listio_args { + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char acb_list_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * acb_list; char acb_list_r_[PADR_(struct aiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char sig_l_[PADL_(struct sigevent *)]; struct sigevent * sig; char sig_r_[PADR_(struct sigevent *)]; +}; struct freebsd32_lutimes_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; char tptr_l_[PADL_(struct timeval32 *)]; struct timeval32 * tptr; char tptr_r_[PADR_(struct timeval32 *)]; @@ -235,6 +247,33 @@ struct freebsd32_modstat_args { char modid_l_[PADL_(int)]; int modid; char modid_r_[PADR_(int)]; char stat_l_[PADL_(struct module_stat32 *)]; struct module_stat32 * stat; char stat_r_[PADR_(struct module_stat32 *)]; }; +struct freebsd32_aio_return_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_suspend_args { + char aiocbp_l_[PADL_(struct aiocb32 *const *)]; struct aiocb32 *const * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; +}; +struct freebsd32_aio_cancel_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_aio_error_args { + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; +struct freebsd32_oaio_read_args { + char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; +}; +struct freebsd32_oaio_write_args { + char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)]; +}; +struct freebsd32_olio_listio_args { + char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)]; + char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)]; + char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)]; + char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)]; +}; struct freebsd32_jail_args { char jail_l_[PADL_(struct jail32 *)]; struct jail32 * jail; char jail_r_[PADR_(struct jail32 *)]; }; @@ -247,6 +286,10 @@ struct freebsd32_sigwaitinfo_args { char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; char info_l_[PADL_(siginfo_t *)]; siginfo_t * info; char info_r_[PADR_(siginfo_t *)]; }; +struct freebsd32_aio_waitcomplete_args { + char aiocbp_l_[PADL_(struct aiocb32 **)]; struct aiocb32 ** aiocbp; char aiocbp_r_[PADR_(struct aiocb32 **)]; + char timeout_l_[PADL_(struct timespec32 *)]; struct timespec32 * timeout; char timeout_r_[PADR_(struct timespec32 *)]; +}; struct freebsd32_kevent_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char changelist_l_[PADL_(const struct kevent32 *)]; const struct kevent32 * changelist; char changelist_r_[PADR_(const struct kevent32 *)]; @@ -308,6 +351,10 @@ struct freebsd32_thr_new_args { char param_l_[PADL_(struct thr_param32 *)]; struct thr_param32 * param; char param_r_[PADR_(struct thr_param32 *)]; char param_size_l_[PADL_(int)]; int param_size; char param_size_r_[PADR_(int)]; }; +struct freebsd32_aio_fsync_args { + char op_l_[PADL_(int)]; int op; char op_r_[PADR_(int)]; + char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)]; +}; struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; @@ -427,13 +474,24 @@ int freebsd32_clock_gettime(struct threa int freebsd32_clock_settime(struct thread *, struct freebsd32_clock_settime_args *); int freebsd32_clock_getres(struct thread *, struct freebsd32_clock_getres_args *); int freebsd32_nanosleep(struct thread *, struct freebsd32_nanosleep_args *); +int freebsd32_aio_read(struct thread *, struct freebsd32_aio_read_args *); +int freebsd32_aio_write(struct thread *, struct freebsd32_aio_write_args *); +int freebsd32_lio_listio(struct thread *, struct freebsd32_lio_listio_args *); int freebsd32_lutimes(struct thread *, struct freebsd32_lutimes_args *); int freebsd32_preadv(struct thread *, struct freebsd32_preadv_args *); int freebsd32_pwritev(struct thread *, struct freebsd32_pwritev_args *); int freebsd32_modstat(struct thread *, struct freebsd32_modstat_args *); +int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *); +int freebsd32_aio_suspend(struct thread *, struct freebsd32_aio_suspend_args *); +int freebsd32_aio_cancel(struct thread *, struct freebsd32_aio_cancel_args *); +int freebsd32_aio_error(struct thread *, struct freebsd32_aio_error_args *); +int freebsd32_oaio_read(struct thread *, struct freebsd32_oaio_read_args *); +int freebsd32_oaio_write(struct thread *, struct freebsd32_oaio_write_args *); +int freebsd32_olio_listio(struct thread *, struct freebsd32_olio_listio_args *); int freebsd32_jail(struct thread *, struct freebsd32_jail_args *); int freebsd32_sigtimedwait(struct thread *, struct freebsd32_sigtimedwait_args *); int freebsd32_sigwaitinfo(struct thread *, struct freebsd32_sigwaitinfo_args *); +int freebsd32_aio_waitcomplete(struct thread *, struct freebsd32_aio_waitcomplete_args *); int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); int freebsd32_nmount(struct thread *, struct freebsd32_nmount_args *); int freebsd32_sendfile(struct thread *, struct freebsd32_sendfile_args *); @@ -447,6 +505,7 @@ int freebsd32_umtx_unlock(struct thread int freebsd32_thr_suspend(struct thread *, struct freebsd32_thr_suspend_args *); int freebsd32_umtx_op(struct thread *, struct freebsd32_umtx_op_args *); int freebsd32_thr_new(struct thread *, struct freebsd32_thr_new_args *); +int freebsd32_aio_fsync(struct thread *, struct freebsd32_aio_fsync_args *); int freebsd32_pread(struct thread *, struct freebsd32_pread_args *); int freebsd32_pwrite(struct thread *, struct freebsd32_pwrite_args *); int freebsd32_mmap(struct thread *, struct freebsd32_mmap_args *); @@ -641,13 +700,24 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_clock_settime AUE_CLOCK_SETTIME #define FREEBSD32_SYS_AUE_freebsd32_clock_getres AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nanosleep AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_read AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_write AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_lio_listio AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_lutimes AUE_LUTIMES #define FREEBSD32_SYS_AUE_freebsd32_preadv AUE_PREADV #define FREEBSD32_SYS_AUE_freebsd32_pwritev AUE_PWRITEV #define FREEBSD32_SYS_AUE_freebsd32_modstat AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_suspend AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_cancel AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_error AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_oaio_read AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_oaio_write AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_olio_listio AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_jail AUE_JAIL #define FREEBSD32_SYS_AUE_freebsd32_sigtimedwait AUE_SIGWAIT #define FREEBSD32_SYS_AUE_freebsd32_sigwaitinfo AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_waitcomplete AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_nmount AUE_NMOUNT #define FREEBSD32_SYS_AUE_freebsd32_sendfile AUE_SENDFILE @@ -661,6 +731,7 @@ int freebsd6_freebsd32_ftruncate(struct #define FREEBSD32_SYS_AUE_freebsd32_thr_suspend AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_umtx_op AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_thr_new AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_aio_fsync AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_pread AUE_PREAD #define FREEBSD32_SYS_AUE_freebsd32_pwrite AUE_PWRITE #define FREEBSD32_SYS_AUE_freebsd32_mmap AUE_MMAP Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Wed Dec 10 20:56:19 2008 (r185878) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Wed Dec 10 20:57:16 2008 (r185879) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185435 2008-11-29 14:32:14Z bz + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185878 2008-12-10 20:56:19Z jhb */ #define FREEBSD32_SYS_syscall 0 @@ -210,6 +210,9 @@ #define FREEBSD32_SYS_openbsd_poll 252 #define FREEBSD32_SYS_issetugid 253 #define FREEBSD32_SYS_lchown 254 +#define FREEBSD32_SYS_freebsd32_aio_read 255 +#define FREEBSD32_SYS_freebsd32_aio_write 256 +#define FREEBSD32_SYS_freebsd32_lio_listio 257 #define FREEBSD32_SYS_getdents 272 #define FREEBSD32_SYS_lchmod 274 #define FREEBSD32_SYS_netbsd_lchown 275 @@ -237,6 +240,13 @@ #define FREEBSD32_SYS_setresuid 311 #define FREEBSD32_SYS_setresgid 312 /* 313 is obsolete signanosleep */ +#define FREEBSD32_SYS_freebsd32_aio_return 314 +#define FREEBSD32_SYS_freebsd32_aio_suspend 315 +#define FREEBSD32_SYS_freebsd32_aio_cancel 316 +#define FREEBSD32_SYS_freebsd32_aio_error 317 +#define FREEBSD32_SYS_freebsd32_oaio_read 318 +#define FREEBSD32_SYS_freebsd32_oaio_write 319 +#define FREEBSD32_SYS_freebsd32_olio_listio 320 #define FREEBSD32_SYS_yield 321 /* 322 is obsolete thr_sleep */ /* 323 is obsolete thr_wakeup */ @@ -274,6 +284,7 @@ #define FREEBSD32_SYS_extattr_set_file 356 #define FREEBSD32_SYS_extattr_get_file 357 #define FREEBSD32_SYS_extattr_delete_file 358 +#define FREEBSD32_SYS_freebsd32_aio_waitcomplete 359 #define FREEBSD32_SYS_getresuid 360 #define FREEBSD32_SYS_getresgid 361 #define FREEBSD32_SYS_kqueue 362 @@ -321,6 +332,7 @@ #define FREEBSD32_SYS_sigqueue 456 #define FREEBSD32_SYS_abort2 463 #define FREEBSD32_SYS_thr_set_name 464 +#define FREEBSD32_SYS_freebsd32_aio_fsync 465 #define FREEBSD32_SYS_rtprio_thread 466 #define FREEBSD32_SYS_sctp_peeloff 471 #define FREEBSD32_SYS_sctp_generic_sendmsg 472 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Wed Dec 10 20:56:19 2008 (r185878) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Wed Dec 10 20:57:16 2008 (r185879) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185435 2008-11-29 14:32:14Z bz + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185878 2008-12-10 20:56:19Z jhb */ const char *freebsd32_syscallnames[] = { @@ -262,9 +262,9 @@ const char *freebsd32_syscallnames[] = { "openbsd_poll", /* 252 = openbsd_poll */ "issetugid", /* 253 = issetugid */ "lchown", /* 254 = lchown */ - "#255", /* 255 = nosys */ - "#256", /* 256 = nosys */ - "#257", /* 257 = nosys */ + "freebsd32_aio_read", /* 255 = freebsd32_aio_read */ + "freebsd32_aio_write", /* 256 = freebsd32_aio_write */ + "freebsd32_lio_listio", /* 257 = freebsd32_lio_listio */ "#258", /* 258 = nosys */ "#259", /* 259 = nosys */ "#260", /* 260 = nosys */ @@ -321,13 +321,13 @@ const char *freebsd32_syscallnames[] = { "setresuid", /* 311 = setresuid */ "setresgid", /* 312 = setresgid */ "obs_signanosleep", /* 313 = obsolete signanosleep */ - "#314", /* 314 = aio_return */ - "#315", /* 315 = aio_suspend */ - "#316", /* 316 = aio_cancel */ - "#317", /* 317 = aio_error */ - "#318", /* 318 = aio_read */ - "#319", /* 319 = aio_write */ - "#320", /* 320 = lio_listio */ + "freebsd32_aio_return", /* 314 = freebsd32_aio_return */ + "freebsd32_aio_suspend", /* 315 = freebsd32_aio_suspend */ + "freebsd32_aio_cancel", /* 316 = freebsd32_aio_cancel */ + "freebsd32_aio_error", /* 317 = freebsd32_aio_error */ + "freebsd32_oaio_read", /* 318 = freebsd32_oaio_read */ + "freebsd32_oaio_write", /* 319 = freebsd32_oaio_write */ + "freebsd32_olio_listio", /* 320 = freebsd32_olio_listio */ "yield", /* 321 = yield */ "obs_thr_sleep", /* 322 = obsolete thr_sleep */ "obs_thr_wakeup", /* 323 = obsolete thr_wakeup */ @@ -366,7 +366,7 @@ const char *freebsd32_syscallnames[] = { "extattr_set_file", /* 356 = extattr_set_file */ "extattr_get_file", /* 357 = extattr_get_file */ "extattr_delete_file", /* 358 = extattr_delete_file */ - "#359", /* 359 = aio_waitcomplete */ + "freebsd32_aio_waitcomplete", /* 359 = freebsd32_aio_waitcomplete */ "getresuid", /* 360 = getresuid */ "getresgid", /* 361 = getresgid */ "kqueue", /* 362 = kqueue */ @@ -472,7 +472,7 @@ const char *freebsd32_syscallnames[] = { "#462", /* 462 = kmq_unlink */ "abort2", /* 463 = abort2 */ "thr_set_name", /* 464 = thr_set_name */ - "#465", /* 465 = aio_fsync */ + "freebsd32_aio_fsync", /* 465 = freebsd32_aio_fsync */ "rtprio_thread", /* 466 = rtprio_thread */ "#467", /* 467 = nosys */ "#468", /* 468 = nosys */ Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Wed Dec 10 20:56:19 2008 (r185878) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Wed Dec 10 20:57:16 2008 (r185879) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185435 2008-11-29 14:32:14Z bz + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 185878 2008-12-10 20:56:19Z jhb */ #include "opt_compat.h" @@ -293,9 +293,9 @@ struct sysent freebsd32_sysent[] = { { AS(openbsd_poll_args), (sy_call_t *)openbsd_poll, AUE_POLL, NULL, 0, 0 }, /* 252 = openbsd_poll */ { 0, (sy_call_t *)issetugid, AUE_ISSETUGID, NULL, 0, 0 }, /* 253 = issetugid */ { AS(lchown_args), (sy_call_t *)lchown, AUE_LCHOWN, NULL, 0, 0 }, /* 254 = lchown */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 255 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 256 = nosys */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 257 = nosys */ + { AS(freebsd32_aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 255 = freebsd32_aio_read */ + { AS(freebsd32_aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 256 = freebsd32_aio_write */ + { AS(freebsd32_lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 257 = freebsd32_lio_listio */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 258 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 259 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 260 = nosys */ @@ -352,13 +352,13 @@ struct sysent freebsd32_sysent[] = { { AS(setresuid_args), (sy_call_t *)setresuid, AUE_SETRESUID, NULL, 0, 0 }, /* 311 = setresuid */ { AS(setresgid_args), (sy_call_t *)setresgid, AUE_SETRESGID, NULL, 0, 0 }, /* 312 = setresgid */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 313 = obsolete signanosleep */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 314 = aio_return */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 315 = aio_suspend */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 316 = aio_cancel */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 317 = aio_error */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 318 = aio_read */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 319 = aio_write */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 320 = lio_listio */ + { AS(freebsd32_aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 314 = freebsd32_aio_return */ + { AS(freebsd32_aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 315 = freebsd32_aio_suspend */ + { AS(freebsd32_aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 316 = freebsd32_aio_cancel */ + { AS(freebsd32_aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 317 = freebsd32_aio_error */ + { AS(freebsd32_oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 318 = freebsd32_oaio_read */ + { AS(freebsd32_oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 319 = freebsd32_oaio_write */ + { AS(freebsd32_olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 320 = freebsd32_olio_listio */ { 0, (sy_call_t *)yield, AUE_NULL, NULL, 0, 0 }, /* 321 = yield */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 322 = obsolete thr_sleep */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 323 = obsolete thr_wakeup */ @@ -397,7 +397,7 @@ struct sysent freebsd32_sysent[] = { { AS(extattr_set_file_args), (sy_call_t *)extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0 }, /* 356 = extattr_set_file */ { AS(extattr_get_file_args), (sy_call_t *)extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0 }, /* 357 = extattr_get_file */ { AS(extattr_delete_file_args), (sy_call_t *)extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0 }, /* 358 = extattr_delete_file */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 359 = aio_waitcomplete */ + { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 359 = freebsd32_aio_waitcomplete */ { AS(getresuid_args), (sy_call_t *)getresuid, AUE_GETRESUID, NULL, 0, 0 }, /* 360 = getresuid */ { AS(getresgid_args), (sy_call_t *)getresgid, AUE_GETRESGID, NULL, 0, 0 }, /* 361 = getresgid */ { 0, (sy_call_t *)kqueue, AUE_KQUEUE, NULL, 0, 0 }, /* 362 = kqueue */ @@ -503,7 +503,7 @@ struct sysent freebsd32_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 462 = kmq_unlink */ { AS(abort2_args), (sy_call_t *)abort2, AUE_NULL, NULL, 0, 0 }, /* 463 = abort2 */ { AS(thr_set_name_args), (sy_call_t *)thr_set_name, AUE_NULL, NULL, 0, 0 }, /* 464 = thr_set_name */ - { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 465 = aio_fsync */ + { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0 }, /* 465 = freebsd32_aio_fsync */ { AS(rtprio_thread_args), (sy_call_t *)rtprio_thread, AUE_RTPRIO, NULL, 0, 0 }, /* 466 = rtprio_thread */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 467 = nosys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 468 = nosys */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 20:59:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18DF11065672; Wed, 10 Dec 2008 20:59:27 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 044BE8FC08; Wed, 10 Dec 2008 20:59:27 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAKxR5o042544; Wed, 10 Dec 2008 20:59:27 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAKxQu3042532; Wed, 10 Dec 2008 20:59:26 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102059.mBAKxQu3042532@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 20:59:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185880 - in vendor/pf/dist: authpf ftp-proxy man pfctl pflogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 20:59:27 -0000 Author: mlaier Date: Wed Dec 10 20:59:26 2008 New Revision: 185880 URL: http://svn.freebsd.org/changeset/base/185880 Log: Import OPENBSD_4_3_BASE Modified: vendor/pf/dist/authpf/Makefile vendor/pf/dist/authpf/authpf.8 vendor/pf/dist/authpf/authpf.c vendor/pf/dist/authpf/pathnames.h vendor/pf/dist/ftp-proxy/filter.c vendor/pf/dist/ftp-proxy/ftp-proxy.8 vendor/pf/dist/ftp-proxy/ftp-proxy.c vendor/pf/dist/man/pf.4 vendor/pf/dist/man/pf.conf.5 vendor/pf/dist/man/pfsync.4 vendor/pf/dist/pfctl/parse.y vendor/pf/dist/pfctl/pf_print_state.c vendor/pf/dist/pfctl/pfctl.c vendor/pf/dist/pfctl/pfctl.h vendor/pf/dist/pfctl/pfctl_altq.c vendor/pf/dist/pfctl/pfctl_optimize.c vendor/pf/dist/pfctl/pfctl_parser.c vendor/pf/dist/pfctl/pfctl_parser.h vendor/pf/dist/pfctl/pfctl_qstats.c vendor/pf/dist/pfctl/pfctl_radix.c vendor/pf/dist/pflogd/pflogd.8 Modified: vendor/pf/dist/authpf/Makefile ============================================================================== --- vendor/pf/dist/authpf/Makefile Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/authpf/Makefile Wed Dec 10 20:59:26 2008 (r185880) @@ -1,7 +1,11 @@ -# $OpenBSD: Makefile,v 1.12 2004/04/25 19:24:52 deraadt Exp $ +# $OpenBSD: Makefile,v 1.13 2008/02/14 01:49:17 mcbride Exp $ PROG= authpf MAN= authpf.8 + +LINKS= ${BINDIR}/authpf ${BINDIR}/authpf-noip +MLINKS+=authpf.8 authpf-noip.8 + BINOWN= root BINGRP= authpf BINMODE= 6555 Modified: vendor/pf/dist/authpf/authpf.8 ============================================================================== --- vendor/pf/dist/authpf/authpf.8 Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/authpf/authpf.8 Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -.\" $OpenBSD: authpf.8,v 1.44 2007/05/31 19:20:22 jmc Exp $ +.\" $OpenBSD: authpf.8,v 1.45 2008/02/14 01:49:17 mcbride Exp $ .\" .\" Copyright (c) 1998-2007 Bob Beck (beck@openbsd.org>. All rights reserved. .\" @@ -14,14 +14,16 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate$ +.Dd $Mdocdate: May 31 2007 $ .Dt AUTHPF 8 .Os .Sh NAME -.Nm authpf +.Nm authpf , +.Nm authpf-noip .Nd authenticating gateway user shell .Sh SYNOPSIS .Nm authpf +.Nm authpf-noip .Sh DESCRIPTION .Nm is a user shell for authenticating gateways. @@ -30,43 +32,63 @@ It is used to change rules when a user authenticates and starts a session with .Xr sshd 8 and to undo these changes when the user's session exits. -It is designed for changing filter and translation rules for an individual -source IP address as long as a user maintains an active -.Xr ssh 1 -session. Typical use would be for a gateway that authenticates users before allowing them Internet use, or a gateway that allows different users into different places. +Combined with properly set up filter rules and secure switches, .Nm -logs the successful start and end of a session to -.Xr syslogd 8 . -This, combined with properly set up filter rules and secure switches, can be used to ensure users are held accountable for their network traffic. -.Pp -.Nm -can add filter and translation rules using the syntax described in -.Xr pf.conf 5 . -.Nm -requires that the +It is meant to be used with users who can connect via +.Xr ssh 1 +only, and requires the .Xr pf 4 -system be enabled before use. +subsystem to be enabled. +.Pp +.Nm authpf-noip +is a user shell +which allows multiple connections to take +place from the same IP address. +It is useful primarily in cases where connections are tunneled via +the gateway system, and can be directly associated with the user name. +It cannot ensure accountability when +classifying connections by IP address; +in this case the client's IP address +is not provided to the packet filter via the +.Ar client_ip +macro or the +.Ar authpf users +table. +Additionally, states associated with the client IP address +are not purged when the session is ended. +.Pp +To use either .Nm -can also maintain the list of IP address of connected users -in the "authpf_users" -.Pa table . +or +.Nm authpf-noip , +the user's shell needs to be set to +.Pa /usr/sbin/authpf +or +.Pa /usr/sbin/authpf-noip . .Pp .Nm -is meant to be used with users who can connect via +uses the +.Xr pf.conf 5 +syntax to change filter and translation rules for an individual +user or client IP address as long as a user maintains an active .Xr ssh 1 -only. -On startup, +session, and logs the successful start and end of a session to +.Xr syslogd 8 . .Nm retrieves the client's connecting IP address via the .Ev SSH_CLIENT environment variable and, after performing additional access checks, reads a template file to determine what filter and translation rules -(if any) to add. -On session exit the same rules that were added at startup are removed. +(if any) to add, and +maintains the list of IP addresses of connected users in the +.Ar authpf_users +table. +On session exit the same rules and table entries that were added at startup +are removed, and all states associated with the client's IP address are purged. .Pp Each .Nm @@ -496,6 +518,31 @@ table persist anchor "authpf/*" from rdr-anchor "authpf/*" from .Ed +.Pp +.Sy Tunneled users +\- normally +.Nm +allows only one session per client IP address. +However in some cases, such as when connections are tunneled via +.Xr ssh 1 +or +.Xr ipsec 4 , +the connections can be authorized based on the userid of the user instead of +the client IP address. +In this case it is appropriate to use +.Nm authpf-noip +to allow multiple users behind a NAT gateway to connect. +In the +.Pa /etc/authpf/authpf.rules +example below, the remote user could tunnel a remote desktop session to their +workstation: +.Bd -literal +internal_if="bge0" +workstation_ip="10.2.3.4" + +pass out on $internal_if from (self) to $workstation_ip port 3389 \e + user $user_id +.Ed .Sh FILES .Bl -tag -width "/etc/authpf/authpf.conf" -compact .It Pa /etc/authpf/authpf.conf Modified: vendor/pf/dist/authpf/authpf.c ============================================================================== --- vendor/pf/dist/authpf/authpf.c Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/authpf/authpf.c Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -/* $OpenBSD: authpf.c,v 1.104 2007/02/24 17:35:08 beck Exp $ */ +/* $OpenBSD: authpf.c,v 1.107 2008/02/14 01:49:17 mcbride Exp $ */ /* * Copyright (C) 1998 - 2007 Bob Beck (beck@openbsd.org). @@ -46,6 +46,7 @@ static void print_message(char *); static int allowed_luser(char *); static int check_luser(char *, char *); static int remove_stale_rulesets(void); +static int recursive_ruleset_purge(char *, char *); static int change_filter(int, const char *, const char *); static int change_table(int, const char *); static void authpf_kill_states(void); @@ -54,6 +55,7 @@ int dev; /* pf device */ char anchorname[PF_ANCHOR_NAME_SIZE] = "authpf"; char rulesetname[MAXPATHLEN - PF_ANCHOR_NAME_SIZE - 2]; char tablename[PF_TABLE_NAME_SIZE] = "authpf_users"; +int user_ip = 1; /* controls whether $user_ip is set */ FILE *pidfp; char luser[MAXLOGNAME]; /* username */ @@ -65,6 +67,7 @@ struct timeval Tstart, Tend; /* start an volatile sig_atomic_t want_death; static void need_death(int signo); static __dead void do_death(int); +extern char *__progname; /* program name */ /* * User shell for authenticating gateways. Sole purpose is to allow @@ -85,6 +88,9 @@ main(int argc, char *argv[]) char *shell; login_cap_t *lc; + if (strcmp(__progname, "-authpf-noip") == 0) + user_ip = 0; + config = fopen(PATH_CONFFILE, "r"); if (config == NULL) { syslog(LOG_ERR, "can not open %s (%m)", PATH_CONFFILE); @@ -139,7 +145,8 @@ main(int argc, char *argv[]) login_close(lc); - if (strcmp(shell, PATH_AUTHPF_SHELL)) { + if (strcmp(shell, PATH_AUTHPF_SHELL) && + strcmp(shell, PATH_AUTHPF_SHELL_NOIP)) { syslog(LOG_ERR, "wrong shell for user %s, uid %u", pw->pw_name, pw->pw_uid); if (shell != pw->pw_shell) @@ -171,8 +178,9 @@ main(int argc, char *argv[]) } - /* Make our entry in /var/authpf as /var/authpf/ipaddr */ - n = snprintf(pidfile, sizeof(pidfile), "%s/%s", PATH_PIDFILE, ipsrc); + /* Make our entry in /var/authpf as ipaddr or username */ + n = snprintf(pidfile, sizeof(pidfile), "%s/%s", + PATH_PIDFILE, user_ip ? ipsrc : luser); if (n < 0 || (u_int)n >= sizeof(pidfile)) { syslog(LOG_ERR, "path to pidfile too long"); goto die; @@ -292,7 +300,7 @@ main(int argc, char *argv[]) printf("Unable to modify filters\r\n"); do_death(0); } - if (change_table(1, ipsrc) == -1) { + if (user_ip && change_table(1, ipsrc) == -1) { printf("Unable to modify table\r\n"); change_filter(0, luser, ipsrc); do_death(0); @@ -349,6 +357,8 @@ read_config(FILE *f) } i++; len = strlen(buf); + if (len == 0) + continue; if (buf[len - 1] != '\n' && !feof(f)) { syslog(LOG_ERR, "line %d too long in %s", i, PATH_CONFFILE); @@ -569,7 +579,7 @@ static int remove_stale_rulesets(void) { struct pfioc_ruleset prs; - u_int32_t nr, mnr; + u_int32_t nr; memset(&prs, 0, sizeof(prs)); strlcpy(prs.path, anchorname, sizeof(prs.path)); @@ -580,13 +590,12 @@ remove_stale_rulesets(void) return (1); } - mnr = prs.nr; - nr = 0; - while (nr < mnr) { + nr = prs.nr; + while (nr) { char *s, *t; pid_t pid; - prs.nr = nr; + prs.nr = nr - 1; if (ioctl(dev, DIOCGETRULESET, &prs)) return (1); errno = 0; @@ -598,111 +607,156 @@ remove_stale_rulesets(void) if (!prs.name[0] || errno || (*s && (t == prs.name || *s != ')'))) return (1); - if (kill(pid, 0) && errno != EPERM) { - int i; - struct pfioc_trans_e t_e[PF_RULESET_MAX+1]; - struct pfioc_trans t; - - bzero(&t, sizeof(t)); - bzero(t_e, sizeof(t_e)); - t.size = PF_RULESET_MAX+1; - t.esize = sizeof(t_e[0]); - t.array = t_e; - for (i = 0; i < PF_RULESET_MAX+1; ++i) { - t_e[i].rs_num = i; - snprintf(t_e[i].anchor, sizeof(t_e[i].anchor), - "%s/%s", anchorname, prs.name); - } - t_e[PF_RULESET_MAX].rs_num = PF_RULESET_TABLE; - if ((ioctl(dev, DIOCXBEGIN, &t) || - ioctl(dev, DIOCXCOMMIT, &t)) && - errno != EINVAL) + if ((kill(pid, 0) && errno != EPERM) || pid == getpid()) { + if (recursive_ruleset_purge(anchorname, prs.name)) return (1); - mnr--; - } else - nr++; + } + nr--; } return (0); } +static int +recursive_ruleset_purge(char *an, char *rs) +{ + struct pfioc_trans_e *t_e = NULL; + struct pfioc_trans *t = NULL; + struct pfioc_ruleset *prs = NULL; + int i; + + + /* purge rules */ + errno = 0; + if ((t = calloc(1, sizeof(struct pfioc_trans))) == NULL) + goto no_mem; + if ((t_e = calloc(PF_RULESET_MAX+1, + sizeof(struct pfioc_trans_e))) == NULL) + goto no_mem; + t->size = PF_RULESET_MAX+1; + t->esize = sizeof(struct pfioc_trans_e); + t->array = t_e; + for (i = 0; i < PF_RULESET_MAX+1; ++i) { + t_e[i].rs_num = i; + snprintf(t_e[i].anchor, sizeof(t_e[i].anchor), "%s/%s", an, rs); + } + t_e[PF_RULESET_MAX].rs_num = PF_RULESET_TABLE; + if ((ioctl(dev, DIOCXBEGIN, t) || + ioctl(dev, DIOCXCOMMIT, t)) && + errno != EINVAL) + goto cleanup; + + /* purge any children */ + if ((prs = calloc(1, sizeof(struct pfioc_ruleset))) == NULL) + goto no_mem; + snprintf(prs->path, sizeof(prs->path), "%s/%s", an, rs); + if (ioctl(dev, DIOCGETRULESETS, prs)) { + if (errno != EINVAL) + goto cleanup; + errno = 0; + } else { + int nr = prs->nr; + + while (nr) { + prs->nr = 0; + if (ioctl(dev, DIOCGETRULESET, prs)) + goto cleanup; + + if (recursive_ruleset_purge(prs->path, prs->name)) + goto cleanup; + nr--; + } + } + +no_mem: + if (errno == ENOMEM) + syslog(LOG_ERR, "calloc failed"); + +cleanup: + free(t); + free(t_e); + free(prs); + return (errno); +} + /* * Add/remove filter entries for user "luser" from ip "ipsrc" */ static int change_filter(int add, const char *luser, const char *ipsrc) { - char *pargv[13] = { - "pfctl", "-p", "/dev/pf", "-q", "-a", "anchor/ruleset", - "-D", "user_ip=X", "-D", "user_id=X", "-f", - "file", NULL - }; char *fdpath = NULL, *userstr = NULL, *ipstr = NULL; char *rsn = NULL, *fn = NULL; pid_t pid; gid_t gid; int s; - if (luser == NULL || !luser[0] || ipsrc == NULL || !ipsrc[0]) { - syslog(LOG_ERR, "invalid luser/ipsrc"); - goto error; - } - - if (asprintf(&rsn, "%s/%s", anchorname, rulesetname) == -1) - goto no_mem; - if (asprintf(&fdpath, "/dev/fd/%d", dev) == -1) - goto no_mem; - if (asprintf(&ipstr, "user_ip=%s", ipsrc) == -1) - goto no_mem; - if (asprintf(&userstr, "user_id=%s", luser) == -1) - goto no_mem; - if (add) { struct stat sb; + char *pargv[13] = { + "pfctl", "-p", "/dev/pf", "-q", "-a", "anchor/ruleset", + "-D", "user_id=X", "-D", "user_ip=X", "-f", "file", NULL + }; + + if (luser == NULL || !luser[0] || ipsrc == NULL || !ipsrc[0]) { + syslog(LOG_ERR, "invalid luser/ipsrc"); + goto error; + } - if (asprintf(&fn, "%s/%s/authpf.rules", PATH_USER_DIR, luser) - == -1) + if (asprintf(&rsn, "%s/%s", anchorname, rulesetname) == -1) + goto no_mem; + if (asprintf(&fdpath, "/dev/fd/%d", dev) == -1) + goto no_mem; + if (asprintf(&ipstr, "user_ip=%s", ipsrc) == -1) + goto no_mem; + if (asprintf(&userstr, "user_id=%s", luser) == -1) + goto no_mem; + if (asprintf(&fn, "%s/%s/authpf.rules", + PATH_USER_DIR, luser) == -1) goto no_mem; if (stat(fn, &sb) == -1) { free(fn); if ((fn = strdup(PATH_PFRULES)) == NULL) goto no_mem; } - } - pargv[2] = fdpath; - pargv[5] = rsn; - pargv[7] = userstr; - pargv[9] = ipstr; - if (!add) - pargv[11] = "/dev/null"; - else - pargv[11] = fn; + pargv[2] = fdpath; + pargv[5] = rsn; + pargv[7] = userstr; + if (user_ip) { + pargv[9] = ipstr; + pargv[11] = fn; + } else { + pargv[8] = "-f"; + pargv[9] = fn; + pargv[10] = NULL; + } - switch (pid = fork()) { - case -1: - syslog(LOG_ERR, "fork failed"); - goto error; - case 0: - /* revoke group privs before exec */ - gid = getgid(); - if (setregid(gid, gid) == -1) { - err(1, "setregid"); - } - execvp(PATH_PFCTL, pargv); - warn("exec of %s failed", PATH_PFCTL); - _exit(1); - } - - /* parent */ - waitpid(pid, &s, 0); - if (s != 0) { - syslog(LOG_ERR, "pfctl exited abnormally"); - goto error; - } + switch (pid = fork()) { + case -1: + syslog(LOG_ERR, "fork failed"); + goto error; + case 0: + /* revoke group privs before exec */ + gid = getgid(); + if (setregid(gid, gid) == -1) { + err(1, "setregid"); + } + execvp(PATH_PFCTL, pargv); + warn("exec of %s failed", PATH_PFCTL); + _exit(1); + } + + /* parent */ + waitpid(pid, &s, 0); + if (s != 0) { + syslog(LOG_ERR, "pfctl exited abnormally"); + goto error; + } - if (add) { gettimeofday(&Tstart, NULL); syslog(LOG_INFO, "allowing %s, user %s", ipsrc, luser); } else { + remove_stale_rulesets(); + gettimeofday(&Tend, NULL); syslog(LOG_INFO, "removed %s, user %s - duration %ld seconds", ipsrc, luser, Tend.tv_sec - Tstart.tv_sec); @@ -819,9 +873,10 @@ do_death(int active) if (active) { change_filter(0, luser, ipsrc); - change_table(0, ipsrc); - authpf_kill_states(); - remove_stale_rulesets(); + if (user_ip) { + change_table(0, ipsrc); + authpf_kill_states(); + } } if (pidfile[0] && (pidfp != NULL)) if (unlink(pidfile) == -1) Modified: vendor/pf/dist/authpf/pathnames.h ============================================================================== --- vendor/pf/dist/authpf/pathnames.h Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/authpf/pathnames.h Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -/* $OpenBSD: pathnames.h,v 1.7 2004/04/25 18:40:42 beck Exp $ */ +/* $OpenBSD: pathnames.h,v 1.8 2008/02/14 01:49:17 mcbride Exp $ */ /* * Copyright (C) 2002 Chris Kuethe (ckuethe@ualberta.ca) @@ -35,4 +35,5 @@ #define PATH_DEVFILE "/dev/pf" #define PATH_PIDFILE "/var/authpf" #define PATH_AUTHPF_SHELL "/usr/sbin/authpf" +#define PATH_AUTHPF_SHELL_NOIP "/usr/sbin/authpf-noip" #define PATH_PFCTL "/sbin/pfctl" Modified: vendor/pf/dist/ftp-proxy/filter.c ============================================================================== --- vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.6 2007/08/01 09:31:41 henning Exp $ */ +/* $OpenBSD: filter.c,v 1.7 2008/02/26 18:52:53 henning Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -277,15 +277,13 @@ prepare_rule(u_int32_t id, int rs_num, s } pfr.rule.dst.port_op = PF_OP_EQ; pfr.rule.dst.port[0] = htons(d_port); - if (tagname != NULL) - strlcpy(pfr.rule.tagname, tagname, sizeof pfr.rule.tagname); switch (rs_num) { case PF_RULESET_FILTER: /* - * pass quick [log] inet[6] proto tcp \ + * pass [quick] [log] inet[6] proto tcp \ * from $src to $dst port = $d_port flags S/SA keep state - * (max 1) [queue qname] + * (max 1) [queue qname] [tag tagname] */ pfr.rule.action = PF_PASS; pfr.rule.quick = 1; @@ -296,6 +294,11 @@ prepare_rule(u_int32_t id, int rs_num, s pfr.rule.max_states = 1; if (qname != NULL) strlcpy(pfr.rule.qname, qname, sizeof pfr.rule.qname); + if (tagname != NULL) { + pfr.rule.quick = 0; + strlcpy(pfr.rule.tagname, tagname, + sizeof pfr.rule.tagname); + } break; case PF_RULESET_NAT: /* Modified: vendor/pf/dist/ftp-proxy/ftp-proxy.8 ============================================================================== --- vendor/pf/dist/ftp-proxy/ftp-proxy.8 Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/ftp-proxy/ftp-proxy.8 Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -.\" $OpenBSD: ftp-proxy.8,v 1.10 2007/08/01 15:45:41 jmc Exp $ +.\" $OpenBSD: ftp-proxy.8,v 1.11 2008/02/26 18:52:53 henning Exp $ .\" .\" Copyright (c) 2004, 2005 Camiel Dobbelaar, .\" @@ -21,7 +21,7 @@ .Nm ftp-proxy .Nd Internet File Transfer Protocol proxy daemon .Sh SYNOPSIS -.Nm ftp-proxy +.Nm .Bk -words .Op Fl 6Adrv .Op Fl a Ar address @@ -59,7 +59,7 @@ facility for this. Assuming the FTP control connection is from $client to $server, the proxy connected to the server using the $proxy source address, and $port is negotiated, then -.Nm ftp-proxy +.Nm adds the following rules to the various anchors. (These example rules use inet, but the proxy also supports inet6.) .Pp @@ -132,9 +132,19 @@ connections to another proxy. Rewrite sourceport to 20 in active mode to suit ancient clients that insist on this RFC property. .It Fl T Ar tag -Automatically tag packets passing through the +The filter rules will add tag +.Ar tag +to data connections, and not match quick. +This way alternative rules that use the +.Ar tagged +keyword can be implemented following the +.Nm +anchor. +These rules can use special .Xr pf 4 -rule with the name supplied. +features like route-to, reply-to, label, rtable, overload, etc. that +.Nm +does not implement itself. .It Fl t Ar timeout Number of seconds that the control connection can be idle, before the proxy will disconnect. @@ -177,7 +187,7 @@ does not allow the ruleset to be modifie .Xr securelevel 7 higher than 1. At that level -.Nm ftp-proxy +.Nm cannot add rules to the anchors and FTP data connections may get blocked. .Pp Negotiated data connection ports below 1024 are not allowed. @@ -186,5 +196,5 @@ The negotiated IP address for active mod reasons. This makes third party file transfers impossible. .Pp -.Nm ftp-proxy +.Nm chroots to "/var/empty" and changes to user "proxy" to drop privileges. Modified: vendor/pf/dist/ftp-proxy/ftp-proxy.c ============================================================================== --- vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.15 2007/08/15 15:18:02 camield Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.16 2008/02/26 18:52:53 henning Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -1117,6 +1117,7 @@ usage(void) { fprintf(stderr, "usage: %s [-6Adrv] [-a address] [-b address]" " [-D level] [-m maxsessions]\n [-P port]" - " [-p port] [-q queue] [-R address] [-T tag] [-t timeout]\n", __progname); + " [-p port] [-q queue] [-R address] [-T tag]\n" + " [-t timeout]\n", __progname); exit(1); } Modified: vendor/pf/dist/man/pf.4 ============================================================================== --- vendor/pf/dist/man/pf.4 Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/man/pf.4 Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pf.4,v 1.59 2007/05/31 19:19:51 jmc Exp $ +.\" $OpenBSD: pf.4,v 1.60 2007/12/02 12:08:04 pascoe Exp $ .\" .\" Copyright (C) 2001, Kjell Wooding. All rights reserved. .\" @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate$ +.Dd $Mdocdate: May 31 2007 $ .Dt PF 4 .Os .Sh NAME @@ -292,14 +292,17 @@ if another process is concurrently updat Add a state entry. .Bd -literal struct pfioc_state { - u_int32_t nr; - struct pf_state state; + struct pfsync_state state; }; .Ed .It Dv DIOCGETSTATE Fa "struct pfioc_state *ps" -Extract the entry with the specified number -.Va nr -from the state table. +Extract the entry identified by the +.Va id +and +.Va creatorid +fields of the +.Va state +structure from the state table. .It Dv DIOCKILLSTATES Fa "struct pfioc_state_kill *psk" Remove matching entries from the state table. This ioctl returns the number of killed states in Modified: vendor/pf/dist/man/pf.conf.5 ============================================================================== --- vendor/pf/dist/man/pf.conf.5 Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/man/pf.conf.5 Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pf.conf.5,v 1.383 2007/07/17 16:27:38 jmc Exp $ +.\" $OpenBSD: pf.conf.5,v 1.393 2008/02/11 07:46:32 jmc Exp $ .\" .\" Copyright (c) 2002, Daniel Hartmeier .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: June 26 2007 $ +.Dd $Mdocdate: Febuary 1 2008 $ .Dt PF.CONF 5 .Os .Sh NAME @@ -78,6 +78,17 @@ By default enforces this order (see .Ar set require-order below). +.Pp +Comments can be put anywhere in the file using a hash mark +.Pq Sq # , +and extend to the end of the current line. +.Pp +Additional configuration files can be included with the +.Ic include +keyword, for example: +.Bd -literal -offset indent +include "/etc/pf/sub.filter.conf" +.Ed .Sh MACROS Macros can be defined that will later be expanded in context. Macro names must start with a letter, and may contain letters, digits @@ -327,7 +338,8 @@ With 9000 state table entries, the timeo (tcp.first 60, tcp.established 43200). .Pp .It Ar set loginterface -Enable collection of packet and byte count statistics for the given interface. +Enable collection of packet and byte count statistics for the given +interface or interface group. These statistics can be viewed using .Bd -literal -offset indent # pfctl -s info @@ -808,7 +820,7 @@ assigned. .Ar Priority mainly controls the time packets take to get sent out, while .Ar bandwidth -has primarily effects on throughput. +primarily affects throughput. .Ar hfsc supports both link-sharing and guaranteed real-time services. It employs a service curve based QoS model, @@ -1163,7 +1175,7 @@ or to the firewall itself. Note that redirecting external incoming connections to the loopback address, as in .Bd -literal -offset indent -rdr on ne3 inet proto tcp to port spamd -\*(Gt 127.0.0.1 port smtp +rdr on ne3 inet proto tcp to port smtp -\*(Gt 127.0.0.1 port spamd .Ed .Pp will effectively allow an external host to connect to daemons @@ -1442,6 +1454,14 @@ the route back to the packet's source ad Any address that matches the given table. .El .Pp +Ranges of addresses are specified by using the +.Sq - +operator. +For instance: +.Dq 10.1.1.10 - 10.1.1.12 +means all addresses from 10.1.1.10 to 10.1.1.12, +hence addresses 10.1.1.10, 10.1.1.11, and 10.1.1.12. +.Pp Interface names and interface group names can have modifiers appended: .Pp .Bl -tag -width xxxxxxxxxxxx -compact @@ -2023,8 +2043,8 @@ must be specified explicitly to apply op .Bl -tag -width xxxx -compact .It Ar max Aq Ar number Limits the number of concurrent states the rule may create. -When this limit is reached, further packets matching the rule that would -create state are dropped, until existing states time out. +When this limit is reached, further packets that would create +state will not match this rule until existing states time out. .It Ar no-sync Prevent state changes for states created by this rule from appearing on the .Xr pfsync 4 @@ -2442,10 +2462,8 @@ into the anchor. .Pp Optionally, .Ar anchor -rules can specify the parameter's -direction, interface, address family, protocol and source/destination -address/port -using the same syntax as filter rules. +rules can specify packet filtering parameters using the same syntax as +filter rules. When parameters are used, the .Ar anchor rule is only evaluated for matching packets. @@ -2526,8 +2544,8 @@ anchor "external" on egress { .Ed .Pp Since the parser specification for anchor names is a string, any -reference to an anchor name containing solidus -.Pq Sq / +reference to an anchor name containing +.Sq / characters will require double quote .Pq Sq \&" characters around the anchor name. @@ -2749,10 +2767,11 @@ in BNF: .Bd -literal line = ( option | pf-rule | nat-rule | binat-rule | rdr-rule | antispoof-rule | altq-rule | queue-rule | trans-anchors | - anchor-rule | anchor-close | load-anchor | table-rule | ) + anchor-rule | anchor-close | load-anchor | table-rule | + include ) option = "set" ( [ "timeout" ( timeout | "{" timeout-list "}" ) ] | - [ "ruleset-optimization" [ "none" | "basic" | "profile" ]] | + [ "ruleset-optimization" [ "none" | "basic" | "profile" ]] | [ "optimization" [ "default" | "normal" | "high-latency" | "satellite" | "aggressive" | "conservative" ] ] @@ -2821,7 +2840,7 @@ queue-rule = "queue" string [ "on" i subqueue anchor-rule = "anchor" [ string ] [ ( "in" | "out" ) ] [ "on" ifspec ] - [ af ] [ protospec ] [ hosts ] [ "{" ] + [ af ] [ protospec ] [ hosts ] [ filteropt-list ] [ "{" ] anchor-close = "}" @@ -2956,8 +2975,6 @@ Default location of OS fingerprints. Protocol name database. .It Pa /etc/services Service name database. -.It Pa /usr/share/pf -Example rulesets. .El .Sh SEE ALSO .Xr carp 4 , Modified: vendor/pf/dist/man/pfsync.4 ============================================================================== --- vendor/pf/dist/man/pfsync.4 Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/man/pfsync.4 Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -.\" $OpenBSD: pfsync.4,v 1.25 2007/05/31 19:19:51 jmc Exp $ +.\" $OpenBSD: pfsync.4,v 1.26 2007/09/20 20:50:07 mpf Exp $ .\" .\" Copyright (c) 2002 Michael Shalayeff .\" Copyright (c) 2003-2004 Ryan McBride @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate$ +.Dd $Mdocdate: May 31 2007 $ .Dt PFSYNC 4 .Os .Sh NAME @@ -199,8 +199,8 @@ traffic through. The following should be added to the top of .Pa /etc/pf.conf : .Bd -literal -offset indent -pass quick on { sis2 } proto pfsync -pass on { sis0 sis1 } proto carp +pass quick on { sis2 } proto pfsync keep state (no-sync) +pass on { sis0 sis1 } proto carp keep state (no-sync) .Ed .Pp If it is preferable that one firewall handle the traffic, Modified: vendor/pf/dist/pfctl/parse.y ============================================================================== --- vendor/pf/dist/pfctl/parse.y Wed Dec 10 20:57:16 2008 (r185879) +++ vendor/pf/dist/pfctl/parse.y Wed Dec 10 20:59:26 2008 (r185880) @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.519 2007/06/21 19:30:03 henning Exp $ */ +/* $OpenBSD: parse.y,v 1.536 2008/02/01 06:58:45 mcbride Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -29,6 +29,7 @@ %{ #include #include +#include #include #include #include @@ -43,6 +44,7 @@ #include #include +#include #include #include #include @@ -60,10 +62,7 @@ #include "pfctl.h" static struct pfctl *pf = NULL; -static FILE *fin = NULL; static int debug = 0; -static int lineno = 1; -static int errors = 0; static int rulestate = 0; static u_int16_t returnicmpdefault = (ICMP_UNREACH << 8) | ICMP_UNREACH_PORT; @@ -73,6 +72,39 @@ static int blockpolicy = PFRULE_DROP; static int require_order = 1; static int default_statelock; +TAILQ_HEAD(files, file) files = TAILQ_HEAD_INITIALIZER(files); +static struct file { + TAILQ_ENTRY(file) entry; + FILE *stream; + char *name; + int lineno; + int errors; +} *file; +struct file *pushfile(const char *, int); +int popfile(void); +int check_file_secrecy(int, const char *); +int yyparse(void); +int yylex(void); +int yyerror(const char *, ...); +int kw_cmp(const void *, const void *); +int lookup(char *); +int lgetc(int); +int lungetc(int); +int findeol(void); + +TAILQ_HEAD(symhead, sym) symhead = TAILQ_HEAD_INITIALIZER(symhead); +struct sym { + TAILQ_ENTRY(sym) entry; + int used; + int persist; + char *nam; + char *val; +}; +int symset(const char *, const char *, int); +char *symget(const char *); + +int atoul(char *, u_long *); + enum { PFCTL_STATE_NONE, PFCTL_STATE_OPTION, @@ -199,12 +231,12 @@ struct filter_opts { char *tag; char *match_tag; u_int8_t match_tag_not; - int rtableid; + u_int rtableid; } filter_opts; struct antispoof_opts { char *label; - int rtableid; + u_int rtableid; } antispoof_opts; struct scrub_opts { @@ -218,7 +250,7 @@ struct scrub_opts { int fragcache; int randomid; int reassemble_tcp; - int rtableid; + u_int rtableid; } scrub_opts; struct queue_opts { @@ -255,61 +287,42 @@ struct pool_opts { struct node_hfsc_opts hfsc_opts; -int yyerror(const char *, ...); -int disallow_table(struct node_host *, const char *); -int disallow_urpf_failed(struct node_host *, const char *); -int disallow_alias(struct node_host *, const char *); -int rule_consistent(struct pf_rule *, int); -int filter_consistent(struct pf_rule *, int); -int nat_consistent(struct pf_rule *); -int rdr_consistent(struct pf_rule *); -int process_tabledef(char *, struct table_opts *); -int yyparse(void); -void expand_label_str(char *, size_t, const char *, const char *); -void expand_label_if(const char *, char *, size_t, const char *); -void expand_label_addr(const char *, char *, size_t, u_int8_t, - struct node_host *); -void expand_label_port(const char *, char *, size_t, struct node_port *); -void expand_label_proto(const char *, char *, size_t, u_int8_t); -void expand_label_nr(const char *, char *, size_t); -void expand_label(char *, size_t, const char *, u_int8_t, struct node_host *, - struct node_port *, struct node_host *, struct node_port *, - u_int8_t); -void expand_rule(struct pf_rule *, struct node_if *, struct node_host *, - struct node_proto *, struct node_os*, struct node_host *, - struct node_port *, struct node_host *, struct node_port *, - struct node_uid *, struct node_gid *, struct node_icmp *, - const char *); -int expand_altq(struct pf_altq *, struct node_if *, struct node_queue *, - struct node_queue_bw bwspec, struct node_queue_opt *); -int expand_queue(struct pf_altq *, struct node_if *, struct node_queue *, - struct node_queue_bw, struct node_queue_opt *); -int expand_skip_interface(struct node_if *); +int disallow_table(struct node_host *, const char *); +int disallow_urpf_failed(struct node_host *, const char *); +int disallow_alias(struct node_host *, const char *); +int rule_consistent(struct pf_rule *, int); +int filter_consistent(struct pf_rule *, int); +int nat_consistent(struct pf_rule *); +int rdr_consistent(struct pf_rule *); +int process_tabledef(char *, struct table_opts *); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:00:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3F641065689; Wed, 10 Dec 2008 21:00:02 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B4E4B8FC2A; Wed, 10 Dec 2008 21:00:02 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAL02kI042615; Wed, 10 Dec 2008 21:00:02 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAL02aH042614; Wed, 10 Dec 2008 21:00:02 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102100.mBAL02aH042614@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185881 - vendor/pf/4.3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:00:03 -0000 Author: mlaier Date: Wed Dec 10 21:00:02 2008 New Revision: 185881 URL: http://svn.freebsd.org/changeset/base/185881 Log: Tag for pf 4.3 Added: vendor/pf/4.3/ - copied from r185880, vendor/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:08:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63DC41065676; Wed, 10 Dec 2008 21:08:43 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E6398FC12; Wed, 10 Dec 2008 21:08:43 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAL8hn6042841; Wed, 10 Dec 2008 21:08:43 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAL8gDG042828; Wed, 10 Dec 2008 21:08:42 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102108.mBAL8gDG042828@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185882 - in vendor/pf/dist: authpf ftp-proxy libevent man pfctl pflogd tftp-proxy X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:08:43 -0000 Author: mlaier Date: Wed Dec 10 21:08:42 2008 New Revision: 185882 URL: http://svn.freebsd.org/changeset/base/185882 Log: Import OPENBSD_4_4_BASE and libevent 1.3e Modified: vendor/pf/dist/authpf/authpf.8 vendor/pf/dist/ftp-proxy/filter.c vendor/pf/dist/ftp-proxy/ftp-proxy.c vendor/pf/dist/libevent/buffer.c vendor/pf/dist/libevent/event-internal.h vendor/pf/dist/libevent/event.c vendor/pf/dist/libevent/event.h vendor/pf/dist/libevent/evsignal.h vendor/pf/dist/libevent/kqueue.c vendor/pf/dist/libevent/poll.c vendor/pf/dist/libevent/select.c vendor/pf/dist/libevent/signal.c vendor/pf/dist/man/pf.conf.5 vendor/pf/dist/man/pfsync.4 vendor/pf/dist/pfctl/parse.y vendor/pf/dist/pfctl/pf_print_state.c vendor/pf/dist/pfctl/pfctl.8 vendor/pf/dist/pfctl/pfctl.c vendor/pf/dist/pfctl/pfctl.h vendor/pf/dist/pfctl/pfctl_altq.c vendor/pf/dist/pfctl/pfctl_optimize.c vendor/pf/dist/pfctl/pfctl_parser.c vendor/pf/dist/pfctl/pfctl_table.c vendor/pf/dist/pflogd/privsep_fdpass.c vendor/pf/dist/tftp-proxy/tftp-proxy.c Modified: vendor/pf/dist/authpf/authpf.8 ============================================================================== --- vendor/pf/dist/authpf/authpf.8 Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/authpf/authpf.8 Wed Dec 10 21:08:42 2008 (r185882) @@ -1,4 +1,4 @@ -.\" $OpenBSD: authpf.8,v 1.45 2008/02/14 01:49:17 mcbride Exp $ +.\" $OpenBSD: authpf.8,v 1.46 2008/03/18 23:03:14 merdely Exp $ .\" .\" Copyright (c) 1998-2007 Bob Beck (beck@openbsd.org>. All rights reserved. .\" @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: May 31 2007 $ +.Dd $Mdocdate: February 14 2008 $ .Dt AUTHPF 8 .Os .Sh NAME @@ -56,7 +56,7 @@ in this case the client's IP address is not provided to the packet filter via the .Ar client_ip macro or the -.Ar authpf users +.Ar authpf_users table. Additionally, states associated with the client IP address are not purged when the session is ended. Modified: vendor/pf/dist/ftp-proxy/filter.c ============================================================================== --- vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/ftp-proxy/filter.c Wed Dec 10 21:08:42 2008 (r185882) @@ -1,4 +1,4 @@ -/* $OpenBSD: filter.c,v 1.7 2008/02/26 18:52:53 henning Exp $ */ +/* $OpenBSD: filter.c,v 1.8 2008/06/13 07:25:26 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -173,7 +173,7 @@ init_filter(char *opt_qname, char *opt_t dev = open("/dev/pf", O_RDWR); if (dev == -1) - err(1, "/dev/pf"); + err(1, "open /dev/pf"); if (ioctl(dev, DIOCGETSTATUS, &status) == -1) err(1, "DIOCGETSTATUS"); if (!status.running) Modified: vendor/pf/dist/ftp-proxy/ftp-proxy.c ============================================================================== --- vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/ftp-proxy/ftp-proxy.c Wed Dec 10 21:08:42 2008 (r185882) @@ -1,4 +1,4 @@ -/* $OpenBSD: ftp-proxy.c,v 1.16 2008/02/26 18:52:53 henning Exp $ */ +/* $OpenBSD: ftp-proxy.c,v 1.19 2008/06/13 07:25:26 claudio Exp $ */ /* * Copyright (c) 2004, 2005 Camiel Dobbelaar, @@ -91,7 +91,7 @@ int client_parse_cmd(struct session *s); void client_read(struct bufferevent *, void *); int drop_privs(void); void end_session(struct session *); -int exit_daemon(void); +void exit_daemon(void); int getline(char *, size_t *); void handle_connection(const int, short, void *); void handle_signal(int, short, void *); @@ -282,6 +282,12 @@ end_session(struct session *s) logmsg(LOG_INFO, "#%d ending session", s->id); + /* Flush output buffers. */ + if (s->client_bufev && s->client_fd != -1) + evbuffer_write(s->client_bufev->output, s->client_fd); + if (s->server_bufev && s->server_fd != -1) + evbuffer_write(s->server_bufev->output, s->server_fd); + if (s->client_fd != -1) close(s->client_fd); if (s->server_fd != -1) @@ -309,7 +315,7 @@ end_session(struct session *s) session_count--; } -int +void exit_daemon(void) { struct session *s, *next; @@ -323,9 +329,6 @@ exit_daemon(void) closelog(); exit(0); - - /* NOTREACHED */ - return (-1); } int @@ -519,7 +522,7 @@ handle_signal(int sig, short event, void * Signal handler rules don't apply, libevent decouples for us. */ - logmsg(LOG_ERR, "%s exiting on signal %d", __progname, sig); + logmsg(LOG_ERR, "exiting on signal %d", sig); exit_daemon(); } @@ -834,8 +837,8 @@ u_int16_t pick_proxy_port(void) { /* Random should be good enough for avoiding port collisions. */ - return (IPPORT_HIFIRSTAUTO + (arc4random() % - (IPPORT_HILASTAUTO - IPPORT_HIFIRSTAUTO))); + return (IPPORT_HIFIRSTAUTO + + arc4random_uniform(IPPORT_HILASTAUTO - IPPORT_HIFIRSTAUTO)); } void Modified: vendor/pf/dist/libevent/buffer.c ============================================================================== --- vendor/pf/dist/libevent/buffer.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/buffer.c Wed Dec 10 21:08:42 2008 (r185882) @@ -44,6 +44,7 @@ #include #endif +#include #include #include #include @@ -106,7 +107,7 @@ evbuffer_add_buffer(struct evbuffer *out /* * Optimization comes with a price; we need to notify the * buffer if necessary of the changes. oldoff is the amount - * of data that we tranfered from inbuf to outbuf + * of data that we transfered from inbuf to outbuf */ if (inbuf->off != oldoff && inbuf->cb != NULL) (*inbuf->cb)(inbuf, oldoff, inbuf->off, inbuf->cbarg); @@ -134,9 +135,13 @@ evbuffer_add_vprintf(struct evbuffer *bu int sz; va_list aq; + /* make sure that at least some space is available */ + evbuffer_expand(buf, 64); for (;;) { + size_t used = buf->misalign + buf->off; buffer = (char *)buf->buffer + buf->off; - space = buf->totallen - buf->misalign - buf->off; + assert(buf->totallen >= used); + space = buf->totallen - used; #ifndef va_copy #define va_copy(dst, src) memcpy(&(dst), &(src), sizeof(va_list)) @@ -152,7 +157,7 @@ evbuffer_add_vprintf(struct evbuffer *bu va_end(aq); - if (sz == -1) + if (sz < 0) return (-1); if (sz < space) { buf->off += sz; @@ -244,7 +249,7 @@ evbuffer_readline(struct evbuffer *buffe /* Adds data to an event buffer */ -static inline void +static void evbuffer_align(struct evbuffer *buf) { memmove(buf->orig_buffer, buf->buffer, buf->off); @@ -431,13 +436,12 @@ evbuffer_write(struct evbuffer *buffer, u_char * evbuffer_find(struct evbuffer *buffer, const u_char *what, size_t len) { - size_t remain = buffer->off; - u_char *search = buffer->buffer; + u_char *search = buffer->buffer, *end = search + buffer->off; u_char *p; - while ((p = memchr(search, *what, remain)) != NULL) { - remain = buffer->off - (size_t)(search - buffer->buffer); - if (remain < len) + while (search < end && + (p = memchr(search, *what, end - search)) != NULL) { + if (p + len > end) break; if (memcmp(p, what, len) == 0) return (p); Modified: vendor/pf/dist/libevent/event-internal.h ============================================================================== --- vendor/pf/dist/libevent/event-internal.h Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/event-internal.h Wed Dec 10 21:08:42 2008 (r185882) @@ -31,6 +31,8 @@ extern "C" { #endif +#include "evsignal.h" + struct event_base { const struct eventop *evsel; void *evbase; @@ -43,6 +45,9 @@ struct event_base { struct event_list **activequeues; int nactivequeues; + /* signal handling info */ + struct evsignal_info sig; + struct event_list eventqueue; struct timeval event_tv; Modified: vendor/pf/dist/libevent/event.c ============================================================================== --- vendor/pf/dist/libevent/event.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/event.c Wed Dec 10 21:08:42 2008 (r185882) @@ -51,6 +51,7 @@ #include #include #include +#include #include "event.h" #include "event-internal.h" @@ -111,9 +112,9 @@ const struct eventop *eventops[] = { }; /* Global state */ -struct event_list signalqueue; - struct event_base *current_base = NULL; +extern struct event_base *evsignal_base; +static int use_monotonic; /* Handle signals - This is a deprecated interface */ int (*event_sigcb)(void); /* Signal callback when gotsig is set */ @@ -126,7 +127,7 @@ static int event_haveevents(struct event static void event_process_active(struct event_base *); -static int timeout_next(struct event_base *, struct timeval *); +static int timeout_next(struct event_base *, struct timeval **); static void timeout_process(struct event_base *); static void timeout_correct(struct event_base *, struct timeval *); @@ -144,25 +145,34 @@ compare(struct event *a, struct event *b return (0); } +static void +detect_monotonic(void) +{ +#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) + struct timespec ts; + + if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) + use_monotonic = 1; +#endif +} + static int gettime(struct timeval *tp) { -#ifdef HAVE_CLOCK_GETTIME +#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) struct timespec ts; -#ifdef HAVE_CLOCK_MONOTONIC - if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) -#else - if (clock_gettime(CLOCK_REALTIME, &ts) == -1) -#endif - return (-1); - tp->tv_sec = ts.tv_sec; - tp->tv_usec = ts.tv_nsec / 1000; -#else - gettimeofday(tp, NULL); + if (use_monotonic) { + if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1) + return (-1); + + tp->tv_sec = ts.tv_sec; + tp->tv_usec = ts.tv_nsec / 1000; + return (0); + } #endif - return (0); + return (gettimeofday(tp, NULL)); } RB_PROTOTYPE(event_tree, event, ev_timeout_node, compare); @@ -174,36 +184,42 @@ void * event_init(void) { int i; + struct event_base *base; - if ((current_base = calloc(1, sizeof(struct event_base))) == NULL) + if ((base = calloc(1, sizeof(struct event_base))) == NULL) event_err(1, "%s: calloc"); event_sigcb = NULL; event_gotsig = 0; - gettime(¤t_base->event_tv); + + detect_monotonic(); + gettime(&base->event_tv); - RB_INIT(¤t_base->timetree); - TAILQ_INIT(¤t_base->eventqueue); - TAILQ_INIT(&signalqueue); + RB_INIT(&base->timetree); + TAILQ_INIT(&base->eventqueue); + TAILQ_INIT(&base->sig.signalqueue); + base->sig.ev_signal_pair[0] = -1; + base->sig.ev_signal_pair[1] = -1; - current_base->evbase = NULL; - for (i = 0; eventops[i] && !current_base->evbase; i++) { - current_base->evsel = eventops[i]; + base->evbase = NULL; + for (i = 0; eventops[i] && !base->evbase; i++) { + base->evsel = eventops[i]; - current_base->evbase = current_base->evsel->init(); + base->evbase = base->evsel->init(base); } - if (current_base->evbase == NULL) + if (base->evbase == NULL) event_errx(1, "%s: no event mechanism available", __func__); if (getenv("EVENT_SHOW_METHOD")) event_msgx("libevent using: %s\n", - current_base->evsel->name); + base->evsel->name); /* allocate a single active event queue */ - event_base_priority_init(current_base, 1); + event_base_priority_init(base, 1); - return (current_base); + current_base = base; + return (base); } void @@ -217,7 +233,8 @@ event_base_free(struct event_base *base) current_base = NULL; assert(base); - assert(TAILQ_EMPTY(&base->eventqueue)); + if (base->evsel->dealloc != NULL) + base->evsel->dealloc(base, base->evbase); for (i=0; i < base->nactivequeues; ++i) assert(TAILQ_EMPTY(base->activequeues[i])); @@ -227,8 +244,7 @@ event_base_free(struct event_base *base) free(base->activequeues[i]); free(base->activequeues); - if (base->evsel->dealloc != NULL) - base->evsel->dealloc(base->evbase); + assert(TAILQ_EMPTY(&base->eventqueue)); free(base); } @@ -343,7 +359,6 @@ event_loopexit_cb(int fd, short what, vo } /* not thread safe */ - int event_loopexit(struct timeval *tv) { @@ -354,7 +369,7 @@ event_loopexit(struct timeval *tv) int event_base_loopexit(struct event_base *event_base, struct timeval *tv) { - return (event_once(-1, EV_TIMEOUT, event_loopexit_cb, + return (event_base_once(event_base, -1, EV_TIMEOUT, event_loopexit_cb, event_base, tv)); } @@ -372,8 +387,13 @@ event_base_loop(struct event_base *base, const struct eventop *evsel = base->evsel; void *evbase = base->evbase; struct timeval tv; + struct timeval *tv_p; int res, done; +#ifndef WIN32 + if(!TAILQ_EMPTY(&base->sig.signalqueue)) + evsignal_base = base; +#endif done = 0; while (!done) { /* Calculate the initial events that we are waiting for */ @@ -398,21 +418,18 @@ event_base_loop(struct event_base *base, } } - /* Check if time is running backwards */ - gettime(&tv); - if (timercmp(&tv, &base->event_tv, <)) { - struct timeval off; - event_debug(("%s: time is running backwards, corrected", - __func__)); - timersub(&base->event_tv, &tv, &off); - timeout_correct(base, &off); - } - base->event_tv = tv; + timeout_correct(base, &tv); - if (!base->event_count_active && !(flags & EVLOOP_NONBLOCK)) - timeout_next(base, &tv); - else + tv_p = &tv; + if (!base->event_count_active && !(flags & EVLOOP_NONBLOCK)) { + timeout_next(base, &tv_p); + } else { + /* + * if we have active events, we just poll new events + * without waiting. + */ timerclear(&tv); + } /* If we have no events, we just exit */ if (!event_haveevents(base)) { @@ -420,7 +437,8 @@ event_base_loop(struct event_base *base, return (1); } - res = evsel->dispatch(base, evbase, &tv); + res = evsel->dispatch(base, evbase, tv_p); + if (res == -1) return (-1); @@ -459,12 +477,19 @@ event_once_cb(int fd, short events, void free(eonce); } -/* Schedules an event once */ - +/* not threadsafe, event scheduled once. */ int event_once(int fd, short events, void (*callback)(int, short, void *), void *arg, struct timeval *tv) { + return event_base_once(current_base, fd, events, callback, arg, tv); +} + +/* Schedules an event once */ +int +event_base_once(struct event_base *base, int fd, short events, + void (*callback)(int, short, void *), void *arg, struct timeval *tv) +{ struct event_once *eonce; struct timeval etv; int res; @@ -496,7 +521,9 @@ event_once(int fd, short events, return (-1); } - res = event_add(&eonce->ev, tv); + res = event_base_set(base, &eonce->ev); + if (res == 0) + res = event_add(&eonce->ev, tv); if (res != 0) { free(eonce); return (res); @@ -516,12 +543,14 @@ event_set(struct event *ev, int fd, shor ev->ev_arg = arg; ev->ev_fd = fd; ev->ev_events = events; + ev->ev_res = 0; ev->ev_flags = EVLIST_INIT; ev->ev_ncalls = 0; ev->ev_pncalls = NULL; /* by default, we put new events into the middle priority */ - ev->ev_pri = current_base->nactivequeues/2; + if(current_base) + ev->ev_pri = current_base->nactivequeues/2; } int @@ -710,16 +739,16 @@ event_active(struct event *ev, int res, event_queue_insert(ev->ev_base, ev, EVLIST_ACTIVE); } -int -timeout_next(struct event_base *base, struct timeval *tv) +static int +timeout_next(struct event_base *base, struct timeval **tv_p) { - struct timeval dflt = TIMEOUT_DEFAULT; - struct timeval now; struct event *ev; + struct timeval *tv = *tv_p; if ((ev = RB_MIN(event_tree, &base->timetree)) == NULL) { - *tv = dflt; + /* if no time-based events are active wait for I/O */ + *tv_p = NULL; return (0); } @@ -740,17 +769,38 @@ timeout_next(struct event_base *base, st return (0); } +/* + * Determines if the time is running backwards by comparing the current + * time against the last time we checked. Not needed when using clock + * monotonic. + */ + static void -timeout_correct(struct event_base *base, struct timeval *off) +timeout_correct(struct event_base *base, struct timeval *tv) { struct event *ev; + struct timeval off; + + if (use_monotonic) + return; + + /* Check if time is running backwards */ + gettime(tv); + if (timercmp(tv, &base->event_tv, >=)) { + base->event_tv = *tv; + return; + } + + event_debug(("%s: time is running backwards, corrected", + __func__)); + timersub(&base->event_tv, tv, &off); /* * We can modify the key element of the node without destroying * the key, beause we apply it to all in the right order. */ RB_FOREACH(ev, event_tree, &base->timetree) - timersub(&ev->ev_timeout, off, &ev->ev_timeout); + timersub(&ev->ev_timeout, &off, &ev->ev_timeout); } void @@ -801,7 +851,7 @@ event_queue_remove(struct event_base *ba ev, ev_active_next); break; case EVLIST_SIGNAL: - TAILQ_REMOVE(&signalqueue, ev, ev_signal_next); + TAILQ_REMOVE(&base->sig.signalqueue, ev, ev_signal_next); break; case EVLIST_TIMEOUT: RB_REMOVE(event_tree, &base->timetree, ev); @@ -843,7 +893,7 @@ event_queue_insert(struct event_base *ba ev,ev_active_next); break; case EVLIST_SIGNAL: - TAILQ_INSERT_TAIL(&signalqueue, ev, ev_signal_next); + TAILQ_INSERT_TAIL(&base->sig.signalqueue, ev, ev_signal_next); break; case EVLIST_TIMEOUT: { struct event *tmp = RB_INSERT(event_tree, &base->timetree, ev); Modified: vendor/pf/dist/libevent/event.h ============================================================================== --- vendor/pf/dist/libevent/event.h Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/event.h Wed Dec 10 21:08:42 2008 (r185882) @@ -31,6 +31,8 @@ extern "C" { #endif +#include +#include #include #ifdef WIN32 @@ -131,16 +133,14 @@ TAILQ_HEAD (evkeyvalq, evkeyval); struct eventop { char *name; - void *(*init)(void); + void *(*init)(struct event_base *); int (*add)(void *, struct event *); int (*del)(void *, struct event *); int (*recalc)(struct event_base *, void *, int); int (*dispatch)(struct event_base *, void *, struct timeval *); - void (*dealloc)(void *); + void (*dealloc)(struct event_base *, void *); }; -#define TIMEOUT_DEFAULT {5, 0} - void *event_init(void); int event_dispatch(void); int event_base_dispatch(struct event_base *); @@ -184,6 +184,7 @@ int event_base_loopexit(struct event_bas void event_set(struct event *, int, short, void (*)(int, short, void *), void *); int event_once(int, short, void (*)(int, short, void *), void *, struct timeval *); +int event_base_once(struct event_base *, int, short, void (*)(int, short, void *), void *, struct timeval *); int event_add(struct event *, struct timeval *); int event_del(struct event *); @@ -299,39 +300,37 @@ void evbuffer_setcb(struct evbuffer *, v void evtag_init(void); -void evtag_marshal(struct evbuffer *evbuf, u_int8_t tag, const void *data, - u_int32_t len); +void evtag_marshal(struct evbuffer *evbuf, uint8_t tag, const void *data, + uint32_t len); -void encode_int(struct evbuffer *evbuf, u_int32_t number); +void encode_int(struct evbuffer *evbuf, uint32_t number); -void evtag_marshal_int(struct evbuffer *evbuf, u_int8_t tag, - u_int32_t integer); +void evtag_marshal_int(struct evbuffer *evbuf, uint8_t tag, uint32_t integer); -void evtag_marshal_string(struct evbuffer *buf, u_int8_t tag, +void evtag_marshal_string(struct evbuffer *buf, uint8_t tag, const char *string); -void evtag_marshal_timeval(struct evbuffer *evbuf, u_int8_t tag, +void evtag_marshal_timeval(struct evbuffer *evbuf, uint8_t tag, struct timeval *tv); void evtag_test(void); -int evtag_unmarshal(struct evbuffer *src, u_int8_t *ptag, - struct evbuffer *dst); -int evtag_peek(struct evbuffer *evbuf, u_int8_t *ptag); -int evtag_peek_length(struct evbuffer *evbuf, u_int32_t *plength); -int evtag_payload_length(struct evbuffer *evbuf, u_int32_t *plength); +int evtag_unmarshal(struct evbuffer *src, uint8_t *ptag, struct evbuffer *dst); +int evtag_peek(struct evbuffer *evbuf, uint8_t *ptag); +int evtag_peek_length(struct evbuffer *evbuf, uint32_t *plength); +int evtag_payload_length(struct evbuffer *evbuf, uint32_t *plength); int evtag_consume(struct evbuffer *evbuf); -int evtag_unmarshal_int(struct evbuffer *evbuf, u_int8_t need_tag, - u_int32_t *pinteger); +int evtag_unmarshal_int(struct evbuffer *evbuf, uint8_t need_tag, + uint32_t *pinteger); -int evtag_unmarshal_fixed(struct evbuffer *src, u_int8_t need_tag, void *data, +int evtag_unmarshal_fixed(struct evbuffer *src, uint8_t need_tag, void *data, size_t len); -int evtag_unmarshal_string(struct evbuffer *evbuf, u_int8_t need_tag, +int evtag_unmarshal_string(struct evbuffer *evbuf, uint8_t need_tag, char **pstring); -int evtag_unmarshal_timeval(struct evbuffer *evbuf, u_int8_t need_tag, +int evtag_unmarshal_timeval(struct evbuffer *evbuf, uint8_t need_tag, struct timeval *ptv); #ifdef __cplusplus Modified: vendor/pf/dist/libevent/evsignal.h ============================================================================== --- vendor/pf/dist/libevent/evsignal.h Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/evsignal.h Wed Dec 10 21:08:42 2008 (r185882) @@ -27,9 +27,18 @@ #ifndef _EVSIGNAL_H_ #define _EVSIGNAL_H_ -void evsignal_init(void); -void evsignal_process(void); +struct evsignal_info { + struct event_list signalqueue; + struct event ev_signal; + int ev_signal_pair[2]; + int ev_signal_added; + volatile sig_atomic_t evsignal_caught; + sig_atomic_t evsigcaught[NSIG]; +}; +void evsignal_init(struct event_base *); +void evsignal_process(struct event_base *); int evsignal_add(struct event *); int evsignal_del(struct event *); +void evsignal_dealloc(struct event_base *); #endif /* _EVSIGNAL_H_ */ Modified: vendor/pf/dist/libevent/kqueue.c ============================================================================== --- vendor/pf/dist/libevent/kqueue.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/kqueue.c Wed Dec 10 21:08:42 2008 (r185882) @@ -48,10 +48,13 @@ #include #endif -#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) -#define INTPTR(x) (intptr_t)x +/* Some platforms apparently define the udata field of struct kevent as + * ntptr_t, whereas others define it as void*. There doesn't seem to be an + * easy way to tell them apart via autoconf, so we need to use OS macros. */ +#if defined(HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) +#define PTR_TO_UDATA(x) ((intptr_t)(x)) #else -#define INTPTR(x) x +#define PTR_TO_UDATA(x) (x) #endif #include "event.h" @@ -69,13 +72,13 @@ struct kqop { int kq; }; -void *kq_init (void); +void *kq_init (struct event_base *); int kq_add (void *, struct event *); int kq_del (void *, struct event *); int kq_recalc (struct event_base *, void *, int); int kq_dispatch (struct event_base *, void *, struct timeval *); int kq_insert (struct kqop *, struct kevent *); -void kq_dealloc (void *); +void kq_dealloc (struct event_base *, void *); const struct eventop kqops = { "kqueue", @@ -88,7 +91,7 @@ const struct eventop kqops = { }; void * -kq_init(void) +kq_init(struct event_base *base) { int kq; struct kqop *kqueueop; @@ -212,13 +215,16 @@ kq_dispatch(struct event_base *base, voi struct kevent *changes = kqop->changes; struct kevent *events = kqop->events; struct event *ev; - struct timespec ts; + struct timespec ts, *ts_p = NULL; int i, res; - TIMEVAL_TO_TIMESPEC(tv, &ts); + if (tv != NULL) { + TIMEVAL_TO_TIMESPEC(tv, &ts); + ts_p = &ts; + } res = kevent(kqop->kq, changes, kqop->nchanges, - events, kqop->nevents, &ts); + events, kqop->nevents, ts_p); kqop->nchanges = 0; if (res == -1) { if (errno != EINTR) { @@ -294,7 +300,7 @@ kq_add(void *arg, struct event *ev) kev.flags = EV_ADD; if (!(ev->ev_events & EV_PERSIST)) kev.flags |= EV_ONESHOT; - kev.udata = INTPTR(ev); + kev.udata = PTR_TO_UDATA(ev); if (kq_insert(kqop, &kev) == -1) return (-1); @@ -317,7 +323,7 @@ kq_add(void *arg, struct event *ev) kev.flags = EV_ADD; if (!(ev->ev_events & EV_PERSIST)) kev.flags |= EV_ONESHOT; - kev.udata = INTPTR(ev); + kev.udata = PTR_TO_UDATA(ev); if (kq_insert(kqop, &kev) == -1) return (-1); @@ -332,7 +338,7 @@ kq_add(void *arg, struct event *ev) kev.flags = EV_ADD; if (!(ev->ev_events & EV_PERSIST)) kev.flags |= EV_ONESHOT; - kev.udata = INTPTR(ev); + kev.udata = PTR_TO_UDATA(ev); if (kq_insert(kqop, &kev) == -1) return (-1); @@ -398,7 +404,7 @@ kq_del(void *arg, struct event *ev) } void -kq_dealloc(void *arg) +kq_dealloc(struct event_base *base, void *arg) { struct kqop *kqop = arg; Modified: vendor/pf/dist/libevent/poll.c ============================================================================== --- vendor/pf/dist/libevent/poll.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/poll.c Wed Dec 10 21:08:42 2008 (r185882) @@ -54,8 +54,6 @@ #include "evsignal.h" #include "log.h" -extern volatile sig_atomic_t evsignal_caught; - struct pollop { int event_count; /* Highest number alloc */ int nfds; /* Size of event_* */ @@ -68,12 +66,12 @@ struct pollop { * "no entry." */ }; -void *poll_init (void); +void *poll_init (struct event_base *); int poll_add (void *, struct event *); int poll_del (void *, struct event *); int poll_recalc (struct event_base *, void *, int); int poll_dispatch (struct event_base *, void *, struct timeval *); -void poll_dealloc (void *); +void poll_dealloc (struct event_base *, void *); const struct eventop pollops = { "poll", @@ -86,7 +84,7 @@ const struct eventop pollops = { }; void * -poll_init(void) +poll_init(struct event_base *base) { struct pollop *pollop; @@ -97,7 +95,7 @@ poll_init(void) if (!(pollop = calloc(1, sizeof(struct pollop)))) return (NULL); - evsignal_init(); + evsignal_init(base); return (pollop); } @@ -150,13 +148,16 @@ poll_check_ok(struct pollop *pop) int poll_dispatch(struct event_base *base, void *arg, struct timeval *tv) { - int res, i, sec, nfds; + int res, i, msec = -1, nfds; struct pollop *pop = arg; poll_check_ok(pop); - sec = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; + + if (tv != NULL) + msec = tv->tv_sec * 1000 + (tv->tv_usec + 999) / 1000; + nfds = pop->nfds; - res = poll(pop->event_set, nfds, sec); + res = poll(pop->event_set, nfds, msec); if (res == -1) { if (errno != EINTR) { @@ -164,10 +165,11 @@ poll_dispatch(struct event_base *base, v return (-1); } - evsignal_process(); + evsignal_process(base); return (0); - } else if (evsignal_caught) - evsignal_process(); + } else if (base->sig.evsignal_caught) { + evsignal_process(base); + } event_debug(("%s: poll reports %d", __func__, res)); @@ -370,10 +372,11 @@ poll_del(void *arg, struct event *ev) } void -poll_dealloc(void *arg) +poll_dealloc(struct event_base *base, void *arg) { struct pollop *pop = arg; + evsignal_dealloc(base); if (pop->event_set) free(pop->event_set); if (pop->event_r_back) Modified: vendor/pf/dist/libevent/select.c ============================================================================== --- vendor/pf/dist/libevent/select.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/select.c Wed Dec 10 21:08:42 2008 (r185882) @@ -36,6 +36,9 @@ #else #include #endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif #include #include #include @@ -57,8 +60,6 @@ #define howmany(x, y) (((x)+((y)-1))/(y)) #endif -extern volatile sig_atomic_t evsignal_caught; - struct selectop { int event_fds; /* Highest fd in fd set */ int event_fdsz; @@ -70,12 +71,12 @@ struct selectop { struct event **event_w_by_fd; }; -void *select_init (void); +void *select_init (struct event_base *); int select_add (void *, struct event *); int select_del (void *, struct event *); int select_recalc (struct event_base *, void *, int); int select_dispatch (struct event_base *, void *, struct timeval *); -void select_dealloc (void *); +void select_dealloc (struct event_base *, void *); const struct eventop selectops = { "select", @@ -90,7 +91,7 @@ const struct eventop selectops = { static int select_resize(struct selectop *sop, int fdsz); void * -select_init(void) +select_init(struct event_base *base) { struct selectop *sop; @@ -103,7 +104,7 @@ select_init(void) select_resize(sop, howmany(32 + 1, NFDBITS)*sizeof(fd_mask)); - evsignal_init(); + evsignal_init(base); return (sop); } @@ -113,7 +114,7 @@ static void check_selectop(struct selectop *sop) { int i; - for (i=0;i<=sop->event_fds;++i) { + for (i = 0; i <= sop->event_fds; ++i) { if (FD_ISSET(i, sop->event_readset_in)) { assert(sop->event_r_by_fd[i]); assert(sop->event_r_by_fd[i]->ev_events & EV_READ); @@ -174,10 +175,11 @@ select_dispatch(struct event_base *base, return (-1); } - evsignal_process(); + evsignal_process(base); return (0); - } else if (evsignal_caught) - evsignal_process(); + } else if (base->sig.evsignal_caught) { + evsignal_process(base); + } event_debug(("%s: select reports %d", __func__, res)); @@ -348,10 +350,11 @@ select_del(void *arg, struct event *ev) } void -select_dealloc(void *arg) +select_dealloc(struct event_base *base, void *arg) { struct selectop *sop = arg; + evsignal_dealloc(base); if (sop->event_readset_in) free(sop->event_readset_in); if (sop->event_writeset_in) Modified: vendor/pf/dist/libevent/signal.c ============================================================================== --- vendor/pf/dist/libevent/signal.c Wed Dec 10 21:00:02 2008 (r185881) +++ vendor/pf/dist/libevent/signal.c Wed Dec 10 21:08:42 2008 (r185882) @@ -31,6 +31,7 @@ #endif #include +#include #ifdef HAVE_SYS_TIME_H #include #else @@ -47,19 +48,14 @@ #ifdef HAVE_FCNTL_H #include #endif +#include #include "event.h" +#include "event-internal.h" #include "evsignal.h" #include "log.h" -extern struct event_list signalqueue; - -static sig_atomic_t evsigcaught[NSIG]; -volatile sig_atomic_t evsignal_caught = 0; - -static struct event ev_signal; -static int ev_signal_pair[2]; -static int ev_signal_added; +struct event_base *evsignal_base = NULL; static void evsignal_handler(int sig); @@ -87,24 +83,27 @@ evsignal_cb(int fd, short what, void *ar #endif void -evsignal_init(void) +evsignal_init(struct event_base *base) { /* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:09:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 008B41065678; Wed, 10 Dec 2008 21:09:10 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C93C58FC08; Wed, 10 Dec 2008 21:09:09 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAL99d6042891; Wed, 10 Dec 2008 21:09:09 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAL99lT042890; Wed, 10 Dec 2008 21:09:09 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102109.mBAL99lT042890@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:09:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185883 - vendor/pf/4.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:09:10 -0000 Author: mlaier Date: Wed Dec 10 21:09:09 2008 New Revision: 185883 URL: http://svn.freebsd.org/changeset/base/185883 Log: Tag for pf 4.4 Added: vendor/pf/4.4/ - copied from r185882, vendor/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:21:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81A2A1065678; Wed, 10 Dec 2008 21:21:10 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5948FC1C; Wed, 10 Dec 2008 21:21:10 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALLA28043151; Wed, 10 Dec 2008 21:21:10 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALLATn043146; Wed, 10 Dec 2008 21:21:10 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102121.mBALLATn043146@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185884 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:21:10 -0000 Author: mlaier Date: Wed Dec 10 21:21:09 2008 New Revision: 185884 URL: http://svn.freebsd.org/changeset/base/185884 Log: Import OPENBSD_4_2_BASE Modified: vendor-sys/pf/dist/net/if_pflog.c vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pflog.c ============================================================================== --- vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.22 2006/12/15 09:31:20 otto Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.24 2007/05/26 17:13:30 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -87,8 +87,6 @@ struct if_clone pflog_cloner = struct ifnet *pflogifs[PFLOGIFS_MAX]; /* for fast access */ -extern int ifqmaxlen; - void pflogattach(int npflog) { @@ -96,7 +94,6 @@ pflogattach(int npflog) LIST_INIT(&pflogif_list); for (i = 0; i < PFLOGIFS_MAX; i++) pflogifs[i] = NULL; - (void) pflog_clone_create(&pflog_cloner, 0); if_clone_attach(&pflog_cloner); } Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.73 2006/11/16 13:13:38 henning Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -106,7 +106,6 @@ void pfsync_bulk_update(void *); void pfsync_bulkfail(void *); int pfsync_sync_ok; -extern int ifqmaxlen; struct if_clone pfsync_cloner = IF_CLONE_INITIALIZER("pfsync", pfsync_clone_create, pfsync_clone_destroy); @@ -221,6 +220,7 @@ int pfsync_insert_net_state(struct pfsync_state *sp, u_int8_t chksum_flag) { struct pf_state *st = NULL; + struct pf_state_key *sk = NULL; struct pf_rule *r = NULL; struct pfi_kif *kif; @@ -243,7 +243,9 @@ pfsync_insert_net_state(struct pfsync_st * If the ruleset checksums match, it's safe to associate the state * with the rule of that number. */ - if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag) + if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag && + ntohl(sp->rule) < + pf_main_ruleset.rules[PF_RULESET_FILTER].active.rcount) r = pf_main_ruleset.rules[ PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)]; else @@ -257,6 +259,12 @@ pfsync_insert_net_state(struct pfsync_st } bzero(st, sizeof(*st)); + if ((sk = pf_alloc_state_key(st)) == NULL) { + pool_put(&pf_state_pl, st); + pfi_kif_unref(kif, PFI_KIF_REF_NONE); + return (ENOMEM); + } + /* allocate memory for scrub info */ if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) { @@ -264,6 +272,7 @@ pfsync_insert_net_state(struct pfsync_st if (st->src.scrub) pool_put(&pf_state_scrub_pl, st->src.scrub); pool_put(&pf_state_pl, st); + pool_put(&pf_state_key_pl, sk); return (ENOMEM); } @@ -274,9 +283,9 @@ pfsync_insert_net_state(struct pfsync_st r->states++; /* fill in the rest of the state entry */ - pf_state_host_ntoh(&sp->lan, &st->lan); - pf_state_host_ntoh(&sp->gwy, &st->gwy); - pf_state_host_ntoh(&sp->ext, &st->ext); + pf_state_host_ntoh(&sp->lan, &sk->lan); + pf_state_host_ntoh(&sp->gwy, &sk->gwy); + pf_state_host_ntoh(&sp->ext, &sk->ext); pf_state_peer_ntoh(&sp->src, &st->src); pf_state_peer_ntoh(&sp->dst, &st->dst); @@ -285,9 +294,9 @@ pfsync_insert_net_state(struct pfsync_st st->creation = time_second - ntohl(sp->creation); st->expire = ntohl(sp->expire) + time_second; - st->af = sp->af; - st->proto = sp->proto; - st->direction = sp->direction; + sk->af = sp->af; + sk->proto = sp->proto; + sk->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; st->allow_opts = sp->allow_opts; @@ -318,14 +327,17 @@ pfsync_input(struct mbuf *m, ...) struct pfsync_header *ph; struct pfsync_softc *sc = pfsyncif; struct pf_state *st; - struct pf_state_cmp key; + struct pf_state_key *sk; + struct pf_state_cmp id_key; struct pfsync_state *sp; struct pfsync_state_upd *up; struct pfsync_state_del *dp; struct pfsync_state_clr *cp; struct pfsync_state_upd_req *rup; struct pfsync_state_bus *bus; +#ifdef IPSEC struct pfsync_tdb *pt; +#endif struct in_addr src; struct mbuf *mp; int iplen, action, error, i, s, count, offp, sfail, stale = 0; @@ -389,7 +401,8 @@ pfsync_input(struct mbuf *m, ...) switch (action) { case PFSYNC_ACT_CLR: { struct pf_state *nexts; - struct pfi_kif *kif; + struct pf_state_key *nextsk; + struct pfi_kif *kif; u_int32_t creatorid; if ((mp = m_pulldown(m, iplen + sizeof(*ph), sizeof(*cp), &offp)) == NULL) { @@ -414,13 +427,16 @@ pfsync_input(struct mbuf *m, ...) splx(s); return; } - for (st = RB_MIN(pf_state_tree_lan_ext, - &kif->pfik_lan_ext); st; st = nexts) { - nexts = RB_NEXT(pf_state_tree_lan_ext, - &kif->pfik_lan_ext, st); - if (st->creatorid == creatorid) { - st->sync_flags |= PFSTATE_FROMSYNC; - pf_unlink_state(st); + for (sk = RB_MIN(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext); sk; sk = nextsk) { + nextsk = RB_NEXT(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext, sk); + TAILQ_FOREACH(st, &sk->states, next) { + if (st->creatorid == creatorid) { + st->sync_flags |= + PFSTATE_FROMSYNC; + pf_unlink_state(st); + } } } } @@ -485,18 +501,19 @@ pfsync_input(struct mbuf *m, ...) continue; } - bcopy(sp->id, &key.id, sizeof(key.id)); - key.creatorid = sp->creatorid; + bcopy(sp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = sp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { /* insert the update */ if (pfsync_insert_net_state(sp, chksum_flag)) pfsyncstats.pfsyncs_badstate++; continue; } + sk = st->state_key; sfail = 0; - if (st->proto == IPPROTO_TCP) { + if (sk->proto == IPPROTO_TCP) { /* * The state should never go backwards except * for syn-proxy states. Neither should the @@ -579,10 +596,10 @@ pfsync_input(struct mbuf *m, ...) s = splsoftnet(); for (i = 0, sp = (struct pfsync_state *)(mp->m_data + offp); i < count; i++, sp++) { - bcopy(sp->id, &key.id, sizeof(key.id)); - key.creatorid = sp->creatorid; + bcopy(sp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = sp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -616,10 +633,10 @@ pfsync_input(struct mbuf *m, ...) continue; } - bcopy(up->id, &key.id, sizeof(key.id)); - key.creatorid = up->creatorid; + bcopy(up->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = up->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { /* We don't have this state. Ask for it. */ error = pfsync_request_update(up, &src); @@ -631,8 +648,9 @@ pfsync_input(struct mbuf *m, ...) pfsyncstats.pfsyncs_badstate++; continue; } + sk = st->state_key; sfail = 0; - if (st->proto == IPPROTO_TCP) { + if (sk->proto == IPPROTO_TCP) { /* * The state should never go backwards except * for syn-proxy states. Neither should the @@ -702,10 +720,10 @@ pfsync_input(struct mbuf *m, ...) s = splsoftnet(); for (i = 0, dp = (struct pfsync_state_del *)(mp->m_data + offp); i < count; i++, dp++) { - bcopy(dp->id, &key.id, sizeof(key.id)); - key.creatorid = dp->creatorid; + bcopy(dp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = dp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -732,10 +750,10 @@ pfsync_input(struct mbuf *m, ...) for (i = 0, rup = (struct pfsync_state_upd_req *)(mp->m_data + offp); i < count; i++, rup++) { - bcopy(rup->id, &key.id, sizeof(key.id)); - key.creatorid = rup->creatorid; + bcopy(rup->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = rup->creatorid; - if (key.id == 0 && key.creatorid == 0) { + if (id_key.id == 0 && id_key.creatorid == 0) { sc->sc_ureq_received = time_uptime; if (sc->sc_bulk_send_next == NULL) sc->sc_bulk_send_next = @@ -747,7 +765,7 @@ pfsync_input(struct mbuf *m, ...) pfsync_send_bus(sc, PFSYNC_BUS_START); timeout_add(&sc->sc_bulk_tmo, 1 * hz); } else { - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -804,6 +822,7 @@ pfsync_input(struct mbuf *m, ...) break; } break; +#ifdef IPSEC case PFSYNC_ACT_TDB_UPD: if ((mp = m_pulldown(m, iplen + sizeof(*ph), count * sizeof(*pt), &offp)) == NULL) { @@ -816,6 +835,7 @@ pfsync_input(struct mbuf *m, ...) pfsync_update_net_tdb(pt); splx(s); break; +#endif } done: @@ -1080,6 +1100,7 @@ pfsync_pack_state(u_int8_t action, struc struct pfsync_state *sp = NULL; struct pfsync_state_upd *up = NULL; struct pfsync_state_del *dp = NULL; + struct pf_state_key *sk = st->state_key; struct pf_rule *r; u_long secs; int s, ret = 0; @@ -1164,10 +1185,10 @@ pfsync_pack_state(u_int8_t action, struc bcopy(&st->id, sp->id, sizeof(sp->id)); sp->creatorid = st->creatorid; - strlcpy(sp->ifname, st->u.s.kif->pfik_name, sizeof(sp->ifname)); - pf_state_host_hton(&st->lan, &sp->lan); - pf_state_host_hton(&st->gwy, &sp->gwy); - pf_state_host_hton(&st->ext, &sp->ext); + strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); + pf_state_host_hton(&sk->lan, &sp->lan); + pf_state_host_hton(&sk->gwy, &sp->gwy); + pf_state_host_hton(&sk->ext, &sp->ext); bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); @@ -1184,9 +1205,9 @@ pfsync_pack_state(u_int8_t action, struc sp->anchor = htonl(-1); else sp->anchor = htonl(r->nr); - sp->af = st->af; - sp->proto = st->proto; - sp->direction = st->direction; + sp->af = sk->af; + sp->proto = sk->proto; + sp->direction = sk->direction; sp->log = st->log; sp->allow_opts = st->allow_opts; sp->timeout = st->timeout; @@ -1418,7 +1439,7 @@ pfsync_bulk_update(void *v) } /* figure next state to send */ - state = TAILQ_NEXT(state, u.s.entry_list); + state = TAILQ_NEXT(state, entry_list); /* wrap to start of list if we hit the end */ if (!state) @@ -1577,6 +1598,7 @@ pfsync_sendout_mbuf(struct pfsync_softc return (0); } +#ifdef IPSEC /* Update an in-kernel tdb. Silently fail if no tdb is found. */ void pfsync_update_net_tdb(struct pfsync_tdb *pt) @@ -1727,3 +1749,4 @@ pfsync_update_tdb(struct tdb *tdb, int o splx(s); return (ret); } +#endif Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.30 2006/10/31 14:49:01 henning Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.31 2007/05/31 04:11:42 mcbride Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -32,62 +32,6 @@ #define PFSYNC_ID_LEN sizeof(u_int64_t) -struct pfsync_state_scrub { - u_int16_t pfss_flags; - u_int8_t pfss_ttl; /* stashed TTL */ -#define PFSYNC_SCRUB_FLAG_VALID 0x01 - u_int8_t scrub_flag; - u_int32_t pfss_ts_mod; /* timestamp modulation */ -} __packed; - -struct pfsync_state_host { - struct pf_addr addr; - u_int16_t port; - u_int16_t pad[3]; -} __packed; - -struct pfsync_state_peer { - struct pfsync_state_scrub scrub; /* state is scrubbed */ - u_int32_t seqlo; /* Max sequence number sent */ - u_int32_t seqhi; /* Max the other end ACKd + win */ - u_int32_t seqdiff; /* Sequence number modulator */ - u_int16_t max_win; /* largest window (pre scaling) */ - u_int16_t mss; /* Maximum segment size option */ - u_int8_t state; /* active state level */ - u_int8_t wscale; /* window scaling factor */ - u_int8_t pad[6]; -} __packed; - -struct pfsync_state { - u_int32_t id[2]; - char ifname[IFNAMSIZ]; - struct pfsync_state_host lan; - struct pfsync_state_host gwy; - struct pfsync_state_host ext; - struct pfsync_state_peer src; - struct pfsync_state_peer dst; - struct pf_addr rt_addr; - u_int32_t rule; - u_int32_t anchor; - u_int32_t nat_rule; - u_int32_t creation; - u_int32_t expire; - u_int32_t packets[2][2]; - u_int32_t bytes[2][2]; - u_int32_t creatorid; - sa_family_t af; - u_int8_t proto; - u_int8_t direction; - u_int8_t log; - u_int8_t allow_opts; - u_int8_t timeout; - u_int8_t sync_flags; - u_int8_t updates; -} __packed; - -#define PFSYNC_FLAG_COMPRESS 0x01 -#define PFSYNC_FLAG_STALE 0x02 - struct pfsync_tdb { u_int32_t spi; union sockaddr_union dst; @@ -251,6 +195,7 @@ struct pfsyncreq { }; +/* for copies to/from network */ #define pf_state_peer_hton(s,d) do { \ (d)->seqlo = htonl((s)->seqlo); \ (d)->seqhi = htonl((s)->seqhi); \ @@ -312,7 +257,7 @@ int pfsync_clear_states(u_int32_t, char int pfsync_pack_state(u_int8_t, struct pf_state *, int); #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ - (st->proto == IPPROTO_PFSYNC)) \ + (st->state_key->proto == IPPROTO_PFSYNC)) \ st->sync_flags |= PFSTATE_NOSYNC; \ else if (!st->sync_flags) \ pfsync_pack_state(PFSYNC_ACT_INS, (st), \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,5 +1,4 @@ -/* $OpenBSD: pf.c,v 1.527 2007/02/22 15:23:23 pyr Exp $ */ -/* add: $OpenBSD: pf.c,v 1.559 2007/09/18 18:45:59 markus Exp $ */ +/* $OpenBSD: pf.c,v 1.552 2007/08/21 15:57:27 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -96,6 +95,10 @@ * Global variables */ +/* state tables */ +struct pf_state_tree_lan_ext pf_statetbl_lan_ext; +struct pf_state_tree_ext_gwy pf_statetbl_ext_gwy; + struct pf_altqqueue pf_altqs[2]; struct pf_palist pf_pabuf; struct pf_altqqueue *pf_altqs_active; @@ -114,8 +117,9 @@ struct pf_anchor_stackframe { struct pf_anchor *child; } pf_anchor_stack[64]; -struct pool pf_src_tree_pl, pf_rule_pl; -struct pool pf_state_pl, pf_altq_pl, pf_pooladdr_pl; +struct pool pf_src_tree_pl, pf_rule_pl, pf_pooladdr_pl; +struct pool pf_state_pl, pf_state_key_pl; +struct pool pf_altq_pl; void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); @@ -153,22 +157,13 @@ struct pf_rule *pf_get_translation(stru struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t *); -int pf_test_tcp(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, - void *, struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); -int pf_test_udp(struct pf_rule **, struct pf_state **, +void pf_attach_state(struct pf_state_key *, + struct pf_state *, int); +void pf_detach_state(struct pf_state *, int); +int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **, struct ifqueue *); -int pf_test_icmp(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, - void *, struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); -int pf_test_other(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, void *, - struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); int pf_test_fragment(struct pf_rule **, int, struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, @@ -184,8 +179,9 @@ int pf_test_state_icmp(struct pf_stat void *, struct pf_pdesc *, u_short *); int pf_test_state_other(struct pf_state **, int, struct pfi_kif *, struct pf_pdesc *); -int pf_match_tag(struct mbuf *, struct pf_rule *, - struct pf_mtag *, int *); +int pf_match_tag(struct mbuf *, struct pf_rule *, int *); +void pf_step_into_anchor(int *, struct pf_ruleset **, int, + struct pf_rule **, struct pf_rule **, int *); int pf_step_out_of_anchor(int *, struct pf_ruleset **, int, struct pf_rule **, struct pf_rule **, int *); @@ -217,9 +213,11 @@ int pf_check_proto_cksum(struct mbuf u_int8_t, sa_family_t); int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); -struct pf_state *pf_find_state_recurse(struct pfi_kif *, - struct pf_state_cmp *, u_int8_t); +struct pf_state *pf_find_state(struct pfi_kif *, + struct pf_state_key_cmp *, u_int8_t); int pf_src_connlimit(struct pf_state **); +void pf_stateins_err(const char *, struct pf_state *, + struct pfi_kif *); int pf_check_congestion(struct ifqueue *); extern struct pool pfr_ktable_pl; @@ -236,11 +234,9 @@ struct pf_pool_limit pf_pool_limits[PF_L #define STATE_LOOKUP() \ do { \ if (direction == PF_IN) \ - *state = pf_find_state_recurse( \ - kif, &key, PF_EXT_GWY); \ + *state = pf_find_state(kif, &key, PF_EXT_GWY); \ else \ - *state = pf_find_state_recurse( \ - kif, &key, PF_LAN_EXT); \ + *state = pf_find_state(kif, &key, PF_LAN_EXT); \ if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ return (PF_DROP); \ if (direction == PF_OUT && \ @@ -253,13 +249,13 @@ struct pf_pool_limit pf_pool_limits[PF_L return (PF_PASS); \ } while (0) -#define STATE_TRANSLATE(s) \ - (s)->lan.addr.addr32[0] != (s)->gwy.addr.addr32[0] || \ - ((s)->af == AF_INET6 && \ - ((s)->lan.addr.addr32[1] != (s)->gwy.addr.addr32[1] || \ - (s)->lan.addr.addr32[2] != (s)->gwy.addr.addr32[2] || \ - (s)->lan.addr.addr32[3] != (s)->gwy.addr.addr32[3])) || \ - (s)->lan.port != (s)->gwy.port +#define STATE_TRANSLATE(sk) \ + (sk)->lan.addr.addr32[0] != (sk)->gwy.addr.addr32[0] || \ + ((sk)->af == AF_INET6 && \ + ((sk)->lan.addr.addr32[1] != (sk)->gwy.addr.addr32[1] || \ + (sk)->lan.addr.addr32[2] != (sk)->gwy.addr.addr32[2] || \ + (sk)->lan.addr.addr32[3] != (sk)->gwy.addr.addr32[3])) || \ + (sk)->lan.port != (sk)->gwy.port #define BOUND_IFACE(r, k) \ ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : pfi_all @@ -283,10 +279,10 @@ struct pf_pool_limit pf_pool_limits[PF_L } while (0) static __inline int pf_src_compare(struct pf_src_node *, struct pf_src_node *); -static __inline int pf_state_compare_lan_ext(struct pf_state *, - struct pf_state *); -static __inline int pf_state_compare_ext_gwy(struct pf_state *, - struct pf_state *); +static __inline int pf_state_compare_lan_ext(struct pf_state_key *, + struct pf_state_key *); +static __inline int pf_state_compare_ext_gwy(struct pf_state_key *, + struct pf_state_key *); static __inline int pf_state_compare_id(struct pf_state *, struct pf_state *); @@ -296,12 +292,15 @@ struct pf_state_tree_id tree_id; struct pf_state_queue state_list; RB_GENERATE(pf_src_tree, pf_src_node, entry, pf_src_compare); -RB_GENERATE(pf_state_tree_lan_ext, pf_state, - u.s.entry_lan_ext, pf_state_compare_lan_ext); -RB_GENERATE(pf_state_tree_ext_gwy, pf_state, - u.s.entry_ext_gwy, pf_state_compare_ext_gwy); +RB_GENERATE(pf_state_tree_lan_ext, pf_state_key, + entry_lan_ext, pf_state_compare_lan_ext); +RB_GENERATE(pf_state_tree_ext_gwy, pf_state_key, + entry_ext_gwy, pf_state_compare_ext_gwy); RB_GENERATE(pf_state_tree_id, pf_state, - u.s.entry_id, pf_state_compare_id); + entry_id, pf_state_compare_id); + +#define PF_DT_SKIP_LANEXT 0x01 +#define PF_DT_SKIP_EXTGWY 0x02 static __inline int pf_src_compare(struct pf_src_node *a, struct pf_src_node *b) @@ -348,7 +347,7 @@ pf_src_compare(struct pf_src_node *a, st } static __inline int -pf_state_compare_lan_ext(struct pf_state *a, struct pf_state *b) +pf_state_compare_lan_ext(struct pf_state_key *a, struct pf_state_key *b) { int diff; @@ -416,7 +415,7 @@ pf_state_compare_lan_ext(struct pf_state } static __inline int -pf_state_compare_ext_gwy(struct pf_state *a, struct pf_state *b) +pf_state_compare_ext_gwy(struct pf_state_key *a, struct pf_state_key *b) { int diff; @@ -522,74 +521,71 @@ struct pf_state * pf_find_state_byid(struct pf_state_cmp *key) { pf_status.fcounters[FCNT_STATE_SEARCH]++; + return (RB_FIND(pf_state_tree_id, &tree_id, (struct pf_state *)key)); } struct pf_state * -pf_find_state_recurse(struct pfi_kif *kif, struct pf_state_cmp *key, u_int8_t tree) +pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int8_t tree) { - struct pf_state *s; + struct pf_state_key *sk; + struct pf_state *s; pf_status.fcounters[FCNT_STATE_SEARCH]++; switch (tree) { case PF_LAN_EXT: - if ((s = RB_FIND(pf_state_tree_lan_ext, &kif->pfik_lan_ext, - (struct pf_state *)key)) != NULL) - return (s); - if ((s = RB_FIND(pf_state_tree_lan_ext, &pfi_all->pfik_lan_ext, - (struct pf_state *)key)) != NULL) - return (s); - return (NULL); + sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, + (struct pf_state_key *)key); + break; case PF_EXT_GWY: - if ((s = RB_FIND(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, - (struct pf_state *)key)) != NULL) - return (s); - if ((s = RB_FIND(pf_state_tree_ext_gwy, &pfi_all->pfik_ext_gwy, - (struct pf_state *)key)) != NULL) - return (s); - return (NULL); + sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, + (struct pf_state_key *)key); + break; default: - panic("pf_find_state_recurse"); + panic("pf_find_state"); } + + /* list is sorted, if-bound states before floating ones */ + if (sk != NULL) + TAILQ_FOREACH(s, &sk->states, next) + if (s->kif == pfi_all || s->kif == kif) + return (s); + + return (NULL); } struct pf_state * -pf_find_state_all(struct pf_state_cmp *key, u_int8_t tree, int *more) +pf_find_state_all(struct pf_state_key_cmp *key, u_int8_t tree, int *more) { - struct pf_state *s, *ss = NULL; - struct pfi_kif *kif; + struct pf_state_key *sk; + struct pf_state *s, *ret = NULL; pf_status.fcounters[FCNT_STATE_SEARCH]++; switch (tree) { case PF_LAN_EXT: - TAILQ_FOREACH(kif, &pfi_statehead, pfik_w_states) { - s = RB_FIND(pf_state_tree_lan_ext, - &kif->pfik_lan_ext, (struct pf_state *)key); - if (s == NULL) - continue; - if (more == NULL) - return (s); - ss = s; - (*more)++; - } - return (ss); + sk = RB_FIND(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext, (struct pf_state_key *)key); + break; case PF_EXT_GWY: - TAILQ_FOREACH(kif, &pfi_statehead, pfik_w_states) { - s = RB_FIND(pf_state_tree_ext_gwy, - &kif->pfik_ext_gwy, (struct pf_state *)key); - if (s == NULL) - continue; - if (more == NULL) - return (s); - ss = s; - (*more)++; - } - return (ss); + sk = RB_FIND(pf_state_tree_ext_gwy, + &pf_statetbl_ext_gwy, (struct pf_state_key *)key); + break; default: panic("pf_find_state_all"); } + + if (sk != NULL) { + ret = TAILQ_FIRST(&sk->states); + if (more == NULL) + return (ret); + + TAILQ_FOREACH(s, &sk->states, next) + (*more)++; + } + + return (ret); } void @@ -625,7 +621,6 @@ pf_check_threshold(struct pf_threshold * int pf_src_connlimit(struct pf_state **state) { - struct pf_state *s; int bad = 0; (*state)->src_node->conn++; @@ -656,12 +651,12 @@ pf_src_connlimit(struct pf_state **state if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf_src_connlimit: blocking address "); pf_print_host(&(*state)->src_node->addr, 0, - (*state)->af); + (*state)->state_key->af); } bzero(&p, sizeof(p)); - p.pfra_af = (*state)->af; - switch ((*state)->af) { + p.pfra_af = (*state)->state_key->af; + switch ((*state)->state_key->af) { #ifdef INET case AF_INET: p.pfra_net = 32; @@ -681,26 +676,31 @@ pf_src_connlimit(struct pf_state **state /* kill existing states if that's required. */ if ((*state)->rule.ptr->flush) { - pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; + struct pf_state_key *sk; + struct pf_state *st; - RB_FOREACH(s, pf_state_tree_id, &tree_id) { + pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; + RB_FOREACH(st, pf_state_tree_id, &tree_id) { + sk = st->state_key; /* * Kill states from this source. (Only those * from the same rule if PF_FLUSH_GLOBAL is not * set) */ - if (s->af == (*state)->af && - (((*state)->direction == PF_OUT && + if (sk->af == + (*state)->state_key->af && + (((*state)->state_key->direction == + PF_OUT && PF_AEQ(&(*state)->src_node->addr, - &s->lan.addr, s->af)) || - ((*state)->direction == PF_IN && + &sk->lan.addr, sk->af)) || + ((*state)->state_key->direction == PF_IN && PF_AEQ(&(*state)->src_node->addr, - &s->ext.addr, s->af))) && + &sk->ext.addr, sk->af))) && ((*state)->rule.ptr->flush & PF_FLUSH_GLOBAL || - (*state)->rule.ptr == s->rule.ptr)) { - s->timeout = PFTM_PURGE; - s->src.state = s->dst.state = + (*state)->rule.ptr == st->rule.ptr)) { + st->timeout = PFTM_PURGE; + st->src.state = st->dst.state = TCPS_CLOSED; killed++; } @@ -782,73 +782,80 @@ pf_insert_src_node(struct pf_src_node ** return (0); } +void +pf_stateins_err(const char *tree, struct pf_state *s, struct pfi_kif *kif) +{ + struct pf_state_key *sk = s->state_key; + + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state insert failed: %s %s", tree, kif->pfik_name); + printf(" lan: "); + pf_print_host(&sk->lan.addr, sk->lan.port, + sk->af); + printf(" gwy: "); + pf_print_host(&sk->gwy.addr, sk->gwy.port, + sk->af); + printf(" ext: "); + pf_print_host(&sk->ext.addr, sk->ext.port, + sk->af); + if (s->sync_flags & PFSTATE_FROMSYNC) + printf(" (from sync)"); + printf("\n"); + } +} + int -pf_insert_state(struct pfi_kif *kif, struct pf_state *state) +pf_insert_state(struct pfi_kif *kif, struct pf_state *s) { - /* Thou MUST NOT insert multiple duplicate keys */ - state->u.s.kif = kif; - if (RB_INSERT(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state)) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state insert failed: tree_lan_ext"); - printf(" lan: "); - pf_print_host(&state->lan.addr, state->lan.port, - state->af); - printf(" gwy: "); - pf_print_host(&state->gwy.addr, state->gwy.port, - state->af); - printf(" ext: "); - pf_print_host(&state->ext.addr, state->ext.port, - state->af); - if (state->sync_flags & PFSTATE_FROMSYNC) - printf(" (from sync)"); - printf("\n"); - } - return (-1); + struct pf_state_key *cur; + struct pf_state *sp; + + KASSERT(s->state_key != NULL); + s->kif = kif; + + if ((cur = RB_INSERT(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, + s->state_key)) != NULL) { + /* key exists. check for same kif, if none, add to key */ + TAILQ_FOREACH(sp, &cur->states, next) + if (sp->kif == kif) { /* collision! */ + pf_stateins_err("tree_lan_ext", s, kif); + return (-1); + } + pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); + pf_attach_state(cur, s, kif == pfi_all ? 1 : 0); } - if (RB_INSERT(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, state)) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state insert failed: tree_ext_gwy"); - printf(" lan: "); - pf_print_host(&state->lan.addr, state->lan.port, - state->af); - printf(" gwy: "); - pf_print_host(&state->gwy.addr, state->gwy.port, - state->af); - printf(" ext: "); - pf_print_host(&state->ext.addr, state->ext.port, - state->af); - if (state->sync_flags & PFSTATE_FROMSYNC) - printf(" (from sync)"); - printf("\n"); - } - RB_REMOVE(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state); + /* if cur != NULL, we already found a state key and attached to it */ + if (cur == NULL && (cur = RB_INSERT(pf_state_tree_ext_gwy, + &pf_statetbl_ext_gwy, s->state_key)) != NULL) { + /* must not happen. we must have found the sk above! */ + pf_stateins_err("tree_ext_gwy", s, kif); + pf_detach_state(s, PF_DT_SKIP_EXTGWY); return (-1); } - if (state->id == 0 && state->creatorid == 0) { - state->id = htobe64(pf_status.stateid++); - state->creatorid = pf_status.hostid; + if (s->id == 0 && s->creatorid == 0) { + s->id = htobe64(pf_status.stateid++); + s->creatorid = pf_status.hostid; } - if (RB_INSERT(pf_state_tree_id, &tree_id, state) != NULL) { + if (RB_INSERT(pf_state_tree_id, &tree_id, s) != NULL) { if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf: state insert failed: " "id: %016llx creatorid: %08x", - betoh64(state->id), ntohl(state->creatorid)); - if (state->sync_flags & PFSTATE_FROMSYNC) + betoh64(s->id), ntohl(s->creatorid)); + if (s->sync_flags & PFSTATE_FROMSYNC) printf(" (from sync)"); printf("\n"); } - RB_REMOVE(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state); - RB_REMOVE(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, state); + pf_detach_state(s, 0); return (-1); } - TAILQ_INSERT_TAIL(&state_list, state, u.s.entry_list); + TAILQ_INSERT_TAIL(&state_list, s, entry_list); pf_status.fcounters[FCNT_STATE_INSERT]++; pf_status.states++; pfi_kif_ref(kif, PFI_KIF_REF_STATE); #if NPFSYNC - pfsync_insert_state(state); + pfsync_insert_state(s); #endif return (0); } @@ -954,7 +961,7 @@ pf_src_tree_remove_state(struct pf_state u_int32_t timeout; if (s->src_node != NULL) { - if (s->proto == IPPROTO_TCP) { + if (s->state_key->proto == IPPROTO_TCP) { if (s->src.tcp_est) --s->src_node->conn; } @@ -983,16 +990,12 @@ void pf_unlink_state(struct pf_state *cur) { if (cur->src.state == PF_TCPS_PROXY_DST) { - pf_send_tcp(cur->rule.ptr, cur->af, - &cur->ext.addr, &cur->lan.addr, - cur->ext.port, cur->lan.port, + pf_send_tcp(cur->rule.ptr, cur->state_key->af, + &cur->state_key->ext.addr, &cur->state_key->lan.addr, + cur->state_key->ext.port, cur->state_key->lan.port, cur->src.seqhi, cur->src.seqlo + 1, TH_RST|TH_ACK, 0, 0, 0, 1, cur->tag, NULL, NULL); } - RB_REMOVE(pf_state_tree_ext_gwy, - &cur->u.s.kif->pfik_ext_gwy, cur); - RB_REMOVE(pf_state_tree_lan_ext, - &cur->u.s.kif->pfik_lan_ext, cur); RB_REMOVE(pf_state_tree_id, &tree_id, cur); #if NPFSYNC if (cur->creatorid == pf_status.hostid) @@ -1000,6 +1003,7 @@ pf_unlink_state(struct pf_state *cur) #endif cur->timeout = PFTM_UNLINKED; pf_src_tree_remove_state(cur); + pf_detach_state(cur, 0); } /* callers should be at splsoftnet and hold the @@ -1025,8 +1029,8 @@ pf_free_state(struct pf_state *cur) if (--cur->anchor.ptr->states <= 0) pf_rm_rule(NULL, cur->anchor.ptr); pf_normalize_tcp_cleanup(cur); - pfi_kif_unref(cur->u.s.kif, PFI_KIF_REF_STATE); - TAILQ_REMOVE(&state_list, cur, u.s.entry_list); + pfi_kif_unref(cur->kif, PFI_KIF_REF_STATE); + TAILQ_REMOVE(&state_list, cur, entry_list); if (cur->tag) pf_tag_unref(cur->tag); pool_put(&pf_state_pl, cur); @@ -1050,7 +1054,7 @@ pf_purge_expired_states(u_int32_t maxche } /* get next state, as cur may get deleted */ - next = TAILQ_NEXT(cur, u.s.entry_list); + next = TAILQ_NEXT(cur, entry_list); if (cur->timeout == PFTM_UNLINKED) { /* free unlinked state */ @@ -1175,7 +1179,8 @@ pf_print_host(struct pf_addr *addr, u_in void pf_print_state(struct pf_state *s) { - switch (s->proto) { + struct pf_state_key *sk = s->state_key; + switch (sk->proto) { case IPPROTO_TCP: printf("TCP "); break; @@ -1189,14 +1194,14 @@ pf_print_state(struct pf_state *s) printf("ICMPV6 "); break; default: - printf("%u ", s->proto); + printf("%u ", sk->proto); break; } - pf_print_host(&s->lan.addr, s->lan.port, s->af); + pf_print_host(&sk->lan.addr, sk->lan.port, sk->af); printf(" "); - pf_print_host(&s->gwy.addr, s->gwy.port, s->af); + pf_print_host(&sk->gwy.addr, sk->gwy.port, sk->af); printf(" "); - pf_print_host(&s->ext.addr, s->ext.port, s->af); + pf_print_host(&sk->ext.addr, sk->ext.port, sk->af); printf(" [lo=%u high=%u win=%u modulator=%u", s->src.seqlo, s->src.seqhi, s->src.max_win, s->src.seqdiff); if (s->src.wscale && s->dst.wscale) @@ -1565,7 +1570,6 @@ pf_send_tcp(const struct pf_rule *r, sa_ #endif /* INET6 */ struct tcphdr *th; char *opt; - struct pf_mtag *pf_mtag; /* maximum segment size tcp option */ tlen = sizeof(struct tcphdr); @@ -1589,24 +1593,18 @@ pf_send_tcp(const struct pf_rule *r, sa_ m = m_gethdr(M_DONTWAIT, MT_HEADER); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:21:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9408D1065679; Wed, 10 Dec 2008 21:21:10 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F4308FC1D; Wed, 10 Dec 2008 21:21:10 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALLA9J043161; Wed, 10 Dec 2008 21:21:10 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALLAxC043156; Wed, 10 Dec 2008 21:21:10 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102121.mBALLAxC043156@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:21:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185884 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:21:10 -0000 Author: mlaier Date: Wed Dec 10 21:21:09 2008 New Revision: 185884 URL: http://svn.freebsd.org/changeset/base/185884 Log: Import OPENBSD_4_2_BASE Modified: vendor-sys/pf/dist/net/if_pflog.c vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pflog.c ============================================================================== --- vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.22 2006/12/15 09:31:20 otto Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.24 2007/05/26 17:13:30 jason Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -87,8 +87,6 @@ struct if_clone pflog_cloner = struct ifnet *pflogifs[PFLOGIFS_MAX]; /* for fast access */ -extern int ifqmaxlen; - void pflogattach(int npflog) { @@ -96,7 +94,6 @@ pflogattach(int npflog) LIST_INIT(&pflogif_list); for (i = 0; i < PFLOGIFS_MAX; i++) pflogifs[i] = NULL; - (void) pflog_clone_create(&pflog_cloner, 0); if_clone_attach(&pflog_cloner); } Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.73 2006/11/16 13:13:38 henning Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -106,7 +106,6 @@ void pfsync_bulk_update(void *); void pfsync_bulkfail(void *); int pfsync_sync_ok; -extern int ifqmaxlen; struct if_clone pfsync_cloner = IF_CLONE_INITIALIZER("pfsync", pfsync_clone_create, pfsync_clone_destroy); @@ -221,6 +220,7 @@ int pfsync_insert_net_state(struct pfsync_state *sp, u_int8_t chksum_flag) { struct pf_state *st = NULL; + struct pf_state_key *sk = NULL; struct pf_rule *r = NULL; struct pfi_kif *kif; @@ -243,7 +243,9 @@ pfsync_insert_net_state(struct pfsync_st * If the ruleset checksums match, it's safe to associate the state * with the rule of that number. */ - if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag) + if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag && + ntohl(sp->rule) < + pf_main_ruleset.rules[PF_RULESET_FILTER].active.rcount) r = pf_main_ruleset.rules[ PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)]; else @@ -257,6 +259,12 @@ pfsync_insert_net_state(struct pfsync_st } bzero(st, sizeof(*st)); + if ((sk = pf_alloc_state_key(st)) == NULL) { + pool_put(&pf_state_pl, st); + pfi_kif_unref(kif, PFI_KIF_REF_NONE); + return (ENOMEM); + } + /* allocate memory for scrub info */ if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) { @@ -264,6 +272,7 @@ pfsync_insert_net_state(struct pfsync_st if (st->src.scrub) pool_put(&pf_state_scrub_pl, st->src.scrub); pool_put(&pf_state_pl, st); + pool_put(&pf_state_key_pl, sk); return (ENOMEM); } @@ -274,9 +283,9 @@ pfsync_insert_net_state(struct pfsync_st r->states++; /* fill in the rest of the state entry */ - pf_state_host_ntoh(&sp->lan, &st->lan); - pf_state_host_ntoh(&sp->gwy, &st->gwy); - pf_state_host_ntoh(&sp->ext, &st->ext); + pf_state_host_ntoh(&sp->lan, &sk->lan); + pf_state_host_ntoh(&sp->gwy, &sk->gwy); + pf_state_host_ntoh(&sp->ext, &sk->ext); pf_state_peer_ntoh(&sp->src, &st->src); pf_state_peer_ntoh(&sp->dst, &st->dst); @@ -285,9 +294,9 @@ pfsync_insert_net_state(struct pfsync_st st->creation = time_second - ntohl(sp->creation); st->expire = ntohl(sp->expire) + time_second; - st->af = sp->af; - st->proto = sp->proto; - st->direction = sp->direction; + sk->af = sp->af; + sk->proto = sp->proto; + sk->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; st->allow_opts = sp->allow_opts; @@ -318,14 +327,17 @@ pfsync_input(struct mbuf *m, ...) struct pfsync_header *ph; struct pfsync_softc *sc = pfsyncif; struct pf_state *st; - struct pf_state_cmp key; + struct pf_state_key *sk; + struct pf_state_cmp id_key; struct pfsync_state *sp; struct pfsync_state_upd *up; struct pfsync_state_del *dp; struct pfsync_state_clr *cp; struct pfsync_state_upd_req *rup; struct pfsync_state_bus *bus; +#ifdef IPSEC struct pfsync_tdb *pt; +#endif struct in_addr src; struct mbuf *mp; int iplen, action, error, i, s, count, offp, sfail, stale = 0; @@ -389,7 +401,8 @@ pfsync_input(struct mbuf *m, ...) switch (action) { case PFSYNC_ACT_CLR: { struct pf_state *nexts; - struct pfi_kif *kif; + struct pf_state_key *nextsk; + struct pfi_kif *kif; u_int32_t creatorid; if ((mp = m_pulldown(m, iplen + sizeof(*ph), sizeof(*cp), &offp)) == NULL) { @@ -414,13 +427,16 @@ pfsync_input(struct mbuf *m, ...) splx(s); return; } - for (st = RB_MIN(pf_state_tree_lan_ext, - &kif->pfik_lan_ext); st; st = nexts) { - nexts = RB_NEXT(pf_state_tree_lan_ext, - &kif->pfik_lan_ext, st); - if (st->creatorid == creatorid) { - st->sync_flags |= PFSTATE_FROMSYNC; - pf_unlink_state(st); + for (sk = RB_MIN(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext); sk; sk = nextsk) { + nextsk = RB_NEXT(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext, sk); + TAILQ_FOREACH(st, &sk->states, next) { + if (st->creatorid == creatorid) { + st->sync_flags |= + PFSTATE_FROMSYNC; + pf_unlink_state(st); + } } } } @@ -485,18 +501,19 @@ pfsync_input(struct mbuf *m, ...) continue; } - bcopy(sp->id, &key.id, sizeof(key.id)); - key.creatorid = sp->creatorid; + bcopy(sp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = sp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { /* insert the update */ if (pfsync_insert_net_state(sp, chksum_flag)) pfsyncstats.pfsyncs_badstate++; continue; } + sk = st->state_key; sfail = 0; - if (st->proto == IPPROTO_TCP) { + if (sk->proto == IPPROTO_TCP) { /* * The state should never go backwards except * for syn-proxy states. Neither should the @@ -579,10 +596,10 @@ pfsync_input(struct mbuf *m, ...) s = splsoftnet(); for (i = 0, sp = (struct pfsync_state *)(mp->m_data + offp); i < count; i++, sp++) { - bcopy(sp->id, &key.id, sizeof(key.id)); - key.creatorid = sp->creatorid; + bcopy(sp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = sp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -616,10 +633,10 @@ pfsync_input(struct mbuf *m, ...) continue; } - bcopy(up->id, &key.id, sizeof(key.id)); - key.creatorid = up->creatorid; + bcopy(up->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = up->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { /* We don't have this state. Ask for it. */ error = pfsync_request_update(up, &src); @@ -631,8 +648,9 @@ pfsync_input(struct mbuf *m, ...) pfsyncstats.pfsyncs_badstate++; continue; } + sk = st->state_key; sfail = 0; - if (st->proto == IPPROTO_TCP) { + if (sk->proto == IPPROTO_TCP) { /* * The state should never go backwards except * for syn-proxy states. Neither should the @@ -702,10 +720,10 @@ pfsync_input(struct mbuf *m, ...) s = splsoftnet(); for (i = 0, dp = (struct pfsync_state_del *)(mp->m_data + offp); i < count; i++, dp++) { - bcopy(dp->id, &key.id, sizeof(key.id)); - key.creatorid = dp->creatorid; + bcopy(dp->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = dp->creatorid; - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -732,10 +750,10 @@ pfsync_input(struct mbuf *m, ...) for (i = 0, rup = (struct pfsync_state_upd_req *)(mp->m_data + offp); i < count; i++, rup++) { - bcopy(rup->id, &key.id, sizeof(key.id)); - key.creatorid = rup->creatorid; + bcopy(rup->id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = rup->creatorid; - if (key.id == 0 && key.creatorid == 0) { + if (id_key.id == 0 && id_key.creatorid == 0) { sc->sc_ureq_received = time_uptime; if (sc->sc_bulk_send_next == NULL) sc->sc_bulk_send_next = @@ -747,7 +765,7 @@ pfsync_input(struct mbuf *m, ...) pfsync_send_bus(sc, PFSYNC_BUS_START); timeout_add(&sc->sc_bulk_tmo, 1 * hz); } else { - st = pf_find_state_byid(&key); + st = pf_find_state_byid(&id_key); if (st == NULL) { pfsyncstats.pfsyncs_badstate++; continue; @@ -804,6 +822,7 @@ pfsync_input(struct mbuf *m, ...) break; } break; +#ifdef IPSEC case PFSYNC_ACT_TDB_UPD: if ((mp = m_pulldown(m, iplen + sizeof(*ph), count * sizeof(*pt), &offp)) == NULL) { @@ -816,6 +835,7 @@ pfsync_input(struct mbuf *m, ...) pfsync_update_net_tdb(pt); splx(s); break; +#endif } done: @@ -1080,6 +1100,7 @@ pfsync_pack_state(u_int8_t action, struc struct pfsync_state *sp = NULL; struct pfsync_state_upd *up = NULL; struct pfsync_state_del *dp = NULL; + struct pf_state_key *sk = st->state_key; struct pf_rule *r; u_long secs; int s, ret = 0; @@ -1164,10 +1185,10 @@ pfsync_pack_state(u_int8_t action, struc bcopy(&st->id, sp->id, sizeof(sp->id)); sp->creatorid = st->creatorid; - strlcpy(sp->ifname, st->u.s.kif->pfik_name, sizeof(sp->ifname)); - pf_state_host_hton(&st->lan, &sp->lan); - pf_state_host_hton(&st->gwy, &sp->gwy); - pf_state_host_hton(&st->ext, &sp->ext); + strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); + pf_state_host_hton(&sk->lan, &sp->lan); + pf_state_host_hton(&sk->gwy, &sp->gwy); + pf_state_host_hton(&sk->ext, &sp->ext); bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); @@ -1184,9 +1205,9 @@ pfsync_pack_state(u_int8_t action, struc sp->anchor = htonl(-1); else sp->anchor = htonl(r->nr); - sp->af = st->af; - sp->proto = st->proto; - sp->direction = st->direction; + sp->af = sk->af; + sp->proto = sk->proto; + sp->direction = sk->direction; sp->log = st->log; sp->allow_opts = st->allow_opts; sp->timeout = st->timeout; @@ -1418,7 +1439,7 @@ pfsync_bulk_update(void *v) } /* figure next state to send */ - state = TAILQ_NEXT(state, u.s.entry_list); + state = TAILQ_NEXT(state, entry_list); /* wrap to start of list if we hit the end */ if (!state) @@ -1577,6 +1598,7 @@ pfsync_sendout_mbuf(struct pfsync_softc return (0); } +#ifdef IPSEC /* Update an in-kernel tdb. Silently fail if no tdb is found. */ void pfsync_update_net_tdb(struct pfsync_tdb *pt) @@ -1727,3 +1749,4 @@ pfsync_update_tdb(struct tdb *tdb, int o splx(s); return (ret); } +#endif Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:21:09 2008 (r185884) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.30 2006/10/31 14:49:01 henning Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.31 2007/05/31 04:11:42 mcbride Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -32,62 +32,6 @@ #define PFSYNC_ID_LEN sizeof(u_int64_t) -struct pfsync_state_scrub { - u_int16_t pfss_flags; - u_int8_t pfss_ttl; /* stashed TTL */ -#define PFSYNC_SCRUB_FLAG_VALID 0x01 - u_int8_t scrub_flag; - u_int32_t pfss_ts_mod; /* timestamp modulation */ -} __packed; - -struct pfsync_state_host { - struct pf_addr addr; - u_int16_t port; - u_int16_t pad[3]; -} __packed; - -struct pfsync_state_peer { - struct pfsync_state_scrub scrub; /* state is scrubbed */ - u_int32_t seqlo; /* Max sequence number sent */ - u_int32_t seqhi; /* Max the other end ACKd + win */ - u_int32_t seqdiff; /* Sequence number modulator */ - u_int16_t max_win; /* largest window (pre scaling) */ - u_int16_t mss; /* Maximum segment size option */ - u_int8_t state; /* active state level */ - u_int8_t wscale; /* window scaling factor */ - u_int8_t pad[6]; -} __packed; - -struct pfsync_state { - u_int32_t id[2]; - char ifname[IFNAMSIZ]; - struct pfsync_state_host lan; - struct pfsync_state_host gwy; - struct pfsync_state_host ext; - struct pfsync_state_peer src; - struct pfsync_state_peer dst; - struct pf_addr rt_addr; - u_int32_t rule; - u_int32_t anchor; - u_int32_t nat_rule; - u_int32_t creation; - u_int32_t expire; - u_int32_t packets[2][2]; - u_int32_t bytes[2][2]; - u_int32_t creatorid; - sa_family_t af; - u_int8_t proto; - u_int8_t direction; - u_int8_t log; - u_int8_t allow_opts; - u_int8_t timeout; - u_int8_t sync_flags; - u_int8_t updates; -} __packed; - -#define PFSYNC_FLAG_COMPRESS 0x01 -#define PFSYNC_FLAG_STALE 0x02 - struct pfsync_tdb { u_int32_t spi; union sockaddr_union dst; @@ -251,6 +195,7 @@ struct pfsyncreq { }; +/* for copies to/from network */ #define pf_state_peer_hton(s,d) do { \ (d)->seqlo = htonl((s)->seqlo); \ (d)->seqhi = htonl((s)->seqhi); \ @@ -312,7 +257,7 @@ int pfsync_clear_states(u_int32_t, char int pfsync_pack_state(u_int8_t, struct pf_state *, int); #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ - (st->proto == IPPROTO_PFSYNC)) \ + (st->state_key->proto == IPPROTO_PFSYNC)) \ st->sync_flags |= PFSTATE_NOSYNC; \ else if (!st->sync_flags) \ pfsync_pack_state(PFSYNC_ACT_INS, (st), \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:09:09 2008 (r185883) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:21:09 2008 (r185884) @@ -1,5 +1,4 @@ -/* $OpenBSD: pf.c,v 1.527 2007/02/22 15:23:23 pyr Exp $ */ -/* add: $OpenBSD: pf.c,v 1.559 2007/09/18 18:45:59 markus Exp $ */ +/* $OpenBSD: pf.c,v 1.552 2007/08/21 15:57:27 dhartmei Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -96,6 +95,10 @@ * Global variables */ +/* state tables */ +struct pf_state_tree_lan_ext pf_statetbl_lan_ext; +struct pf_state_tree_ext_gwy pf_statetbl_ext_gwy; + struct pf_altqqueue pf_altqs[2]; struct pf_palist pf_pabuf; struct pf_altqqueue *pf_altqs_active; @@ -114,8 +117,9 @@ struct pf_anchor_stackframe { struct pf_anchor *child; } pf_anchor_stack[64]; -struct pool pf_src_tree_pl, pf_rule_pl; -struct pool pf_state_pl, pf_altq_pl, pf_pooladdr_pl; +struct pool pf_src_tree_pl, pf_rule_pl, pf_pooladdr_pl; +struct pool pf_state_pl, pf_state_key_pl; +struct pool pf_altq_pl; void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); @@ -153,22 +157,13 @@ struct pf_rule *pf_get_translation(stru struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t, struct pf_addr *, u_int16_t *); -int pf_test_tcp(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, - void *, struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); -int pf_test_udp(struct pf_rule **, struct pf_state **, +void pf_attach_state(struct pf_state_key *, + struct pf_state *, int); +void pf_detach_state(struct pf_state *, int); +int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **, struct ifqueue *); -int pf_test_icmp(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, - void *, struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); -int pf_test_other(struct pf_rule **, struct pf_state **, - int, struct pfi_kif *, struct mbuf *, int, void *, - struct pf_pdesc *, struct pf_rule **, - struct pf_ruleset **, struct ifqueue *); int pf_test_fragment(struct pf_rule **, int, struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, @@ -184,8 +179,9 @@ int pf_test_state_icmp(struct pf_stat void *, struct pf_pdesc *, u_short *); int pf_test_state_other(struct pf_state **, int, struct pfi_kif *, struct pf_pdesc *); -int pf_match_tag(struct mbuf *, struct pf_rule *, - struct pf_mtag *, int *); +int pf_match_tag(struct mbuf *, struct pf_rule *, int *); +void pf_step_into_anchor(int *, struct pf_ruleset **, int, + struct pf_rule **, struct pf_rule **, int *); int pf_step_out_of_anchor(int *, struct pf_ruleset **, int, struct pf_rule **, struct pf_rule **, int *); @@ -217,9 +213,11 @@ int pf_check_proto_cksum(struct mbuf u_int8_t, sa_family_t); int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); -struct pf_state *pf_find_state_recurse(struct pfi_kif *, - struct pf_state_cmp *, u_int8_t); +struct pf_state *pf_find_state(struct pfi_kif *, + struct pf_state_key_cmp *, u_int8_t); int pf_src_connlimit(struct pf_state **); +void pf_stateins_err(const char *, struct pf_state *, + struct pfi_kif *); int pf_check_congestion(struct ifqueue *); extern struct pool pfr_ktable_pl; @@ -236,11 +234,9 @@ struct pf_pool_limit pf_pool_limits[PF_L #define STATE_LOOKUP() \ do { \ if (direction == PF_IN) \ - *state = pf_find_state_recurse( \ - kif, &key, PF_EXT_GWY); \ + *state = pf_find_state(kif, &key, PF_EXT_GWY); \ else \ - *state = pf_find_state_recurse( \ - kif, &key, PF_LAN_EXT); \ + *state = pf_find_state(kif, &key, PF_LAN_EXT); \ if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ return (PF_DROP); \ if (direction == PF_OUT && \ @@ -253,13 +249,13 @@ struct pf_pool_limit pf_pool_limits[PF_L return (PF_PASS); \ } while (0) -#define STATE_TRANSLATE(s) \ - (s)->lan.addr.addr32[0] != (s)->gwy.addr.addr32[0] || \ - ((s)->af == AF_INET6 && \ - ((s)->lan.addr.addr32[1] != (s)->gwy.addr.addr32[1] || \ - (s)->lan.addr.addr32[2] != (s)->gwy.addr.addr32[2] || \ - (s)->lan.addr.addr32[3] != (s)->gwy.addr.addr32[3])) || \ - (s)->lan.port != (s)->gwy.port +#define STATE_TRANSLATE(sk) \ + (sk)->lan.addr.addr32[0] != (sk)->gwy.addr.addr32[0] || \ + ((sk)->af == AF_INET6 && \ + ((sk)->lan.addr.addr32[1] != (sk)->gwy.addr.addr32[1] || \ + (sk)->lan.addr.addr32[2] != (sk)->gwy.addr.addr32[2] || \ + (sk)->lan.addr.addr32[3] != (sk)->gwy.addr.addr32[3])) || \ + (sk)->lan.port != (sk)->gwy.port #define BOUND_IFACE(r, k) \ ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : pfi_all @@ -283,10 +279,10 @@ struct pf_pool_limit pf_pool_limits[PF_L } while (0) static __inline int pf_src_compare(struct pf_src_node *, struct pf_src_node *); -static __inline int pf_state_compare_lan_ext(struct pf_state *, - struct pf_state *); -static __inline int pf_state_compare_ext_gwy(struct pf_state *, - struct pf_state *); +static __inline int pf_state_compare_lan_ext(struct pf_state_key *, + struct pf_state_key *); +static __inline int pf_state_compare_ext_gwy(struct pf_state_key *, + struct pf_state_key *); static __inline int pf_state_compare_id(struct pf_state *, struct pf_state *); @@ -296,12 +292,15 @@ struct pf_state_tree_id tree_id; struct pf_state_queue state_list; RB_GENERATE(pf_src_tree, pf_src_node, entry, pf_src_compare); -RB_GENERATE(pf_state_tree_lan_ext, pf_state, - u.s.entry_lan_ext, pf_state_compare_lan_ext); -RB_GENERATE(pf_state_tree_ext_gwy, pf_state, - u.s.entry_ext_gwy, pf_state_compare_ext_gwy); +RB_GENERATE(pf_state_tree_lan_ext, pf_state_key, + entry_lan_ext, pf_state_compare_lan_ext); +RB_GENERATE(pf_state_tree_ext_gwy, pf_state_key, + entry_ext_gwy, pf_state_compare_ext_gwy); RB_GENERATE(pf_state_tree_id, pf_state, - u.s.entry_id, pf_state_compare_id); + entry_id, pf_state_compare_id); + +#define PF_DT_SKIP_LANEXT 0x01 +#define PF_DT_SKIP_EXTGWY 0x02 static __inline int pf_src_compare(struct pf_src_node *a, struct pf_src_node *b) @@ -348,7 +347,7 @@ pf_src_compare(struct pf_src_node *a, st } static __inline int -pf_state_compare_lan_ext(struct pf_state *a, struct pf_state *b) +pf_state_compare_lan_ext(struct pf_state_key *a, struct pf_state_key *b) { int diff; @@ -416,7 +415,7 @@ pf_state_compare_lan_ext(struct pf_state } static __inline int -pf_state_compare_ext_gwy(struct pf_state *a, struct pf_state *b) +pf_state_compare_ext_gwy(struct pf_state_key *a, struct pf_state_key *b) { int diff; @@ -522,74 +521,71 @@ struct pf_state * pf_find_state_byid(struct pf_state_cmp *key) { pf_status.fcounters[FCNT_STATE_SEARCH]++; + return (RB_FIND(pf_state_tree_id, &tree_id, (struct pf_state *)key)); } struct pf_state * -pf_find_state_recurse(struct pfi_kif *kif, struct pf_state_cmp *key, u_int8_t tree) +pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int8_t tree) { - struct pf_state *s; + struct pf_state_key *sk; + struct pf_state *s; pf_status.fcounters[FCNT_STATE_SEARCH]++; switch (tree) { case PF_LAN_EXT: - if ((s = RB_FIND(pf_state_tree_lan_ext, &kif->pfik_lan_ext, - (struct pf_state *)key)) != NULL) - return (s); - if ((s = RB_FIND(pf_state_tree_lan_ext, &pfi_all->pfik_lan_ext, - (struct pf_state *)key)) != NULL) - return (s); - return (NULL); + sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, + (struct pf_state_key *)key); + break; case PF_EXT_GWY: - if ((s = RB_FIND(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, - (struct pf_state *)key)) != NULL) - return (s); - if ((s = RB_FIND(pf_state_tree_ext_gwy, &pfi_all->pfik_ext_gwy, - (struct pf_state *)key)) != NULL) - return (s); - return (NULL); + sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, + (struct pf_state_key *)key); + break; default: - panic("pf_find_state_recurse"); + panic("pf_find_state"); } + + /* list is sorted, if-bound states before floating ones */ + if (sk != NULL) + TAILQ_FOREACH(s, &sk->states, next) + if (s->kif == pfi_all || s->kif == kif) + return (s); + + return (NULL); } struct pf_state * -pf_find_state_all(struct pf_state_cmp *key, u_int8_t tree, int *more) +pf_find_state_all(struct pf_state_key_cmp *key, u_int8_t tree, int *more) { - struct pf_state *s, *ss = NULL; - struct pfi_kif *kif; + struct pf_state_key *sk; + struct pf_state *s, *ret = NULL; pf_status.fcounters[FCNT_STATE_SEARCH]++; switch (tree) { case PF_LAN_EXT: - TAILQ_FOREACH(kif, &pfi_statehead, pfik_w_states) { - s = RB_FIND(pf_state_tree_lan_ext, - &kif->pfik_lan_ext, (struct pf_state *)key); - if (s == NULL) - continue; - if (more == NULL) - return (s); - ss = s; - (*more)++; - } - return (ss); + sk = RB_FIND(pf_state_tree_lan_ext, + &pf_statetbl_lan_ext, (struct pf_state_key *)key); + break; case PF_EXT_GWY: - TAILQ_FOREACH(kif, &pfi_statehead, pfik_w_states) { - s = RB_FIND(pf_state_tree_ext_gwy, - &kif->pfik_ext_gwy, (struct pf_state *)key); - if (s == NULL) - continue; - if (more == NULL) - return (s); - ss = s; - (*more)++; - } - return (ss); + sk = RB_FIND(pf_state_tree_ext_gwy, + &pf_statetbl_ext_gwy, (struct pf_state_key *)key); + break; default: panic("pf_find_state_all"); } + + if (sk != NULL) { + ret = TAILQ_FIRST(&sk->states); + if (more == NULL) + return (ret); + + TAILQ_FOREACH(s, &sk->states, next) + (*more)++; + } + + return (ret); } void @@ -625,7 +621,6 @@ pf_check_threshold(struct pf_threshold * int pf_src_connlimit(struct pf_state **state) { - struct pf_state *s; int bad = 0; (*state)->src_node->conn++; @@ -656,12 +651,12 @@ pf_src_connlimit(struct pf_state **state if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf_src_connlimit: blocking address "); pf_print_host(&(*state)->src_node->addr, 0, - (*state)->af); + (*state)->state_key->af); } bzero(&p, sizeof(p)); - p.pfra_af = (*state)->af; - switch ((*state)->af) { + p.pfra_af = (*state)->state_key->af; + switch ((*state)->state_key->af) { #ifdef INET case AF_INET: p.pfra_net = 32; @@ -681,26 +676,31 @@ pf_src_connlimit(struct pf_state **state /* kill existing states if that's required. */ if ((*state)->rule.ptr->flush) { - pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; + struct pf_state_key *sk; + struct pf_state *st; - RB_FOREACH(s, pf_state_tree_id, &tree_id) { + pf_status.lcounters[LCNT_OVERLOAD_FLUSH]++; + RB_FOREACH(st, pf_state_tree_id, &tree_id) { + sk = st->state_key; /* * Kill states from this source. (Only those * from the same rule if PF_FLUSH_GLOBAL is not * set) */ - if (s->af == (*state)->af && - (((*state)->direction == PF_OUT && + if (sk->af == + (*state)->state_key->af && + (((*state)->state_key->direction == + PF_OUT && PF_AEQ(&(*state)->src_node->addr, - &s->lan.addr, s->af)) || - ((*state)->direction == PF_IN && + &sk->lan.addr, sk->af)) || + ((*state)->state_key->direction == PF_IN && PF_AEQ(&(*state)->src_node->addr, - &s->ext.addr, s->af))) && + &sk->ext.addr, sk->af))) && ((*state)->rule.ptr->flush & PF_FLUSH_GLOBAL || - (*state)->rule.ptr == s->rule.ptr)) { - s->timeout = PFTM_PURGE; - s->src.state = s->dst.state = + (*state)->rule.ptr == st->rule.ptr)) { + st->timeout = PFTM_PURGE; + st->src.state = st->dst.state = TCPS_CLOSED; killed++; } @@ -782,73 +782,80 @@ pf_insert_src_node(struct pf_src_node ** return (0); } +void +pf_stateins_err(const char *tree, struct pf_state *s, struct pfi_kif *kif) +{ + struct pf_state_key *sk = s->state_key; + + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state insert failed: %s %s", tree, kif->pfik_name); + printf(" lan: "); + pf_print_host(&sk->lan.addr, sk->lan.port, + sk->af); + printf(" gwy: "); + pf_print_host(&sk->gwy.addr, sk->gwy.port, + sk->af); + printf(" ext: "); + pf_print_host(&sk->ext.addr, sk->ext.port, + sk->af); + if (s->sync_flags & PFSTATE_FROMSYNC) + printf(" (from sync)"); + printf("\n"); + } +} + int -pf_insert_state(struct pfi_kif *kif, struct pf_state *state) +pf_insert_state(struct pfi_kif *kif, struct pf_state *s) { - /* Thou MUST NOT insert multiple duplicate keys */ - state->u.s.kif = kif; - if (RB_INSERT(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state)) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state insert failed: tree_lan_ext"); - printf(" lan: "); - pf_print_host(&state->lan.addr, state->lan.port, - state->af); - printf(" gwy: "); - pf_print_host(&state->gwy.addr, state->gwy.port, - state->af); - printf(" ext: "); - pf_print_host(&state->ext.addr, state->ext.port, - state->af); - if (state->sync_flags & PFSTATE_FROMSYNC) - printf(" (from sync)"); - printf("\n"); - } - return (-1); + struct pf_state_key *cur; + struct pf_state *sp; + + KASSERT(s->state_key != NULL); + s->kif = kif; + + if ((cur = RB_INSERT(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, + s->state_key)) != NULL) { + /* key exists. check for same kif, if none, add to key */ + TAILQ_FOREACH(sp, &cur->states, next) + if (sp->kif == kif) { /* collision! */ + pf_stateins_err("tree_lan_ext", s, kif); + return (-1); + } + pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); + pf_attach_state(cur, s, kif == pfi_all ? 1 : 0); } - if (RB_INSERT(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, state)) { - if (pf_status.debug >= PF_DEBUG_MISC) { - printf("pf: state insert failed: tree_ext_gwy"); - printf(" lan: "); - pf_print_host(&state->lan.addr, state->lan.port, - state->af); - printf(" gwy: "); - pf_print_host(&state->gwy.addr, state->gwy.port, - state->af); - printf(" ext: "); - pf_print_host(&state->ext.addr, state->ext.port, - state->af); - if (state->sync_flags & PFSTATE_FROMSYNC) - printf(" (from sync)"); - printf("\n"); - } - RB_REMOVE(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state); + /* if cur != NULL, we already found a state key and attached to it */ + if (cur == NULL && (cur = RB_INSERT(pf_state_tree_ext_gwy, + &pf_statetbl_ext_gwy, s->state_key)) != NULL) { + /* must not happen. we must have found the sk above! */ + pf_stateins_err("tree_ext_gwy", s, kif); + pf_detach_state(s, PF_DT_SKIP_EXTGWY); return (-1); } - if (state->id == 0 && state->creatorid == 0) { - state->id = htobe64(pf_status.stateid++); - state->creatorid = pf_status.hostid; + if (s->id == 0 && s->creatorid == 0) { + s->id = htobe64(pf_status.stateid++); + s->creatorid = pf_status.hostid; } - if (RB_INSERT(pf_state_tree_id, &tree_id, state) != NULL) { + if (RB_INSERT(pf_state_tree_id, &tree_id, s) != NULL) { if (pf_status.debug >= PF_DEBUG_MISC) { printf("pf: state insert failed: " "id: %016llx creatorid: %08x", - betoh64(state->id), ntohl(state->creatorid)); - if (state->sync_flags & PFSTATE_FROMSYNC) + betoh64(s->id), ntohl(s->creatorid)); + if (s->sync_flags & PFSTATE_FROMSYNC) printf(" (from sync)"); printf("\n"); } - RB_REMOVE(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state); - RB_REMOVE(pf_state_tree_ext_gwy, &kif->pfik_ext_gwy, state); + pf_detach_state(s, 0); return (-1); } - TAILQ_INSERT_TAIL(&state_list, state, u.s.entry_list); + TAILQ_INSERT_TAIL(&state_list, s, entry_list); pf_status.fcounters[FCNT_STATE_INSERT]++; pf_status.states++; pfi_kif_ref(kif, PFI_KIF_REF_STATE); #if NPFSYNC - pfsync_insert_state(state); + pfsync_insert_state(s); #endif return (0); } @@ -954,7 +961,7 @@ pf_src_tree_remove_state(struct pf_state u_int32_t timeout; if (s->src_node != NULL) { - if (s->proto == IPPROTO_TCP) { + if (s->state_key->proto == IPPROTO_TCP) { if (s->src.tcp_est) --s->src_node->conn; } @@ -983,16 +990,12 @@ void pf_unlink_state(struct pf_state *cur) { if (cur->src.state == PF_TCPS_PROXY_DST) { - pf_send_tcp(cur->rule.ptr, cur->af, - &cur->ext.addr, &cur->lan.addr, - cur->ext.port, cur->lan.port, + pf_send_tcp(cur->rule.ptr, cur->state_key->af, + &cur->state_key->ext.addr, &cur->state_key->lan.addr, + cur->state_key->ext.port, cur->state_key->lan.port, cur->src.seqhi, cur->src.seqlo + 1, TH_RST|TH_ACK, 0, 0, 0, 1, cur->tag, NULL, NULL); } - RB_REMOVE(pf_state_tree_ext_gwy, - &cur->u.s.kif->pfik_ext_gwy, cur); - RB_REMOVE(pf_state_tree_lan_ext, - &cur->u.s.kif->pfik_lan_ext, cur); RB_REMOVE(pf_state_tree_id, &tree_id, cur); #if NPFSYNC if (cur->creatorid == pf_status.hostid) @@ -1000,6 +1003,7 @@ pf_unlink_state(struct pf_state *cur) #endif cur->timeout = PFTM_UNLINKED; pf_src_tree_remove_state(cur); + pf_detach_state(cur, 0); } /* callers should be at splsoftnet and hold the @@ -1025,8 +1029,8 @@ pf_free_state(struct pf_state *cur) if (--cur->anchor.ptr->states <= 0) pf_rm_rule(NULL, cur->anchor.ptr); pf_normalize_tcp_cleanup(cur); - pfi_kif_unref(cur->u.s.kif, PFI_KIF_REF_STATE); - TAILQ_REMOVE(&state_list, cur, u.s.entry_list); + pfi_kif_unref(cur->kif, PFI_KIF_REF_STATE); + TAILQ_REMOVE(&state_list, cur, entry_list); if (cur->tag) pf_tag_unref(cur->tag); pool_put(&pf_state_pl, cur); @@ -1050,7 +1054,7 @@ pf_purge_expired_states(u_int32_t maxche } /* get next state, as cur may get deleted */ - next = TAILQ_NEXT(cur, u.s.entry_list); + next = TAILQ_NEXT(cur, entry_list); if (cur->timeout == PFTM_UNLINKED) { /* free unlinked state */ @@ -1175,7 +1179,8 @@ pf_print_host(struct pf_addr *addr, u_in void pf_print_state(struct pf_state *s) { - switch (s->proto) { + struct pf_state_key *sk = s->state_key; + switch (sk->proto) { case IPPROTO_TCP: printf("TCP "); break; @@ -1189,14 +1194,14 @@ pf_print_state(struct pf_state *s) printf("ICMPV6 "); break; default: - printf("%u ", s->proto); + printf("%u ", sk->proto); break; } - pf_print_host(&s->lan.addr, s->lan.port, s->af); + pf_print_host(&sk->lan.addr, sk->lan.port, sk->af); printf(" "); - pf_print_host(&s->gwy.addr, s->gwy.port, s->af); + pf_print_host(&sk->gwy.addr, sk->gwy.port, sk->af); printf(" "); - pf_print_host(&s->ext.addr, s->ext.port, s->af); + pf_print_host(&sk->ext.addr, sk->ext.port, sk->af); printf(" [lo=%u high=%u win=%u modulator=%u", s->src.seqlo, s->src.seqhi, s->src.max_win, s->src.seqdiff); if (s->src.wscale && s->dst.wscale) @@ -1565,7 +1570,6 @@ pf_send_tcp(const struct pf_rule *r, sa_ #endif /* INET6 */ struct tcphdr *th; char *opt; - struct pf_mtag *pf_mtag; /* maximum segment size tcp option */ tlen = sizeof(struct tcphdr); @@ -1589,24 +1593,18 @@ pf_send_tcp(const struct pf_rule *r, sa_ m = m_gethdr(M_DONTWAIT, MT_HEADER); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:22:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA97F1065676; Wed, 10 Dec 2008 21:22:15 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AE6768FC24; Wed, 10 Dec 2008 21:22:15 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALMF8o043239; Wed, 10 Dec 2008 21:22:15 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALMFxj043238; Wed, 10 Dec 2008 21:22:15 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102122.mBALMFxj043238@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185885 - vendor-sys/pf/4.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:22:16 -0000 Author: mlaier Date: Wed Dec 10 21:22:15 2008 New Revision: 185885 URL: http://svn.freebsd.org/changeset/base/185885 Log: Tag for pf 4.2 Added: vendor-sys/pf/4.2/ - copied from r185884, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:22:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DAB01065679; Wed, 10 Dec 2008 21:22:16 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D56228FC25; Wed, 10 Dec 2008 21:22:15 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALMF96043244; Wed, 10 Dec 2008 21:22:15 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALMFNX043243; Wed, 10 Dec 2008 21:22:15 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102122.mBALMFNX043243@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:22:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185885 - vendor-sys/pf/4.2 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:22:16 -0000 Author: mlaier Date: Wed Dec 10 21:22:15 2008 New Revision: 185885 URL: http://svn.freebsd.org/changeset/base/185885 Log: Tag for pf 4.2 Added: vendor-sys/pf/4.2/ - copied from r185884, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:22:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15B171065678; Wed, 10 Dec 2008 21:22:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0163D8FC13; Wed, 10 Dec 2008 21:22:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALMwew043311; Wed, 10 Dec 2008 21:22:58 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALMvpq043303; Wed, 10 Dec 2008 21:22:57 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102122.mBALMvpq043303@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185886 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:22:58 -0000 Author: mlaier Date: Wed Dec 10 21:22:57 2008 New Revision: 185886 URL: http://svn.freebsd.org/changeset/base/185886 Log: Import OPENBSD_4_3_BASE Modified: vendor-sys/pf/dist/net/if_pflog.c vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_osfp.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pflog.c ============================================================================== --- vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.24 2007/05/26 17:13:30 jason Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.27 2007/12/20 02:53:02 brad Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -107,9 +107,9 @@ pflog_clone_create(struct if_clone *ifc, if (unit >= PFLOGIFS_MAX) return (EINVAL); - if ((pflogif = malloc(sizeof(*pflogif), M_DEVBUF, M_NOWAIT)) == NULL) + if ((pflogif = malloc(sizeof(*pflogif), + M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) return (ENOMEM); - bzero(pflogif, sizeof(*pflogif)); pflogif->sc_unit = unit; ifp = &pflogif->sc_if; @@ -191,9 +191,6 @@ int pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { switch (cmd) { - case SIOCSIFADDR: - case SIOCAIFADDR: - case SIOCSIFDSTADDR: case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) ifp->if_flags |= IFF_RUNNING; @@ -201,7 +198,7 @@ pflogioctl(struct ifnet *ifp, u_long cmd ifp->if_flags &= ~IFF_RUNNING; break; default: - return (EINVAL); + return (ENOTTY); } return (0); Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.89 2008/01/12 17:08:33 mpf Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #ifdef INET #include @@ -124,9 +126,9 @@ pfsync_clone_create(struct if_clone *ifc return (EINVAL); pfsync_sync_ok = 1; - if ((pfsyncif = malloc(sizeof(*pfsyncif), M_DEVBUF, M_NOWAIT)) == NULL) + if ((pfsyncif = malloc(sizeof(*pfsyncif), M_DEVBUF, + M_NOWAIT|M_ZERO)) == NULL) return (ENOMEM); - bzero(pfsyncif, sizeof(*pfsyncif)); pfsyncif->sc_mbuf = NULL; pfsyncif->sc_mbuf_net = NULL; pfsyncif->sc_mbuf_tdb = NULL; @@ -140,6 +142,10 @@ pfsync_clone_create(struct if_clone *ifc pfsyncif->sc_ureq_sent = 0; pfsyncif->sc_bulk_send_next = NULL; pfsyncif->sc_bulk_terminator = NULL; + pfsyncif->sc_imo.imo_membership = (struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS, + M_WAITOK|M_ZERO); + pfsyncif->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; ifp = &pfsyncif->sc_if; snprintf(ifp->if_xname, sizeof ifp->if_xname, "pfsync%d", unit); ifp->if_softc = pfsyncif; @@ -171,10 +177,21 @@ pfsync_clone_create(struct if_clone *ifc int pfsync_clone_destroy(struct ifnet *ifp) { + struct pfsync_softc *sc = ifp->if_softc; + + timeout_del(&sc->sc_tmo); + timeout_del(&sc->sc_tdb_tmo); + timeout_del(&sc->sc_bulk_tmo); + timeout_del(&sc->sc_bulkfail_tmo); +#if NCARP > 0 + if (!pfsync_sync_ok) + carp_group_demote_adj(&sc->sc_if, -1); +#endif #if NBPFILTER > 0 bpfdetach(ifp); #endif if_detach(ifp); + free(pfsyncif->sc_imo.imo_membership, M_IPMOPTS); free(pfsyncif, M_DEVBUF); pfsyncif = NULL; return (0); @@ -461,9 +478,9 @@ pfsync_input(struct mbuf *m, ...) sp->direction > PF_OUT || (sp->af != AF_INET && sp->af != AF_INET6)) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: PFSYNC_ACT_INS: " + printf("pfsync_input: PFSYNC_ACT_INS: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -495,9 +512,9 @@ pfsync_input(struct mbuf *m, ...) sp->src.state > PF_TCPS_PROXY_DST || sp->dst.state > PF_TCPS_PROXY_DST) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: PFSYNC_ACT_UPD: " + printf("pfsync_input: PFSYNC_ACT_UPD: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -559,7 +576,7 @@ pfsync_input(struct mbuf *m, ...) : "partial"), sfail, betoh64(st->id), ntohl(st->creatorid)); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_stale++; if (!(sp->sync_flags & PFSTATE_STALE)) { /* we have a better state, send it */ @@ -626,10 +643,10 @@ pfsync_input(struct mbuf *m, ...) up->src.state > PF_TCPS_PROXY_DST || up->dst.state > PF_TCPS_PROXY_DST) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: " + printf("pfsync_input: " "PFSYNC_ACT_UPD_C: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -685,7 +702,7 @@ pfsync_input(struct mbuf *m, ...) "creatorid: %08x\n", sfail, betoh64(st->id), ntohl(st->creatorid)); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_stale++; /* we have a better state, send it out */ if ((!stale || update_requested) && @@ -1750,3 +1767,22 @@ pfsync_update_tdb(struct tdb *tdb, int o return (ret); } #endif + +int +pfsync_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, + size_t newlen) +{ + /* All sysctl names at this level are terminal. */ + if (namelen != 1) + return (ENOTDIR); + + switch (name[0]) { + case PFSYNCCTL_STATS: + if (newp != NULL) + return (EPERM); + return (sysctl_struct(oldp, oldlenp, newp, newlen, + &pfsyncstats, sizeof(pfsyncstats))); + default: + return (ENOPROTOOPT); + } +} Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.31 2007/05/31 04:11:42 mcbride Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.32 2007/12/14 18:33:37 deraadt Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -86,6 +86,17 @@ struct pfsync_state_bus { u_int8_t pad[7]; } __packed; +/* + * Names for PFSYNC sysctl objects + */ +#define PFSYNCCTL_STATS 1 /* PFSYNC stats */ +#define PFSYNCCTL_MAXID 2 + +#define PFSYNCCTL_NAMES { \ + { 0, 0 }, \ + { "stats", CTLTYPE_STRUCT }, \ +} + #ifdef _KERNEL union sc_statep { @@ -255,6 +266,8 @@ struct pfsyncreq { void pfsync_input(struct mbuf *, ...); int pfsync_clear_states(u_int32_t, char *); int pfsync_pack_state(u_int8_t, struct pf_state *, int); +int pfsync_sysctl(int *, u_int, void *, size_t *, void *, size_t); + #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ (st->state_key->proto == IPPROTO_PFSYNC)) \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.552 2007/08/21 15:57:27 dhartmei Exp $ */ +/* $OpenBSD: pf.c,v 1.567 2008/02/20 23:40:13 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -51,6 +51,8 @@ #include #include +#include + #include #include #include @@ -110,6 +112,11 @@ u_int32_t ticket_altqs_inactive; int altqs_inactive_open; u_int32_t ticket_pabuf; +MD5_CTX pf_tcp_secret_ctx; +u_char pf_tcp_secret[16]; +int pf_tcp_secret_init; +int pf_tcp_iss_off; + struct pf_anchor_stackframe { struct pf_ruleset *rs; struct pf_rule *r; @@ -160,6 +167,7 @@ struct pf_rule *pf_get_translation(stru void pf_attach_state(struct pf_state_key *, struct pf_state *, int); void pf_detach_state(struct pf_state *, int); +u_int32_t pf_tcp_iss(struct pf_pdesc *); int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, @@ -214,7 +222,7 @@ int pf_check_proto_cksum(struct mbuf int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); struct pf_state *pf_find_state(struct pfi_kif *, - struct pf_state_key_cmp *, u_int8_t); + struct pf_state_key_cmp *, u_int); int pf_src_connlimit(struct pf_state **); void pf_stateins_err(const char *, struct pf_state *, struct pfi_kif *); @@ -233,10 +241,7 @@ struct pf_pool_limit pf_pool_limits[PF_L #define STATE_LOOKUP() \ do { \ - if (direction == PF_IN) \ - *state = pf_find_state(kif, &key, PF_EXT_GWY); \ - else \ - *state = pf_find_state(kif, &key, PF_LAN_EXT); \ + *state = pf_find_state(kif, &key, direction); \ if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ return (PF_DROP); \ if (direction == PF_OUT && \ @@ -526,19 +531,19 @@ pf_find_state_byid(struct pf_state_cmp * } struct pf_state * -pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int8_t tree) +pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir) { struct pf_state_key *sk; struct pf_state *s; pf_status.fcounters[FCNT_STATE_SEARCH]++; - switch (tree) { - case PF_LAN_EXT: + switch (dir) { + case PF_OUT: sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, (struct pf_state_key *)key); break; - case PF_EXT_GWY: + case PF_IN: sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, (struct pf_state_key *)key); break; @@ -556,19 +561,19 @@ pf_find_state(struct pfi_kif *kif, struc } struct pf_state * -pf_find_state_all(struct pf_state_key_cmp *key, u_int8_t tree, int *more) +pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) { struct pf_state_key *sk; struct pf_state *s, *ret = NULL; pf_status.fcounters[FCNT_STATE_SEARCH]++; - switch (tree) { - case PF_LAN_EXT: + switch (dir) { + case PF_OUT: sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, (struct pf_state_key *)key); break; - case PF_EXT_GWY: + case PF_IN: sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, (struct pf_state_key *)key); break; @@ -819,6 +824,8 @@ pf_insert_state(struct pfi_kif *kif, str TAILQ_FOREACH(sp, &cur->states, next) if (sp->kif == kif) { /* collision! */ pf_stateins_err("tree_lan_ext", s, kif); + pf_detach_state(s, + PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); return (-1); } pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); @@ -961,10 +968,8 @@ pf_src_tree_remove_state(struct pf_state u_int32_t timeout; if (s->src_node != NULL) { - if (s->state_key->proto == IPPROTO_TCP) { - if (s->src.tcp_est) - --s->src_node->conn; - } + if (s->src.tcp_est) + --s->src_node->conn; if (--s->src_node->states <= 0) { timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; if (!timeout) @@ -1295,6 +1300,7 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw return (1); switch (aw1->type) { case PF_ADDR_ADDRMASK: + case PF_ADDR_RANGE: if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, 0)) return (1); if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, 0)) @@ -1598,7 +1604,7 @@ pf_send_tcp(const struct pf_rule *r, sa_ m->m_pkthdr.pf.tag = rtag; if (r != NULL && r->rtableid >= 0) - m->m_pkthdr.pf.rtableid = m->m_pkthdr.pf.rtableid; + m->m_pkthdr.pf.rtableid = r->rtableid; #ifdef ALTQ if (r != NULL && r->qid) { @@ -1790,6 +1796,44 @@ pf_match_addr(u_int8_t n, struct pf_addr } } +/* + * Return 1 if b <= a <= e, otherwise return 0. + */ +int +pf_match_addr_range(struct pf_addr *b, struct pf_addr *e, + struct pf_addr *a, sa_family_t af) +{ + switch (af) { +#ifdef INET + case AF_INET: + if ((a->addr32[0] < b->addr32[0]) || + (a->addr32[0] > e->addr32[0])) + return (0); + break; +#endif /* INET */ +#ifdef INET6 + case AF_INET6: { + int i; + + /* check a >= b */ + for (i = 0; i < 4; ++i) + if (a->addr32[i] > b->addr32[i]) + break; + else if (a->addr32[i] < b->addr32[i]) + return (0); + /* check a <= e */ + for (i = 0; i < 4; ++i) + if (a->addr32[i] < e->addr32[i]) + break; + else if (a->addr32[i] > e->addr32[i]) + return (0); + break; + } +#endif /* INET6 */ + } + return (1); +} + int pf_match(u_int8_t op, u_int32_t a1, u_int32_t a2, u_int32_t p) { @@ -2267,15 +2311,15 @@ pf_get_sport(sa_family_t af, u_int8_t pr if (!(proto == IPPROTO_TCP || proto == IPPROTO_UDP || proto == IPPROTO_ICMP)) { key.gwy.port = dport; - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) return (0); } else if (low == 0 && high == 0) { key.gwy.port = *nport; - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) return (0); } else if (low == high) { key.gwy.port = htons(low); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) { + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(low); return (0); } @@ -2292,7 +2336,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr /* low <= cut <= high */ for (tmp = cut; tmp <= high; ++(tmp)) { key.gwy.port = htons(tmp); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); return (0); @@ -2300,7 +2344,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr } for (tmp = cut - 1; tmp >= low; --(tmp)) { key.gwy.port = htons(tmp); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); return (0); @@ -2836,6 +2880,34 @@ pf_alloc_state_key(struct pf_state *s) return (sk); } +u_int32_t +pf_tcp_iss(struct pf_pdesc *pd) +{ + MD5_CTX ctx; + u_int32_t digest[4]; + + if (pf_tcp_secret_init == 0) { + arc4random_bytes(pf_tcp_secret, sizeof(pf_tcp_secret)); + MD5Init(&pf_tcp_secret_ctx); + MD5Update(&pf_tcp_secret_ctx, pf_tcp_secret, sizeof(pf_tcp_secret)); + pf_tcp_secret_init = 1; + } + ctx = pf_tcp_secret_ctx; + + MD5Update(&ctx, (char *)&pd->hdr.tcp->th_sport, sizeof(u_short)); + MD5Update(&ctx, (char *)&pd->hdr.tcp->th_dport, sizeof(u_short)); + if (pd->af == AF_INET6) { + MD5Update(&ctx, (char *)&pd->src->v6, sizeof(struct in6_addr)); + MD5Update(&ctx, (char *)&pd->dst->v6, sizeof(struct in6_addr)); + } else { + MD5Update(&ctx, (char *)&pd->src->v4, sizeof(struct in_addr)); + MD5Update(&ctx, (char *)&pd->dst->v4, sizeof(struct in_addr)); + } + MD5Final((u_char *)digest, &ctx); + pf_tcp_iss_off += 4096; + return (digest[0] + tcp_iss + pf_tcp_iss_off); +} + int pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, struct pfi_kif *kif, struct mbuf *m, int off, void *h, @@ -3077,7 +3149,8 @@ pf_test_rule(struct pf_rule **rm, struct !pf_match_gid(r->gid.op, r->gid.gid[0], r->gid.gid[1], pd->lookup.gid)) r = TAILQ_NEXT(r, entries); - else if (r->prob && r->prob <= arc4random()) + else if (r->prob && r->prob <= + (arc4random() % (UINT_MAX - 1) + 1)) r = TAILQ_NEXT(r, entries); else if (r->match_tag && !pf_match_tag(m, r, &tag)) r = TAILQ_NEXT(r, entries); @@ -3203,10 +3276,22 @@ pf_test_rule(struct pf_rule **rm, struct (r->rule_flag & PFRULE_RETURN)) && !(th->th_flags & TH_RST)) { u_int32_t ack = ntohl(th->th_seq) + pd->p_len; - struct ip *h = mtod(m, struct ip *); + int len = 0; + struct ip *h4; + struct ip6_hdr *h6; + + switch (af) { + case AF_INET: + h4 = mtod(m, struct ip *); + len = ntohs(h4->ip_len) - off; + break; + case AF_INET6: + h6 = mtod(m, struct ip6_hdr *); + len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); + break; + } - if (pf_check_proto_cksum(m, off, - ntohs(h->ip_len) - off, IPPROTO_TCP, AF_INET)) + if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) REASON_SET(&reason, PFRES_PROTCKSUM); else { if (th->th_flags & TH_SYN) @@ -3218,10 +3303,12 @@ pf_test_rule(struct pf_rule **rm, struct ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, r->return_ttl, 1, 0, pd->eh, kif->pfik_ifp); } - } else if ((af == AF_INET) && r->return_icmp) + } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && + r->return_icmp) pf_send_icmp(m, r->return_icmp >> 8, r->return_icmp & 255, af, r); - else if ((af == AF_INET6) && r->return_icmp6) + else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && + r->return_icmp6) pf_send_icmp(m, r->return_icmp6 >> 8, r->return_icmp6 & 255, af, r); } @@ -3237,7 +3324,6 @@ pf_test_rule(struct pf_rule **rm, struct if (!state_icmp && (r->keep_state || nr != NULL || (pd->flags & PFDESC_TCP_NORM))) { /* create new state */ - u_int16_t len; struct pf_state *s = NULL; struct pf_state_key *sk = NULL; struct pf_src_node *sn = NULL; @@ -3296,15 +3382,14 @@ cleanup: s->log |= nr->log & PF_LOG_ALL; switch (pd->proto) { case IPPROTO_TCP: - len = pd->tot_len - off - (th->th_off << 2); s->src.seqlo = ntohl(th->th_seq); - s->src.seqhi = s->src.seqlo + len + 1; + s->src.seqhi = s->src.seqlo + pd->p_len + 1; if ((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN && r->keep_state == PF_STATE_MODULATE) { /* Generate sequence number modulator */ - while ((s->src.seqdiff = - tcp_rndiss_next() - s->src.seqlo) == 0) - ; + if ((s->src.seqdiff = pf_tcp_iss(pd) - + s->src.seqlo) == 0) + s->src.seqdiff = 1; pf_change_a(&th->th_seq, &th->th_sum, htonl(s->src.seqlo + s->src.seqdiff), 0); rewrite = 1; @@ -3525,11 +3610,20 @@ pf_test_fragment(struct pf_rule **rm, in r = r->skip[PF_SKIP_DST_ADDR].ptr; else if (r->tos && !(r->tos == pd->tos)) r = TAILQ_NEXT(r, entries); - else if (r->src.port_op || r->dst.port_op || - r->flagset || r->type || r->code || - r->os_fingerprint != PF_OSFP_ANY) + else if (r->os_fingerprint != PF_OSFP_ANY) + r = TAILQ_NEXT(r, entries); + else if (pd->proto == IPPROTO_UDP && + (r->src.port_op || r->dst.port_op)) r = TAILQ_NEXT(r, entries); - else if (r->prob && r->prob <= arc4random()) + else if (pd->proto == IPPROTO_TCP && + (r->src.port_op || r->dst.port_op || r->flagset)) + r = TAILQ_NEXT(r, entries); + else if ((pd->proto == IPPROTO_ICMP || + pd->proto == IPPROTO_ICMPV6) && + (r->type || r->code)) + r = TAILQ_NEXT(r, entries); + else if (r->prob && r->prob <= + (arc4random() % (UINT_MAX - 1) + 1)) r = TAILQ_NEXT(r, entries); else if (r->match_tag && !pf_match_tag(m, r, &tag)) r = TAILQ_NEXT(r, entries); @@ -3698,6 +3792,22 @@ pf_test_state_tcp(struct pf_state **stat } } + if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && + dst->state >= TCPS_FIN_WAIT_2 && + src->state >= TCPS_FIN_WAIT_2) { + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state reuse "); + pf_print_state(*state); + pf_print_flags(th->th_flags); + printf("\n"); + } + /* XXX make sure it's the same direction ?? */ + (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_unlink_state(*state); + *state = NULL; + return (PF_DROP); + } + if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { sws = src->wscale & PF_WSCALE_MASK; dws = dst->wscale & PF_WSCALE_MASK; @@ -3724,7 +3834,8 @@ pf_test_state_tcp(struct pf_state **stat /* Deferred generation of sequence number modulator */ if (dst->seqdiff && !src->seqdiff) { - while ((src->seqdiff = tcp_rndiss_next() - seq) == 0) + /* use random iss for the TCP server */ + while ((src->seqdiff = arc4random() - seq) == 0) ; ack = ntohl(th->th_ack) - dst->seqdiff; pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + @@ -3842,7 +3953,8 @@ pf_test_state_tcp(struct pf_state **stat (ackskew <= (MAXACKWINDOW << sws)) && /* Acking not more than one window forward */ ((th->th_flags & TH_RST) == 0 || orig_seq == src->seqlo || - (orig_seq == src->seqlo + 1) || (pd->flags & PFDESC_IP_REAS) == 0)) { + (orig_seq == src->seqlo + 1) || (orig_seq + 1 == src->seqlo) || + (pd->flags & PFDESC_IP_REAS) == 0)) { /* Require an exact/+1 sequence match on resets when possible */ if (dst->scrub || src->scrub) { @@ -3937,9 +4049,12 @@ pf_test_state_tcp(struct pf_state **stat pf_print_state(*state); pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " - "pkts=%llu:%llu\n", seq, orig_seq, ack, pd->p_len, - ackskew, (*state)->packets[0], - (*state)->packets[1]); + "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, + pd->p_len, ackskew, (*state)->packets[0], + (*state)->packets[1], + direction == PF_IN ? "in" : "out", + direction == (*state)->state_key->direction ? + "fwd" : "rev"); } if (dst->scrub || src->scrub) { Modified: vendor-sys/pf/dist/net/pf_if.c ============================================================================== --- vendor-sys/pf/dist/net/pf_if.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_if.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.47 2007/07/13 09:17:48 markus Exp $ */ +/* $OpenBSD: pf_if.c,v 1.51 2007/11/07 17:28:40 mpf Exp $ */ /* * Copyright 2005 Henning Brauer @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -110,10 +111,9 @@ pfi_kif_get(const char *kif_name) return (kif); /* create new one */ - if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT)) == NULL) + if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT|M_ZERO)) == NULL) return (NULL); - bzero(kif, sizeof(*kif)); strlcpy(kif->pfik_name, kif_name, sizeof(kif->pfik_name)); kif->pfik_tzero = time_second; TAILQ_INIT(&kif->pfik_dynaddrs); @@ -603,49 +603,57 @@ pfi_if_compare(struct pfi_kif *p, struct } void -pfi_fill_oldstatus(struct pf_status *pfs) +pfi_update_status(const char *name, struct pf_status *pfs) { struct pfi_kif *p; struct pfi_kif_cmp key; + struct ifg_member p_member, *ifgm; + TAILQ_HEAD(, ifg_member) ifg_members; int i, j, k, s; - strlcpy(key.pfik_name, pfs->ifname, sizeof(key.pfik_name)); + strlcpy(key.pfik_name, name, sizeof(key.pfik_name)); s = splsoftnet(); p = RB_FIND(pfi_ifhead, &pfi_ifs, (struct pfi_kif *)&key); if (p == NULL) { splx(s); return; } - bzero(pfs->pcounters, sizeof(pfs->pcounters)); - bzero(pfs->bcounters, sizeof(pfs->bcounters)); - for (i = 0; i < 2; i++) - for (j = 0; j < 2; j++) - for (k = 0; k < 2; k++) { - pfs->pcounters[i][j][k] = - p->pfik_packets[i][j][k]; - pfs->bcounters[i][j] += - p->pfik_bytes[i][j][k]; - } - splx(s); -} - -int -pfi_clr_istats(const char *name) -{ - struct pfi_kif *p; - int s; + if (p->pfik_group != NULL) { + bcopy(&p->pfik_group->ifg_members, &ifg_members, + sizeof(ifg_members)); + } else { + /* build a temporary list for p only */ + bzero(&p_member, sizeof(p_member)); + p_member.ifgm_ifp = p->pfik_ifp; + TAILQ_INIT(&ifg_members); + TAILQ_INSERT_TAIL(&ifg_members, &p_member, ifgm_next); + } + if (pfs) { + bzero(pfs->pcounters, sizeof(pfs->pcounters)); + bzero(pfs->bcounters, sizeof(pfs->bcounters)); + } + TAILQ_FOREACH(ifgm, &ifg_members, ifgm_next) { + if (ifgm->ifgm_ifp == NULL) + continue; + p = (struct pfi_kif *)ifgm->ifgm_ifp->if_pf_kif; - s = splsoftnet(); - RB_FOREACH(p, pfi_ifhead, &pfi_ifs) { - if (pfi_skip_if(name, p)) + /* just clear statistics */ + if (pfs == NULL) { + bzero(p->pfik_packets, sizeof(p->pfik_packets)); + bzero(p->pfik_bytes, sizeof(p->pfik_bytes)); + p->pfik_tzero = time_second; continue; - bzero(p->pfik_packets, sizeof(p->pfik_packets)); - bzero(p->pfik_bytes, sizeof(p->pfik_bytes)); - p->pfik_tzero = time_second; + } + for (i = 0; i < 2; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 2; k++) { + pfs->pcounters[i][j][k] += + p->pfik_packets[i][j][k]; + pfs->bcounters[i][j] += + p->pfik_bytes[i][j][k]; + } } splx(s); - - return (0); } int Modified: vendor-sys/pf/dist/net/pf_ioctl.c ============================================================================== --- vendor-sys/pf/dist/net/pf_ioctl.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_ioctl.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.193 2007/12/02 12:08:04 pascoe Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -160,7 +160,7 @@ pfattach(int num) pool_sethardlimit(pf_pool_limits[PF_LIMIT_STATES].pp, pf_pool_limits[PF_LIMIT_STATES].limit, NULL, 0); - if (ctob(physmem) <= 100*1024*1024) + if (ptoa(physmem) <= 100*1024*1024) pf_pool_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT_SMALL; @@ -379,11 +379,9 @@ tagname2tag(struct pf_tags *head, char * return (0); /* allocate and fill new struct pf_tagname */ - tag = (struct pf_tagname *)malloc(sizeof(struct pf_tagname), - M_TEMP, M_NOWAIT); + tag = malloc(sizeof(*tag), M_TEMP, M_NOWAIT|M_ZERO); if (tag == NULL) return (0); - bzero(tag, sizeof(struct pf_tagname)); strlcpy(tag->name, tagname, sizeof(tag->name)); tag->tag = new_tagid; tag->ref++; @@ -912,7 +910,6 @@ pf_state_import(struct pfsync_state *sp, /* copy to state */ memcpy(&s->id, &sp->id, sizeof(sp->id)); s->creatorid = sp->creatorid; - strlcpy(sp->ifname, s->kif->pfik_name, sizeof(sp->ifname)); pf_state_peer_from_pfsync(&sp->src, &s->src); pf_state_peer_from_pfsync(&sp->dst, &s->dst); @@ -921,6 +918,9 @@ pf_state_import(struct pfsync_state *sp, s->anchor.ptr = NULL; s->rt_kif = NULL; s->creation = time_second; + s->expire = time_second; + if (sp->expire > 0) + s->expire -= pf_default_rule.timeout[sp->timeout] - sp->expire; s->pfsync_time = 0; s->packets[0] = s->packets[1] = 0; s->bytes[0] = s->bytes[1] = 0; @@ -1633,7 +1633,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a case DIOCADDSTATE: { struct pfioc_state *ps = (struct pfioc_state *)addr; - struct pfsync_state *sp = (struct pfsync_state *)ps->state; + struct pfsync_state *sp = &ps->state; struct pf_state *s; struct pf_state_key *sk; struct pfi_kif *kif; @@ -1650,6 +1650,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a } bzero(s, sizeof(struct pf_state)); if ((sk = pf_alloc_state_key(s)) == NULL) { + pool_put(&pf_state_pl, s); error = ENOMEM; break; } @@ -1664,30 +1665,28 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a if (pf_insert_state(kif, s)) { pfi_kif_unref(kif, PFI_KIF_REF_NONE); pool_put(&pf_state_pl, s); - pool_put(&pf_state_key_pl, sk); - error = ENOMEM; + error = EEXIST; + break; } + pf_default_rule.states++; break; } case DIOCGETSTATE: { struct pfioc_state *ps = (struct pfioc_state *)addr; struct pf_state *s; - u_int32_t nr; + struct pf_state_cmp id_key; - nr = 0; - RB_FOREACH(s, pf_state_tree_id, &tree_id) { - if (nr >= ps->nr) - break; - nr++; - } + bcopy(ps->state.id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = ps->state.creatorid; + + s = pf_find_state_byid(&id_key); if (s == NULL) { - error = EBUSY; + error = ENOENT; break; } - pf_state_export((struct pfsync_state *)&ps->state, - s->state_key, s); + pf_state_export(&ps->state, s->state_key, s); break; } @@ -1735,7 +1734,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a case DIOCGETSTATUS: { struct pf_status *s = (struct pf_status *)addr; bcopy(&pf_status, s, sizeof(struct pf_status)); - pfi_fill_oldstatus(s); + pfi_update_status(s->ifname, s); break; } @@ -1746,10 +1745,6 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a bzero(pf_status.ifname, IFNAMSIZ); break; } - if (ifunit(pi->ifname) == NULL) { - error = EINVAL; - break; - } strlcpy(pf_status.ifname, pi->ifname, IFNAMSIZ); break; } @@ -1760,7 +1755,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a bzero(pf_status.scounters, sizeof(pf_status.scounters)); pf_status.since = time_second; if (*pf_status.ifname) - pfi_clr_istats(pf_status.ifname); + pfi_update_status(pf_status.ifname, NULL); break; } @@ -1793,13 +1788,13 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a key.ext.port = pnl->dport; PF_ACPY(&key.gwy.addr, &pnl->saddr, pnl->af); key.gwy.port = pnl->sport; - state = pf_find_state_all(&key, PF_EXT_GWY, &m); + state = pf_find_state_all(&key, PF_IN, &m); } else { PF_ACPY(&key.lan.addr, &pnl->daddr, pnl->af); key.lan.port = pnl->dport; PF_ACPY(&key.ext.addr, &pnl->saddr, pnl->af); key.ext.port = pnl->sport; - state = pf_find_state_all(&key, PF_LAN_EXT, &m); + state = pf_find_state_all(&key, PF_OUT, &m); } if (m > 1) error = E2BIG; /* more than one state */ @@ -1968,6 +1963,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a pool_put(&pf_altq_pl, altq); break; } + altq->altq_disc = NULL; TAILQ_FOREACH(a, pf_altqs_inactive, entries) { if (strncmp(a->ifname, altq->ifname, IFNAMSIZ) == 0 && a->qname[0] == 0) { @@ -2547,10 +2543,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { free(table, M_TEMP); @@ -2616,10 +2610,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { free(table, M_TEMP); @@ -2680,10 +2672,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); /* first makes sure everything will succeed */ for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { Modified: vendor-sys/pf/dist/net/pf_norm.c ============================================================================== --- vendor-sys/pf/dist/net/pf_norm.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_norm.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.109 2007/05/28 17:16:39 henning Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.111 2007/12/30 10:32:24 mglocker Exp $ */ /* * Copyright 2001 Niels Provos @@ -115,7 +115,7 @@ struct mbuf *pf_reassemble(struct mbuf struct mbuf *pf_fragcache(struct mbuf **, struct ip*, struct pf_fragment **, int, int, int *); int pf_normalize_tcpopt(struct pf_rule *, struct mbuf *, - struct tcphdr *, int); + struct tcphdr *, int, sa_family_t); #define DPFPRINTF(x) do { \ if (pf_status.debug >= PF_DEBUG_MISC) { \ @@ -1316,7 +1316,7 @@ pf_normalize_tcp(int dir, struct pfi_kif } /* Process options */ - if (r->max_mss && pf_normalize_tcpopt(r, m, th, off)) + if (r->max_mss && pf_normalize_tcpopt(r, m, th, off, pd->af)) rewrite = 1; /* copy back packet headers if we sanitized */ @@ -1819,17 +1819,21 @@ pf_normalize_tcp_stateful(struct mbuf *m int pf_normalize_tcpopt(struct pf_rule *r, struct mbuf *m, struct tcphdr *th, - int off) + int off, sa_family_t af) { u_int16_t *mss; int thoff; int opt, cnt, optlen = 0; int rewrite = 0; - u_char *optp; + u_char opts[MAX_TCPOPTLEN]; + u_char *optp = opts; thoff = th->th_off << 2; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:22:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B20C1065670; Wed, 10 Dec 2008 21:22:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 56B128FC18; Wed, 10 Dec 2008 21:22:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALMw2a043324; Wed, 10 Dec 2008 21:22:58 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALMwS7043316; Wed, 10 Dec 2008 21:22:58 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102122.mBALMwS7043316@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:22:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185886 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:22:58 -0000 Author: mlaier Date: Wed Dec 10 21:22:57 2008 New Revision: 185886 URL: http://svn.freebsd.org/changeset/base/185886 Log: Import OPENBSD_4_3_BASE Modified: vendor-sys/pf/dist/net/if_pflog.c vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_osfp.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pflog.c ============================================================================== --- vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pflog.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pflog.c,v 1.24 2007/05/26 17:13:30 jason Exp $ */ +/* $OpenBSD: if_pflog.c,v 1.27 2007/12/20 02:53:02 brad Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -107,9 +107,9 @@ pflog_clone_create(struct if_clone *ifc, if (unit >= PFLOGIFS_MAX) return (EINVAL); - if ((pflogif = malloc(sizeof(*pflogif), M_DEVBUF, M_NOWAIT)) == NULL) + if ((pflogif = malloc(sizeof(*pflogif), + M_DEVBUF, M_NOWAIT|M_ZERO)) == NULL) return (ENOMEM); - bzero(pflogif, sizeof(*pflogif)); pflogif->sc_unit = unit; ifp = &pflogif->sc_if; @@ -191,9 +191,6 @@ int pflogioctl(struct ifnet *ifp, u_long cmd, caddr_t data) { switch (cmd) { - case SIOCSIFADDR: - case SIOCAIFADDR: - case SIOCSIFDSTADDR: case SIOCSIFFLAGS: if (ifp->if_flags & IFF_UP) ifp->if_flags |= IFF_RUNNING; @@ -201,7 +198,7 @@ pflogioctl(struct ifnet *ifp, u_long cmd ifp->if_flags &= ~IFF_RUNNING; break; default: - return (EINVAL); + return (ENOTTY); } return (0); Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.89 2008/01/12 17:08:33 mpf Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -45,6 +46,7 @@ #include #include #include +#include #ifdef INET #include @@ -124,9 +126,9 @@ pfsync_clone_create(struct if_clone *ifc return (EINVAL); pfsync_sync_ok = 1; - if ((pfsyncif = malloc(sizeof(*pfsyncif), M_DEVBUF, M_NOWAIT)) == NULL) + if ((pfsyncif = malloc(sizeof(*pfsyncif), M_DEVBUF, + M_NOWAIT|M_ZERO)) == NULL) return (ENOMEM); - bzero(pfsyncif, sizeof(*pfsyncif)); pfsyncif->sc_mbuf = NULL; pfsyncif->sc_mbuf_net = NULL; pfsyncif->sc_mbuf_tdb = NULL; @@ -140,6 +142,10 @@ pfsync_clone_create(struct if_clone *ifc pfsyncif->sc_ureq_sent = 0; pfsyncif->sc_bulk_send_next = NULL; pfsyncif->sc_bulk_terminator = NULL; + pfsyncif->sc_imo.imo_membership = (struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_IPMOPTS, + M_WAITOK|M_ZERO); + pfsyncif->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; ifp = &pfsyncif->sc_if; snprintf(ifp->if_xname, sizeof ifp->if_xname, "pfsync%d", unit); ifp->if_softc = pfsyncif; @@ -171,10 +177,21 @@ pfsync_clone_create(struct if_clone *ifc int pfsync_clone_destroy(struct ifnet *ifp) { + struct pfsync_softc *sc = ifp->if_softc; + + timeout_del(&sc->sc_tmo); + timeout_del(&sc->sc_tdb_tmo); + timeout_del(&sc->sc_bulk_tmo); + timeout_del(&sc->sc_bulkfail_tmo); +#if NCARP > 0 + if (!pfsync_sync_ok) + carp_group_demote_adj(&sc->sc_if, -1); +#endif #if NBPFILTER > 0 bpfdetach(ifp); #endif if_detach(ifp); + free(pfsyncif->sc_imo.imo_membership, M_IPMOPTS); free(pfsyncif, M_DEVBUF); pfsyncif = NULL; return (0); @@ -461,9 +478,9 @@ pfsync_input(struct mbuf *m, ...) sp->direction > PF_OUT || (sp->af != AF_INET && sp->af != AF_INET6)) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: PFSYNC_ACT_INS: " + printf("pfsync_input: PFSYNC_ACT_INS: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -495,9 +512,9 @@ pfsync_input(struct mbuf *m, ...) sp->src.state > PF_TCPS_PROXY_DST || sp->dst.state > PF_TCPS_PROXY_DST) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: PFSYNC_ACT_UPD: " + printf("pfsync_input: PFSYNC_ACT_UPD: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -559,7 +576,7 @@ pfsync_input(struct mbuf *m, ...) : "partial"), sfail, betoh64(st->id), ntohl(st->creatorid)); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_stale++; if (!(sp->sync_flags & PFSTATE_STALE)) { /* we have a better state, send it */ @@ -626,10 +643,10 @@ pfsync_input(struct mbuf *m, ...) up->src.state > PF_TCPS_PROXY_DST || up->dst.state > PF_TCPS_PROXY_DST) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert: " + printf("pfsync_input: " "PFSYNC_ACT_UPD_C: " "invalid value\n"); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_badval++; continue; } @@ -685,7 +702,7 @@ pfsync_input(struct mbuf *m, ...) "creatorid: %08x\n", sfail, betoh64(st->id), ntohl(st->creatorid)); - pfsyncstats.pfsyncs_badstate++; + pfsyncstats.pfsyncs_stale++; /* we have a better state, send it out */ if ((!stale || update_requested) && @@ -1750,3 +1767,22 @@ pfsync_update_tdb(struct tdb *tdb, int o return (ret); } #endif + +int +pfsync_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp, + size_t newlen) +{ + /* All sysctl names at this level are terminal. */ + if (namelen != 1) + return (ENOTDIR); + + switch (name[0]) { + case PFSYNCCTL_STATS: + if (newp != NULL) + return (EPERM); + return (sysctl_struct(oldp, oldlenp, newp, newlen, + &pfsyncstats, sizeof(pfsyncstats))); + default: + return (ENOPROTOOPT); + } +} Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.31 2007/05/31 04:11:42 mcbride Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.32 2007/12/14 18:33:37 deraadt Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -86,6 +86,17 @@ struct pfsync_state_bus { u_int8_t pad[7]; } __packed; +/* + * Names for PFSYNC sysctl objects + */ +#define PFSYNCCTL_STATS 1 /* PFSYNC stats */ +#define PFSYNCCTL_MAXID 2 + +#define PFSYNCCTL_NAMES { \ + { 0, 0 }, \ + { "stats", CTLTYPE_STRUCT }, \ +} + #ifdef _KERNEL union sc_statep { @@ -255,6 +266,8 @@ struct pfsyncreq { void pfsync_input(struct mbuf *, ...); int pfsync_clear_states(u_int32_t, char *); int pfsync_pack_state(u_int8_t, struct pf_state *, int); +int pfsync_sysctl(int *, u_int, void *, size_t *, void *, size_t); + #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ (st->state_key->proto == IPPROTO_PFSYNC)) \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.552 2007/08/21 15:57:27 dhartmei Exp $ */ +/* $OpenBSD: pf.c,v 1.567 2008/02/20 23:40:13 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -51,6 +51,8 @@ #include #include +#include + #include #include #include @@ -110,6 +112,11 @@ u_int32_t ticket_altqs_inactive; int altqs_inactive_open; u_int32_t ticket_pabuf; +MD5_CTX pf_tcp_secret_ctx; +u_char pf_tcp_secret[16]; +int pf_tcp_secret_init; +int pf_tcp_iss_off; + struct pf_anchor_stackframe { struct pf_ruleset *rs; struct pf_rule *r; @@ -160,6 +167,7 @@ struct pf_rule *pf_get_translation(stru void pf_attach_state(struct pf_state_key *, struct pf_state *, int); void pf_detach_state(struct pf_state *, int); +u_int32_t pf_tcp_iss(struct pf_pdesc *); int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, @@ -214,7 +222,7 @@ int pf_check_proto_cksum(struct mbuf int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); struct pf_state *pf_find_state(struct pfi_kif *, - struct pf_state_key_cmp *, u_int8_t); + struct pf_state_key_cmp *, u_int); int pf_src_connlimit(struct pf_state **); void pf_stateins_err(const char *, struct pf_state *, struct pfi_kif *); @@ -233,10 +241,7 @@ struct pf_pool_limit pf_pool_limits[PF_L #define STATE_LOOKUP() \ do { \ - if (direction == PF_IN) \ - *state = pf_find_state(kif, &key, PF_EXT_GWY); \ - else \ - *state = pf_find_state(kif, &key, PF_LAN_EXT); \ + *state = pf_find_state(kif, &key, direction); \ if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ return (PF_DROP); \ if (direction == PF_OUT && \ @@ -526,19 +531,19 @@ pf_find_state_byid(struct pf_state_cmp * } struct pf_state * -pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int8_t tree) +pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir) { struct pf_state_key *sk; struct pf_state *s; pf_status.fcounters[FCNT_STATE_SEARCH]++; - switch (tree) { - case PF_LAN_EXT: + switch (dir) { + case PF_OUT: sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, (struct pf_state_key *)key); break; - case PF_EXT_GWY: + case PF_IN: sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, (struct pf_state_key *)key); break; @@ -556,19 +561,19 @@ pf_find_state(struct pfi_kif *kif, struc } struct pf_state * -pf_find_state_all(struct pf_state_key_cmp *key, u_int8_t tree, int *more) +pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) { struct pf_state_key *sk; struct pf_state *s, *ret = NULL; pf_status.fcounters[FCNT_STATE_SEARCH]++; - switch (tree) { - case PF_LAN_EXT: + switch (dir) { + case PF_OUT: sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, (struct pf_state_key *)key); break; - case PF_EXT_GWY: + case PF_IN: sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, (struct pf_state_key *)key); break; @@ -819,6 +824,8 @@ pf_insert_state(struct pfi_kif *kif, str TAILQ_FOREACH(sp, &cur->states, next) if (sp->kif == kif) { /* collision! */ pf_stateins_err("tree_lan_ext", s, kif); + pf_detach_state(s, + PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); return (-1); } pf_detach_state(s, PF_DT_SKIP_LANEXT|PF_DT_SKIP_EXTGWY); @@ -961,10 +968,8 @@ pf_src_tree_remove_state(struct pf_state u_int32_t timeout; if (s->src_node != NULL) { - if (s->state_key->proto == IPPROTO_TCP) { - if (s->src.tcp_est) - --s->src_node->conn; - } + if (s->src.tcp_est) + --s->src_node->conn; if (--s->src_node->states <= 0) { timeout = s->rule.ptr->timeout[PFTM_SRC_NODE]; if (!timeout) @@ -1295,6 +1300,7 @@ pf_addr_wrap_neq(struct pf_addr_wrap *aw return (1); switch (aw1->type) { case PF_ADDR_ADDRMASK: + case PF_ADDR_RANGE: if (PF_ANEQ(&aw1->v.a.addr, &aw2->v.a.addr, 0)) return (1); if (PF_ANEQ(&aw1->v.a.mask, &aw2->v.a.mask, 0)) @@ -1598,7 +1604,7 @@ pf_send_tcp(const struct pf_rule *r, sa_ m->m_pkthdr.pf.tag = rtag; if (r != NULL && r->rtableid >= 0) - m->m_pkthdr.pf.rtableid = m->m_pkthdr.pf.rtableid; + m->m_pkthdr.pf.rtableid = r->rtableid; #ifdef ALTQ if (r != NULL && r->qid) { @@ -1790,6 +1796,44 @@ pf_match_addr(u_int8_t n, struct pf_addr } } +/* + * Return 1 if b <= a <= e, otherwise return 0. + */ +int +pf_match_addr_range(struct pf_addr *b, struct pf_addr *e, + struct pf_addr *a, sa_family_t af) +{ + switch (af) { +#ifdef INET + case AF_INET: + if ((a->addr32[0] < b->addr32[0]) || + (a->addr32[0] > e->addr32[0])) + return (0); + break; +#endif /* INET */ +#ifdef INET6 + case AF_INET6: { + int i; + + /* check a >= b */ + for (i = 0; i < 4; ++i) + if (a->addr32[i] > b->addr32[i]) + break; + else if (a->addr32[i] < b->addr32[i]) + return (0); + /* check a <= e */ + for (i = 0; i < 4; ++i) + if (a->addr32[i] < e->addr32[i]) + break; + else if (a->addr32[i] > e->addr32[i]) + return (0); + break; + } +#endif /* INET6 */ + } + return (1); +} + int pf_match(u_int8_t op, u_int32_t a1, u_int32_t a2, u_int32_t p) { @@ -2267,15 +2311,15 @@ pf_get_sport(sa_family_t af, u_int8_t pr if (!(proto == IPPROTO_TCP || proto == IPPROTO_UDP || proto == IPPROTO_ICMP)) { key.gwy.port = dport; - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) return (0); } else if (low == 0 && high == 0) { key.gwy.port = *nport; - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) return (0); } else if (low == high) { key.gwy.port = htons(low); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == NULL) { + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(low); return (0); } @@ -2292,7 +2336,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr /* low <= cut <= high */ for (tmp = cut; tmp <= high; ++(tmp)) { key.gwy.port = htons(tmp); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); return (0); @@ -2300,7 +2344,7 @@ pf_get_sport(sa_family_t af, u_int8_t pr } for (tmp = cut - 1; tmp >= low; --(tmp)) { key.gwy.port = htons(tmp); - if (pf_find_state_all(&key, PF_EXT_GWY, NULL) == + if (pf_find_state_all(&key, PF_IN, NULL) == NULL) { *nport = htons(tmp); return (0); @@ -2836,6 +2880,34 @@ pf_alloc_state_key(struct pf_state *s) return (sk); } +u_int32_t +pf_tcp_iss(struct pf_pdesc *pd) +{ + MD5_CTX ctx; + u_int32_t digest[4]; + + if (pf_tcp_secret_init == 0) { + arc4random_bytes(pf_tcp_secret, sizeof(pf_tcp_secret)); + MD5Init(&pf_tcp_secret_ctx); + MD5Update(&pf_tcp_secret_ctx, pf_tcp_secret, sizeof(pf_tcp_secret)); + pf_tcp_secret_init = 1; + } + ctx = pf_tcp_secret_ctx; + + MD5Update(&ctx, (char *)&pd->hdr.tcp->th_sport, sizeof(u_short)); + MD5Update(&ctx, (char *)&pd->hdr.tcp->th_dport, sizeof(u_short)); + if (pd->af == AF_INET6) { + MD5Update(&ctx, (char *)&pd->src->v6, sizeof(struct in6_addr)); + MD5Update(&ctx, (char *)&pd->dst->v6, sizeof(struct in6_addr)); + } else { + MD5Update(&ctx, (char *)&pd->src->v4, sizeof(struct in_addr)); + MD5Update(&ctx, (char *)&pd->dst->v4, sizeof(struct in_addr)); + } + MD5Final((u_char *)digest, &ctx); + pf_tcp_iss_off += 4096; + return (digest[0] + tcp_iss + pf_tcp_iss_off); +} + int pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction, struct pfi_kif *kif, struct mbuf *m, int off, void *h, @@ -3077,7 +3149,8 @@ pf_test_rule(struct pf_rule **rm, struct !pf_match_gid(r->gid.op, r->gid.gid[0], r->gid.gid[1], pd->lookup.gid)) r = TAILQ_NEXT(r, entries); - else if (r->prob && r->prob <= arc4random()) + else if (r->prob && r->prob <= + (arc4random() % (UINT_MAX - 1) + 1)) r = TAILQ_NEXT(r, entries); else if (r->match_tag && !pf_match_tag(m, r, &tag)) r = TAILQ_NEXT(r, entries); @@ -3203,10 +3276,22 @@ pf_test_rule(struct pf_rule **rm, struct (r->rule_flag & PFRULE_RETURN)) && !(th->th_flags & TH_RST)) { u_int32_t ack = ntohl(th->th_seq) + pd->p_len; - struct ip *h = mtod(m, struct ip *); + int len = 0; + struct ip *h4; + struct ip6_hdr *h6; + + switch (af) { + case AF_INET: + h4 = mtod(m, struct ip *); + len = ntohs(h4->ip_len) - off; + break; + case AF_INET6: + h6 = mtod(m, struct ip6_hdr *); + len = ntohs(h6->ip6_plen) - (off - sizeof(*h6)); + break; + } - if (pf_check_proto_cksum(m, off, - ntohs(h->ip_len) - off, IPPROTO_TCP, AF_INET)) + if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af)) REASON_SET(&reason, PFRES_PROTCKSUM); else { if (th->th_flags & TH_SYN) @@ -3218,10 +3303,12 @@ pf_test_rule(struct pf_rule **rm, struct ntohl(th->th_ack), ack, TH_RST|TH_ACK, 0, 0, r->return_ttl, 1, 0, pd->eh, kif->pfik_ifp); } - } else if ((af == AF_INET) && r->return_icmp) + } else if (pd->proto != IPPROTO_ICMP && af == AF_INET && + r->return_icmp) pf_send_icmp(m, r->return_icmp >> 8, r->return_icmp & 255, af, r); - else if ((af == AF_INET6) && r->return_icmp6) + else if (pd->proto != IPPROTO_ICMPV6 && af == AF_INET6 && + r->return_icmp6) pf_send_icmp(m, r->return_icmp6 >> 8, r->return_icmp6 & 255, af, r); } @@ -3237,7 +3324,6 @@ pf_test_rule(struct pf_rule **rm, struct if (!state_icmp && (r->keep_state || nr != NULL || (pd->flags & PFDESC_TCP_NORM))) { /* create new state */ - u_int16_t len; struct pf_state *s = NULL; struct pf_state_key *sk = NULL; struct pf_src_node *sn = NULL; @@ -3296,15 +3382,14 @@ cleanup: s->log |= nr->log & PF_LOG_ALL; switch (pd->proto) { case IPPROTO_TCP: - len = pd->tot_len - off - (th->th_off << 2); s->src.seqlo = ntohl(th->th_seq); - s->src.seqhi = s->src.seqlo + len + 1; + s->src.seqhi = s->src.seqlo + pd->p_len + 1; if ((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN && r->keep_state == PF_STATE_MODULATE) { /* Generate sequence number modulator */ - while ((s->src.seqdiff = - tcp_rndiss_next() - s->src.seqlo) == 0) - ; + if ((s->src.seqdiff = pf_tcp_iss(pd) - + s->src.seqlo) == 0) + s->src.seqdiff = 1; pf_change_a(&th->th_seq, &th->th_sum, htonl(s->src.seqlo + s->src.seqdiff), 0); rewrite = 1; @@ -3525,11 +3610,20 @@ pf_test_fragment(struct pf_rule **rm, in r = r->skip[PF_SKIP_DST_ADDR].ptr; else if (r->tos && !(r->tos == pd->tos)) r = TAILQ_NEXT(r, entries); - else if (r->src.port_op || r->dst.port_op || - r->flagset || r->type || r->code || - r->os_fingerprint != PF_OSFP_ANY) + else if (r->os_fingerprint != PF_OSFP_ANY) + r = TAILQ_NEXT(r, entries); + else if (pd->proto == IPPROTO_UDP && + (r->src.port_op || r->dst.port_op)) r = TAILQ_NEXT(r, entries); - else if (r->prob && r->prob <= arc4random()) + else if (pd->proto == IPPROTO_TCP && + (r->src.port_op || r->dst.port_op || r->flagset)) + r = TAILQ_NEXT(r, entries); + else if ((pd->proto == IPPROTO_ICMP || + pd->proto == IPPROTO_ICMPV6) && + (r->type || r->code)) + r = TAILQ_NEXT(r, entries); + else if (r->prob && r->prob <= + (arc4random() % (UINT_MAX - 1) + 1)) r = TAILQ_NEXT(r, entries); else if (r->match_tag && !pf_match_tag(m, r, &tag)) r = TAILQ_NEXT(r, entries); @@ -3698,6 +3792,22 @@ pf_test_state_tcp(struct pf_state **stat } } + if (((th->th_flags & (TH_SYN|TH_ACK)) == TH_SYN) && + dst->state >= TCPS_FIN_WAIT_2 && + src->state >= TCPS_FIN_WAIT_2) { + if (pf_status.debug >= PF_DEBUG_MISC) { + printf("pf: state reuse "); + pf_print_state(*state); + pf_print_flags(th->th_flags); + printf("\n"); + } + /* XXX make sure it's the same direction ?? */ + (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; + pf_unlink_state(*state); + *state = NULL; + return (PF_DROP); + } + if (src->wscale && dst->wscale && !(th->th_flags & TH_SYN)) { sws = src->wscale & PF_WSCALE_MASK; dws = dst->wscale & PF_WSCALE_MASK; @@ -3724,7 +3834,8 @@ pf_test_state_tcp(struct pf_state **stat /* Deferred generation of sequence number modulator */ if (dst->seqdiff && !src->seqdiff) { - while ((src->seqdiff = tcp_rndiss_next() - seq) == 0) + /* use random iss for the TCP server */ + while ((src->seqdiff = arc4random() - seq) == 0) ; ack = ntohl(th->th_ack) - dst->seqdiff; pf_change_a(&th->th_seq, &th->th_sum, htonl(seq + @@ -3842,7 +3953,8 @@ pf_test_state_tcp(struct pf_state **stat (ackskew <= (MAXACKWINDOW << sws)) && /* Acking not more than one window forward */ ((th->th_flags & TH_RST) == 0 || orig_seq == src->seqlo || - (orig_seq == src->seqlo + 1) || (pd->flags & PFDESC_IP_REAS) == 0)) { + (orig_seq == src->seqlo + 1) || (orig_seq + 1 == src->seqlo) || + (pd->flags & PFDESC_IP_REAS) == 0)) { /* Require an exact/+1 sequence match on resets when possible */ if (dst->scrub || src->scrub) { @@ -3937,9 +4049,12 @@ pf_test_state_tcp(struct pf_state **stat pf_print_state(*state); pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " - "pkts=%llu:%llu\n", seq, orig_seq, ack, pd->p_len, - ackskew, (*state)->packets[0], - (*state)->packets[1]); + "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, + pd->p_len, ackskew, (*state)->packets[0], + (*state)->packets[1], + direction == PF_IN ? "in" : "out", + direction == (*state)->state_key->direction ? + "fwd" : "rev"); } if (dst->scrub || src->scrub) { Modified: vendor-sys/pf/dist/net/pf_if.c ============================================================================== --- vendor-sys/pf/dist/net/pf_if.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_if.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_if.c,v 1.47 2007/07/13 09:17:48 markus Exp $ */ +/* $OpenBSD: pf_if.c,v 1.51 2007/11/07 17:28:40 mpf Exp $ */ /* * Copyright 2005 Henning Brauer @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -110,10 +111,9 @@ pfi_kif_get(const char *kif_name) return (kif); /* create new one */ - if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT)) == NULL) + if ((kif = malloc(sizeof(*kif), PFI_MTYPE, M_DONTWAIT|M_ZERO)) == NULL) return (NULL); - bzero(kif, sizeof(*kif)); strlcpy(kif->pfik_name, kif_name, sizeof(kif->pfik_name)); kif->pfik_tzero = time_second; TAILQ_INIT(&kif->pfik_dynaddrs); @@ -603,49 +603,57 @@ pfi_if_compare(struct pfi_kif *p, struct } void -pfi_fill_oldstatus(struct pf_status *pfs) +pfi_update_status(const char *name, struct pf_status *pfs) { struct pfi_kif *p; struct pfi_kif_cmp key; + struct ifg_member p_member, *ifgm; + TAILQ_HEAD(, ifg_member) ifg_members; int i, j, k, s; - strlcpy(key.pfik_name, pfs->ifname, sizeof(key.pfik_name)); + strlcpy(key.pfik_name, name, sizeof(key.pfik_name)); s = splsoftnet(); p = RB_FIND(pfi_ifhead, &pfi_ifs, (struct pfi_kif *)&key); if (p == NULL) { splx(s); return; } - bzero(pfs->pcounters, sizeof(pfs->pcounters)); - bzero(pfs->bcounters, sizeof(pfs->bcounters)); - for (i = 0; i < 2; i++) - for (j = 0; j < 2; j++) - for (k = 0; k < 2; k++) { - pfs->pcounters[i][j][k] = - p->pfik_packets[i][j][k]; - pfs->bcounters[i][j] += - p->pfik_bytes[i][j][k]; - } - splx(s); -} - -int -pfi_clr_istats(const char *name) -{ - struct pfi_kif *p; - int s; + if (p->pfik_group != NULL) { + bcopy(&p->pfik_group->ifg_members, &ifg_members, + sizeof(ifg_members)); + } else { + /* build a temporary list for p only */ + bzero(&p_member, sizeof(p_member)); + p_member.ifgm_ifp = p->pfik_ifp; + TAILQ_INIT(&ifg_members); + TAILQ_INSERT_TAIL(&ifg_members, &p_member, ifgm_next); + } + if (pfs) { + bzero(pfs->pcounters, sizeof(pfs->pcounters)); + bzero(pfs->bcounters, sizeof(pfs->bcounters)); + } + TAILQ_FOREACH(ifgm, &ifg_members, ifgm_next) { + if (ifgm->ifgm_ifp == NULL) + continue; + p = (struct pfi_kif *)ifgm->ifgm_ifp->if_pf_kif; - s = splsoftnet(); - RB_FOREACH(p, pfi_ifhead, &pfi_ifs) { - if (pfi_skip_if(name, p)) + /* just clear statistics */ + if (pfs == NULL) { + bzero(p->pfik_packets, sizeof(p->pfik_packets)); + bzero(p->pfik_bytes, sizeof(p->pfik_bytes)); + p->pfik_tzero = time_second; continue; - bzero(p->pfik_packets, sizeof(p->pfik_packets)); - bzero(p->pfik_bytes, sizeof(p->pfik_bytes)); - p->pfik_tzero = time_second; + } + for (i = 0; i < 2; i++) + for (j = 0; j < 2; j++) + for (k = 0; k < 2; k++) { + pfs->pcounters[i][j][k] += + p->pfik_packets[i][j][k]; + pfs->bcounters[i][j] += + p->pfik_bytes[i][j][k]; + } } splx(s); - - return (0); } int Modified: vendor-sys/pf/dist/net/pf_ioctl.c ============================================================================== --- vendor-sys/pf/dist/net/pf_ioctl.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_ioctl.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.193 2007/12/02 12:08:04 pascoe Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -160,7 +160,7 @@ pfattach(int num) pool_sethardlimit(pf_pool_limits[PF_LIMIT_STATES].pp, pf_pool_limits[PF_LIMIT_STATES].limit, NULL, 0); - if (ctob(physmem) <= 100*1024*1024) + if (ptoa(physmem) <= 100*1024*1024) pf_pool_limits[PF_LIMIT_TABLE_ENTRIES].limit = PFR_KENTRY_HIWAT_SMALL; @@ -379,11 +379,9 @@ tagname2tag(struct pf_tags *head, char * return (0); /* allocate and fill new struct pf_tagname */ - tag = (struct pf_tagname *)malloc(sizeof(struct pf_tagname), - M_TEMP, M_NOWAIT); + tag = malloc(sizeof(*tag), M_TEMP, M_NOWAIT|M_ZERO); if (tag == NULL) return (0); - bzero(tag, sizeof(struct pf_tagname)); strlcpy(tag->name, tagname, sizeof(tag->name)); tag->tag = new_tagid; tag->ref++; @@ -912,7 +910,6 @@ pf_state_import(struct pfsync_state *sp, /* copy to state */ memcpy(&s->id, &sp->id, sizeof(sp->id)); s->creatorid = sp->creatorid; - strlcpy(sp->ifname, s->kif->pfik_name, sizeof(sp->ifname)); pf_state_peer_from_pfsync(&sp->src, &s->src); pf_state_peer_from_pfsync(&sp->dst, &s->dst); @@ -921,6 +918,9 @@ pf_state_import(struct pfsync_state *sp, s->anchor.ptr = NULL; s->rt_kif = NULL; s->creation = time_second; + s->expire = time_second; + if (sp->expire > 0) + s->expire -= pf_default_rule.timeout[sp->timeout] - sp->expire; s->pfsync_time = 0; s->packets[0] = s->packets[1] = 0; s->bytes[0] = s->bytes[1] = 0; @@ -1633,7 +1633,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a case DIOCADDSTATE: { struct pfioc_state *ps = (struct pfioc_state *)addr; - struct pfsync_state *sp = (struct pfsync_state *)ps->state; + struct pfsync_state *sp = &ps->state; struct pf_state *s; struct pf_state_key *sk; struct pfi_kif *kif; @@ -1650,6 +1650,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a } bzero(s, sizeof(struct pf_state)); if ((sk = pf_alloc_state_key(s)) == NULL) { + pool_put(&pf_state_pl, s); error = ENOMEM; break; } @@ -1664,30 +1665,28 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a if (pf_insert_state(kif, s)) { pfi_kif_unref(kif, PFI_KIF_REF_NONE); pool_put(&pf_state_pl, s); - pool_put(&pf_state_key_pl, sk); - error = ENOMEM; + error = EEXIST; + break; } + pf_default_rule.states++; break; } case DIOCGETSTATE: { struct pfioc_state *ps = (struct pfioc_state *)addr; struct pf_state *s; - u_int32_t nr; + struct pf_state_cmp id_key; - nr = 0; - RB_FOREACH(s, pf_state_tree_id, &tree_id) { - if (nr >= ps->nr) - break; - nr++; - } + bcopy(ps->state.id, &id_key.id, sizeof(id_key.id)); + id_key.creatorid = ps->state.creatorid; + + s = pf_find_state_byid(&id_key); if (s == NULL) { - error = EBUSY; + error = ENOENT; break; } - pf_state_export((struct pfsync_state *)&ps->state, - s->state_key, s); + pf_state_export(&ps->state, s->state_key, s); break; } @@ -1735,7 +1734,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a case DIOCGETSTATUS: { struct pf_status *s = (struct pf_status *)addr; bcopy(&pf_status, s, sizeof(struct pf_status)); - pfi_fill_oldstatus(s); + pfi_update_status(s->ifname, s); break; } @@ -1746,10 +1745,6 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a bzero(pf_status.ifname, IFNAMSIZ); break; } - if (ifunit(pi->ifname) == NULL) { - error = EINVAL; - break; - } strlcpy(pf_status.ifname, pi->ifname, IFNAMSIZ); break; } @@ -1760,7 +1755,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a bzero(pf_status.scounters, sizeof(pf_status.scounters)); pf_status.since = time_second; if (*pf_status.ifname) - pfi_clr_istats(pf_status.ifname); + pfi_update_status(pf_status.ifname, NULL); break; } @@ -1793,13 +1788,13 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a key.ext.port = pnl->dport; PF_ACPY(&key.gwy.addr, &pnl->saddr, pnl->af); key.gwy.port = pnl->sport; - state = pf_find_state_all(&key, PF_EXT_GWY, &m); + state = pf_find_state_all(&key, PF_IN, &m); } else { PF_ACPY(&key.lan.addr, &pnl->daddr, pnl->af); key.lan.port = pnl->dport; PF_ACPY(&key.ext.addr, &pnl->saddr, pnl->af); key.ext.port = pnl->sport; - state = pf_find_state_all(&key, PF_LAN_EXT, &m); + state = pf_find_state_all(&key, PF_OUT, &m); } if (m > 1) error = E2BIG; /* more than one state */ @@ -1968,6 +1963,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a pool_put(&pf_altq_pl, altq); break; } + altq->altq_disc = NULL; TAILQ_FOREACH(a, pf_altqs_inactive, entries) { if (strncmp(a->ifname, altq->ifname, IFNAMSIZ) == 0 && a->qname[0] == 0) { @@ -2547,10 +2543,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { free(table, M_TEMP); @@ -2616,10 +2610,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { free(table, M_TEMP); @@ -2680,10 +2672,8 @@ pfioctl(dev_t dev, u_long cmd, caddr_t a error = ENODEV; goto fail; } - ioe = (struct pfioc_trans_e *)malloc(sizeof(*ioe), - M_TEMP, M_WAITOK); - table = (struct pfr_table *)malloc(sizeof(*table), - M_TEMP, M_WAITOK); + ioe = malloc(sizeof(*ioe), M_TEMP, M_WAITOK); + table = malloc(sizeof(*table), M_TEMP, M_WAITOK); /* first makes sure everything will succeed */ for (i = 0; i < io->size; i++) { if (copyin(io->array+i, ioe, sizeof(*ioe))) { Modified: vendor-sys/pf/dist/net/pf_norm.c ============================================================================== --- vendor-sys/pf/dist/net/pf_norm.c Wed Dec 10 21:22:15 2008 (r185885) +++ vendor-sys/pf/dist/net/pf_norm.c Wed Dec 10 21:22:57 2008 (r185886) @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.109 2007/05/28 17:16:39 henning Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.111 2007/12/30 10:32:24 mglocker Exp $ */ /* * Copyright 2001 Niels Provos @@ -115,7 +115,7 @@ struct mbuf *pf_reassemble(struct mbuf struct mbuf *pf_fragcache(struct mbuf **, struct ip*, struct pf_fragment **, int, int, int *); int pf_normalize_tcpopt(struct pf_rule *, struct mbuf *, - struct tcphdr *, int); + struct tcphdr *, int, sa_family_t); #define DPFPRINTF(x) do { \ if (pf_status.debug >= PF_DEBUG_MISC) { \ @@ -1316,7 +1316,7 @@ pf_normalize_tcp(int dir, struct pfi_kif } /* Process options */ - if (r->max_mss && pf_normalize_tcpopt(r, m, th, off)) + if (r->max_mss && pf_normalize_tcpopt(r, m, th, off, pd->af)) rewrite = 1; /* copy back packet headers if we sanitized */ @@ -1819,17 +1819,21 @@ pf_normalize_tcp_stateful(struct mbuf *m int pf_normalize_tcpopt(struct pf_rule *r, struct mbuf *m, struct tcphdr *th, - int off) + int off, sa_family_t af) { u_int16_t *mss; int thoff; int opt, cnt, optlen = 0; int rewrite = 0; - u_char *optp; + u_char opts[MAX_TCPOPTLEN]; + u_char *optp = opts; thoff = th->th_off << 2; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:23:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C96C106568E; Wed, 10 Dec 2008 21:23:24 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49908FC1D; Wed, 10 Dec 2008 21:23:23 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALNNvP043381; Wed, 10 Dec 2008 21:23:23 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALNNMh043380; Wed, 10 Dec 2008 21:23:23 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102123.mBALNNMh043380@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185887 - vendor-sys/pf/4.3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:23:24 -0000 Author: mlaier Date: Wed Dec 10 21:23:23 2008 New Revision: 185887 URL: http://svn.freebsd.org/changeset/base/185887 Log: Tag for pf 4.3 Added: vendor-sys/pf/4.3/ - copied from r185886, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:23:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3546210656A8; Wed, 10 Dec 2008 21:23:24 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 077728FC1F; Wed, 10 Dec 2008 21:23:24 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALNNsb043386; Wed, 10 Dec 2008 21:23:23 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALNNHs043385; Wed, 10 Dec 2008 21:23:23 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102123.mBALNNHs043385@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:23:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185887 - vendor-sys/pf/4.3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:23:24 -0000 Author: mlaier Date: Wed Dec 10 21:23:23 2008 New Revision: 185887 URL: http://svn.freebsd.org/changeset/base/185887 Log: Tag for pf 4.3 Added: vendor-sys/pf/4.3/ - copied from r185886, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:24:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 701B11065675; Wed, 10 Dec 2008 21:24:31 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BA7E8FC25; Wed, 10 Dec 2008 21:24:31 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALOVBB043443; Wed, 10 Dec 2008 21:24:31 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALOVYN043439; Wed, 10 Dec 2008 21:24:31 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102124.mBALOVYN043439@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185888 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:24:31 -0000 Author: mlaier Date: Wed Dec 10 21:24:31 2008 New Revision: 185888 URL: http://svn.freebsd.org/changeset/base/185888 Log: Import OPENBSD_4_4_BASE Modified: vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_osfp.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:24:31 2008 (r185888) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.89 2008/01/12 17:08:33 mpf Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.98 2008/06/29 08:42:15 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -89,7 +89,6 @@ int pfsync_clone_destroy(struct ifnet *) void pfsync_setmtu(struct pfsync_softc *, int); int pfsync_alloc_scrub_memory(struct pfsync_state_peer *, struct pf_state_peer *); -int pfsync_insert_net_state(struct pfsync_state *, u_int8_t); void pfsync_update_net_tdb(struct pfsync_tdb *); int pfsyncoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); @@ -224,117 +223,218 @@ pfsync_alloc_scrub_memory(struct pfsync_ struct pf_state_peer *d) { if (s->scrub.scrub_flag && d->scrub == NULL) { - d->scrub = pool_get(&pf_state_scrub_pl, PR_NOWAIT); + d->scrub = pool_get(&pf_state_scrub_pl, PR_NOWAIT | PR_ZERO); if (d->scrub == NULL) return (ENOMEM); - bzero(d->scrub, sizeof(*d->scrub)); } return (0); } +void +pfsync_state_export(struct pfsync_state *sp, struct pf_state *st) +{ + bzero(sp, sizeof(struct pfsync_state)); + + /* copy from state key */ + sp->key[PF_SK_WIRE].addr[0] = st->key[PF_SK_WIRE]->addr[0]; + sp->key[PF_SK_WIRE].addr[1] = st->key[PF_SK_WIRE]->addr[1]; + sp->key[PF_SK_WIRE].port[0] = st->key[PF_SK_WIRE]->port[0]; + sp->key[PF_SK_WIRE].port[1] = st->key[PF_SK_WIRE]->port[1]; + sp->key[PF_SK_STACK].addr[0] = st->key[PF_SK_STACK]->addr[0]; + sp->key[PF_SK_STACK].addr[1] = st->key[PF_SK_STACK]->addr[1]; + sp->key[PF_SK_STACK].port[0] = st->key[PF_SK_STACK]->port[0]; + sp->key[PF_SK_STACK].port[1] = st->key[PF_SK_STACK]->port[1]; + sp->proto = st->key[PF_SK_WIRE]->proto; + sp->af = st->key[PF_SK_WIRE]->af; + + /* copy from state */ + strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); + bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); + sp->creation = htonl(time_second - st->creation); + sp->expire = pf_state_expires(st); + if (sp->expire <= time_second) + sp->expire = htonl(0); + else + sp->expire = htonl(sp->expire - time_second); + + sp->direction = st->direction; + sp->log = st->log; + sp->timeout = st->timeout; + sp->state_flags = st->state_flags; + if (st->src_node) + sp->sync_flags |= PFSYNC_FLAG_SRCNODE; + if (st->nat_src_node) + sp->sync_flags |= PFSYNC_FLAG_NATSRCNODE; + + bcopy(&st->id, &sp->id, sizeof(sp->id)); + sp->creatorid = st->creatorid; + pf_state_peer_hton(&st->src, &sp->src); + pf_state_peer_hton(&st->dst, &sp->dst); + + if (st->rule.ptr == NULL) + sp->rule = htonl(-1); + else + sp->rule = htonl(st->rule.ptr->nr); + if (st->anchor.ptr == NULL) + sp->anchor = htonl(-1); + else + sp->anchor = htonl(st->anchor.ptr->nr); + if (st->nat_rule.ptr == NULL) + sp->nat_rule = htonl(-1); + else + sp->nat_rule = htonl(st->nat_rule.ptr->nr); + + pf_state_counter_hton(st->packets[0], sp->packets[0]); + pf_state_counter_hton(st->packets[1], sp->packets[1]); + pf_state_counter_hton(st->bytes[0], sp->bytes[0]); + pf_state_counter_hton(st->bytes[1], sp->bytes[1]); + +} + int -pfsync_insert_net_state(struct pfsync_state *sp, u_int8_t chksum_flag) +pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) { struct pf_state *st = NULL; - struct pf_state_key *sk = NULL; + struct pf_state_key *skw = NULL, *sks = NULL; struct pf_rule *r = NULL; struct pfi_kif *kif; + int pool_flags; + int error; if (sp->creatorid == 0 && pf_status.debug >= PF_DEBUG_MISC) { - printf("pfsync_insert_net_state: invalid creator id:" + printf("pfsync_state_import: invalid creator id:" " %08x\n", ntohl(sp->creatorid)); return (EINVAL); } - kif = pfi_kif_get(sp->ifname); - if (kif == NULL) { + if ((kif = pfi_kif_get(sp->ifname)) == NULL) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert_net_state: " + printf("pfsync_state_import: " "unknown interface: %s\n", sp->ifname); - /* skip this state */ - return (0); + if (flags & PFSYNC_SI_IOCTL) + return (EINVAL); + return (0); /* skip this state */ } /* - * If the ruleset checksums match, it's safe to associate the state - * with the rule of that number. + * If the ruleset checksums match or the state is coming from the ioctl, + * it's safe to associate the state with the rule of that number. */ - if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag && - ntohl(sp->rule) < + if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && + (flags & (PFSYNC_SI_IOCTL | PFSYNC_SI_CKSUM)) && ntohl(sp->rule) < pf_main_ruleset.rules[PF_RULESET_FILTER].active.rcount) r = pf_main_ruleset.rules[ PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)]; else r = &pf_default_rule; - if (!r->max_states || r->states < r->max_states) - st = pool_get(&pf_state_pl, PR_NOWAIT); - if (st == NULL) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - return (ENOMEM); - } - bzero(st, sizeof(*st)); + if ((r->max_states && r->states_cur >= r->max_states)) + goto cleanup; - if ((sk = pf_alloc_state_key(st)) == NULL) { - pool_put(&pf_state_pl, st); - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - return (ENOMEM); - } + if (flags & PFSYNC_SI_IOCTL) + pool_flags = PR_WAITOK | PR_LIMITFAIL | PR_ZERO; + else + pool_flags = PR_LIMITFAIL | PR_ZERO; - /* allocate memory for scrub info */ - if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || - pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - if (st->src.scrub) - pool_put(&pf_state_scrub_pl, st->src.scrub); - pool_put(&pf_state_pl, st); - pool_put(&pf_state_key_pl, sk); - return (ENOMEM); - } + if ((st = pool_get(&pf_state_pl, pool_flags)) == NULL) + goto cleanup; - st->rule.ptr = r; - /* XXX get pointers to nat_rule and anchor */ + if ((skw = pf_alloc_state_key(pool_flags)) == NULL) + goto cleanup; - /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ - r->states++; + if (PF_ANEQ(&sp->key[PF_SK_WIRE].addr[0], + &sp->key[PF_SK_STACK].addr[0], sp->af) || + PF_ANEQ(&sp->key[PF_SK_WIRE].addr[1], + &sp->key[PF_SK_STACK].addr[1], sp->af) || + sp->key[PF_SK_WIRE].port[0] != sp->key[PF_SK_STACK].port[0] || + sp->key[PF_SK_WIRE].port[1] != sp->key[PF_SK_STACK].port[1]) { + if ((sks = pf_alloc_state_key(pool_flags)) == NULL) + goto cleanup; + } else + sks = skw; - /* fill in the rest of the state entry */ - pf_state_host_ntoh(&sp->lan, &sk->lan); - pf_state_host_ntoh(&sp->gwy, &sk->gwy); - pf_state_host_ntoh(&sp->ext, &sk->ext); + /* allocate memory for scrub info */ + if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || + pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) + goto cleanup; - pf_state_peer_ntoh(&sp->src, &st->src); - pf_state_peer_ntoh(&sp->dst, &st->dst); + /* copy to state key(s) */ + skw->addr[0] = sp->key[PF_SK_WIRE].addr[0]; + skw->addr[1] = sp->key[PF_SK_WIRE].addr[1]; + skw->port[0] = sp->key[PF_SK_WIRE].port[0]; + skw->port[1] = sp->key[PF_SK_WIRE].port[1]; + skw->proto = sp->proto; + skw->af = sp->af; + if (sks != skw) { + sks->addr[0] = sp->key[PF_SK_STACK].addr[0]; + sks->addr[1] = sp->key[PF_SK_STACK].addr[1]; + sks->port[0] = sp->key[PF_SK_STACK].port[0]; + sks->port[1] = sp->key[PF_SK_STACK].port[1]; + sks->proto = sp->proto; + sks->af = sp->af; + } + /* copy to state */ bcopy(&sp->rt_addr, &st->rt_addr, sizeof(st->rt_addr)); st->creation = time_second - ntohl(sp->creation); - st->expire = ntohl(sp->expire) + time_second; + st->expire = time_second; + if (sp->expire) { + /* XXX No adaptive scaling. */ + st->expire -= r->timeout[sp->timeout] - ntohl(sp->expire); + } - sk->af = sp->af; - sk->proto = sp->proto; - sk->direction = sp->direction; + st->expire = ntohl(sp->expire) + time_second; + st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; - st->allow_opts = sp->allow_opts; + st->state_flags = sp->state_flags; + if (!(flags & PFSYNC_SI_IOCTL)) + st->sync_flags = PFSTATE_FROMSYNC; bcopy(sp->id, &st->id, sizeof(st->id)); st->creatorid = sp->creatorid; - st->sync_flags = PFSTATE_FROMSYNC; + pf_state_peer_ntoh(&sp->src, &st->src); + pf_state_peer_ntoh(&sp->dst, &st->dst); - if (pf_insert_state(kif, st)) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); + st->rule.ptr = r; + st->nat_rule.ptr = NULL; + st->anchor.ptr = NULL; + st->rt_kif = NULL; + + st->pfsync_time = 0; + + + /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ + r->states_cur++; + r->states_tot++; + + if ((error = pf_state_insert(kif, skw, sks, st)) != 0) { /* XXX when we have nat_rule/anchors, use STATE_DEC_COUNTERS */ - r->states--; + r->states_cur--; + goto cleanup_state; + } + + return (0); + + cleanup: + error = ENOMEM; + if (skw == sks) + sks = NULL; + if (skw != NULL) + pool_put(&pf_state_key_pl, skw); + if (sks != NULL) + pool_put(&pf_state_key_pl, sks); + + cleanup_state: /* pf_state_insert frees the state keys */ + if (st) { if (st->dst.scrub) pool_put(&pf_state_scrub_pl, st->dst.scrub); if (st->src.scrub) pool_put(&pf_state_scrub_pl, st->src.scrub); pool_put(&pf_state_pl, st); - return (EINVAL); } - - return (0); + return (error); } void @@ -345,6 +445,7 @@ pfsync_input(struct mbuf *m, ...) struct pfsync_softc *sc = pfsyncif; struct pf_state *st; struct pf_state_key *sk; + struct pf_state_item *si; struct pf_state_cmp id_key; struct pfsync_state *sp; struct pfsync_state_upd *up; @@ -358,7 +459,7 @@ pfsync_input(struct mbuf *m, ...) struct in_addr src; struct mbuf *mp; int iplen, action, error, i, s, count, offp, sfail, stale = 0; - u_int8_t chksum_flag = 0; + u_int8_t flags = 0; pfsyncstats.pfsyncs_ipackets++; @@ -413,7 +514,7 @@ pfsync_input(struct mbuf *m, ...) src = ip->ip_src; if (!bcmp(&ph->pf_chksum, &pf_status.pf_chksum, PF_MD5_DIGEST_LENGTH)) - chksum_flag++; + flags |= PFSYNC_SI_CKSUM; switch (action) { case PFSYNC_ACT_CLR: { @@ -444,15 +545,16 @@ pfsync_input(struct mbuf *m, ...) splx(s); return; } - for (sk = RB_MIN(pf_state_tree_lan_ext, - &pf_statetbl_lan_ext); sk; sk = nextsk) { - nextsk = RB_NEXT(pf_state_tree_lan_ext, - &pf_statetbl_lan_ext, sk); - TAILQ_FOREACH(st, &sk->states, next) { - if (st->creatorid == creatorid) { - st->sync_flags |= + /* XXX correct? */ + for (sk = RB_MIN(pf_state_tree, + &pf_statetbl); sk; sk = nextsk) { + nextsk = RB_NEXT(pf_state_tree, + &pf_statetbl, sk); + TAILQ_FOREACH(si, &sk->states, entry) { + if (si->s->creatorid == creatorid) { + si->s->sync_flags |= PFSTATE_FROMSYNC; - pf_unlink_state(st); + pf_unlink_state(si->s); } } } @@ -484,8 +586,7 @@ pfsync_input(struct mbuf *m, ...) continue; } - if ((error = pfsync_insert_net_state(sp, - chksum_flag))) { + if ((error = pfsync_state_import(sp, flags))) { if (error == ENOMEM) { splx(s); goto done; @@ -524,11 +625,11 @@ pfsync_input(struct mbuf *m, ...) st = pf_find_state_byid(&id_key); if (st == NULL) { /* insert the update */ - if (pfsync_insert_net_state(sp, chksum_flag)) + if (pfsync_state_import(sp, flags)) pfsyncstats.pfsyncs_badstate++; continue; } - sk = st->state_key; + sk = st->key[PF_SK_WIRE]; /* XXX right one? */ sfail = 0; if (sk->proto == IPPROTO_TCP) { /* @@ -589,7 +690,7 @@ pfsync_input(struct mbuf *m, ...) } continue; } - pfsync_alloc_scrub_memory(&sp->dst, &st->dst); + pfsync_alloc_scrub_memory(&sp->dst, &st->dst); pf_state_peer_ntoh(&sp->src, &st->src); pf_state_peer_ntoh(&sp->dst, &st->dst); st->expire = ntohl(sp->expire) + time_second; @@ -665,7 +766,7 @@ pfsync_input(struct mbuf *m, ...) pfsyncstats.pfsyncs_badstate++; continue; } - sk = st->state_key; + sk = st->key[PF_SK_WIRE]; /* XXX right one? */ sfail = 0; if (sk->proto == IPPROTO_TCP) { /* @@ -716,7 +817,7 @@ pfsync_input(struct mbuf *m, ...) PFSYNC_FLAG_STALE); continue; } - pfsync_alloc_scrub_memory(&up->dst, &st->dst); + pfsync_alloc_scrub_memory(&up->dst, &st->dst); pf_state_peer_ntoh(&up->src, &st->src); pf_state_peer_ntoh(&up->dst, &st->dst); st->expire = ntohl(up->expire) + time_second; @@ -1117,9 +1218,6 @@ pfsync_pack_state(u_int8_t action, struc struct pfsync_state *sp = NULL; struct pfsync_state_upd *up = NULL; struct pfsync_state_del *dp = NULL; - struct pf_state_key *sk = st->state_key; - struct pf_rule *r; - u_long secs; int s, ret = 0; u_int8_t i = 255, newaction = 0; @@ -1186,8 +1284,6 @@ pfsync_pack_state(u_int8_t action, struc } } - secs = time_second; - st->pfsync_time = time_uptime; if (sp == NULL) { @@ -1199,47 +1295,19 @@ pfsync_pack_state(u_int8_t action, struc h->count++; bzero(sp, sizeof(*sp)); - bcopy(&st->id, sp->id, sizeof(sp->id)); - sp->creatorid = st->creatorid; - - strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); - pf_state_host_hton(&sk->lan, &sp->lan); - pf_state_host_hton(&sk->gwy, &sp->gwy); - pf_state_host_hton(&sk->ext, &sp->ext); - - bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); - - sp->creation = htonl(secs - st->creation); - pf_state_counter_hton(st->packets[0], sp->packets[0]); - pf_state_counter_hton(st->packets[1], sp->packets[1]); - pf_state_counter_hton(st->bytes[0], sp->bytes[0]); - pf_state_counter_hton(st->bytes[1], sp->bytes[1]); - if ((r = st->rule.ptr) == NULL) - sp->rule = htonl(-1); - else - sp->rule = htonl(r->nr); - if ((r = st->anchor.ptr) == NULL) - sp->anchor = htonl(-1); - else - sp->anchor = htonl(r->nr); - sp->af = sk->af; - sp->proto = sk->proto; - sp->direction = sk->direction; - sp->log = st->log; - sp->allow_opts = st->allow_opts; - sp->timeout = st->timeout; + pfsync_state_export(sp, st); if (flags & PFSYNC_FLAG_STALE) sp->sync_flags |= PFSTATE_STALE; - } - - pf_state_peer_hton(&st->src, &sp->src); - pf_state_peer_hton(&st->dst, &sp->dst); + } else { + pf_state_peer_hton(&st->src, &sp->src); + pf_state_peer_hton(&st->dst, &sp->dst); - if (st->expire <= secs) - sp->expire = htonl(0); - else - sp->expire = htonl(st->expire - secs); + if (st->expire <= time_second) + sp->expire = htonl(0); + else + sp->expire = htonl(st->expire - time_second); + } /* do we need to build "compressed" actions for network transfer? */ if (sc->sc_sync_ifp && flags & PFSYNC_FLAG_COMPRESS) { @@ -1715,7 +1783,7 @@ pfsync_update_tdb(struct tdb *tdb, int o for (i = 0; !pt && i < h->count; i++) { if (tdb->tdb_spi == u->spi && tdb->tdb_sproto == u->sproto && - !bcmp(&tdb->tdb_dst, &u->dst, + !bcmp(&tdb->tdb_dst, &u->dst, SA_LEN(&u->dst.sa))) { pt = u; pt->updates++; Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:24:31 2008 (r185888) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.32 2007/12/14 18:33:37 deraadt Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.35 2008/06/29 08:42:15 mcbride Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -146,7 +146,7 @@ extern struct pfsync_softc *pfsyncif; struct pfsync_header { u_int8_t version; -#define PFSYNC_VERSION 3 +#define PFSYNC_VERSION 4 u_int8_t af; u_int8_t action; #define PFSYNC_ACT_CLR 0 /* clear all states */ @@ -205,72 +205,22 @@ struct pfsyncreq { int pfsyncr_authlevel; }; - -/* for copies to/from network */ -#define pf_state_peer_hton(s,d) do { \ - (d)->seqlo = htonl((s)->seqlo); \ - (d)->seqhi = htonl((s)->seqhi); \ - (d)->seqdiff = htonl((s)->seqdiff); \ - (d)->max_win = htons((s)->max_win); \ - (d)->mss = htons((s)->mss); \ - (d)->state = (s)->state; \ - (d)->wscale = (s)->wscale; \ - if ((s)->scrub) { \ - (d)->scrub.pfss_flags = \ - htons((s)->scrub->pfss_flags & PFSS_TIMESTAMP); \ - (d)->scrub.pfss_ttl = (s)->scrub->pfss_ttl; \ - (d)->scrub.pfss_ts_mod = htonl((s)->scrub->pfss_ts_mod);\ - (d)->scrub.scrub_flag = PFSYNC_SCRUB_FLAG_VALID; \ - } \ -} while (0) - -#define pf_state_peer_ntoh(s,d) do { \ - (d)->seqlo = ntohl((s)->seqlo); \ - (d)->seqhi = ntohl((s)->seqhi); \ - (d)->seqdiff = ntohl((s)->seqdiff); \ - (d)->max_win = ntohs((s)->max_win); \ - (d)->mss = ntohs((s)->mss); \ - (d)->state = (s)->state; \ - (d)->wscale = (s)->wscale; \ - if ((s)->scrub.scrub_flag == PFSYNC_SCRUB_FLAG_VALID && \ - (d)->scrub != NULL) { \ - (d)->scrub->pfss_flags = \ - ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \ - (d)->scrub->pfss_ttl = (s)->scrub.pfss_ttl; \ - (d)->scrub->pfss_ts_mod = ntohl((s)->scrub.pfss_ts_mod);\ - } \ -} while (0) - -#define pf_state_host_hton(s,d) do { \ - bcopy(&(s)->addr, &(d)->addr, sizeof((d)->addr)); \ - (d)->port = (s)->port; \ -} while (0) - -#define pf_state_host_ntoh(s,d) do { \ - bcopy(&(s)->addr, &(d)->addr, sizeof((d)->addr)); \ - (d)->port = (s)->port; \ -} while (0) - -#define pf_state_counter_hton(s,d) do { \ - d[0] = htonl((s>>32)&0xffffffff); \ - d[1] = htonl(s&0xffffffff); \ -} while (0) - -#define pf_state_counter_ntoh(s,d) do { \ - d = ntohl(s[0]); \ - d = d<<32; \ - d += ntohl(s[1]); \ -} while (0) - #ifdef _KERNEL -void pfsync_input(struct mbuf *, ...); -int pfsync_clear_states(u_int32_t, char *); -int pfsync_pack_state(u_int8_t, struct pf_state *, int); -int pfsync_sysctl(int *, u_int, void *, size_t *, void *, size_t); +void pfsync_input(struct mbuf *, ...); +int pfsync_clear_states(u_int32_t, char *); +int pfsync_pack_state(u_int8_t, struct pf_state *, int); +int pfsync_sysctl(int *, u_int, void *, size_t *, + void *, size_t); +void pfsync_state_export(struct pfsync_state *, + struct pf_state *); + +#define PFSYNC_SI_IOCTL 0x01 +#define PFSYNC_SI_CKSUM 0x02 +int pfsync_state_import(struct pfsync_state *, u_int8_t); #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ - (st->state_key->proto == IPPROTO_PFSYNC)) \ + (st->key[PF_SK_WIRE]->proto == IPPROTO_PFSYNC)) \ st->sync_flags |= PFSTATE_NOSYNC; \ else if (!st->sync_flags) \ pfsync_pack_state(PFSYNC_ACT_INS, (st), \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:24:31 2008 (r185888) @@ -1,8 +1,8 @@ -/* $OpenBSD: pf.c,v 1.567 2008/02/20 23:40:13 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.614 2008/08/02 12:34:37 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier - * Copyright (c) 2002,2003 Henning Brauer + * Copyright (c) 2002 - 2008 Henning Brauer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,8 +98,7 @@ */ /* state tables */ -struct pf_state_tree_lan_ext pf_statetbl_lan_ext; -struct pf_state_tree_ext_gwy pf_statetbl_ext_gwy; +struct pf_state_tree pf_statetbl; struct pf_altqqueue pf_altqs[2]; struct pf_palist pf_pabuf; @@ -125,7 +124,7 @@ struct pf_anchor_stackframe { } pf_anchor_stack[64]; struct pool pf_src_tree_pl, pf_rule_pl, pf_pooladdr_pl; -struct pool pf_state_pl, pf_state_key_pl; +struct pool pf_state_pl, pf_state_key_pl, pf_state_item_pl; struct pool pf_altq_pl; void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); @@ -161,21 +160,41 @@ struct pf_rule *pf_match_translation(st u_int16_t, int); struct pf_rule *pf_get_translation(struct pf_pdesc *, struct mbuf *, int, int, struct pfi_kif *, struct pf_src_node **, - struct pf_addr *, u_int16_t, - struct pf_addr *, u_int16_t, - struct pf_addr *, u_int16_t *); -void pf_attach_state(struct pf_state_key *, - struct pf_state *, int); -void pf_detach_state(struct pf_state *, int); + struct pf_state_key **, struct pf_state_key **, + struct pf_state_key **, struct pf_state_key **, + struct pf_addr *, struct pf_addr *, + u_int16_t, u_int16_t); +void pf_detach_state(struct pf_state *); +int pf_state_key_setup(struct pf_pdesc *, struct pf_rule *, + struct pf_state_key **, struct pf_state_key **, + struct pf_state_key **, struct pf_state_key **, + struct pf_addr *, struct pf_addr *, + u_int16_t, u_int16_t); +void pf_state_key_detach(struct pf_state *, int); u_int32_t pf_tcp_iss(struct pf_pdesc *); int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **, struct ifqueue *); +static __inline int pf_create_state(struct pf_rule *, struct pf_rule *, + struct pf_rule *, struct pf_pdesc *, + struct pf_src_node *, struct pf_state_key *, + struct pf_state_key *, struct pf_state_key *, + struct pf_state_key *, struct mbuf *, int, + u_int16_t, u_int16_t, int *, struct pfi_kif *, + struct pf_state **, int, u_int16_t, u_int16_t, + int); int pf_test_fragment(struct pf_rule **, int, struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **); +int pf_tcp_track_full(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pfi_kif *, struct mbuf *, int, + struct pf_pdesc *, u_short *, int *); +int pf_tcp_track_sloppy(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pf_pdesc *, u_short *); int pf_test_state_tcp(struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -186,10 +205,9 @@ int pf_test_state_icmp(struct pf_stat struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); int pf_test_state_other(struct pf_state **, int, - struct pfi_kif *, struct pf_pdesc *); -int pf_match_tag(struct mbuf *, struct pf_rule *, int *); + struct pfi_kif *, struct mbuf *, struct pf_pdesc *); void pf_step_into_anchor(int *, struct pf_ruleset **, int, - struct pf_rule **, struct pf_rule **, int *); + struct pf_rule **, struct pf_rule **, int *); int pf_step_out_of_anchor(int *, struct pf_ruleset **, int, struct pf_rule **, struct pf_rule **, int *); @@ -219,13 +237,14 @@ void pf_set_rt_ifp(struct pf_state *, struct pf_addr *); int pf_check_proto_cksum(struct mbuf *, int, int, u_int8_t, sa_family_t); +struct pf_divert *pf_get_divert(struct mbuf *); +void pf_print_state_parts(struct pf_state *, + struct pf_state_key *, struct pf_state_key *); int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); struct pf_state *pf_find_state(struct pfi_kif *, - struct pf_state_key_cmp *, u_int); + struct pf_state_key_cmp *, u_int, struct mbuf *); int pf_src_connlimit(struct pf_state **); -void pf_stateins_err(const char *, struct pf_state *, - struct pfi_kif *); int pf_check_congestion(struct ifqueue *); extern struct pool pfr_ktable_pl; @@ -239,54 +258,49 @@ struct pf_pool_limit pf_pool_limits[PF_L { &pfr_kentry_pl, PFR_KENTRY_HIWAT } }; -#define STATE_LOOKUP() \ +#define STATE_LOOKUP(i, k, d, s, m) \ do { \ - *state = pf_find_state(kif, &key, direction); \ - if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ + s = pf_find_state(i, k, d, m); \ + if (s == NULL || (s)->timeout == PFTM_PURGE) \ return (PF_DROP); \ - if (direction == PF_OUT && \ - (((*state)->rule.ptr->rt == PF_ROUTETO && \ - (*state)->rule.ptr->direction == PF_OUT) || \ - ((*state)->rule.ptr->rt == PF_REPLYTO && \ - (*state)->rule.ptr->direction == PF_IN)) && \ - (*state)->rt_kif != NULL && \ - (*state)->rt_kif != kif) \ + if (d == PF_OUT && \ + (((s)->rule.ptr->rt == PF_ROUTETO && \ + (s)->rule.ptr->direction == PF_OUT) || \ + ((s)->rule.ptr->rt == PF_REPLYTO && \ + (s)->rule.ptr->direction == PF_IN)) && \ + (s)->rt_kif != NULL && \ + (s)->rt_kif != i) \ return (PF_PASS); \ } while (0) -#define STATE_TRANSLATE(sk) \ - (sk)->lan.addr.addr32[0] != (sk)->gwy.addr.addr32[0] || \ - ((sk)->af == AF_INET6 && \ - ((sk)->lan.addr.addr32[1] != (sk)->gwy.addr.addr32[1] || \ - (sk)->lan.addr.addr32[2] != (sk)->gwy.addr.addr32[2] || \ - (sk)->lan.addr.addr32[3] != (sk)->gwy.addr.addr32[3])) || \ - (sk)->lan.port != (sk)->gwy.port - #define BOUND_IFACE(r, k) \ ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : pfi_all #define STATE_INC_COUNTERS(s) \ do { \ - s->rule.ptr->states++; \ - if (s->anchor.ptr != NULL) \ - s->anchor.ptr->states++; \ - if (s->nat_rule.ptr != NULL) \ - s->nat_rule.ptr->states++; \ + s->rule.ptr->states_cur++; \ + s->rule.ptr->states_tot++; \ + if (s->anchor.ptr != NULL) { \ + s->anchor.ptr->states_cur++; \ + s->anchor.ptr->states_tot++; \ + } \ + if (s->nat_rule.ptr != NULL) { \ + s->nat_rule.ptr->states_cur++; \ + s->nat_rule.ptr->states_tot++; \ + } \ } while (0) #define STATE_DEC_COUNTERS(s) \ do { \ if (s->nat_rule.ptr != NULL) \ - s->nat_rule.ptr->states--; \ + s->nat_rule.ptr->states_cur--; \ if (s->anchor.ptr != NULL) \ - s->anchor.ptr->states--; \ - s->rule.ptr->states--; \ + s->anchor.ptr->states_cur--; \ + s->rule.ptr->states_cur--; \ } while (0) static __inline int pf_src_compare(struct pf_src_node *, struct pf_src_node *); -static __inline int pf_state_compare_lan_ext(struct pf_state_key *, - struct pf_state_key *); -static __inline int pf_state_compare_ext_gwy(struct pf_state_key *, +static __inline int pf_state_compare_key(struct pf_state_key *, struct pf_state_key *); static __inline int pf_state_compare_id(struct pf_state *, struct pf_state *); @@ -297,16 +311,10 @@ struct pf_state_tree_id tree_id; struct pf_state_queue state_list; RB_GENERATE(pf_src_tree, pf_src_node, entry, pf_src_compare); -RB_GENERATE(pf_state_tree_lan_ext, pf_state_key, - entry_lan_ext, pf_state_compare_lan_ext); -RB_GENERATE(pf_state_tree_ext_gwy, pf_state_key, - entry_ext_gwy, pf_state_compare_ext_gwy); +RB_GENERATE(pf_state_tree, pf_state_key, entry, pf_state_compare_key); RB_GENERATE(pf_state_tree_id, pf_state, entry_id, pf_state_compare_id); -#define PF_DT_SKIP_LANEXT 0x01 -#define PF_DT_SKIP_EXTGWY 0x02 - static __inline int pf_src_compare(struct pf_src_node *a, struct pf_src_node *b) { @@ -351,157 +359,6 @@ pf_src_compare(struct pf_src_node *a, st return (0); } -static __inline int -pf_state_compare_lan_ext(struct pf_state_key *a, struct pf_state_key *b) -{ - int diff; - - if ((diff = a->proto - b->proto) != 0) - return (diff); - if ((diff = a->af - b->af) != 0) - return (diff); - switch (a->af) { -#ifdef INET - case AF_INET: - if (a->lan.addr.addr32[0] > b->lan.addr.addr32[0]) - return (1); - if (a->lan.addr.addr32[0] < b->lan.addr.addr32[0]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - if (a->lan.addr.addr32[3] > b->lan.addr.addr32[3]) - return (1); - if (a->lan.addr.addr32[3] < b->lan.addr.addr32[3]) - return (-1); - if (a->ext.addr.addr32[3] > b->ext.addr.addr32[3]) - return (1); - if (a->ext.addr.addr32[3] < b->ext.addr.addr32[3]) - return (-1); - if (a->lan.addr.addr32[2] > b->lan.addr.addr32[2]) - return (1); - if (a->lan.addr.addr32[2] < b->lan.addr.addr32[2]) - return (-1); - if (a->ext.addr.addr32[2] > b->ext.addr.addr32[2]) - return (1); - if (a->ext.addr.addr32[2] < b->ext.addr.addr32[2]) - return (-1); - if (a->lan.addr.addr32[1] > b->lan.addr.addr32[1]) - return (1); - if (a->lan.addr.addr32[1] < b->lan.addr.addr32[1]) - return (-1); - if (a->ext.addr.addr32[1] > b->ext.addr.addr32[1]) - return (1); - if (a->ext.addr.addr32[1] < b->ext.addr.addr32[1]) - return (-1); - if (a->lan.addr.addr32[0] > b->lan.addr.addr32[0]) - return (1); - if (a->lan.addr.addr32[0] < b->lan.addr.addr32[0]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - break; -#endif /* INET6 */ - } - - if ((diff = a->lan.port - b->lan.port) != 0) - return (diff); - if ((diff = a->ext.port - b->ext.port) != 0) - return (diff); - - return (0); -} - -static __inline int -pf_state_compare_ext_gwy(struct pf_state_key *a, struct pf_state_key *b) -{ - int diff; - - if ((diff = a->proto - b->proto) != 0) - return (diff); - if ((diff = a->af - b->af) != 0) - return (diff); - switch (a->af) { -#ifdef INET - case AF_INET: - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - if (a->gwy.addr.addr32[0] > b->gwy.addr.addr32[0]) - return (1); - if (a->gwy.addr.addr32[0] < b->gwy.addr.addr32[0]) - return (-1); - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - if (a->ext.addr.addr32[3] > b->ext.addr.addr32[3]) - return (1); - if (a->ext.addr.addr32[3] < b->ext.addr.addr32[3]) - return (-1); - if (a->gwy.addr.addr32[3] > b->gwy.addr.addr32[3]) - return (1); - if (a->gwy.addr.addr32[3] < b->gwy.addr.addr32[3]) - return (-1); - if (a->ext.addr.addr32[2] > b->ext.addr.addr32[2]) - return (1); - if (a->ext.addr.addr32[2] < b->ext.addr.addr32[2]) - return (-1); - if (a->gwy.addr.addr32[2] > b->gwy.addr.addr32[2]) - return (1); - if (a->gwy.addr.addr32[2] < b->gwy.addr.addr32[2]) - return (-1); - if (a->ext.addr.addr32[1] > b->ext.addr.addr32[1]) - return (1); - if (a->ext.addr.addr32[1] < b->ext.addr.addr32[1]) - return (-1); - if (a->gwy.addr.addr32[1] > b->gwy.addr.addr32[1]) - return (1); - if (a->gwy.addr.addr32[1] < b->gwy.addr.addr32[1]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - if (a->gwy.addr.addr32[0] > b->gwy.addr.addr32[0]) - return (1); - if (a->gwy.addr.addr32[0] < b->gwy.addr.addr32[0]) - return (-1); - break; -#endif /* INET6 */ - } - - if ((diff = a->ext.port - b->ext.port) != 0) - return (diff); - if ((diff = a->gwy.port - b->gwy.port) != 0) - return (diff); - - return (0); -} - -static __inline int -pf_state_compare_id(struct pf_state *a, struct pf_state *b) -{ - if (a->id > b->id) - return (1); - if (a->id < b->id) - return (-1); - if (a->creatorid > b->creatorid) - return (1); - if (a->creatorid < b->creatorid) - return (-1); - - return (0); -} - #ifdef INET6 void pf_addrcpy(struct pf_addr *dst, struct pf_addr *src, sa_family_t af) @@ -522,77 +379,6 @@ pf_addrcpy(struct pf_addr *dst, struct p } #endif /* INET6 */ -struct pf_state * -pf_find_state_byid(struct pf_state_cmp *key) -{ - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - return (RB_FIND(pf_state_tree_id, &tree_id, (struct pf_state *)key)); -} - -struct pf_state * -pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir) -{ - struct pf_state_key *sk; - struct pf_state *s; - - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - switch (dir) { - case PF_OUT: - sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, - (struct pf_state_key *)key); - break; - case PF_IN: - sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, - (struct pf_state_key *)key); - break; - default: - panic("pf_find_state"); - } - - /* list is sorted, if-bound states before floating ones */ - if (sk != NULL) - TAILQ_FOREACH(s, &sk->states, next) - if (s->kif == pfi_all || s->kif == kif) - return (s); - - return (NULL); -} - -struct pf_state * -pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) -{ - struct pf_state_key *sk; - struct pf_state *s, *ret = NULL; - - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - switch (dir) { - case PF_OUT: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:24:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AC261065676; Wed, 10 Dec 2008 21:24:31 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 862818FC26; Wed, 10 Dec 2008 21:24:31 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALOVg3043452; Wed, 10 Dec 2008 21:24:31 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALOVJF043448; Wed, 10 Dec 2008 21:24:31 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102124.mBALOVJF043448@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:24:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185888 - vendor-sys/pf/dist/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:24:31 -0000 Author: mlaier Date: Wed Dec 10 21:24:31 2008 New Revision: 185888 URL: http://svn.freebsd.org/changeset/base/185888 Log: Import OPENBSD_4_4_BASE Modified: vendor-sys/pf/dist/net/if_pfsync.c vendor-sys/pf/dist/net/if_pfsync.h vendor-sys/pf/dist/net/pf.c vendor-sys/pf/dist/net/pf_if.c vendor-sys/pf/dist/net/pf_ioctl.c vendor-sys/pf/dist/net/pf_norm.c vendor-sys/pf/dist/net/pf_osfp.c vendor-sys/pf/dist/net/pf_table.c vendor-sys/pf/dist/net/pfvar.h Modified: vendor-sys/pf/dist/net/if_pfsync.c ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/if_pfsync.c Wed Dec 10 21:24:31 2008 (r185888) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.89 2008/01/12 17:08:33 mpf Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.98 2008/06/29 08:42:15 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -89,7 +89,6 @@ int pfsync_clone_destroy(struct ifnet *) void pfsync_setmtu(struct pfsync_softc *, int); int pfsync_alloc_scrub_memory(struct pfsync_state_peer *, struct pf_state_peer *); -int pfsync_insert_net_state(struct pfsync_state *, u_int8_t); void pfsync_update_net_tdb(struct pfsync_tdb *); int pfsyncoutput(struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); @@ -224,117 +223,218 @@ pfsync_alloc_scrub_memory(struct pfsync_ struct pf_state_peer *d) { if (s->scrub.scrub_flag && d->scrub == NULL) { - d->scrub = pool_get(&pf_state_scrub_pl, PR_NOWAIT); + d->scrub = pool_get(&pf_state_scrub_pl, PR_NOWAIT | PR_ZERO); if (d->scrub == NULL) return (ENOMEM); - bzero(d->scrub, sizeof(*d->scrub)); } return (0); } +void +pfsync_state_export(struct pfsync_state *sp, struct pf_state *st) +{ + bzero(sp, sizeof(struct pfsync_state)); + + /* copy from state key */ + sp->key[PF_SK_WIRE].addr[0] = st->key[PF_SK_WIRE]->addr[0]; + sp->key[PF_SK_WIRE].addr[1] = st->key[PF_SK_WIRE]->addr[1]; + sp->key[PF_SK_WIRE].port[0] = st->key[PF_SK_WIRE]->port[0]; + sp->key[PF_SK_WIRE].port[1] = st->key[PF_SK_WIRE]->port[1]; + sp->key[PF_SK_STACK].addr[0] = st->key[PF_SK_STACK]->addr[0]; + sp->key[PF_SK_STACK].addr[1] = st->key[PF_SK_STACK]->addr[1]; + sp->key[PF_SK_STACK].port[0] = st->key[PF_SK_STACK]->port[0]; + sp->key[PF_SK_STACK].port[1] = st->key[PF_SK_STACK]->port[1]; + sp->proto = st->key[PF_SK_WIRE]->proto; + sp->af = st->key[PF_SK_WIRE]->af; + + /* copy from state */ + strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); + bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); + sp->creation = htonl(time_second - st->creation); + sp->expire = pf_state_expires(st); + if (sp->expire <= time_second) + sp->expire = htonl(0); + else + sp->expire = htonl(sp->expire - time_second); + + sp->direction = st->direction; + sp->log = st->log; + sp->timeout = st->timeout; + sp->state_flags = st->state_flags; + if (st->src_node) + sp->sync_flags |= PFSYNC_FLAG_SRCNODE; + if (st->nat_src_node) + sp->sync_flags |= PFSYNC_FLAG_NATSRCNODE; + + bcopy(&st->id, &sp->id, sizeof(sp->id)); + sp->creatorid = st->creatorid; + pf_state_peer_hton(&st->src, &sp->src); + pf_state_peer_hton(&st->dst, &sp->dst); + + if (st->rule.ptr == NULL) + sp->rule = htonl(-1); + else + sp->rule = htonl(st->rule.ptr->nr); + if (st->anchor.ptr == NULL) + sp->anchor = htonl(-1); + else + sp->anchor = htonl(st->anchor.ptr->nr); + if (st->nat_rule.ptr == NULL) + sp->nat_rule = htonl(-1); + else + sp->nat_rule = htonl(st->nat_rule.ptr->nr); + + pf_state_counter_hton(st->packets[0], sp->packets[0]); + pf_state_counter_hton(st->packets[1], sp->packets[1]); + pf_state_counter_hton(st->bytes[0], sp->bytes[0]); + pf_state_counter_hton(st->bytes[1], sp->bytes[1]); + +} + int -pfsync_insert_net_state(struct pfsync_state *sp, u_int8_t chksum_flag) +pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) { struct pf_state *st = NULL; - struct pf_state_key *sk = NULL; + struct pf_state_key *skw = NULL, *sks = NULL; struct pf_rule *r = NULL; struct pfi_kif *kif; + int pool_flags; + int error; if (sp->creatorid == 0 && pf_status.debug >= PF_DEBUG_MISC) { - printf("pfsync_insert_net_state: invalid creator id:" + printf("pfsync_state_import: invalid creator id:" " %08x\n", ntohl(sp->creatorid)); return (EINVAL); } - kif = pfi_kif_get(sp->ifname); - if (kif == NULL) { + if ((kif = pfi_kif_get(sp->ifname)) == NULL) { if (pf_status.debug >= PF_DEBUG_MISC) - printf("pfsync_insert_net_state: " + printf("pfsync_state_import: " "unknown interface: %s\n", sp->ifname); - /* skip this state */ - return (0); + if (flags & PFSYNC_SI_IOCTL) + return (EINVAL); + return (0); /* skip this state */ } /* - * If the ruleset checksums match, it's safe to associate the state - * with the rule of that number. + * If the ruleset checksums match or the state is coming from the ioctl, + * it's safe to associate the state with the rule of that number. */ - if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && chksum_flag && - ntohl(sp->rule) < + if (sp->rule != htonl(-1) && sp->anchor == htonl(-1) && + (flags & (PFSYNC_SI_IOCTL | PFSYNC_SI_CKSUM)) && ntohl(sp->rule) < pf_main_ruleset.rules[PF_RULESET_FILTER].active.rcount) r = pf_main_ruleset.rules[ PF_RULESET_FILTER].active.ptr_array[ntohl(sp->rule)]; else r = &pf_default_rule; - if (!r->max_states || r->states < r->max_states) - st = pool_get(&pf_state_pl, PR_NOWAIT); - if (st == NULL) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - return (ENOMEM); - } - bzero(st, sizeof(*st)); + if ((r->max_states && r->states_cur >= r->max_states)) + goto cleanup; - if ((sk = pf_alloc_state_key(st)) == NULL) { - pool_put(&pf_state_pl, st); - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - return (ENOMEM); - } + if (flags & PFSYNC_SI_IOCTL) + pool_flags = PR_WAITOK | PR_LIMITFAIL | PR_ZERO; + else + pool_flags = PR_LIMITFAIL | PR_ZERO; - /* allocate memory for scrub info */ - if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || - pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); - if (st->src.scrub) - pool_put(&pf_state_scrub_pl, st->src.scrub); - pool_put(&pf_state_pl, st); - pool_put(&pf_state_key_pl, sk); - return (ENOMEM); - } + if ((st = pool_get(&pf_state_pl, pool_flags)) == NULL) + goto cleanup; - st->rule.ptr = r; - /* XXX get pointers to nat_rule and anchor */ + if ((skw = pf_alloc_state_key(pool_flags)) == NULL) + goto cleanup; - /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ - r->states++; + if (PF_ANEQ(&sp->key[PF_SK_WIRE].addr[0], + &sp->key[PF_SK_STACK].addr[0], sp->af) || + PF_ANEQ(&sp->key[PF_SK_WIRE].addr[1], + &sp->key[PF_SK_STACK].addr[1], sp->af) || + sp->key[PF_SK_WIRE].port[0] != sp->key[PF_SK_STACK].port[0] || + sp->key[PF_SK_WIRE].port[1] != sp->key[PF_SK_STACK].port[1]) { + if ((sks = pf_alloc_state_key(pool_flags)) == NULL) + goto cleanup; + } else + sks = skw; - /* fill in the rest of the state entry */ - pf_state_host_ntoh(&sp->lan, &sk->lan); - pf_state_host_ntoh(&sp->gwy, &sk->gwy); - pf_state_host_ntoh(&sp->ext, &sk->ext); + /* allocate memory for scrub info */ + if (pfsync_alloc_scrub_memory(&sp->src, &st->src) || + pfsync_alloc_scrub_memory(&sp->dst, &st->dst)) + goto cleanup; - pf_state_peer_ntoh(&sp->src, &st->src); - pf_state_peer_ntoh(&sp->dst, &st->dst); + /* copy to state key(s) */ + skw->addr[0] = sp->key[PF_SK_WIRE].addr[0]; + skw->addr[1] = sp->key[PF_SK_WIRE].addr[1]; + skw->port[0] = sp->key[PF_SK_WIRE].port[0]; + skw->port[1] = sp->key[PF_SK_WIRE].port[1]; + skw->proto = sp->proto; + skw->af = sp->af; + if (sks != skw) { + sks->addr[0] = sp->key[PF_SK_STACK].addr[0]; + sks->addr[1] = sp->key[PF_SK_STACK].addr[1]; + sks->port[0] = sp->key[PF_SK_STACK].port[0]; + sks->port[1] = sp->key[PF_SK_STACK].port[1]; + sks->proto = sp->proto; + sks->af = sp->af; + } + /* copy to state */ bcopy(&sp->rt_addr, &st->rt_addr, sizeof(st->rt_addr)); st->creation = time_second - ntohl(sp->creation); - st->expire = ntohl(sp->expire) + time_second; + st->expire = time_second; + if (sp->expire) { + /* XXX No adaptive scaling. */ + st->expire -= r->timeout[sp->timeout] - ntohl(sp->expire); + } - sk->af = sp->af; - sk->proto = sp->proto; - sk->direction = sp->direction; + st->expire = ntohl(sp->expire) + time_second; + st->direction = sp->direction; st->log = sp->log; st->timeout = sp->timeout; - st->allow_opts = sp->allow_opts; + st->state_flags = sp->state_flags; + if (!(flags & PFSYNC_SI_IOCTL)) + st->sync_flags = PFSTATE_FROMSYNC; bcopy(sp->id, &st->id, sizeof(st->id)); st->creatorid = sp->creatorid; - st->sync_flags = PFSTATE_FROMSYNC; + pf_state_peer_ntoh(&sp->src, &st->src); + pf_state_peer_ntoh(&sp->dst, &st->dst); - if (pf_insert_state(kif, st)) { - pfi_kif_unref(kif, PFI_KIF_REF_NONE); + st->rule.ptr = r; + st->nat_rule.ptr = NULL; + st->anchor.ptr = NULL; + st->rt_kif = NULL; + + st->pfsync_time = 0; + + + /* XXX when we have nat_rule/anchors, use STATE_INC_COUNTERS */ + r->states_cur++; + r->states_tot++; + + if ((error = pf_state_insert(kif, skw, sks, st)) != 0) { /* XXX when we have nat_rule/anchors, use STATE_DEC_COUNTERS */ - r->states--; + r->states_cur--; + goto cleanup_state; + } + + return (0); + + cleanup: + error = ENOMEM; + if (skw == sks) + sks = NULL; + if (skw != NULL) + pool_put(&pf_state_key_pl, skw); + if (sks != NULL) + pool_put(&pf_state_key_pl, sks); + + cleanup_state: /* pf_state_insert frees the state keys */ + if (st) { if (st->dst.scrub) pool_put(&pf_state_scrub_pl, st->dst.scrub); if (st->src.scrub) pool_put(&pf_state_scrub_pl, st->src.scrub); pool_put(&pf_state_pl, st); - return (EINVAL); } - - return (0); + return (error); } void @@ -345,6 +445,7 @@ pfsync_input(struct mbuf *m, ...) struct pfsync_softc *sc = pfsyncif; struct pf_state *st; struct pf_state_key *sk; + struct pf_state_item *si; struct pf_state_cmp id_key; struct pfsync_state *sp; struct pfsync_state_upd *up; @@ -358,7 +459,7 @@ pfsync_input(struct mbuf *m, ...) struct in_addr src; struct mbuf *mp; int iplen, action, error, i, s, count, offp, sfail, stale = 0; - u_int8_t chksum_flag = 0; + u_int8_t flags = 0; pfsyncstats.pfsyncs_ipackets++; @@ -413,7 +514,7 @@ pfsync_input(struct mbuf *m, ...) src = ip->ip_src; if (!bcmp(&ph->pf_chksum, &pf_status.pf_chksum, PF_MD5_DIGEST_LENGTH)) - chksum_flag++; + flags |= PFSYNC_SI_CKSUM; switch (action) { case PFSYNC_ACT_CLR: { @@ -444,15 +545,16 @@ pfsync_input(struct mbuf *m, ...) splx(s); return; } - for (sk = RB_MIN(pf_state_tree_lan_ext, - &pf_statetbl_lan_ext); sk; sk = nextsk) { - nextsk = RB_NEXT(pf_state_tree_lan_ext, - &pf_statetbl_lan_ext, sk); - TAILQ_FOREACH(st, &sk->states, next) { - if (st->creatorid == creatorid) { - st->sync_flags |= + /* XXX correct? */ + for (sk = RB_MIN(pf_state_tree, + &pf_statetbl); sk; sk = nextsk) { + nextsk = RB_NEXT(pf_state_tree, + &pf_statetbl, sk); + TAILQ_FOREACH(si, &sk->states, entry) { + if (si->s->creatorid == creatorid) { + si->s->sync_flags |= PFSTATE_FROMSYNC; - pf_unlink_state(st); + pf_unlink_state(si->s); } } } @@ -484,8 +586,7 @@ pfsync_input(struct mbuf *m, ...) continue; } - if ((error = pfsync_insert_net_state(sp, - chksum_flag))) { + if ((error = pfsync_state_import(sp, flags))) { if (error == ENOMEM) { splx(s); goto done; @@ -524,11 +625,11 @@ pfsync_input(struct mbuf *m, ...) st = pf_find_state_byid(&id_key); if (st == NULL) { /* insert the update */ - if (pfsync_insert_net_state(sp, chksum_flag)) + if (pfsync_state_import(sp, flags)) pfsyncstats.pfsyncs_badstate++; continue; } - sk = st->state_key; + sk = st->key[PF_SK_WIRE]; /* XXX right one? */ sfail = 0; if (sk->proto == IPPROTO_TCP) { /* @@ -589,7 +690,7 @@ pfsync_input(struct mbuf *m, ...) } continue; } - pfsync_alloc_scrub_memory(&sp->dst, &st->dst); + pfsync_alloc_scrub_memory(&sp->dst, &st->dst); pf_state_peer_ntoh(&sp->src, &st->src); pf_state_peer_ntoh(&sp->dst, &st->dst); st->expire = ntohl(sp->expire) + time_second; @@ -665,7 +766,7 @@ pfsync_input(struct mbuf *m, ...) pfsyncstats.pfsyncs_badstate++; continue; } - sk = st->state_key; + sk = st->key[PF_SK_WIRE]; /* XXX right one? */ sfail = 0; if (sk->proto == IPPROTO_TCP) { /* @@ -716,7 +817,7 @@ pfsync_input(struct mbuf *m, ...) PFSYNC_FLAG_STALE); continue; } - pfsync_alloc_scrub_memory(&up->dst, &st->dst); + pfsync_alloc_scrub_memory(&up->dst, &st->dst); pf_state_peer_ntoh(&up->src, &st->src); pf_state_peer_ntoh(&up->dst, &st->dst); st->expire = ntohl(up->expire) + time_second; @@ -1117,9 +1218,6 @@ pfsync_pack_state(u_int8_t action, struc struct pfsync_state *sp = NULL; struct pfsync_state_upd *up = NULL; struct pfsync_state_del *dp = NULL; - struct pf_state_key *sk = st->state_key; - struct pf_rule *r; - u_long secs; int s, ret = 0; u_int8_t i = 255, newaction = 0; @@ -1186,8 +1284,6 @@ pfsync_pack_state(u_int8_t action, struc } } - secs = time_second; - st->pfsync_time = time_uptime; if (sp == NULL) { @@ -1199,47 +1295,19 @@ pfsync_pack_state(u_int8_t action, struc h->count++; bzero(sp, sizeof(*sp)); - bcopy(&st->id, sp->id, sizeof(sp->id)); - sp->creatorid = st->creatorid; - - strlcpy(sp->ifname, st->kif->pfik_name, sizeof(sp->ifname)); - pf_state_host_hton(&sk->lan, &sp->lan); - pf_state_host_hton(&sk->gwy, &sp->gwy); - pf_state_host_hton(&sk->ext, &sp->ext); - - bcopy(&st->rt_addr, &sp->rt_addr, sizeof(sp->rt_addr)); - - sp->creation = htonl(secs - st->creation); - pf_state_counter_hton(st->packets[0], sp->packets[0]); - pf_state_counter_hton(st->packets[1], sp->packets[1]); - pf_state_counter_hton(st->bytes[0], sp->bytes[0]); - pf_state_counter_hton(st->bytes[1], sp->bytes[1]); - if ((r = st->rule.ptr) == NULL) - sp->rule = htonl(-1); - else - sp->rule = htonl(r->nr); - if ((r = st->anchor.ptr) == NULL) - sp->anchor = htonl(-1); - else - sp->anchor = htonl(r->nr); - sp->af = sk->af; - sp->proto = sk->proto; - sp->direction = sk->direction; - sp->log = st->log; - sp->allow_opts = st->allow_opts; - sp->timeout = st->timeout; + pfsync_state_export(sp, st); if (flags & PFSYNC_FLAG_STALE) sp->sync_flags |= PFSTATE_STALE; - } - - pf_state_peer_hton(&st->src, &sp->src); - pf_state_peer_hton(&st->dst, &sp->dst); + } else { + pf_state_peer_hton(&st->src, &sp->src); + pf_state_peer_hton(&st->dst, &sp->dst); - if (st->expire <= secs) - sp->expire = htonl(0); - else - sp->expire = htonl(st->expire - secs); + if (st->expire <= time_second) + sp->expire = htonl(0); + else + sp->expire = htonl(st->expire - time_second); + } /* do we need to build "compressed" actions for network transfer? */ if (sc->sc_sync_ifp && flags & PFSYNC_FLAG_COMPRESS) { @@ -1715,7 +1783,7 @@ pfsync_update_tdb(struct tdb *tdb, int o for (i = 0; !pt && i < h->count; i++) { if (tdb->tdb_spi == u->spi && tdb->tdb_sproto == u->sproto && - !bcmp(&tdb->tdb_dst, &u->dst, + !bcmp(&tdb->tdb_dst, &u->dst, SA_LEN(&u->dst.sa))) { pt = u; pt->updates++; Modified: vendor-sys/pf/dist/net/if_pfsync.h ============================================================================== --- vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/if_pfsync.h Wed Dec 10 21:24:31 2008 (r185888) @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.h,v 1.32 2007/12/14 18:33:37 deraadt Exp $ */ +/* $OpenBSD: if_pfsync.h,v 1.35 2008/06/29 08:42:15 mcbride Exp $ */ /* * Copyright (c) 2001 Michael Shalayeff @@ -146,7 +146,7 @@ extern struct pfsync_softc *pfsyncif; struct pfsync_header { u_int8_t version; -#define PFSYNC_VERSION 3 +#define PFSYNC_VERSION 4 u_int8_t af; u_int8_t action; #define PFSYNC_ACT_CLR 0 /* clear all states */ @@ -205,72 +205,22 @@ struct pfsyncreq { int pfsyncr_authlevel; }; - -/* for copies to/from network */ -#define pf_state_peer_hton(s,d) do { \ - (d)->seqlo = htonl((s)->seqlo); \ - (d)->seqhi = htonl((s)->seqhi); \ - (d)->seqdiff = htonl((s)->seqdiff); \ - (d)->max_win = htons((s)->max_win); \ - (d)->mss = htons((s)->mss); \ - (d)->state = (s)->state; \ - (d)->wscale = (s)->wscale; \ - if ((s)->scrub) { \ - (d)->scrub.pfss_flags = \ - htons((s)->scrub->pfss_flags & PFSS_TIMESTAMP); \ - (d)->scrub.pfss_ttl = (s)->scrub->pfss_ttl; \ - (d)->scrub.pfss_ts_mod = htonl((s)->scrub->pfss_ts_mod);\ - (d)->scrub.scrub_flag = PFSYNC_SCRUB_FLAG_VALID; \ - } \ -} while (0) - -#define pf_state_peer_ntoh(s,d) do { \ - (d)->seqlo = ntohl((s)->seqlo); \ - (d)->seqhi = ntohl((s)->seqhi); \ - (d)->seqdiff = ntohl((s)->seqdiff); \ - (d)->max_win = ntohs((s)->max_win); \ - (d)->mss = ntohs((s)->mss); \ - (d)->state = (s)->state; \ - (d)->wscale = (s)->wscale; \ - if ((s)->scrub.scrub_flag == PFSYNC_SCRUB_FLAG_VALID && \ - (d)->scrub != NULL) { \ - (d)->scrub->pfss_flags = \ - ntohs((s)->scrub.pfss_flags) & PFSS_TIMESTAMP; \ - (d)->scrub->pfss_ttl = (s)->scrub.pfss_ttl; \ - (d)->scrub->pfss_ts_mod = ntohl((s)->scrub.pfss_ts_mod);\ - } \ -} while (0) - -#define pf_state_host_hton(s,d) do { \ - bcopy(&(s)->addr, &(d)->addr, sizeof((d)->addr)); \ - (d)->port = (s)->port; \ -} while (0) - -#define pf_state_host_ntoh(s,d) do { \ - bcopy(&(s)->addr, &(d)->addr, sizeof((d)->addr)); \ - (d)->port = (s)->port; \ -} while (0) - -#define pf_state_counter_hton(s,d) do { \ - d[0] = htonl((s>>32)&0xffffffff); \ - d[1] = htonl(s&0xffffffff); \ -} while (0) - -#define pf_state_counter_ntoh(s,d) do { \ - d = ntohl(s[0]); \ - d = d<<32; \ - d += ntohl(s[1]); \ -} while (0) - #ifdef _KERNEL -void pfsync_input(struct mbuf *, ...); -int pfsync_clear_states(u_int32_t, char *); -int pfsync_pack_state(u_int8_t, struct pf_state *, int); -int pfsync_sysctl(int *, u_int, void *, size_t *, void *, size_t); +void pfsync_input(struct mbuf *, ...); +int pfsync_clear_states(u_int32_t, char *); +int pfsync_pack_state(u_int8_t, struct pf_state *, int); +int pfsync_sysctl(int *, u_int, void *, size_t *, + void *, size_t); +void pfsync_state_export(struct pfsync_state *, + struct pf_state *); + +#define PFSYNC_SI_IOCTL 0x01 +#define PFSYNC_SI_CKSUM 0x02 +int pfsync_state_import(struct pfsync_state *, u_int8_t); #define pfsync_insert_state(st) do { \ if ((st->rule.ptr->rule_flag & PFRULE_NOSYNC) || \ - (st->state_key->proto == IPPROTO_PFSYNC)) \ + (st->key[PF_SK_WIRE]->proto == IPPROTO_PFSYNC)) \ st->sync_flags |= PFSTATE_NOSYNC; \ else if (!st->sync_flags) \ pfsync_pack_state(PFSYNC_ACT_INS, (st), \ Modified: vendor-sys/pf/dist/net/pf.c ============================================================================== --- vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:23:23 2008 (r185887) +++ vendor-sys/pf/dist/net/pf.c Wed Dec 10 21:24:31 2008 (r185888) @@ -1,8 +1,8 @@ -/* $OpenBSD: pf.c,v 1.567 2008/02/20 23:40:13 henning Exp $ */ +/* $OpenBSD: pf.c,v 1.614 2008/08/02 12:34:37 henning Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier - * Copyright (c) 2002,2003 Henning Brauer + * Copyright (c) 2002 - 2008 Henning Brauer * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -98,8 +98,7 @@ */ /* state tables */ -struct pf_state_tree_lan_ext pf_statetbl_lan_ext; -struct pf_state_tree_ext_gwy pf_statetbl_ext_gwy; +struct pf_state_tree pf_statetbl; struct pf_altqqueue pf_altqs[2]; struct pf_palist pf_pabuf; @@ -125,7 +124,7 @@ struct pf_anchor_stackframe { } pf_anchor_stack[64]; struct pool pf_src_tree_pl, pf_rule_pl, pf_pooladdr_pl; -struct pool pf_state_pl, pf_state_key_pl; +struct pool pf_state_pl, pf_state_key_pl, pf_state_item_pl; struct pool pf_altq_pl; void pf_print_host(struct pf_addr *, u_int16_t, u_int8_t); @@ -161,21 +160,41 @@ struct pf_rule *pf_match_translation(st u_int16_t, int); struct pf_rule *pf_get_translation(struct pf_pdesc *, struct mbuf *, int, int, struct pfi_kif *, struct pf_src_node **, - struct pf_addr *, u_int16_t, - struct pf_addr *, u_int16_t, - struct pf_addr *, u_int16_t *); -void pf_attach_state(struct pf_state_key *, - struct pf_state *, int); -void pf_detach_state(struct pf_state *, int); + struct pf_state_key **, struct pf_state_key **, + struct pf_state_key **, struct pf_state_key **, + struct pf_addr *, struct pf_addr *, + u_int16_t, u_int16_t); +void pf_detach_state(struct pf_state *); +int pf_state_key_setup(struct pf_pdesc *, struct pf_rule *, + struct pf_state_key **, struct pf_state_key **, + struct pf_state_key **, struct pf_state_key **, + struct pf_addr *, struct pf_addr *, + u_int16_t, u_int16_t); +void pf_state_key_detach(struct pf_state *, int); u_int32_t pf_tcp_iss(struct pf_pdesc *); int pf_test_rule(struct pf_rule **, struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **, struct ifqueue *); +static __inline int pf_create_state(struct pf_rule *, struct pf_rule *, + struct pf_rule *, struct pf_pdesc *, + struct pf_src_node *, struct pf_state_key *, + struct pf_state_key *, struct pf_state_key *, + struct pf_state_key *, struct mbuf *, int, + u_int16_t, u_int16_t, int *, struct pfi_kif *, + struct pf_state **, int, u_int16_t, u_int16_t, + int); int pf_test_fragment(struct pf_rule **, int, struct pfi_kif *, struct mbuf *, void *, struct pf_pdesc *, struct pf_rule **, struct pf_ruleset **); +int pf_tcp_track_full(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pfi_kif *, struct mbuf *, int, + struct pf_pdesc *, u_short *, int *); +int pf_tcp_track_sloppy(struct pf_state_peer *, + struct pf_state_peer *, struct pf_state **, + struct pf_pdesc *, u_short *); int pf_test_state_tcp(struct pf_state **, int, struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); @@ -186,10 +205,9 @@ int pf_test_state_icmp(struct pf_stat struct pfi_kif *, struct mbuf *, int, void *, struct pf_pdesc *, u_short *); int pf_test_state_other(struct pf_state **, int, - struct pfi_kif *, struct pf_pdesc *); -int pf_match_tag(struct mbuf *, struct pf_rule *, int *); + struct pfi_kif *, struct mbuf *, struct pf_pdesc *); void pf_step_into_anchor(int *, struct pf_ruleset **, int, - struct pf_rule **, struct pf_rule **, int *); + struct pf_rule **, struct pf_rule **, int *); int pf_step_out_of_anchor(int *, struct pf_ruleset **, int, struct pf_rule **, struct pf_rule **, int *); @@ -219,13 +237,14 @@ void pf_set_rt_ifp(struct pf_state *, struct pf_addr *); int pf_check_proto_cksum(struct mbuf *, int, int, u_int8_t, sa_family_t); +struct pf_divert *pf_get_divert(struct mbuf *); +void pf_print_state_parts(struct pf_state *, + struct pf_state_key *, struct pf_state_key *); int pf_addr_wrap_neq(struct pf_addr_wrap *, struct pf_addr_wrap *); struct pf_state *pf_find_state(struct pfi_kif *, - struct pf_state_key_cmp *, u_int); + struct pf_state_key_cmp *, u_int, struct mbuf *); int pf_src_connlimit(struct pf_state **); -void pf_stateins_err(const char *, struct pf_state *, - struct pfi_kif *); int pf_check_congestion(struct ifqueue *); extern struct pool pfr_ktable_pl; @@ -239,54 +258,49 @@ struct pf_pool_limit pf_pool_limits[PF_L { &pfr_kentry_pl, PFR_KENTRY_HIWAT } }; -#define STATE_LOOKUP() \ +#define STATE_LOOKUP(i, k, d, s, m) \ do { \ - *state = pf_find_state(kif, &key, direction); \ - if (*state == NULL || (*state)->timeout == PFTM_PURGE) \ + s = pf_find_state(i, k, d, m); \ + if (s == NULL || (s)->timeout == PFTM_PURGE) \ return (PF_DROP); \ - if (direction == PF_OUT && \ - (((*state)->rule.ptr->rt == PF_ROUTETO && \ - (*state)->rule.ptr->direction == PF_OUT) || \ - ((*state)->rule.ptr->rt == PF_REPLYTO && \ - (*state)->rule.ptr->direction == PF_IN)) && \ - (*state)->rt_kif != NULL && \ - (*state)->rt_kif != kif) \ + if (d == PF_OUT && \ + (((s)->rule.ptr->rt == PF_ROUTETO && \ + (s)->rule.ptr->direction == PF_OUT) || \ + ((s)->rule.ptr->rt == PF_REPLYTO && \ + (s)->rule.ptr->direction == PF_IN)) && \ + (s)->rt_kif != NULL && \ + (s)->rt_kif != i) \ return (PF_PASS); \ } while (0) -#define STATE_TRANSLATE(sk) \ - (sk)->lan.addr.addr32[0] != (sk)->gwy.addr.addr32[0] || \ - ((sk)->af == AF_INET6 && \ - ((sk)->lan.addr.addr32[1] != (sk)->gwy.addr.addr32[1] || \ - (sk)->lan.addr.addr32[2] != (sk)->gwy.addr.addr32[2] || \ - (sk)->lan.addr.addr32[3] != (sk)->gwy.addr.addr32[3])) || \ - (sk)->lan.port != (sk)->gwy.port - #define BOUND_IFACE(r, k) \ ((r)->rule_flag & PFRULE_IFBOUND) ? (k) : pfi_all #define STATE_INC_COUNTERS(s) \ do { \ - s->rule.ptr->states++; \ - if (s->anchor.ptr != NULL) \ - s->anchor.ptr->states++; \ - if (s->nat_rule.ptr != NULL) \ - s->nat_rule.ptr->states++; \ + s->rule.ptr->states_cur++; \ + s->rule.ptr->states_tot++; \ + if (s->anchor.ptr != NULL) { \ + s->anchor.ptr->states_cur++; \ + s->anchor.ptr->states_tot++; \ + } \ + if (s->nat_rule.ptr != NULL) { \ + s->nat_rule.ptr->states_cur++; \ + s->nat_rule.ptr->states_tot++; \ + } \ } while (0) #define STATE_DEC_COUNTERS(s) \ do { \ if (s->nat_rule.ptr != NULL) \ - s->nat_rule.ptr->states--; \ + s->nat_rule.ptr->states_cur--; \ if (s->anchor.ptr != NULL) \ - s->anchor.ptr->states--; \ - s->rule.ptr->states--; \ + s->anchor.ptr->states_cur--; \ + s->rule.ptr->states_cur--; \ } while (0) static __inline int pf_src_compare(struct pf_src_node *, struct pf_src_node *); -static __inline int pf_state_compare_lan_ext(struct pf_state_key *, - struct pf_state_key *); -static __inline int pf_state_compare_ext_gwy(struct pf_state_key *, +static __inline int pf_state_compare_key(struct pf_state_key *, struct pf_state_key *); static __inline int pf_state_compare_id(struct pf_state *, struct pf_state *); @@ -297,16 +311,10 @@ struct pf_state_tree_id tree_id; struct pf_state_queue state_list; RB_GENERATE(pf_src_tree, pf_src_node, entry, pf_src_compare); -RB_GENERATE(pf_state_tree_lan_ext, pf_state_key, - entry_lan_ext, pf_state_compare_lan_ext); -RB_GENERATE(pf_state_tree_ext_gwy, pf_state_key, - entry_ext_gwy, pf_state_compare_ext_gwy); +RB_GENERATE(pf_state_tree, pf_state_key, entry, pf_state_compare_key); RB_GENERATE(pf_state_tree_id, pf_state, entry_id, pf_state_compare_id); -#define PF_DT_SKIP_LANEXT 0x01 -#define PF_DT_SKIP_EXTGWY 0x02 - static __inline int pf_src_compare(struct pf_src_node *a, struct pf_src_node *b) { @@ -351,157 +359,6 @@ pf_src_compare(struct pf_src_node *a, st return (0); } -static __inline int -pf_state_compare_lan_ext(struct pf_state_key *a, struct pf_state_key *b) -{ - int diff; - - if ((diff = a->proto - b->proto) != 0) - return (diff); - if ((diff = a->af - b->af) != 0) - return (diff); - switch (a->af) { -#ifdef INET - case AF_INET: - if (a->lan.addr.addr32[0] > b->lan.addr.addr32[0]) - return (1); - if (a->lan.addr.addr32[0] < b->lan.addr.addr32[0]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - if (a->lan.addr.addr32[3] > b->lan.addr.addr32[3]) - return (1); - if (a->lan.addr.addr32[3] < b->lan.addr.addr32[3]) - return (-1); - if (a->ext.addr.addr32[3] > b->ext.addr.addr32[3]) - return (1); - if (a->ext.addr.addr32[3] < b->ext.addr.addr32[3]) - return (-1); - if (a->lan.addr.addr32[2] > b->lan.addr.addr32[2]) - return (1); - if (a->lan.addr.addr32[2] < b->lan.addr.addr32[2]) - return (-1); - if (a->ext.addr.addr32[2] > b->ext.addr.addr32[2]) - return (1); - if (a->ext.addr.addr32[2] < b->ext.addr.addr32[2]) - return (-1); - if (a->lan.addr.addr32[1] > b->lan.addr.addr32[1]) - return (1); - if (a->lan.addr.addr32[1] < b->lan.addr.addr32[1]) - return (-1); - if (a->ext.addr.addr32[1] > b->ext.addr.addr32[1]) - return (1); - if (a->ext.addr.addr32[1] < b->ext.addr.addr32[1]) - return (-1); - if (a->lan.addr.addr32[0] > b->lan.addr.addr32[0]) - return (1); - if (a->lan.addr.addr32[0] < b->lan.addr.addr32[0]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - break; -#endif /* INET6 */ - } - - if ((diff = a->lan.port - b->lan.port) != 0) - return (diff); - if ((diff = a->ext.port - b->ext.port) != 0) - return (diff); - - return (0); -} - -static __inline int -pf_state_compare_ext_gwy(struct pf_state_key *a, struct pf_state_key *b) -{ - int diff; - - if ((diff = a->proto - b->proto) != 0) - return (diff); - if ((diff = a->af - b->af) != 0) - return (diff); - switch (a->af) { -#ifdef INET - case AF_INET: - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - if (a->gwy.addr.addr32[0] > b->gwy.addr.addr32[0]) - return (1); - if (a->gwy.addr.addr32[0] < b->gwy.addr.addr32[0]) - return (-1); - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - if (a->ext.addr.addr32[3] > b->ext.addr.addr32[3]) - return (1); - if (a->ext.addr.addr32[3] < b->ext.addr.addr32[3]) - return (-1); - if (a->gwy.addr.addr32[3] > b->gwy.addr.addr32[3]) - return (1); - if (a->gwy.addr.addr32[3] < b->gwy.addr.addr32[3]) - return (-1); - if (a->ext.addr.addr32[2] > b->ext.addr.addr32[2]) - return (1); - if (a->ext.addr.addr32[2] < b->ext.addr.addr32[2]) - return (-1); - if (a->gwy.addr.addr32[2] > b->gwy.addr.addr32[2]) - return (1); - if (a->gwy.addr.addr32[2] < b->gwy.addr.addr32[2]) - return (-1); - if (a->ext.addr.addr32[1] > b->ext.addr.addr32[1]) - return (1); - if (a->ext.addr.addr32[1] < b->ext.addr.addr32[1]) - return (-1); - if (a->gwy.addr.addr32[1] > b->gwy.addr.addr32[1]) - return (1); - if (a->gwy.addr.addr32[1] < b->gwy.addr.addr32[1]) - return (-1); - if (a->ext.addr.addr32[0] > b->ext.addr.addr32[0]) - return (1); - if (a->ext.addr.addr32[0] < b->ext.addr.addr32[0]) - return (-1); - if (a->gwy.addr.addr32[0] > b->gwy.addr.addr32[0]) - return (1); - if (a->gwy.addr.addr32[0] < b->gwy.addr.addr32[0]) - return (-1); - break; -#endif /* INET6 */ - } - - if ((diff = a->ext.port - b->ext.port) != 0) - return (diff); - if ((diff = a->gwy.port - b->gwy.port) != 0) - return (diff); - - return (0); -} - -static __inline int -pf_state_compare_id(struct pf_state *a, struct pf_state *b) -{ - if (a->id > b->id) - return (1); - if (a->id < b->id) - return (-1); - if (a->creatorid > b->creatorid) - return (1); - if (a->creatorid < b->creatorid) - return (-1); - - return (0); -} - #ifdef INET6 void pf_addrcpy(struct pf_addr *dst, struct pf_addr *src, sa_family_t af) @@ -522,77 +379,6 @@ pf_addrcpy(struct pf_addr *dst, struct p } #endif /* INET6 */ -struct pf_state * -pf_find_state_byid(struct pf_state_cmp *key) -{ - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - return (RB_FIND(pf_state_tree_id, &tree_id, (struct pf_state *)key)); -} - -struct pf_state * -pf_find_state(struct pfi_kif *kif, struct pf_state_key_cmp *key, u_int dir) -{ - struct pf_state_key *sk; - struct pf_state *s; - - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - switch (dir) { - case PF_OUT: - sk = RB_FIND(pf_state_tree_lan_ext, &pf_statetbl_lan_ext, - (struct pf_state_key *)key); - break; - case PF_IN: - sk = RB_FIND(pf_state_tree_ext_gwy, &pf_statetbl_ext_gwy, - (struct pf_state_key *)key); - break; - default: - panic("pf_find_state"); - } - - /* list is sorted, if-bound states before floating ones */ - if (sk != NULL) - TAILQ_FOREACH(s, &sk->states, next) - if (s->kif == pfi_all || s->kif == kif) - return (s); - - return (NULL); -} - -struct pf_state * -pf_find_state_all(struct pf_state_key_cmp *key, u_int dir, int *more) -{ - struct pf_state_key *sk; - struct pf_state *s, *ret = NULL; - - pf_status.fcounters[FCNT_STATE_SEARCH]++; - - switch (dir) { - case PF_OUT: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:24:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E23511065688; Wed, 10 Dec 2008 21:24:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B611B8FC14; Wed, 10 Dec 2008 21:24:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALOweX043497; Wed, 10 Dec 2008 21:24:58 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALOwOB043496; Wed, 10 Dec 2008 21:24:58 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102124.mBALOwOB043496@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185889 - vendor-sys/pf/4.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:24:59 -0000 Author: mlaier Date: Wed Dec 10 21:24:58 2008 New Revision: 185889 URL: http://svn.freebsd.org/changeset/base/185889 Log: Tag for pf 4.4 Added: vendor-sys/pf/4.4/ - copied from r185888, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:24:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 146971065691; Wed, 10 Dec 2008 21:24:59 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCBE08FC19; Wed, 10 Dec 2008 21:24:58 +0000 (UTC) (envelope-from mlaier@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALOwaq043502; Wed, 10 Dec 2008 21:24:58 GMT (envelope-from mlaier@svn.freebsd.org) Received: (from mlaier@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALOwW3043501; Wed, 10 Dec 2008 21:24:58 GMT (envelope-from mlaier@svn.freebsd.org) Message-Id: <200812102124.mBALOwW3043501@svn.freebsd.org> From: Max Laier Date: Wed, 10 Dec 2008 21:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185889 - vendor-sys/pf/4.4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:24:59 -0000 Author: mlaier Date: Wed Dec 10 21:24:58 2008 New Revision: 185889 URL: http://svn.freebsd.org/changeset/base/185889 Log: Tag for pf 4.4 Added: vendor-sys/pf/4.4/ - copied from r185888, vendor-sys/pf/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:31:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E444D1065670; Wed, 10 Dec 2008 21:31:13 +0000 (UTC) (envelope-from prvs=julian=223e0e01c@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id C06608FC13; Wed, 10 Dec 2008 21:31:13 +0000 (UTC) (envelope-from prvs=julian=223e0e01c@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.167]) by smtp-outbound.ironport.com with ESMTP; 10 Dec 2008 13:02:36 -0800 Message-ID: <49402E6B.3010206@elischer.org> Date: Wed, 10 Dec 2008 13:02:35 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Max Laier References: <200812102059.mBAKxQu3042532@svn.freebsd.org> In-Reply-To: <200812102059.mBAKxQu3042532@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r185880 - in vendor/pf/dist: authpf ftp-proxy man pfctl pflogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:31:14 -0000 Max Laier wrote: > Author: mlaier > Date: Wed Dec 10 20:59:26 2008 > New Revision: 185880 > URL: http://svn.freebsd.org/changeset/base/185880 > > Log: > Import OPENBSD_4_3_BASE > so, how do we go about virtualizing this? and I don't like our chances of getting virtualized macros into the openbsd sources.... From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:43:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8588D1065675 for ; Wed, 10 Dec 2008 21:43:57 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mx1.freebsd.org (Postfix) with ESMTP id 13DEC8FC19 for ; Wed, 10 Dec 2008 21:43:57 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-005-194.pools.arcor-ip.net [88.66.5.194]) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis) id 0ML25U-1LAWqZ2g8u-0004NH; Wed, 10 Dec 2008 22:43:55 +0100 Received: (qmail 40225 invoked from network); 10 Dec 2008 21:43:55 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by router.laiers.local with SMTP; 10 Dec 2008 21:43:55 -0000 From: Max Laier Organization: FreeBSD To: Julian Elischer , src-committers@freebsd.org Date: Wed, 10 Dec 2008 22:43:54 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200812102059.mBAKxQu3042532@svn.freebsd.org> <49402E6B.3010206@elischer.org> In-Reply-To: <49402E6B.3010206@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812102243.54975.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1+4xS3B3muWxZ2dR6mk4Tm1F9Ug7lFGTpW1fFM lPvnsVfsnPHNDARFiMOTbjBJCH+yJ4VgnGDgz8hp9jyjdq5tZy JuXpUv36munyzuiNw3uWQ== Cc: svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: Re: svn commit: r185880 - in vendor/pf/dist: authpf ftp-proxy man pfctl pflogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:43:57 -0000 On Wednesday 10 December 2008 22:02:35 Julian Elischer wrote: > Max Laier wrote: > > Author: mlaier > > Date: Wed Dec 10 20:59:26 2008 > > New Revision: 185880 > > URL: http://svn.freebsd.org/changeset/base/185880 > > > > Log: > > Import OPENBSD_4_3_BASE > > so, how do we go about virtualizing this? > and I don't like our chances of getting virtualized macros into the > openbsd sources.... Yeah, most likely a no-go. From what I understand, Marko has a virtualized version of what's in the tree now and I don't intend to void that work by blindly dumping the new version in head and have him deal with it. It will take some time to get the import done and I'll do it in my user dir. Once this is in somewhat usable shape I'll start looking at the V_ stuff and how to best go about merging it. FWIW, it might be easier to virtualize the new version as it greatly reduces code duplication in some relevant areas. If you are ready to commit the 2nd half of the vnet stuff in the meantime, please go ahead and do so. I'll figure out how to deal with it. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 21:48:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CC9A106568E; Wed, 10 Dec 2008 21:48:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7944E8FC22; Wed, 10 Dec 2008 21:48:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBALm5IA044022; Wed, 10 Dec 2008 21:48:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBALm5Lt044021; Wed, 10 Dec 2008 21:48:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812102148.mBALm5Lt044021@svn.freebsd.org> From: Ed Schouten Date: Wed, 10 Dec 2008 21:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185891 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 21:48:05 -0000 Author: ed Date: Wed Dec 10 21:48:05 2008 New Revision: 185891 URL: http://svn.freebsd.org/changeset/base/185891 Log: Remove added newlines from logged messages written to /dev/console. The /dev/console device node logs all strings that are written to it. When the string does not contain a trailing newline, it appends one. I can imagine this was useful a long time ago, but with our current rc-scripts, it generates a whole bunch of messages that look like: | Configuring syscons: | blanktime | . By not appending the newlines, the output of `dmesg -a' is now (almost?) exactly the same as what the user will see on the console device (syscons, uart). Modified: head/sys/kern/subr_prf.c Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Wed Dec 10 21:32:58 2008 (r185890) +++ head/sys/kern/subr_prf.c Wed Dec 10 21:48:05 2008 (r185891) @@ -257,7 +257,7 @@ log(int level, const char *fmt, ...) void log_console(struct uio *uio) { - int c, i, error, nl; + int c, i, error; char *consbuffer; int pri; @@ -268,22 +268,14 @@ log_console(struct uio *uio) uio = cloneuio(uio); consbuffer = malloc(CONSCHUNK, M_TEMP, M_WAITOK); - nl = 0; while (uio->uio_resid > 0) { c = imin(uio->uio_resid, CONSCHUNK); error = uiomove(consbuffer, c, uio); if (error != 0) break; - for (i = 0; i < c; i++) { + for (i = 0; i < c; i++) msglogchar(consbuffer[i], pri); - if (consbuffer[i] == '\n') - nl = 1; - else - nl = 0; - } } - if (!nl) - msglogchar('\n', pri); msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 22:10:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAC501065670; Wed, 10 Dec 2008 22:10:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6BB38FC1C; Wed, 10 Dec 2008 22:10:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAMAbuN044579; Wed, 10 Dec 2008 22:10:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAMAbl5044578; Wed, 10 Dec 2008 22:10:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812102210.mBAMAbl5044578@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 10 Dec 2008 22:10:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185892 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 22:10:37 -0000 Author: bz Date: Wed Dec 10 22:10:37 2008 New Revision: 185892 URL: http://svn.freebsd.org/changeset/base/185892 Log: Style changes only. Put the return type on an extra line[1] and add an empty line at the beginning as we do not have any local variables. Submitted by: rwatson [1] Reviewed by: rwatson MFC after: 4 weeks Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Wed Dec 10 21:48:05 2008 (r185891) +++ head/sys/kern/uipc_socket.c Wed Dec 10 22:10:37 2008 (r185892) @@ -238,8 +238,10 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsock /* * Initialise maxsockets. */ -static void init_maxsockets(void *ignored) +static void +init_maxsockets(void *ignored) { + TUNABLE_INT_FETCH("kern.ipc.maxsockets", &maxsockets); maxsockets = imax(maxsockets, imax(maxfiles, nmbclusters)); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 22:17:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58743106564A; Wed, 10 Dec 2008 22:17:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44B368FC29; Wed, 10 Dec 2008 22:17:10 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAMHAFZ044755; Wed, 10 Dec 2008 22:17:10 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAMHAPo044753; Wed, 10 Dec 2008 22:17:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812102217.mBAMHAPo044753@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 10 Dec 2008 22:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185893 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 22:17:10 -0000 Author: bz Date: Wed Dec 10 22:17:09 2008 New Revision: 185893 URL: http://svn.freebsd.org/changeset/base/185893 Log: Make sure nmbclusters are initialized before maxsockets by running the tunable_mbinit() SYSINIT at SI_ORDER_MIDDLE before the init_maxsockets() SYSINT at SI_ORDER_ANY. Reviewed by: rwatson, zec Sponsored by: The FreeBSD Foundation MFC after: 4 weeks Modified: head/sys/kern/kern_mbuf.c head/sys/kern/uipc_socket.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Wed Dec 10 22:10:37 2008 (r185892) +++ head/sys/kern/kern_mbuf.c Wed Dec 10 22:17:09 2008 (r185893) @@ -101,6 +101,11 @@ int nmbjumbo9; /* limits number of 9k int nmbjumbo16; /* limits number of 16k jumbo clusters */ struct mbstat mbstat; +/* + * tunable_mbinit() has to be run before init_maxsockets() thus + * the SYSINIT order below is SI_ORDER_MIDDLE while init_maxsockets() + * runs at SI_ORDER_ANY. + */ static void tunable_mbinit(void *dummy) { @@ -113,7 +118,7 @@ tunable_mbinit(void *dummy) nmbjumbo9 = nmbjumbop / 2; nmbjumbo16 = nmbjumbo9 / 2; } -SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL); +SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_MIDDLE, tunable_mbinit, NULL); /* XXX: These should be tuneables. Can't change UMA limits on the fly. */ static int Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Wed Dec 10 22:10:37 2008 (r185892) +++ head/sys/kern/uipc_socket.c Wed Dec 10 22:17:09 2008 (r185893) @@ -236,7 +236,8 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, maxsock "Maximum number of sockets avaliable"); /* - * Initialise maxsockets. + * Initialise maxsockets. This SYSINIT must be run after + * tunable_mbinit(). */ static void init_maxsockets(void *ignored) From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 22:24:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107391065673; Wed, 10 Dec 2008 22:24:46 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id BAD5C8FC21; Wed, 10 Dec 2008 22:24:45 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 4ABB541C5C9; Wed, 10 Dec 2008 23:24:44 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id gtGUB64NaP9T; Wed, 10 Dec 2008 23:24:43 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id BA84D41C5D9; Wed, 10 Dec 2008 23:24:43 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 095F54448DD; Wed, 10 Dec 2008 22:24:32 +0000 (UTC) Date: Wed, 10 Dec 2008 22:24:32 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200812102217.mBAMHAPo044753@svn.freebsd.org> Message-ID: <20081210221842.V97918@maildrop.int.zabbadoz.net> References: <200812102217.mBAMHAPo044753@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r185893 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 22:24:46 -0000 On Wed, 10 Dec 2008, Bjoern A. Zeeb wrote: > Author: bz > Date: Wed Dec 10 22:17:09 2008 > New Revision: 185893 > URL: http://svn.freebsd.org/changeset/base/185893 > > Log: > Make sure nmbclusters are initialized before maxsockets > by running the tunable_mbinit() SYSINIT at SI_ORDER_MIDDLE > before the init_maxsockets() SYSINT at SI_ORDER_ANY. > > Reviewed by: rwatson, zec > Sponsored by: The FreeBSD Foundation > MFC after: 4 weeks The problem was found by Marko Zec during the preparation of the next vimage commit patch. Booting different kernels (w/ and w/o the patch) resulted in different values for net.inet.tcp.maxtcptw and kern.ipc.maxsockets. After careful review it was clear that the intialization values for all relevant variables had not been altered. Further debugging revealed that the order the SYSINITs were run had changed. This has been around for quite a while and worked more or less out of linker luck. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 22:45:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A3D01065676; Wed, 10 Dec 2008 22:45:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 2755C8FC0C; Wed, 10 Dec 2008 22:45:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mBAMj3bn026597; Wed, 10 Dec 2008 17:45:04 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ed Schouten Date: Wed, 10 Dec 2008 17:44:00 -0500 User-Agent: KMail/1.9.7 References: <200812102148.mBALm5Lt044021@svn.freebsd.org> In-Reply-To: <200812102148.mBALm5Lt044021@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812101744.00578.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Wed, 10 Dec 2008 17:45:04 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8745/Wed Dec 10 15:10:10 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185891 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 22:45:10 -0000 On Wednesday 10 December 2008 04:48:05 pm Ed Schouten wrote: > Author: ed > Date: Wed Dec 10 21:48:05 2008 > New Revision: 185891 > URL: http://svn.freebsd.org/changeset/base/185891 > > Log: > Remove added newlines from logged messages written to /dev/console. > > The /dev/console device node logs all strings that are written to it. > When the string does not contain a trailing newline, it appends one. I > can imagine this was useful a long time ago, but with our current > rc-scripts, it generates a whole bunch of messages that look like: > > | Configuring syscons: > | blanktime > | . > > By not appending the newlines, the output of `dmesg -a' is now (almost?) > exactly the same as what the user will see on the console device > (syscons, uart). I believe phk@ inserted the new-lines on purpose to prevent interleaving of messages in dmesg. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 22:50:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 107F3106564A; Wed, 10 Dec 2008 22:50:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF5188FC18; Wed, 10 Dec 2008 22:50:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBAMoBm0045372; Wed, 10 Dec 2008 22:50:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBAMoBXc045371; Wed, 10 Dec 2008 22:50:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812102250.mBAMoBXc045371@svn.freebsd.org> From: John Baldwin Date: Wed, 10 Dec 2008 22:50:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185894 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 22:50:12 -0000 Author: jhb Date: Wed Dec 10 22:50:11 2008 New Revision: 185894 URL: http://svn.freebsd.org/changeset/base/185894 Log: MFC: Check for duplicate attempts to add the same positive entry to the name cache. If a duplicate attempt is made, just do nothing. This fixes a race with shared locking in pathname lockups. Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_cache.c Modified: stable/6/sys/kern/vfs_cache.c ============================================================================== --- stable/6/sys/kern/vfs_cache.c Wed Dec 10 22:17:09 2008 (r185893) +++ stable/6/sys/kern/vfs_cache.c Wed Dec 10 22:50:11 2008 (r185894) @@ -511,8 +511,39 @@ cache_enter(dvp, vp, cnp) hold = 0; zap = 0; + + /* + * Calculate the hash key and setup as much of the new + * namecache entry as possible before acquiring the lock. + */ ncp = cache_alloc(cnp->cn_namelen); + ncp->nc_vp = vp; + ncp->nc_dvp = dvp; + len = ncp->nc_nlen = cnp->cn_namelen; + hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); + bcopy(cnp->cn_nameptr, ncp->nc_name, len); + hash = fnv_32_buf(&dvp, sizeof(dvp), hash); CACHE_LOCK(); + + /* + * See if this vnode is already in the cache with this name. + * This can happen with concurrent lookups of the same path + * name. + */ + if (vp) { + struct namecache *n2; + + TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } + numcache++; if (!vp) { numneg++; @@ -524,16 +555,9 @@ cache_enter(dvp, vp, cnp) } /* - * Set the rest of the namecache entry elements, calculate it's - * hash key and insert it into the appropriate chain within - * the cache entries table. + * Insert the new namecache entry into the appropriate chain + * within the cache entries table. */ - ncp->nc_vp = vp; - ncp->nc_dvp = dvp; - len = ncp->nc_nlen = cnp->cn_namelen; - hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); - bcopy(cnp->cn_nameptr, ncp->nc_name, len); - hash = fnv_32_buf(&dvp, sizeof(dvp), hash); ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 23:12:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E58881065670; Wed, 10 Dec 2008 23:12:41 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDE098FC17; Wed, 10 Dec 2008 23:12:41 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBANCfMG045907; Wed, 10 Dec 2008 23:12:41 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBANCeaE045870; Wed, 10 Dec 2008 23:12:40 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200812102312.mBANCeaE045870@svn.freebsd.org> From: Marko Zec Date: Wed, 10 Dec 2008 23:12:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185895 - in head/sys: conf contrib/pf/net kern net netgraph netinet netinet/libalias netinet6 netipsec sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 23:12:42 -0000 Author: zec Date: Wed Dec 10 23:12:39 2008 New Revision: 185895 URL: http://svn.freebsd.org/changeset/base/185895 Log: Conditionally compile out V_ globals while instantiating the appropriate container structures, depending on VIMAGE_GLOBALS compile time option. Make VIMAGE_GLOBALS a new compile-time option, which by default will not be defined, resulting in instatiations of global variables selected for V_irtualization (enclosed in #ifdef VIMAGE_GLOBALS blocks) to be effectively compiled out. Instantiate new global container structures to hold V_irtualized variables: vnet_net_0, vnet_inet_0, vnet_inet6_0, vnet_ipsec_0, vnet_netgraph_0, and vnet_gif_0. Update the VSYM() macro so that depending on VIMAGE_GLOBALS the V_ macros resolve either to the original globals, or to fields inside container structures, i.e. effectively #ifdef VIMAGE_GLOBALS #define V_rt_tables rt_tables #else #define V_rt_tables vnet_net_0._rt_tables #endif Update SYSCTL_V_*() macros to operate either on globals or on fields inside container structs. Extend the internal kldsym() lookups with the ability to resolve selected fields inside the virtualization container structs. This applies only to the fields which are explicitly registered for kldsym() visibility via VNET_MOD_DECLARE() and vnet_mod_register(), currently this is done only in sys/net/if.c. Fix a few broken instances of MODULE_GLOBAL() macro use in SCTP code, and modify the MODULE_GLOBAL() macro to resolve to V_ macros, which in turn result in proper code being generated depending on VIMAGE_GLOBALS. De-virtualize local static variables in sys/contrib/pf/net/pf_subr.c which were prematurely V_irtualized by automated V_ prepending scripts during earlier merging steps. PF virtualization will be done separately, most probably after next PF import. Convert a few variable initializations at instantiation to initialization in init functions, most notably in ipfw. Also convert TUNABLE_INT() initializers for V_ variables to TUNABLE_FETCH_INT() in initializer functions. Discussed at: devsummit Strassburg Reviewed by: bz, julian Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation Added: head/sys/kern/kern_vimage.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/contrib/pf/net/pf_subr.c head/sys/kern/kern_linker.c head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/net/vnet.h head/sys/netgraph/netgraph.h head/sys/netgraph/ng_base.c head/sys/netgraph/ng_bridge.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c head/sys/netgraph/ng_ipfw.c head/sys/netinet/in_proto.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_dummynet.c head/sys/netinet/ip_fw.h head/sys/netinet/ip_fw2.c head/sys/netinet/ip_fw_nat.c head/sys/netinet/ip_fw_pfil.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h head/sys/netinet/libalias/alias_db.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/sctp_pcb.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/udp_usrreq.c head/sys/netinet/vinet.h head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_input.c head/sys/netinet6/nd6.c head/sys/netinet6/vinet6.h head/sys/netipsec/ipsec.c head/sys/netipsec/vipsec.h head/sys/sys/kernel.h head/sys/sys/sysctl.h head/sys/sys/vimage.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/conf/files Wed Dec 10 23:12:39 2008 (r185895) @@ -1953,6 +1953,7 @@ kern/kern_timeout.c standard kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard +kern/kern_vimage.c standard kern/link_elf.c standard kern/linker_if.m standard kern/md4c.c optional netsmb Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/conf/options Wed Dec 10 23:12:39 2008 (r185895) @@ -415,6 +415,7 @@ TCPDEBUG TCP_OFFLOAD_DISABLE opt_inet.h #Disable code to dispatch tcp offloading TCP_SIGNATURE opt_inet.h VLAN_ARRAY opt_vlan.h +VIMAGE_GLOBALS opt_global.h XBONEHACK # Modified: head/sys/contrib/pf/net/pf_subr.c ============================================================================== --- head/sys/contrib/pf/net/pf_subr.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/contrib/pf/net/pf_subr.c Wed Dec 10 23:12:39 2008 (r185895) @@ -124,15 +124,14 @@ static MD5_CTX isn_ctx; u_int32_t pf_new_isn(struct pf_state *s) { - INIT_VNET_INET(curvnet); u_int32_t md5_buffer[4]; u_int32_t new_isn; struct pf_state_host *src, *dst; /* Seed if this is the first use, reseed if requested. */ - if (V_isn_last_reseed == 0) { - read_random(&V_isn_secret, sizeof(V_isn_secret)); - V_isn_last_reseed = ticks; + if (isn_last_reseed == 0) { + read_random(&isn_secret, sizeof(isn_secret)); + isn_last_reseed = ticks; } if (s->direction == PF_IN) { @@ -144,28 +143,28 @@ pf_new_isn(struct pf_state *s) } /* Compute the md5 hash and return the ISN. */ - MD5Init(&V_isn_ctx); - MD5Update(&V_isn_ctx, (u_char *) &dst->port, sizeof(u_short)); - MD5Update(&V_isn_ctx, (u_char *) &src->port, sizeof(u_short)); + MD5Init(&isn_ctx); + MD5Update(&isn_ctx, (u_char *) &dst->port, sizeof(u_short)); + MD5Update(&isn_ctx, (u_char *) &src->port, sizeof(u_short)); #ifdef INET6 if (s->af == AF_INET6) { - MD5Update(&V_isn_ctx, (u_char *) &dst->addr, + MD5Update(&isn_ctx, (u_char *) &dst->addr, sizeof(struct in6_addr)); - MD5Update(&V_isn_ctx, (u_char *) &src->addr, + MD5Update(&isn_ctx, (u_char *) &src->addr, sizeof(struct in6_addr)); } else #endif { - MD5Update(&V_isn_ctx, (u_char *) &dst->addr, + MD5Update(&isn_ctx, (u_char *) &dst->addr, sizeof(struct in_addr)); - MD5Update(&V_isn_ctx, (u_char *) &src->addr, + MD5Update(&isn_ctx, (u_char *) &src->addr, sizeof(struct in_addr)); } - MD5Update(&V_isn_ctx, (u_char *) &V_isn_secret, sizeof(V_isn_secret)); - MD5Final((u_char *) &md5_buffer, &V_isn_ctx); + MD5Update(&isn_ctx, (u_char *) &isn_secret, sizeof(isn_secret)); + MD5Final((u_char *) &md5_buffer, &isn_ctx); new_isn = (tcp_seq) md5_buffer[0]; - V_isn_offset += ISN_STATIC_INCREMENT + + isn_offset += ISN_STATIC_INCREMENT + (arc4random() & ISN_RANDOM_INCREMENT); - new_isn += V_isn_offset; + new_isn += isn_offset; return (new_isn); } Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/kern/kern_linker.c Wed Dec 10 23:12:39 2008 (r185895) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -1301,8 +1302,23 @@ kldsym(struct thread *td, struct kldsym_ break; } } +#ifndef VIMAGE_GLOBALS + /* + * If the symbol is not found in global namespace, + * try to look it up in the current vimage namespace. + */ + if (lf == NULL) { + CURVNET_SET(TD_TO_VNET(td)); + error = vi_symlookup(&lookup, symstr); + CURVNET_RESTORE(); + if (error == 0) + error = copyout(&lookup, uap->data, + sizeof(lookup)); + } +#else if (lf == NULL) error = ENOENT; +#endif } KLD_UNLOCK(); out: Added: head/sys/kern/kern_vimage.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/kern/kern_vimage.c Wed Dec 10 23:12:39 2008 (r185895) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2004-2008 University of Zagreb + * Copyright (c) 2006-2008 FreeBSD Foundation + * + * This software was developed by the University of Zagreb and the + * FreeBSD Foundation under sponsorship by the Stichting NLnet and the + * FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include + +#ifndef VIMAGE_GLOBALS + +MALLOC_DEFINE(M_VIMAGE, "vimage", "vimage resource container"); + +static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head; + +void +vnet_mod_register(const struct vnet_modinfo *vmi) +{ + struct vnet_modlink *vml, *vml_iter; + + /* Do not register the same module instance more than once. */ + TAILQ_FOREACH(vml_iter, &vnet_modlink_head, vml_mod_le) + if (vml_iter->vml_modinfo == vmi) + panic("%s: %s", __func__, vmi->vmi_name); + vml = malloc(sizeof(struct vnet_modlink), M_VIMAGE, M_NOWAIT); + vml->vml_modinfo = vmi; + TAILQ_INSERT_TAIL(&vnet_modlink_head, vml, vml_mod_le); +} + +/* + * vi_symlookup() attempts to resolve name to address queries for + * variables which have been moved from global namespace to virtualization + * container structures, but are still directly accessed from legacy + * userspace processes via kldsym(2) and kmem(4) interfaces. + */ +int +vi_symlookup(struct kld_sym_lookup *lookup, char *symstr) +{ + struct vnet_modlink *vml; + struct vnet_symmap *mapentry; + + TAILQ_FOREACH(vml, &vnet_modlink_head, vml_mod_le) { + if (vml->vml_modinfo->vmi_symmap == NULL) + continue; + for (mapentry = vml->vml_modinfo->vmi_symmap; + mapentry->name != NULL; mapentry++) { + if (strcmp(symstr, mapentry->name) == 0) { + lookup->symvalue = (u_long) mapentry->base; + lookup->symsize = mapentry->size; + return (0); + } + } + } + return (ENOENT); +} + +static void +vi_init(void *unused) +{ + + TAILQ_INIT(&vnet_modlink_head); +} + +SYSINIT(vimage, SI_SUB_VIMAGE, SI_ORDER_FIRST, vi_init, NULL); + +#endif /* !VIMAGE_GLOBALS */ Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/if.c Wed Dec 10 23:12:39 2008 (r185895) @@ -90,6 +90,12 @@ #include +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +struct vnet_net vnet_net_0; +#endif +#endif + SYSCTL_NODE(_net, PF_LINK, link, CTLFLAG_RW, 0, "Link layers"); SYSCTL_NODE(_net_link, 0, generic, CTLFLAG_RW, 0, "Generic link-management"); @@ -161,6 +167,19 @@ static int filt_netdev(struct knote *kn, static struct filterops netdev_filtops = { 1, NULL, filt_netdetach, filt_netdev }; +#ifndef VIMAGE_GLOBALS +static struct vnet_symmap vnet_net_symmap[] = { + VNET_SYMMAP(net, ifnet), + VNET_SYMMAP(net, rt_tables), + VNET_SYMMAP(net, rtstat), + VNET_SYMMAP(net, rttrash), + VNET_SYMMAP_END +}; + +VNET_MOD_DECLARE(NET, net, vnet_net_iattach, vnet_net_idetach, + NONE, vnet_net_symmap) +#endif + /* * System initialization */ @@ -361,6 +380,10 @@ if_init(void *dummy __unused) { INIT_VNET_NET(curvnet); +#ifndef VIMAGE_GLOBALS + vnet_mod_register(&vnet_net_modinfo); +#endif + V_if_index = 0; V_ifindex_table = NULL; V_if_indexlim = 8; Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/if_bridge.c Wed Dec 10 23:12:39 2008 (r185895) @@ -100,6 +100,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -3041,7 +3042,7 @@ bridge_pfil(struct mbuf **mp, struct ifn } if (IPFW_LOADED && pfil_ipfw != 0 && dir == PFIL_OUT && ifp != NULL) { - INIT_VNET_IPFW(curvnet); + INIT_VNET_INET(curvnet); error = -1; args.rule = ip_dn_claim_rule(*mp); Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/if_ethersubr.c Wed Dec 10 23:12:39 2008 (r185895) @@ -42,10 +42,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include #include @@ -71,6 +73,7 @@ #include #include #include +#include #endif #ifdef INET6 #include @@ -426,7 +429,7 @@ int ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, struct ip_fw **rule, int shared) { - INIT_VNET_IPFW(dst->if_vnet); + INIT_VNET_INET(dst->if_vnet); struct ether_header *eh; struct ether_header save_eh; struct mbuf *m; Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/if_gif.c Wed Dec 10 23:12:39 2008 (r185895) @@ -95,6 +95,12 @@ static struct mtx gif_mtx; static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface"); +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +struct vnet_gif vnet_gif_0; +#endif +#endif + #ifdef VIMAGE_GLOBALS static LIST_HEAD(, gif_softc) gif_softc_list; static int max_gif_nesting; Modified: head/sys/net/if_gif.h ============================================================================== --- head/sys/net/if_gif.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/if_gif.h Wed Dec 10 23:12:39 2008 (r185895) @@ -113,7 +113,7 @@ int gif_encapcheck(const struct mbuf *, /* * Virtualization support */ -#ifdef VIMAGE + struct vnet_gif { LIST_HEAD(, gif_softc) _gif_softc_list; int _max_gif_nesting; @@ -121,6 +121,11 @@ struct vnet_gif { int _ip_gif_ttl; int _ip6_gif_hlim; }; + +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +extern struct vnet_gif vnet_gif_0; +#endif #endif #define INIT_VNET_GIF(vnet) \ Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/net/vnet.h Wed Dec 10 23:12:39 2008 (r185895) @@ -37,9 +37,7 @@ #include #include -#include #include -#include #include #include @@ -67,6 +65,12 @@ struct vnet_net { int _ether_ipfw; }; +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +extern struct vnet_net vnet_net_0; +#endif +#endif + /* * Symbol translation macros */ Modified: head/sys/netgraph/netgraph.h ============================================================================== --- head/sys/netgraph/netgraph.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/netgraph.h Wed Dec 10 23:12:39 2008 (r185895) @@ -1205,6 +1205,12 @@ struct vnet_netgraph { struct unrhdr *_ng_wormhole_unit; }; +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +extern struct vnet_netgraph vnet_netgraph_0; +#endif +#endif + /* Symbol translation macros */ #define V_nextID VNET_NETGRAPH(nextID) #define V_ng_ID_hash VNET_NETGRAPH(ng_ID_hash) Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/ng_base.c Wed Dec 10 23:12:39 2008 (r185895) @@ -72,6 +72,12 @@ MODULE_VERSION(netgraph, NG_ABI_VERSION); +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +struct vnet_netgraph vnet_netgraph_0; +#endif +#endif + /* Mutex to protect topology events. */ static struct mtx ng_topo_mtx; @@ -167,7 +173,9 @@ static struct mtx ng_typelist_mtx; /* Hash related definitions */ /* XXX Don't need to initialise them because it's a LIST */ +#ifdef VIMAGE_GLOBALS static LIST_HEAD(, ng_node) ng_ID_hash[NG_ID_HASH_SIZE]; +#endif static struct mtx ng_idhash_mtx; /* Method to find a node.. used twice so do it here */ #define NG_IDHASH_FN(ID) ((ID) % (NG_ID_HASH_SIZE)) @@ -183,7 +191,9 @@ static struct mtx ng_idhash_mtx; } \ } while (0) +#ifdef VIMAGE_GLOBALS static LIST_HEAD(, ng_node) ng_name_hash[NG_NAME_HASH_SIZE]; +#endif static struct mtx ng_namehash_mtx; #define NG_NAMEHASH(NAME, HASH) \ do { \ @@ -348,7 +358,9 @@ ng_alloc_node(void) #define TRAP_ERROR() #endif -static ng_ID_t nextID = 1; +#ifdef VIMAGE_GLOBALS +static ng_ID_t nextID; +#endif #ifdef INVARIANTS #define CHECK_DATA_MBUF(m) do { \ @@ -3063,6 +3075,7 @@ ngb_mod_event(module_t mod, int event, v switch (event) { case MOD_LOAD: /* Initialize everything. */ + V_nextID = 1; NG_WORKLIST_LOCK_INIT(); mtx_init(&ng_typelist_mtx, "netgraph types mutex", NULL, MTX_DEF); Modified: head/sys/netgraph/ng_bridge.c ============================================================================== --- head/sys/netgraph/ng_bridge.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/ng_bridge.c Wed Dec 10 23:12:39 2008 (r185895) @@ -61,9 +61,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/ng_eiface.c Wed Dec 10 23:12:39 2008 (r185895) @@ -113,7 +113,9 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(eiface, &typestruct); +#ifdef VIMAGE_GLOBALS static struct unrhdr *ng_eiface_unit; +#endif /************************************************************************ INTERFACE STUFF Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/ng_iface.c Wed Dec 10 23:12:39 2008 (r185895) @@ -208,7 +208,9 @@ static struct ng_type typestruct = { }; NETGRAPH_INIT(iface, &typestruct); +#ifdef VIMAGE_GLOBALS static struct unrhdr *ng_iface_unit; +#endif /************************************************************************ HELPER STUFF Modified: head/sys/netgraph/ng_ipfw.c ============================================================================== --- head/sys/netgraph/ng_ipfw.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netgraph/ng_ipfw.c Wed Dec 10 23:12:39 2008 (r185895) @@ -29,10 +29,12 @@ #include #include #include +#include #include #include #include #include +#include #include #include Modified: head/sys/netinet/in_proto.c ============================================================================== --- head/sys/netinet/in_proto.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/in_proto.c Wed Dec 10 23:12:39 2008 (r185895) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_divert.c Wed Dec 10 23:12:39 2008 (r185895) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -167,7 +168,7 @@ div_init(void) V_divcbinfo.ipi_zone = uma_zcreate("divcb", sizeof(struct inpcb), NULL, NULL, div_inpcb_init, div_inpcb_fini, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); - uma_zone_set_max(divcbinfo.ipi_zone, maxsockets); + uma_zone_set_max(V_divcbinfo.ipi_zone, maxsockets); EVENTHANDLER_REGISTER(maxsockets_change, div_zone_change, NULL, EVENTHANDLER_PRI_ANY); } Modified: head/sys/netinet/ip_dummynet.c ============================================================================== --- head/sys/netinet/ip_dummynet.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_dummynet.c Wed Dec 10 23:12:39 2008 (r185895) @@ -62,9 +62,11 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include +#include #include #include #include Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_fw.h Wed Dec 10 23:12:39 2008 (r185895) @@ -650,8 +650,6 @@ typedef int ip_fw_chk_t(struct ip_fw_arg extern ip_fw_chk_t *ip_fw_chk_ptr; #define IPFW_LOADED (ip_fw_chk_ptr != NULL) -#ifdef IPFW_INTERNAL - struct ip_fw_chain { struct ip_fw *rules; /* list of rules */ struct ip_fw *reap; /* list of rules to reap */ @@ -659,6 +657,9 @@ struct ip_fw_chain { struct radix_node_head *tables[IPFW_TABLES_MAX]; struct rwlock rwmtx; }; + +#ifdef IPFW_INTERNAL + #define IPFW_LOCK_INIT(_chain) \ rw_init(&(_chain)->rwmtx, "IPFW static rules") #define IPFW_LOCK_DESTROY(_chain) rw_destroy(&(_chain)->rwmtx) @@ -684,9 +685,7 @@ typedef int ipfw_nat_cfg_t(struct sockop /* * Stack virtualization support. */ -#ifdef VIMAGE struct vnet_ipfw { - int _fw_one_pass; int _fw_enable; int _fw6_enable; u_int32_t _set_disable; @@ -716,6 +715,11 @@ struct vnet_ipfw { struct callout _ipfw_timeout; eventhandler_tag _ifaddr_event_tag; }; + +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +extern struct vnet_ipfw vnet_ipfw_0; +#endif #endif /* @@ -726,7 +730,6 @@ struct vnet_ipfw { #define VNET_IPFW(sym) VSYM(vnet_ipfw, sym) -#define V_fw_one_pass VNET_IPFW(fw_one_pass) #define V_fw_enable VNET_IPFW(fw_enable) #define V_fw6_enable VNET_IPFW(fw6_enable) #define V_set_disable VNET_IPFW(set_disable) Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_fw2.c Wed Dec 10 23:12:39 2008 (r185895) @@ -110,6 +110,12 @@ __FBSDID("$FreeBSD$"); #include +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +struct vnet_ipfw vnet_ipfw_0; +#endif +#endif + /* * set_disable contains one bit per set value (0..31). * If the bit is set, all rules with the corresponding set @@ -118,12 +124,13 @@ __FBSDID("$FreeBSD$"); * and CANNOT be disabled. * Rules in set RESVD_SET can only be deleted explicitly. */ +#ifdef VIMAGE_GLOBALS static u_int32_t set_disable; - static int fw_verbose; +static struct callout ipfw_timeout; +#endif static int verbose_limit; -static struct callout ipfw_timeout; static uma_zone_t ipfw_dyn_rule_zone; /* @@ -159,8 +166,10 @@ struct table_entry { u_int32_t value; }; -static int fw_debug = 1; -static int autoinc_step = 100; /* bounded to 1..1000 in add_rule() */ +#ifdef VIMAGE_GLOBALS +static int fw_debug; +static int autoinc_step; +#endif extern int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); @@ -171,7 +180,7 @@ SYSCTL_V_PROC(V_NET, vnet_ipfw, _net_ine ipfw_chg_hook, "I", "Enable ipfw"); SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, autoinc_step, CTLFLAG_RW, autoinc_step, 0, "Rule number autincrement step"); -SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, one_pass, +SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip_fw, OID_AUTO, one_pass, CTLFLAG_RW | CTLFLAG_SECURE3, fw_one_pass, 0, "Only do a single pass through ipfw when using dummynet(4)"); SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, debug, CTLFLAG_RW, @@ -222,9 +231,11 @@ SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, t * obey the 'randomized match', and we do not do multiple * passes through the firewall. XXX check the latter!!! */ -static ipfw_dyn_rule **ipfw_dyn_v = NULL; -static u_int32_t dyn_buckets = 256; /* must be power of 2 */ -static u_int32_t curr_dyn_buckets = 256; /* must be power of 2 */ +#ifdef VIMAGE_GLOBALS +static ipfw_dyn_rule **ipfw_dyn_v; +static u_int32_t dyn_buckets; +static u_int32_t curr_dyn_buckets; +#endif static struct mtx ipfw_dyn_mtx; /* mutex guarding dynamic rules */ #define IPFW_DYN_LOCK_INIT() \ @@ -237,12 +248,13 @@ static struct mtx ipfw_dyn_mtx; /* mute /* * Timeouts for various events in handing dynamic rules. */ -static u_int32_t dyn_ack_lifetime = 300; -static u_int32_t dyn_syn_lifetime = 20; -static u_int32_t dyn_fin_lifetime = 1; -static u_int32_t dyn_rst_lifetime = 1; -static u_int32_t dyn_udp_lifetime = 10; -static u_int32_t dyn_short_lifetime = 5; +#ifdef VIMAGE_GLOBALS +static u_int32_t dyn_ack_lifetime; +static u_int32_t dyn_syn_lifetime; +static u_int32_t dyn_fin_lifetime; +static u_int32_t dyn_rst_lifetime; +static u_int32_t dyn_udp_lifetime; +static u_int32_t dyn_short_lifetime; /* * Keepalives are sent if dyn_keepalive is set. They are sent every @@ -252,14 +264,15 @@ static u_int32_t dyn_short_lifetime = 5; * than dyn_keepalive_period. */ -static u_int32_t dyn_keepalive_interval = 20; -static u_int32_t dyn_keepalive_period = 5; -static u_int32_t dyn_keepalive = 1; /* do send keepalives */ +static u_int32_t dyn_keepalive_interval; +static u_int32_t dyn_keepalive_period; +static u_int32_t dyn_keepalive; static u_int32_t static_count; /* # of static rules */ static u_int32_t static_len; /* size in bytes of static rules */ -static u_int32_t dyn_count; /* # of dynamic rules */ -static u_int32_t dyn_max = 4096; /* max # of dynamic rules */ +static u_int32_t dyn_count; /* # of dynamic rules */ +static u_int32_t dyn_max; /* max # of dynamic rules */ +#endif /* VIMAGE_GLOBALS */ SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, dyn_buckets, CTLFLAG_RW, dyn_buckets, 0, "Number of dyn. buckets"); @@ -299,8 +312,9 @@ static struct sysctl_oid *ip6_fw_sysctl_ #endif /* INET6 */ #endif /* SYSCTL_NODE */ -static int fw_deny_unknown_exthdrs = 1; - +#ifdef VIMAGE_GLOBALS +static int fw_deny_unknown_exthdrs; +#endif /* * L3HDR maps an ipv4 pointer into a layer3 header pointer of type T @@ -748,7 +762,9 @@ send_reject6(struct ip_fw_args *args, in #endif /* INET6 */ +#ifdef VIMAGE_GLOBALS static u_int64_t norule_counter; /* counter for ipfw_log(NULL...) */ +#endif #define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0 #define SNP(buf) buf, sizeof(buf) @@ -4510,6 +4526,28 @@ ipfw_init(void) struct ip_fw default_rule; int error; + V_fw_debug = 1; + V_autoinc_step = 100; /* bounded to 1..1000 in add_rule() */ + + V_ipfw_dyn_v = NULL; + V_dyn_buckets = 256; /* must be power of 2 */ + V_curr_dyn_buckets = 256; /* must be power of 2 */ + + V_dyn_ack_lifetime = 300; + V_dyn_syn_lifetime = 20; + V_dyn_fin_lifetime = 1; + V_dyn_rst_lifetime = 1; + V_dyn_udp_lifetime = 10; + V_dyn_short_lifetime = 5; + + V_dyn_keepalive_interval = 20; + V_dyn_keepalive_period = 5; + V_dyn_keepalive = 1; /* do send keepalives */ + + V_dyn_max = 4096; /* max # of dynamic rules */ + + V_fw_deny_unknown_exthdrs = 1; + #ifdef INET6 /* Setup IPv6 fw sysctl tree. */ sysctl_ctx_init(&ip6_fw_sysctl_ctx); Modified: head/sys/netinet/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ip_fw_nat.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_fw_nat.c Wed Dec 10 23:12:39 2008 (r185895) @@ -71,7 +71,9 @@ MALLOC_DECLARE(M_IPFW); extern struct ip_fw_chain layer3_chain; +#ifdef VIMAGE_GLOBALS static eventhandler_tag ifaddr_event_tag; +#endif extern ipfw_nat_t *ipfw_nat_ptr; extern ipfw_nat_cfg_t *ipfw_nat_cfg_ptr; Modified: head/sys/netinet/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ip_fw_pfil.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_fw_pfil.c Wed Dec 10 23:12:39 2008 (r185895) @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_input.c Wed Dec 10 23:12:39 2008 (r185895) @@ -49,6 +49,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -91,6 +93,12 @@ __FBSDID("$FreeBSD$"); CTASSERT(sizeof(struct ip) == 20); #endif +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +struct vnet_inet vnet_inet_0; +#endif +#endif + #ifdef VIMAGE_GLOBALS static int ipsendredirects; static int ip_checkinterface; @@ -170,7 +178,9 @@ SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROP SYSCTL_V_STRUCT(V_NET, vnet_inet, _net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, ipstat, ipstat, "IP statistics (struct ipstat, netinet/ip_var.h)"); +#ifdef VIMAGE_GLOBALS static uma_zone_t ipq_zone; +#endif static struct mtx ipqlock; #define IPQ_LOCK() mtx_lock(&ipqlock) @@ -207,7 +217,9 @@ SYSCTL_V_INT(V_NET, vnet_inet, _net_inet */ ip_fw_chk_t *ip_fw_chk_ptr = NULL; ip_dn_io_t *ip_dn_io_ptr = NULL; -int fw_one_pass = 1; +#ifdef VIMAGE_GLOBALS +int fw_one_pass; +#endif static void ip_freef(struct ipqhead *, struct ipq *); @@ -246,6 +258,8 @@ ip_init(void) V_ipport_randomtime = 45; /* user controlled via sysctl */ V_ipport_stoprandom = 0; /* toggled by ipport_tick */ + V_fw_one_pass = 1; + #ifdef NOTYET /* XXX global static but not instantiated in this file */ V_ipfastforward_active = 0; Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_output.c Wed Dec 10 23:12:39 2008 (r185895) @@ -793,7 +793,6 @@ done: void in_delayed_cksum(struct mbuf *m) { - INIT_VNET_INET(curvnet); struct ip *ip; u_short csum, offset; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/ip_var.h Wed Dec 10 23:12:39 2008 (r185895) @@ -177,6 +177,7 @@ struct sockopt; extern struct ipstat ipstat; extern u_short ip_id; /* ip packet ctr, for ids */ +extern int ip_do_randomid; extern int ip_defttl; /* default IP ttl */ extern int ipforwarding; /* ip forwarding */ #ifdef IPSTEALTH Modified: head/sys/netinet/libalias/alias_db.c ============================================================================== --- head/sys/netinet/libalias/alias_db.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/libalias/alias_db.c Wed Dec 10 23:12:39 2008 (r185895) @@ -146,7 +146,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #else #include Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/raw_ip.c Wed Dec 10 23:12:39 2008 (r185895) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/sctp_os_bsd.h Wed Dec 10 23:12:39 2008 (r185895) @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -96,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #endif /* INET6 */ @@ -152,13 +154,8 @@ MALLOC_DECLARE(SCTP_M_SOCKOPT); #define MOD_IPSEC ipsec /* then define the macro(s) that hook into the vimage macros */ -#if defined(__FreeBSD__) && __FreeBSD_version >= 800044 && defined(VIMAGE) -#if 0 -#define VSYMNAME(__MODULE) vnet_ ## __MODULE -#define MODULE_GLOBAL(__MODULE, __SYMBOL) VSYM(VSYMNAME(__MODULE), __SYMBOL) -#else +#if defined(__FreeBSD__) && __FreeBSD_version >= 800056 #define MODULE_GLOBAL(__MODULE, __SYMBOL) V_ ## __SYMBOL -#endif #else #define MODULE_GLOBAL(__MODULE, __SYMBOL) (__SYMBOL) #endif Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/sctp_pcb.c Wed Dec 10 23:12:39 2008 (r185895) @@ -59,11 +59,11 @@ SCTP6_ARE_ADDR_EQUAL(struct sockaddr_in6 struct sockaddr_in6 tmp_a, tmp_b; memcpy(&tmp_a, a, sizeof(struct sockaddr_in6)); - if (sa6_embedscope(&tmp_a, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))) != 0) { + if (sa6_embedscope(&tmp_a, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)) != 0) { return 0; } memcpy(&tmp_b, b, sizeof(struct sockaddr_in6)); - if (sa6_embedscope(&tmp_b, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))) != 0) { + if (sa6_embedscope(&tmp_b, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)) != 0) { return 0; } return (IN6_ARE_ADDR_EQUAL(&tmp_a.sin6_addr, &tmp_b.sin6_addr)); @@ -2008,7 +2008,7 @@ sctp_findassociation_addr(struct mbuf *m /* Get the scopes in properly to the sin6 addr's */ /* we probably don't need these operations */ (void)sa6_recoverscope(from6); - sa6_embedscope(from6, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))); + sa6_embedscope(from6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)); break; } #endif @@ -2049,7 +2049,7 @@ sctp_findassociation_addr(struct mbuf *m /* Get the scopes in properly to the sin6 addr's */ /* we probably don't need these operations */ (void)sa6_recoverscope(to6); - sa6_embedscope(to6, MODULE_GLOBAL(MOD_INET6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone))); + sa6_embedscope(to6, MODULE_GLOBAL(MOD_INET6, ip6_use_defzone)); break; } #endif Modified: head/sys/netinet/tcp_sack.c ============================================================================== --- head/sys/netinet/tcp_sack.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/tcp_sack.c Wed Dec 10 23:12:39 2008 (r185895) @@ -135,7 +135,6 @@ int tcp_sack_globalholes; SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, tcp_do_sack, 0, "Enable/Disable TCP SACK support"); -TUNABLE_INT("net.inet.tcp.sack.enable", &tcp_do_sack); SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_RW, tcp_sack_maxholes, 0, Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/tcp_subr.c Wed Dec 10 23:12:39 2008 (r185895) @@ -203,7 +203,7 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t "Enable tcp_drain routine for extra help when low on mbufs"); SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, pcbcount, - CTLFLAG_RD, V_tcbinfo.ipi_count, 0, "Number of active PCBs"); + CTLFLAG_RD, tcbinfo.ipi_count, 0, "Number of active PCBs"); SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW, icmp_may_rst, 0, @@ -359,6 +359,8 @@ tcp_init(void) V_tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH; tcp_finwait2_timeout = TCPTV_FINWAIT2_TIMEOUT; + TUNABLE_INT_FETCH("net.inet.tcp.sack.enable", &V_tcp_do_sack); + INP_INFO_LOCK_INIT(&V_tcbinfo, "tcp"); LIST_INIT(&V_tcb); V_tcbinfo.ipi_listhead = &V_tcb; Modified: head/sys/netinet/udp_usrreq.c ============================================================================== --- head/sys/netinet/udp_usrreq.c Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/udp_usrreq.c Wed Dec 10 23:12:39 2008 (r185895) @@ -1198,7 +1198,7 @@ udp_connect(struct socket *so, struct so sin = (struct sockaddr_in *)nam; if (prison_remote_ip4(td->td_ucred, &sin->sin_addr) != 0) { INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&udbinfo); + INP_INFO_WUNLOCK(&V_udbinfo); return (EAFNOSUPPORT); } error = in_pcbconnect(inp, nam, td->td_ucred); Modified: head/sys/netinet/vinet.h ============================================================================== --- head/sys/netinet/vinet.h Wed Dec 10 22:50:11 2008 (r185894) +++ head/sys/netinet/vinet.h Wed Dec 10 23:12:39 2008 (r185895) @@ -194,8 +194,16 @@ struct vnet_inet { int _icmp_rfi; int _icmp_quotelen; int _icmpbmcastecho; + + int _fw_one_pass; }; +#ifndef VIMAGE +#ifndef VIMAGE_GLOBALS +extern struct vnet_inet vnet_inet_0; +#endif +#endif + /* * Symbol translation macros */ @@ -212,6 +220,7 @@ struct vnet_inet { #define V_divcbinfo VNET_INET(divcbinfo) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 10 23:30:57 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EAAF106564A; Wed, 10 Dec 2008 23:30:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 248808FC08; Wed, 10 Dec 2008 23:30:57 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBANS6FT021276; Wed, 10 Dec 2008 16:28:06 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 10 Dec 2008 16:28:17 -0700 (MST) Message-Id: <20081210.162817.474623206.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200812101945.mBAJjwn2040853@svn.freebsd.org> References: <200812101945.mBAJjwn2040853@svn.freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r185874 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Dec 2008 23:30:57 -0000 In message: <200812101945.mBAJjwn2040853@svn.freebsd.org> John Baldwin writes: : Author: jhb : Date: Wed Dec 10 19:45:58 2008 : New Revision: 185874 : URL: http://svn.freebsd.org/changeset/base/185874 : : Log: : Rather than using a char array with explicit assumptions about the layout : of 'struct osigevent' in 'struct aiocb', use int and void pointer spare : members that are identical to 'struct osigevent'. This is better from an alignment perspective for !intel architectures. warner : MFC after: 1 month : : Modified: : head/sys/sys/aio.h : : Modified: head/sys/sys/aio.h : ============================================================================== : --- head/sys/sys/aio.h Wed Dec 10 19:33:10 2008 (r185873) : +++ head/sys/sys/aio.h Wed Dec 10 19:45:58 2008 (r185874) : @@ -69,7 +69,8 @@ typedef struct aiocb { : off_t aio_offset; /* File offset for I/O */ : volatile void *aio_buf; /* I/O buffer in process space */ : size_t aio_nbytes; /* Number of bytes for I/O */ : - char __spare__[sizeof(int) * 2 + sizeof(void *)]; /* osigevent. */ : + int __spare__[2]; : + void *__spare2__; : int aio_lio_opcode; /* LIO opcode */ : int aio_reqprio; /* Request priority -- ignored */ : struct __aiocb_private _aiocb_private; : From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 00:28:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89D411065670; Thu, 11 Dec 2008 00:28:22 +0000 (UTC) (envelope-from zec@icir.org) Received: from xaqua.tel.fer.hr (xaqua.tel.fer.hr [161.53.19.25]) by mx1.freebsd.org (Postfix) with ESMTP id D347C8FC12; Thu, 11 Dec 2008 00:28:21 +0000 (UTC) (envelope-from zec@icir.org) Received: by xaqua.tel.fer.hr (Postfix, from userid 20006) id 5E3F49B649; Thu, 11 Dec 2008 01:04:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on xaqua.tel.fer.hr X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7 Received: from [192.168.200.110] (zec2.tel.fer.hr [161.53.19.79]) by xaqua.tel.fer.hr (Postfix) with ESMTP id 584569B645; Thu, 11 Dec 2008 01:04:37 +0100 (CET) From: Marko Zec To: Max Laier Date: Thu, 11 Dec 2008 01:04:29 +0100 User-Agent: KMail/1.9.7 References: <200812102059.mBAKxQu3042532@svn.freebsd.org> <49402E6B.3010206@elischer.org> <200812102243.54975.max@love2party.net> In-Reply-To: <200812102243.54975.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812110104.29592.zec@icir.org> Cc: svn-src-vendor@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Julian Elischer Subject: Re: svn commit: r185880 - in vendor/pf/dist: authpf ftp-proxy man pfctl pflogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:28:22 -0000 On Wednesday 10 December 2008 22:43:54 Max Laier wrote: > On Wednesday 10 December 2008 22:02:35 Julian Elischer wrote: > > Max Laier wrote: > > > Author: mlaier > > > Date: Wed Dec 10 20:59:26 2008 > > > New Revision: 185880 > > > URL: http://svn.freebsd.org/changeset/base/185880 > > > > > > Log: > > > Import OPENBSD_4_3_BASE > > > > so, how do we go about virtualizing this? > > and I don't like our chances of getting virtualized macros into the > > openbsd sources.... > > Yeah, most likely a no-go. From what I understand, Marko has a > virtualized version of what's in the tree now and I don't intend to > void that work by blindly dumping the new version in head and have > him deal with it. I _had_ a virtualized version that become obsolete with the import of then new PF version around May 2007... Given that virtualizing PF isn't quite a trivial task, I was reluctant to spent another full week or so on crunching the current version of PF that we have in the tree, just to see it becoming obsolete again and again. > It will take some time to get the import done and I'll do it in my > user dir. Once this is in somewhat usable shape I'll start looking at > the V_ stuff and how to best go about merging it. FWIW, it might be > easier to virtualize the new version as it greatly reduces code > duplication in some relevant areas. Great! So from my perspective by all means pls. go ahead and proceed with merging the latest PF to head, and by the time that will be done, we'll also have more than enough of virtualization infrastructure in the tree to justify another round of PF virtualization game. Of course we should start thinking on what tricks would be best suited for PF virtualization while still permitting code syncing with OpenBSD. Marko > If you are ready to commit the 2nd half of the vnet stuff in the > meantime, please go ahead and do so. I'll figure out how to deal > with it. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 00:30:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D73771065677; Thu, 11 Dec 2008 00:30:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2E628FC17; Thu, 11 Dec 2008 00:30:26 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB0UQ6c047516; Thu, 11 Dec 2008 00:30:26 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB0UQiK047515; Thu, 11 Dec 2008 00:30:26 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812110030.mBB0UQiK047515@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Dec 2008 00:30:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185896 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:30:27 -0000 Author: yongari Date: Thu Dec 11 00:30:26 2008 New Revision: 185896 URL: http://svn.freebsd.org/changeset/base/185896 Log: Partly revert r185756. RTL8169SC doesn't like reduced delays in GMII access while Tx/Rx is in progress. Reported by: Jaakko Heinonen saunalahti DOT fi>, Anton Yuzhaninov citrin DOT ru> Tested by: Jaakko Heinonen saunalahti DOT fi> Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Wed Dec 10 23:12:39 2008 (r185895) +++ head/sys/dev/re/if_re.c Thu Dec 11 00:30:26 2008 (r185896) @@ -419,10 +419,10 @@ re_gmii_readreg(device_t dev, int phy, i CSR_WRITE_4(sc, RL_PHYAR, reg << 16); for (i = 0; i < RL_TIMEOUT; i++) { - DELAY(30); rval = CSR_READ_4(sc, RL_PHYAR); if (rval & RL_PHYAR_BUSY) break; + DELAY(100); } if (i == RL_TIMEOUT) { @@ -446,10 +446,10 @@ re_gmii_writereg(device_t dev, int phy, (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); for (i = 0; i < RL_TIMEOUT; i++) { - DELAY(30); rval = CSR_READ_4(sc, RL_PHYAR); if (!(rval & RL_PHYAR_BUSY)) break; + DELAY(100); } if (i == RL_TIMEOUT) { From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 00:46:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1A691065686; Thu, 11 Dec 2008 00:46:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9CF8FC1F; Thu, 11 Dec 2008 00:46:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB0k7Ts047844; Thu, 11 Dec 2008 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB0k7Xo047843; Thu, 11 Dec 2008 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812110046.mBB0k7Xo047843@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Dec 2008 00:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185897 - head/sys/dev/re X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:46:08 -0000 Author: yongari Date: Thu Dec 11 00:46:07 2008 New Revision: 185897 URL: http://svn.freebsd.org/changeset/base/185897 Log: Always put controller into known state before device intialization. While here remove re_reset calls invoked in system error case as controller reset is always done in device initialization. Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Dec 11 00:30:26 2008 (r185896) +++ head/sys/dev/re/if_re.c Thu Dec 11 00:46:07 2008 (r185897) @@ -756,7 +756,6 @@ re_diag(struct rl_softc *sc) ifp->if_flags |= IFF_PROMISC; sc->rl_testmode = 1; - re_reset(sc); re_init_locked(sc); sc->rl_flags |= RL_FLAG_LINK; if (sc->rl_type == RL_8169) @@ -2091,10 +2090,8 @@ re_poll_locked(struct ifnet *ifp, enum p * XXX check behaviour on receiver stalls. */ - if (status & RL_ISR_SYSTEM_ERR) { - re_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) re_init_locked(sc); - } } } #endif /* DEVICE_POLLING */ @@ -2158,10 +2155,8 @@ re_int_task(void *arg, int npending) RL_ISR_TX_ERR|RL_ISR_TX_DESC_UNAVAIL)) re_txeof(sc); - if (status & RL_ISR_SYSTEM_ERR) { - re_reset(sc); + if (status & RL_ISR_SYSTEM_ERR) re_init_locked(sc); - } if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) taskqueue_enqueue_fast(taskqueue_fast, &sc->rl_txtask); @@ -2482,6 +2477,9 @@ re_init_locked(struct rl_softc *sc) */ re_stop(sc); + /* Put controller into known state. */ + re_reset(sc); + /* * Enable C+ RX and TX mode, as well as VLAN stripping and * RX checksum offload. We must configure the C+ register From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 00:46:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 924E9106567A; Thu, 11 Dec 2008 00:46:25 +0000 (UTC) (envelope-from prvs=julian=2245e07b3@elischer.org) Received: from smtp-outbound.ironport.com (smtp-outbound.ironport.com [63.251.108.112]) by mx1.freebsd.org (Postfix) with ESMTP id 730AE8FC1C; Thu, 11 Dec 2008 00:46:25 +0000 (UTC) (envelope-from prvs=julian=2245e07b3@elischer.org) Received: from unknown (HELO julian-mac.elischer.org) ([10.251.60.120]) by smtp-outbound.ironport.com with ESMTP; 10 Dec 2008 16:17:46 -0800 Message-ID: <49405C2A.7070203@elischer.org> Date: Wed, 10 Dec 2008 16:17:46 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Marko Zec References: <200812102312.mBANCeaE045870@svn.freebsd.org> In-Reply-To: <200812102312.mBANCeaE045870@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185895 - in head/sys: conf contrib/pf/net kern net netgraph netinet netinet/libalias netinet6 netipsec sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:46:25 -0000 Marko Zec wrote: > Author: zec > Date: Wed Dec 10 23:12:39 2008 > New Revision: 185895 > URL: http://svn.freebsd.org/changeset/base/185895 > congratulations. this is a big step. The first step where we introduce real physical change. Now we need people to help look for problems and do benchmarking. it is possible at this stage that re-ordering the fields in the various vinet/vnet structures may make noticeable performance changes due to cache line effects. it would be cool if we could look at this at this stage. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 00:58:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B1621065675; Thu, 11 Dec 2008 00:58:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36D998FC12; Thu, 11 Dec 2008 00:58:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB0w6Zi048103; Thu, 11 Dec 2008 00:58:06 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB0w6HD048102; Thu, 11 Dec 2008 00:58:06 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812110058.mBB0w6HD048102@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 00:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185898 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 00:58:06 -0000 Author: bz Date: Thu Dec 11 00:58:05 2008 New Revision: 185898 URL: http://svn.freebsd.org/changeset/base/185898 Log: Add 32-bit compat support for AIO. jhb probably forgot to commit this file with r185878 and will want to review this. It unbreaks the build here. Obtained from: p4 //depot/user/jhb/lock/compat/freebsd32/freebsd32_signal.h#2 Modified: head/sys/compat/freebsd32/freebsd32_signal.h Modified: head/sys/compat/freebsd32/freebsd32_signal.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_signal.h Thu Dec 11 00:46:07 2008 (r185897) +++ head/sys/compat/freebsd32/freebsd32_signal.h Thu Dec 11 00:58:05 2008 (r185898) @@ -36,6 +36,9 @@ struct sigaltstack32 { }; union sigval32 { + int sival_int; + u_int32_t sival_ptr; + /* 6.0 compatibility */ int sigval_int; u_int32_t sigval_ptr; }; @@ -70,6 +73,29 @@ struct siginfo32 { } _reason; }; +struct osigevent32 { + int sigev_notify; /* Notification type */ + union { + int __sigev_signo; /* Signal number */ + int __sigev_notify_kqueue; + } __sigev_u; + union sigval32 sigev_value; /* Signal value */ +}; + +struct sigevent32 { + int sigev_notify; /* Notification type */ + int sigev_signo; /* Signal number */ + union sigval32 sigev_value; /* Signal value */ + union { + __lwpid_t _threadid; + struct { + uint32_t _function; + uint32_t _attribute; + } _sigev_thread; + uint32_t __spare__[8]; + } _sigev_un; +}; + void siginfo_to_siginfo32(siginfo_t *src, struct siginfo32 *dst); #endif /* !_COMPAT_FREEBSD32_SIGNAL_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 01:04:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE3F11065670; Thu, 11 Dec 2008 01:04:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 996D48FC1E; Thu, 11 Dec 2008 01:04:26 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB14Q1C048265; Thu, 11 Dec 2008 01:04:26 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB14Qp0048262; Thu, 11 Dec 2008 01:04:26 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812110104.mBB14Qp0048262@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 01:04:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185899 - in head: sys/kern usr.sbin/jexec usr.sbin/jls X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 01:04:26 -0000 Author: bz Date: Thu Dec 11 01:04:25 2008 New Revision: 185899 URL: http://svn.freebsd.org/changeset/base/185899 Log: Correctly check the number of prison states to not access anything outside the prison_states array. When checking if there is a name configured for the prison, check the first character to not be '\0' instead of checking if the char array is present, which it always is. Note, that this is different for the *jailname in the syscall. Found with: Coverity Prevent(tm) CID: 4156, 4155 MFC after: 4 weeks (just that I get the mail) Modified: head/sys/kern/kern_jail.c head/usr.sbin/jexec/jexec.c head/usr.sbin/jls/jls.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Thu Dec 11 00:58:05 2008 (r185898) +++ head/sys/kern/kern_jail.c Thu Dec 11 01:04:25 2008 (r185899) @@ -1574,13 +1574,13 @@ DB_SHOW_COMMAND(jails, db_show_jails) pr->pr_ip4s, pr->pr_ip6s); db_printf("%6s %-29.29s %.74s\n", "", pr->pr_host, pr->pr_path); - if (pr->pr_state < 0 || pr->pr_state > (int)((sizeof( + if (pr->pr_state < 0 || pr->pr_state >= (int)((sizeof( prison_states) / sizeof(struct prison_state)))) state = "(bogus)"; else state = prison_states[pr->pr_state].state_name; db_printf("%6s %-29.29s %.74s\n", - "", (pr->pr_name != NULL) ? pr->pr_name : "", state); + "", (pr->pr_name[0] != '\0') ? pr->pr_name : "", state); db_printf("%6s %-6d\n", "", pr->pr_cpuset->cs_id); #ifdef INET Modified: head/usr.sbin/jexec/jexec.c ============================================================================== --- head/usr.sbin/jexec/jexec.c Thu Dec 11 00:58:05 2008 (r185898) +++ head/usr.sbin/jexec/jexec.c Thu Dec 11 01:04:25 2008 (r185899) @@ -80,13 +80,13 @@ char *lookup_xprison_v3(void *p, char *e ok = 1; /* Jail state and name. */ - if (xp->pr_state < 0 || xp->pr_state > + if (xp->pr_state < 0 || xp->pr_state >= (int)((sizeof(prison_states) / sizeof(struct prison_state)))) errx(1, "Invalid jail state."); else if (xp->pr_state != PRISON_STATE_ALIVE) ok = 0; if (jailname != NULL) { - if (xp->pr_name == NULL) + if (xp->pr_name[0] == '\0') ok = 0; else if (strcmp(jailname, xp->pr_name) != 0) ok = 0; Modified: head/usr.sbin/jls/jls.c ============================================================================== --- head/usr.sbin/jls/jls.c Thu Dec 11 00:58:05 2008 (r185898) +++ head/usr.sbin/jls/jls.c Thu Dec 11 01:04:25 2008 (r185899) @@ -86,7 +86,7 @@ char *print_xprison_v3(void *p, char *en errx(1, "Invalid length for jail"); xp = (struct xprison *)p; - if (xp->pr_state < 0 || xp->pr_state > (int) + if (xp->pr_state < 0 || xp->pr_state >= (int) ((sizeof(prison_states) / sizeof(struct prison_state)))) state = "(bogus)"; else @@ -110,7 +110,7 @@ char *print_xprison_v3(void *p, char *en /* Jail state and name. */ if (flags & FLAG_V) printf("%6s %-29.29s %.74s\n", - "", (xp->pr_name != NULL) ? xp->pr_name : "", state); + "", (xp->pr_name[0] != '\0') ? xp->pr_name : "", state); /* cpusetid. */ if (flags & FLAG_V) From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 01:26:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DB9C1065670; Thu, 11 Dec 2008 01:26:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 896498FC12; Thu, 11 Dec 2008 01:26:18 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB1QIuv048694; Thu, 11 Dec 2008 01:26:18 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB1QISC048692; Thu, 11 Dec 2008 01:26:18 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812110126.mBB1QISC048692@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Dec 2008 01:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185900 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 01:26:18 -0000 Author: yongari Date: Thu Dec 11 01:26:18 2008 New Revision: 185900 URL: http://svn.freebsd.org/changeset/base/185900 Log: Newer RealTek controllers requires setting stop request bit to terminate active Tx/Rx operation. Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Dec 11 01:04:25 2008 (r185899) +++ head/sys/dev/re/if_re.c Thu Dec 11 01:26:18 2008 (r185900) @@ -1244,7 +1244,7 @@ re_attach(device_t dev) case RL_HWREV_8102EL: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | - RL_FLAG_MACSTAT | RL_FLAG_FASTETHER; + RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP; break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: @@ -1257,7 +1257,8 @@ re_attach(device_t dev) case RL_HWREV_8168CP: case RL_HWREV_8168D: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | - RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT; + RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | + RL_FLAG_CMDSTOP; /* * These controllers support jumbo frame but it seems * that enabling it requires touching additional magic @@ -2868,7 +2869,12 @@ re_stop(struct rl_softc *sc) callout_stop(&sc->rl_stat_callout); ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); - CSR_WRITE_1(sc, RL_COMMAND, 0x00); + if ((sc->rl_flags & RL_FLAG_CMDSTOP) != 0) + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_STOPREQ | RL_CMD_TX_ENB | + RL_CMD_RX_ENB); + else + CSR_WRITE_1(sc, RL_COMMAND, 0x00); + DELAY(1000); CSR_WRITE_2(sc, RL_IMR, 0x0000); CSR_WRITE_2(sc, RL_ISR, 0xFFFF); Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Thu Dec 11 01:04:25 2008 (r185899) +++ head/sys/pci/if_rlreg.h Thu Dec 11 01:26:18 2008 (r185900) @@ -308,6 +308,7 @@ #define RL_CMD_TX_ENB 0x0004 #define RL_CMD_RX_ENB 0x0008 #define RL_CMD_RESET 0x0010 +#define RL_CMD_STOPREQ 0x0080 /* * Twister register values. These are completely undocumented and derived @@ -883,6 +884,7 @@ struct rl_softc { #define RL_FLAG_DESCV2 0x0040 #define RL_FLAG_MACSTAT 0x0080 #define RL_FLAG_FASTETHER 0x0100 +#define RL_FLAG_CMDSTOP 0x0200 #define RL_FLAG_LINK 0x8000 }; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 01:41:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9A151065673; Thu, 11 Dec 2008 01:41:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 958F58FC1A; Thu, 11 Dec 2008 01:41:38 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB1fcEK048994; Thu, 11 Dec 2008 01:41:38 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB1fc5K048992; Thu, 11 Dec 2008 01:41:38 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812110141.mBB1fc5K048992@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Dec 2008 01:41:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185901 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 01:41:38 -0000 Author: yongari Date: Thu Dec 11 01:41:38 2008 New Revision: 185901 URL: http://svn.freebsd.org/changeset/base/185901 Log: Don't access undocumented register 0x82 on controllers that have no such register. While here clear undocumented PHY register 0x0B for RTL8110S. Obtained from: RealTek FreeBSD driver Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Dec 11 01:26:18 2008 (r185900) +++ head/sys/dev/re/if_re.c Thu Dec 11 01:41:38 2008 (r185901) @@ -700,7 +700,12 @@ re_reset(struct rl_softc *sc) if (i == RL_TIMEOUT) device_printf(sc->rl_dev, "reset never completed!\n"); - CSR_WRITE_1(sc, 0x82, 1); + if ((sc->rl_flags & RL_FLAG_PHY8169) != 0) + CSR_WRITE_1(sc, 0x82, 1); + if ((sc->rl_flags & RL_FLAG_PHY8110S) != 0) { + CSR_WRITE_1(sc, 0x82, 1); + re_gmii_writereg(sc->rl_dev, 1, 0x0B, 0); + } } #ifdef RE_DIAG @@ -1235,6 +1240,9 @@ re_attach(device_t dev) case RL_HWREV_8139CPLUS: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_FASTETHER; break; + case RL_HWREV_8110S: + sc->rl_flags |= RL_FLAG_PHY8110S; + break; case RL_HWREV_8100E: case RL_HWREV_8101E: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_INVMAR | @@ -1271,10 +1279,14 @@ re_attach(device_t dev) */ sc->rl_flags |= RL_FLAG_NOJUMBO; break; + case RL_HWREV_8169: + case RL_HWREV_8169S: + sc->rl_flags |= RL_FLAG_PHY8169; + break; case RL_HWREV_8169_8110SB: case RL_HWREV_8169_8110SC: case RL_HWREV_8169_8110SBL: - sc->rl_flags |= RL_FLAG_PHYWAKE; + sc->rl_flags |= RL_FLAG_PHYWAKE | RL_FLAG_PHY8169; break; default: break; Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Thu Dec 11 01:26:18 2008 (r185900) +++ head/sys/pci/if_rlreg.h Thu Dec 11 01:41:38 2008 (r185901) @@ -885,6 +885,8 @@ struct rl_softc { #define RL_FLAG_MACSTAT 0x0080 #define RL_FLAG_FASTETHER 0x0100 #define RL_FLAG_CMDSTOP 0x0200 +#define RL_FLAG_PHY8169 0x0400 +#define RL_FLAG_PHY8110S 0x0800 #define RL_FLAG_LINK 0x8000 }; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 02:23:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B6E21065676; Thu, 11 Dec 2008 02:23:49 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 780188FC1C; Thu, 11 Dec 2008 02:23:49 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB2NnVj049844; Thu, 11 Dec 2008 02:23:49 GMT (envelope-from ps@svn.freebsd.org) Received: (from ps@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB2NnjW049843; Thu, 11 Dec 2008 02:23:49 GMT (envelope-from ps@svn.freebsd.org) Message-Id: <200812110223.mBB2NnjW049843@svn.freebsd.org> From: Paul Saab Date: Thu, 11 Dec 2008 02:23:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185902 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 02:23:49 -0000 Author: ps Date: Thu Dec 11 02:23:49 2008 New Revision: 185902 URL: http://svn.freebsd.org/changeset/base/185902 Log: Avoid a double free in devopen by not freeing the device structure in zfs_dev_open. This stops a panic in the loader when trying to read from a zfs device and no zfs devices exist. Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Thu Dec 11 01:41:38 2008 (r185901) +++ head/sys/boot/zfs/zfs.c Thu Dec 11 02:23:49 2008 (r185902) @@ -474,7 +474,6 @@ zfs_dev_open(struct open_file *f, ...) * the pool. */ unit = dev->d_unit; - free(dev); i = 0; STAILQ_FOREACH(spa, &zfs_pools, spa_link) { From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 02:24:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B42C1065749; Thu, 11 Dec 2008 02:24:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 275DD8FC12; Thu, 11 Dec 2008 02:24:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB2OBi9049892; Thu, 11 Dec 2008 02:24:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB2OBns049890; Thu, 11 Dec 2008 02:24:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812110224.mBB2OBns049890@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 11 Dec 2008 02:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185903 - in head/sys: dev/re pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 02:24:12 -0000 Author: yongari Date: Thu Dec 11 02:24:11 2008 New Revision: 185903 URL: http://svn.freebsd.org/changeset/base/185903 Log: Make WOL work on RTL8168B. This controller seems to require explicit command to enable Rx MAC prior to entering D3. Tested by: Cyrus Rahman gmail DOT com> Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Dec 11 02:23:49 2008 (r185902) +++ head/sys/dev/re/if_re.c Thu Dec 11 02:24:11 2008 (r185903) @@ -1256,6 +1256,8 @@ re_attach(device_t dev) break; case RL_HWREV_8168_SPIN1: case RL_HWREV_8168_SPIN2: + sc->rl_flags |= RL_FLAG_WOLRXENB; + /* FALLTHROUGH */ case RL_HWREV_8168_SPIN3: sc->rl_flags |= RL_FLAG_INVMAR | RL_FLAG_PHYWAKE | RL_FLAG_MACSTAT; @@ -3016,6 +3018,9 @@ re_setwol(struct rl_softc *sc) return; ifp = sc->rl_ifp; + if ((ifp->if_capenable & IFCAP_WOL) != 0 && + (sc->rl_flags & RL_FLAG_WOLRXENB) != 0) + CSR_WRITE_1(sc, RL_COMMAND, RL_CMD_RX_ENB); /* Enable config register write. */ CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Thu Dec 11 02:23:49 2008 (r185902) +++ head/sys/pci/if_rlreg.h Thu Dec 11 02:24:11 2008 (r185903) @@ -887,6 +887,7 @@ struct rl_softc { #define RL_FLAG_CMDSTOP 0x0200 #define RL_FLAG_PHY8169 0x0400 #define RL_FLAG_PHY8110S 0x0800 +#define RL_FLAG_WOLRXENB 0x1000 #define RL_FLAG_LINK 0x8000 }; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 02:39:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA0E106564A; Thu, 11 Dec 2008 02:39:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AADE8FC1A; Thu, 11 Dec 2008 02:39:28 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB2dSkL050590; Thu, 11 Dec 2008 02:39:28 GMT (envelope-from das@svn.freebsd.org) Received: (from das@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB2dSnv050588; Thu, 11 Dec 2008 02:39:28 GMT (envelope-from das@svn.freebsd.org) Message-Id: <200812110239.mBB2dSnv050588@svn.freebsd.org> From: David Schultz Date: Thu, 11 Dec 2008 02:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185904 - head/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 02:39:28 -0000 Author: das Date: Thu Dec 11 02:39:27 2008 New Revision: 185904 URL: http://svn.freebsd.org/changeset/base/185904 Log: Consolidate some variable initializations. No substantive change. Modified: head/lib/libc/stdio/vfprintf.c head/lib/libc/stdio/vfwprintf.c Modified: head/lib/libc/stdio/vfprintf.c ============================================================================== --- head/lib/libc/stdio/vfprintf.c Thu Dec 11 02:24:11 2008 (r185903) +++ head/lib/libc/stdio/vfprintf.c Thu Dec 11 02:39:27 2008 (r185904) @@ -567,13 +567,6 @@ __vfprintf(FILE *fp, const char *fmt0, v if (__use_xprintf > 0) return (__xvprintf(fp, fmt0, ap)); - thousands_sep = '\0'; - grouping = NULL; - convbuf = NULL; -#ifndef NO_FLOATING_POINT - dtoaresult = NULL; - decimal_point = localeconv()->decimal_point; -#endif /* sorry, fprintf(read_only_file, "") returns EOF, not 0 */ if (prepwrite(fp) != 0) return (EOF); @@ -583,6 +576,9 @@ __vfprintf(FILE *fp, const char *fmt0, v fp->_file >= 0) return (__sbprintf(fp, fmt0, ap)); + thousands_sep = '\0'; + grouping = NULL; + convbuf = NULL; fmt = (char *)fmt0; argtable = NULL; nextarg = 1; @@ -591,6 +587,10 @@ __vfprintf(FILE *fp, const char *fmt0, v uio.uio_resid = 0; uio.uio_iovcnt = 0; ret = 0; +#ifndef NO_FLOATING_POINT + dtoaresult = NULL; + decimal_point = localeconv()->decimal_point; +#endif /* * Scan the format for conversions (`%' character). Modified: head/lib/libc/stdio/vfwprintf.c ============================================================================== --- head/lib/libc/stdio/vfwprintf.c Thu Dec 11 02:24:11 2008 (r185903) +++ head/lib/libc/stdio/vfwprintf.c Thu Dec 11 02:39:27 2008 (r185904) @@ -575,12 +575,6 @@ __vfwprintf(FILE *fp, const wchar_t *fmt } - thousands_sep = '\0'; - grouping = NULL; -#ifndef NO_FLOATING_POINT - decimal_point = localeconv()->decimal_point; -#endif - convbuf = NULL; /* sorry, fwprintf(read_only_file, L"") returns WEOF, not 0 */ if (prepwrite(fp) != 0) return (EOF); @@ -590,11 +584,17 @@ __vfwprintf(FILE *fp, const wchar_t *fmt fp->_file >= 0) return (__sbprintf(fp, fmt0, ap)); + thousands_sep = '\0'; + grouping = NULL; + convbuf = NULL; fmt = (wchar_t *)fmt0; argtable = NULL; nextarg = 1; va_copy(orgap, ap); ret = 0; +#ifndef NO_FLOATING_POINT + decimal_point = localeconv()->decimal_point; +#endif /* * Scan the format for conversions (`%' character). From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 04:03:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEAF5106564A; Thu, 11 Dec 2008 04:03:13 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD9358FC0C; Thu, 11 Dec 2008 04:03:13 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB43D2Y053536; Thu, 11 Dec 2008 04:03:13 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB43D1J053535; Thu, 11 Dec 2008 04:03:13 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812110403.mBB43D1J053535@svn.freebsd.org> From: Sam Leffler Date: Thu, 11 Dec 2008 04:03:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185906 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 04:03:14 -0000 Author: sam Date: Thu Dec 11 04:03:13 2008 New Revision: 185906 URL: http://svn.freebsd.org/changeset/base/185906 Log: add missing break Coverity ID: 4151 Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Thu Dec 11 02:47:41 2008 (r185905) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Thu Dec 11 04:03:13 2008 (r185906) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v14.c,v 1.4 2008/11/10 19:04:26 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -54,6 +54,7 @@ v14EepromGet(struct ath_hal *ah, int par __func__, ath_hal_ether_sprintf(macaddr)); return HAL_EEBADMAC; } + return HAL_OK; case AR_EEP_REGDMN_0: return pBase->regDmn[0]; case AR_EEP_REGDMN_1: From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 04:03:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EBEB106567A; Thu, 11 Dec 2008 04:03:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB7B8FC1E; Thu, 11 Dec 2008 04:03:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB43pIR053585; Thu, 11 Dec 2008 04:03:51 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB43p2N053584; Thu, 11 Dec 2008 04:03:51 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812110403.mBB43p2N053584@svn.freebsd.org> From: Sam Leffler Date: Thu, 11 Dec 2008 04:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185907 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 04:03:51 -0000 Author: sam Date: Thu Dec 11 04:03:50 2008 New Revision: 185907 URL: http://svn.freebsd.org/changeset/base/185907 Log: add missing break Coverity ID: 4159 Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 11 04:03:13 2008 (r185906) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 11 04:03:50 2008 (r185907) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5212_misc.c,v 1.12 2008/11/27 22:30:00 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -803,6 +803,7 @@ ar5212GetCapability(struct ath_hal *ah, return (ahp->ah_staId1Defaults & AR_STA_ID1_CRPT_MIC_ENABLE) ? HAL_OK : HAL_ENXIO; } + return HAL_EINVAL; case HAL_CAP_TKIP_SPLIT: /* hardware TKIP uses split keys */ switch (capability) { case 0: /* hardware capability */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 05:56:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F18721065673; Thu, 11 Dec 2008 05:56:25 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF7928FC14; Thu, 11 Dec 2008 05:56:25 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB5uPUd055724; Thu, 11 Dec 2008 05:56:25 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB5uPvG055720; Thu, 11 Dec 2008 05:56:25 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812110556.mBB5uPvG055720@svn.freebsd.org> From: Tim Kientzle Date: Thu, 11 Dec 2008 05:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185908 - in releng/7.1/usr.bin/tar: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 05:56:26 -0000 Author: kientzle Date: Thu Dec 11 05:56:25 2008 New Revision: 185908 URL: http://svn.freebsd.org/changeset/base/185908 Log: MFC r183009, r184807, r184808: Fix --strip-components, plus a handful of test suite improvements. PR: bin/128562 Submitted by: Jaakko Heinonen Approved by: re Added: releng/7.1/usr.bin/tar/test/test_strip_components.c - copied, changed from r184807, head/usr.bin/tar/test/test_strip_components.c releng/7.1/usr.bin/tar/test/test_symlink_dir.c - copied unchanged from r183009, head/usr.bin/tar/test/test_symlink_dir.c Modified: releng/7.1/usr.bin/tar/ (props changed) releng/7.1/usr.bin/tar/test/Makefile releng/7.1/usr.bin/tar/util.c Modified: releng/7.1/usr.bin/tar/test/Makefile ============================================================================== --- releng/7.1/usr.bin/tar/test/Makefile Thu Dec 11 04:03:50 2008 (r185907) +++ releng/7.1/usr.bin/tar/test/Makefile Thu Dec 11 05:56:25 2008 (r185908) @@ -18,6 +18,8 @@ TESTS= \ test_option_q.c \ test_patterns.c \ test_stdio.c \ + test_strip_components.c \ + test_symlink_dir.c \ test_version.c # Build the test program Copied and modified: releng/7.1/usr.bin/tar/test/test_strip_components.c (from r184807, head/usr.bin/tar/test/test_strip_components.c) ============================================================================== --- head/usr.bin/tar/test/test_strip_components.c Mon Nov 10 05:04:55 2008 (r184807, copy source) +++ releng/7.1/usr.bin/tar/test/test_strip_components.c Thu Dec 11 05:56:25 2008 (r185908) @@ -63,15 +63,44 @@ DEFINE_TEST(test_strip_components) assertEqualInt(-1, lstat("target/d0", &st)); failure("d0/d1/ is too short and should not get restored"); assertEqualInt(-1, lstat("target/d1", &st)); - failure("d0/l1 is too short and should not get restored"); - assertEqualInt(-1, lstat("target/l1", &st)); - failure("d0/d1/l2 is a hardlink to file whose name was too short"); - assertEqualInt(-1, lstat("target/l2", &st)); - assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/s2 is a symlink to something that won't be extracted"); assertEqualInt(-1, stat("target/s2", &st)); + assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/d2 should be extracted"); assertEqualInt(0, lstat("target/d2", &st)); + + /* + * This next is a complicated case. d0/l1, d0/d1/l2, and + * d0/d1/d2/f1 are all hardlinks to the same file; d0/l1 can't + * be extracted with --strip-components=2 and the other two + * can. Remember that tar normally stores the first file with + * a body and the other as hardlink entries to the first + * appearance. So the final result depends on the order in + * which these three names get archived. If d0/l1 is first, + * none of the three can be restored. If either of the longer + * names are first, then the two longer ones can both be + * restored. + * + * The tree-walking code used by bsdtar always visits files + * before subdirectories, so bsdtar's behavior is fortunately + * deterministic: d0/l1 will always get stored first and the + * other two will be stored as hardlinks to d0/l1. Since + * d0/l1 can't be extracted, none of these three will be + * extracted. + * + * It may be worth extending this test to force a particular + * archiving order so as to exercise both of the cases described + * above. + * + * Of course, this is all totally different for cpio and newc + * formats because the hardlink management is different. + * TODO: Rename this to test_strip_components_tar and create + * parallel tests for cpio and newc formats. + */ + failure("d0/l1 is too short and should not get restored"); + assertEqualInt(-1, lstat("target/l1", &st)); + failure("d0/d1/l2 is a hardlink to file whose name was too short"); + assertEqualInt(-1, lstat("target/l2", &st)); failure("d0/d1/d2/f1 is a hardlink to file whose name was too short"); assertEqualInt(-1, lstat("target/d2/f1", &st)); } Copied: releng/7.1/usr.bin/tar/test/test_symlink_dir.c (from r183009, head/usr.bin/tar/test/test_symlink_dir.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ releng/7.1/usr.bin/tar/test/test_symlink_dir.c Thu Dec 11 05:56:25 2008 (r185908, copy of r183009, head/usr.bin/tar/test/test_symlink_dir.c) @@ -0,0 +1,172 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +/* + * tar -x -P should follow existing symlinks for dirs, but not other + * content. Plain tar -x should remove symlinks when they're in the + * way of a dir extraction. + */ + +static int +mkfile(const char *name, int mode, const char *contents, ssize_t size) +{ + int fd = open(name, O_CREAT | O_WRONLY, mode); + if (fd < 0) + return (-1); + if (size != write(fd, contents, size)) { + close(fd); + return (-1); + } + close(fd); + return (0); +} + +DEFINE_TEST(test_symlink_dir) +{ + struct stat st, st2; + int oldumask; + + oldumask = umask(0); + + assertEqualInt(0, mkdir("source", 0755)); + assertEqualInt(0, mkfile("source/file", 0755, "a", 1)); + assertEqualInt(0, mkfile("source/file2", 0755, "ab", 2)); + assertEqualInt(0, mkdir("source/dir", 0755)); + assertEqualInt(0, mkdir("source/dir/d", 0755)); + assertEqualInt(0, mkfile("source/dir/f", 0755, "abc", 3)); + assertEqualInt(0, mkdir("source/dir2", 0755)); + assertEqualInt(0, mkdir("source/dir2/d2", 0755)); + assertEqualInt(0, mkfile("source/dir2/f2", 0755, "abcd", 4)); + assertEqualInt(0, mkdir("source/dir3", 0755)); + assertEqualInt(0, mkdir("source/dir3/d3", 0755)); + assertEqualInt(0, mkfile("source/dir3/f3", 0755, "abcde", 5)); + + assertEqualInt(0, + systemf("%s -cf test.tar -C source dir dir2 dir3 file file2", + testprog)); + + /* + * Extract with -x and without -P. + */ + assertEqualInt(0, mkdir("dest1", 0755)); + /* "dir" is a symlink to an existing "real_dir" */ + assertEqualInt(0, mkdir("dest1/real_dir", 0755)); + assertEqualInt(0, symlink("real_dir", "dest1/dir")); + /* "dir2" is a symlink to a non-existing "real_dir2" */ + assertEqualInt(0, symlink("real_dir2", "dest1/dir2")); + /* "dir3" is a symlink to an existing "non_dir3" */ + assertEqualInt(0, mkfile("dest1/non_dir3", 0755, "abcdef", 6)); + assertEqualInt(0, symlink("non_dir3", "dest1/dir3")); + /* "file" is a symlink to existing "real_file" */ + assertEqualInt(0, mkfile("dest1/real_file", 0755, "abcdefg", 7)); + assertEqualInt(0, symlink("real_file", "dest1/file")); + /* "file2" is a symlink to non-existing "real_file2" */ + assertEqualInt(0, symlink("real_file2", "dest1/file2")); + + assertEqualInt(0, systemf("%s -xf test.tar -C dest1", testprog)); + + /* dest1/dir symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir", &st)); + failure("symlink to dir was followed when it shouldn't be"); + assert(S_ISDIR(st.st_mode)); + /* dest1/dir2 symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir2", &st)); + failure("Broken symlink wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest1/dir3 symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir3", &st)); + failure("Symlink to non-dir wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest1/file symlink should be removed */ + assertEqualInt(0, lstat("dest1/file", &st)); + failure("Symlink to existing file should be removed"); + assert(S_ISREG(st.st_mode)); + /* dest1/file2 symlink should be removed */ + assertEqualInt(0, lstat("dest1/file2", &st)); + failure("Symlink to non-existing file should be removed"); + assert(S_ISREG(st.st_mode)); + + /* + * Extract with both -x and -P + */ + assertEqualInt(0, mkdir("dest2", 0755)); + /* "dir" is a symlink to existing "real_dir" */ + assertEqualInt(0, mkdir("dest2/real_dir", 0755)); + assertEqualInt(0, symlink("real_dir", "dest2/dir")); + /* "dir2" is a symlink to a non-existing "real_dir2" */ + assertEqualInt(0, symlink("real_dir2", "dest2/dir2")); + /* "dir3" is a symlink to an existing "non_dir3" */ + assertEqualInt(0, mkfile("dest2/non_dir3", 0755, "abcdefgh", 8)); + assertEqualInt(0, symlink("non_dir3", "dest2/dir3")); + /* "file" is a symlink to existing "real_file" */ + assertEqualInt(0, mkfile("dest2/real_file", 0755, "abcdefghi", 9)); + assertEqualInt(0, symlink("real_file", "dest2/file")); + /* "file2" is a symlink to non-existing "real_file2" */ + assertEqualInt(0, symlink("real_file2", "dest2/file2")); + + assertEqualInt(0, systemf("%s -xPf test.tar -C dest2", testprog)); + + /* dest2/dir symlink should be followed */ + assertEqualInt(0, lstat("dest2/dir", &st)); + failure("tar -xP removed symlink instead of following it"); + if (assert(S_ISLNK(st.st_mode))) { + /* Only verify what the symlink points to if it + * really is a symlink. */ + failure("The symlink should point to a directory"); + assertEqualInt(0, stat("dest2/dir", &st)); + assert(S_ISDIR(st.st_mode)); + failure("The pre-existing directory should still be there"); + assertEqualInt(0, lstat("dest2/real_dir", &st2)); + assert(S_ISDIR(st2.st_mode)); + assertEqualInt(st.st_dev, st2.st_dev); + failure("symlink should still point to the existing directory"); + assertEqualInt(st.st_ino, st2.st_ino); + } + /* Contents of 'dir' should be restored */ + assertEqualInt(0, lstat("dest2/dir/d", &st)); + assert(S_ISDIR(st.st_mode)); + assertEqualInt(0, lstat("dest2/dir/f", &st)); + assert(S_ISREG(st.st_mode)); + assertEqualInt(3, st.st_size); + /* dest2/dir2 symlink should be removed */ + assertEqualInt(0, lstat("dest2/dir2", &st)); + failure("Broken symlink wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest2/dir3 symlink should be removed */ + assertEqualInt(0, lstat("dest2/dir3", &st)); + failure("Symlink to non-dir wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest2/file symlink should be removed; + * even -P shouldn't follow symlinks for files */ + assertEqualInt(0, lstat("dest2/file", &st)); + failure("Symlink to existing file should be removed"); + assert(S_ISREG(st.st_mode)); + /* dest2/file2 symlink should be removed */ + assertEqualInt(0, lstat("dest2/file2", &st)); + failure("Symlink to non-existing file should be removed"); + assert(S_ISREG(st.st_mode)); +} Modified: releng/7.1/usr.bin/tar/util.c ============================================================================== --- releng/7.1/usr.bin/tar/util.c Thu Dec 11 04:03:50 2008 (r185907) +++ releng/7.1/usr.bin/tar/util.c Thu Dec 11 05:56:25 2008 (r185908) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); static void bsdtar_vwarnc(struct bsdtar *, int code, const char *fmt, va_list ap); +static const char *strip_components(const char *path, int elements); /* * Print a string, taking care with any non-printable characters. @@ -346,6 +347,31 @@ do_chdir(struct bsdtar *bsdtar) bsdtar->pending_chdir = NULL; } +const char * +strip_components(const char *path, int elements) +{ + const char *p = path; + + while (elements > 0) { + switch (*p++) { + case '/': + elements--; + path = p; + break; + case '\0': + /* Path is too short, skip it. */ + return (NULL); + } + } + + while (*path == '/') + ++path; + if (*path == '\0') + return (NULL); + + return (path); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -402,24 +428,20 @@ edit_pathname(struct bsdtar *bsdtar, str #endif /* Strip leading dir names as per --strip-components option. */ - if ((r = bsdtar->strip_components) > 0) { - const char *p = name; + if (bsdtar->strip_components > 0) { + const char *linkname = archive_entry_hardlink(entry); + + name = strip_components(name, bsdtar->strip_components); + if (name == NULL) + return (1); - while (r > 0) { - switch (*p++) { - case '/': - r--; - name = p; - break; - case '\0': - /* Path is too short, skip it. */ + if (linkname != NULL) { + linkname = strip_components(linkname, + bsdtar->strip_components); + if (linkname == NULL) return (1); - } + archive_entry_copy_hardlink(entry, linkname); } - while (*name == '/') - ++name; - if (*name == '\0') - return (1); } /* Strip redundant leading '/' characters. */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 05:56:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 265C71065670; Thu, 11 Dec 2008 05:56:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13BE18FC1D; Thu, 11 Dec 2008 05:56:48 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB5ulvG055768; Thu, 11 Dec 2008 05:56:47 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB5ulMx055764; Thu, 11 Dec 2008 05:56:47 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200812110556.mBB5ulMx055764@svn.freebsd.org> From: Tim Kientzle Date: Thu, 11 Dec 2008 05:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185909 - in stable/7/usr.bin/tar: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 05:56:48 -0000 Author: kientzle Date: Thu Dec 11 05:56:47 2008 New Revision: 185909 URL: http://svn.freebsd.org/changeset/base/185909 Log: MFC r183009, r184807, r184808: Fix --strip-components, plus a handful of test suite improvements. PR: bin/128562 Submitted by: Jaakko Heinonen Approved by: re Added: stable/7/usr.bin/tar/test/test_strip_components.c - copied, changed from r184807, head/usr.bin/tar/test/test_strip_components.c stable/7/usr.bin/tar/test/test_symlink_dir.c - copied unchanged from r183009, head/usr.bin/tar/test/test_symlink_dir.c Modified: stable/7/usr.bin/tar/ (props changed) stable/7/usr.bin/tar/test/Makefile stable/7/usr.bin/tar/util.c Modified: stable/7/usr.bin/tar/test/Makefile ============================================================================== --- stable/7/usr.bin/tar/test/Makefile Thu Dec 11 05:56:25 2008 (r185908) +++ stable/7/usr.bin/tar/test/Makefile Thu Dec 11 05:56:47 2008 (r185909) @@ -18,6 +18,8 @@ TESTS= \ test_option_q.c \ test_patterns.c \ test_stdio.c \ + test_strip_components.c \ + test_symlink_dir.c \ test_version.c # Build the test program Copied and modified: stable/7/usr.bin/tar/test/test_strip_components.c (from r184807, head/usr.bin/tar/test/test_strip_components.c) ============================================================================== --- head/usr.bin/tar/test/test_strip_components.c Mon Nov 10 05:04:55 2008 (r184807, copy source) +++ stable/7/usr.bin/tar/test/test_strip_components.c Thu Dec 11 05:56:47 2008 (r185909) @@ -63,15 +63,44 @@ DEFINE_TEST(test_strip_components) assertEqualInt(-1, lstat("target/d0", &st)); failure("d0/d1/ is too short and should not get restored"); assertEqualInt(-1, lstat("target/d1", &st)); - failure("d0/l1 is too short and should not get restored"); - assertEqualInt(-1, lstat("target/l1", &st)); - failure("d0/d1/l2 is a hardlink to file whose name was too short"); - assertEqualInt(-1, lstat("target/l2", &st)); - assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/s2 is a symlink to something that won't be extracted"); assertEqualInt(-1, stat("target/s2", &st)); + assertEqualInt(0, lstat("target/s2", &st)); failure("d0/d1/d2 should be extracted"); assertEqualInt(0, lstat("target/d2", &st)); + + /* + * This next is a complicated case. d0/l1, d0/d1/l2, and + * d0/d1/d2/f1 are all hardlinks to the same file; d0/l1 can't + * be extracted with --strip-components=2 and the other two + * can. Remember that tar normally stores the first file with + * a body and the other as hardlink entries to the first + * appearance. So the final result depends on the order in + * which these three names get archived. If d0/l1 is first, + * none of the three can be restored. If either of the longer + * names are first, then the two longer ones can both be + * restored. + * + * The tree-walking code used by bsdtar always visits files + * before subdirectories, so bsdtar's behavior is fortunately + * deterministic: d0/l1 will always get stored first and the + * other two will be stored as hardlinks to d0/l1. Since + * d0/l1 can't be extracted, none of these three will be + * extracted. + * + * It may be worth extending this test to force a particular + * archiving order so as to exercise both of the cases described + * above. + * + * Of course, this is all totally different for cpio and newc + * formats because the hardlink management is different. + * TODO: Rename this to test_strip_components_tar and create + * parallel tests for cpio and newc formats. + */ + failure("d0/l1 is too short and should not get restored"); + assertEqualInt(-1, lstat("target/l1", &st)); + failure("d0/d1/l2 is a hardlink to file whose name was too short"); + assertEqualInt(-1, lstat("target/l2", &st)); failure("d0/d1/d2/f1 is a hardlink to file whose name was too short"); assertEqualInt(-1, lstat("target/d2/f1", &st)); } Copied: stable/7/usr.bin/tar/test/test_symlink_dir.c (from r183009, head/usr.bin/tar/test/test_symlink_dir.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/7/usr.bin/tar/test/test_symlink_dir.c Thu Dec 11 05:56:47 2008 (r185909, copy of r183009, head/usr.bin/tar/test/test_symlink_dir.c) @@ -0,0 +1,172 @@ +/*- + * Copyright (c) 2003-2007 Tim Kientzle + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include "test.h" +__FBSDID("$FreeBSD$"); + +/* + * tar -x -P should follow existing symlinks for dirs, but not other + * content. Plain tar -x should remove symlinks when they're in the + * way of a dir extraction. + */ + +static int +mkfile(const char *name, int mode, const char *contents, ssize_t size) +{ + int fd = open(name, O_CREAT | O_WRONLY, mode); + if (fd < 0) + return (-1); + if (size != write(fd, contents, size)) { + close(fd); + return (-1); + } + close(fd); + return (0); +} + +DEFINE_TEST(test_symlink_dir) +{ + struct stat st, st2; + int oldumask; + + oldumask = umask(0); + + assertEqualInt(0, mkdir("source", 0755)); + assertEqualInt(0, mkfile("source/file", 0755, "a", 1)); + assertEqualInt(0, mkfile("source/file2", 0755, "ab", 2)); + assertEqualInt(0, mkdir("source/dir", 0755)); + assertEqualInt(0, mkdir("source/dir/d", 0755)); + assertEqualInt(0, mkfile("source/dir/f", 0755, "abc", 3)); + assertEqualInt(0, mkdir("source/dir2", 0755)); + assertEqualInt(0, mkdir("source/dir2/d2", 0755)); + assertEqualInt(0, mkfile("source/dir2/f2", 0755, "abcd", 4)); + assertEqualInt(0, mkdir("source/dir3", 0755)); + assertEqualInt(0, mkdir("source/dir3/d3", 0755)); + assertEqualInt(0, mkfile("source/dir3/f3", 0755, "abcde", 5)); + + assertEqualInt(0, + systemf("%s -cf test.tar -C source dir dir2 dir3 file file2", + testprog)); + + /* + * Extract with -x and without -P. + */ + assertEqualInt(0, mkdir("dest1", 0755)); + /* "dir" is a symlink to an existing "real_dir" */ + assertEqualInt(0, mkdir("dest1/real_dir", 0755)); + assertEqualInt(0, symlink("real_dir", "dest1/dir")); + /* "dir2" is a symlink to a non-existing "real_dir2" */ + assertEqualInt(0, symlink("real_dir2", "dest1/dir2")); + /* "dir3" is a symlink to an existing "non_dir3" */ + assertEqualInt(0, mkfile("dest1/non_dir3", 0755, "abcdef", 6)); + assertEqualInt(0, symlink("non_dir3", "dest1/dir3")); + /* "file" is a symlink to existing "real_file" */ + assertEqualInt(0, mkfile("dest1/real_file", 0755, "abcdefg", 7)); + assertEqualInt(0, symlink("real_file", "dest1/file")); + /* "file2" is a symlink to non-existing "real_file2" */ + assertEqualInt(0, symlink("real_file2", "dest1/file2")); + + assertEqualInt(0, systemf("%s -xf test.tar -C dest1", testprog)); + + /* dest1/dir symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir", &st)); + failure("symlink to dir was followed when it shouldn't be"); + assert(S_ISDIR(st.st_mode)); + /* dest1/dir2 symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir2", &st)); + failure("Broken symlink wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest1/dir3 symlink should be removed */ + assertEqualInt(0, lstat("dest1/dir3", &st)); + failure("Symlink to non-dir wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest1/file symlink should be removed */ + assertEqualInt(0, lstat("dest1/file", &st)); + failure("Symlink to existing file should be removed"); + assert(S_ISREG(st.st_mode)); + /* dest1/file2 symlink should be removed */ + assertEqualInt(0, lstat("dest1/file2", &st)); + failure("Symlink to non-existing file should be removed"); + assert(S_ISREG(st.st_mode)); + + /* + * Extract with both -x and -P + */ + assertEqualInt(0, mkdir("dest2", 0755)); + /* "dir" is a symlink to existing "real_dir" */ + assertEqualInt(0, mkdir("dest2/real_dir", 0755)); + assertEqualInt(0, symlink("real_dir", "dest2/dir")); + /* "dir2" is a symlink to a non-existing "real_dir2" */ + assertEqualInt(0, symlink("real_dir2", "dest2/dir2")); + /* "dir3" is a symlink to an existing "non_dir3" */ + assertEqualInt(0, mkfile("dest2/non_dir3", 0755, "abcdefgh", 8)); + assertEqualInt(0, symlink("non_dir3", "dest2/dir3")); + /* "file" is a symlink to existing "real_file" */ + assertEqualInt(0, mkfile("dest2/real_file", 0755, "abcdefghi", 9)); + assertEqualInt(0, symlink("real_file", "dest2/file")); + /* "file2" is a symlink to non-existing "real_file2" */ + assertEqualInt(0, symlink("real_file2", "dest2/file2")); + + assertEqualInt(0, systemf("%s -xPf test.tar -C dest2", testprog)); + + /* dest2/dir symlink should be followed */ + assertEqualInt(0, lstat("dest2/dir", &st)); + failure("tar -xP removed symlink instead of following it"); + if (assert(S_ISLNK(st.st_mode))) { + /* Only verify what the symlink points to if it + * really is a symlink. */ + failure("The symlink should point to a directory"); + assertEqualInt(0, stat("dest2/dir", &st)); + assert(S_ISDIR(st.st_mode)); + failure("The pre-existing directory should still be there"); + assertEqualInt(0, lstat("dest2/real_dir", &st2)); + assert(S_ISDIR(st2.st_mode)); + assertEqualInt(st.st_dev, st2.st_dev); + failure("symlink should still point to the existing directory"); + assertEqualInt(st.st_ino, st2.st_ino); + } + /* Contents of 'dir' should be restored */ + assertEqualInt(0, lstat("dest2/dir/d", &st)); + assert(S_ISDIR(st.st_mode)); + assertEqualInt(0, lstat("dest2/dir/f", &st)); + assert(S_ISREG(st.st_mode)); + assertEqualInt(3, st.st_size); + /* dest2/dir2 symlink should be removed */ + assertEqualInt(0, lstat("dest2/dir2", &st)); + failure("Broken symlink wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest2/dir3 symlink should be removed */ + assertEqualInt(0, lstat("dest2/dir3", &st)); + failure("Symlink to non-dir wasn't replaced with dir"); + assert(S_ISDIR(st.st_mode)); + /* dest2/file symlink should be removed; + * even -P shouldn't follow symlinks for files */ + assertEqualInt(0, lstat("dest2/file", &st)); + failure("Symlink to existing file should be removed"); + assert(S_ISREG(st.st_mode)); + /* dest2/file2 symlink should be removed */ + assertEqualInt(0, lstat("dest2/file2", &st)); + failure("Symlink to non-existing file should be removed"); + assert(S_ISREG(st.st_mode)); +} Modified: stable/7/usr.bin/tar/util.c ============================================================================== --- stable/7/usr.bin/tar/util.c Thu Dec 11 05:56:25 2008 (r185908) +++ stable/7/usr.bin/tar/util.c Thu Dec 11 05:56:47 2008 (r185909) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); static void bsdtar_vwarnc(struct bsdtar *, int code, const char *fmt, va_list ap); +static const char *strip_components(const char *path, int elements); /* * Print a string, taking care with any non-printable characters. @@ -346,6 +347,31 @@ do_chdir(struct bsdtar *bsdtar) bsdtar->pending_chdir = NULL; } +const char * +strip_components(const char *path, int elements) +{ + const char *p = path; + + while (elements > 0) { + switch (*p++) { + case '/': + elements--; + path = p; + break; + case '\0': + /* Path is too short, skip it. */ + return (NULL); + } + } + + while (*path == '/') + ++path; + if (*path == '\0') + return (NULL); + + return (path); +} + /* * Handle --strip-components and any future path-rewriting options. * Returns non-zero if the pathname should not be extracted. @@ -402,24 +428,20 @@ edit_pathname(struct bsdtar *bsdtar, str #endif /* Strip leading dir names as per --strip-components option. */ - if ((r = bsdtar->strip_components) > 0) { - const char *p = name; + if (bsdtar->strip_components > 0) { + const char *linkname = archive_entry_hardlink(entry); + + name = strip_components(name, bsdtar->strip_components); + if (name == NULL) + return (1); - while (r > 0) { - switch (*p++) { - case '/': - r--; - name = p; - break; - case '\0': - /* Path is too short, skip it. */ + if (linkname != NULL) { + linkname = strip_components(linkname, + bsdtar->strip_components); + if (linkname == NULL) return (1); - } + archive_entry_copy_hardlink(entry, linkname); } - while (*name == '/') - ++name; - if (*name == '\0') - return (1); } /* Strip redundant leading '/' characters. */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 06:27:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 961621065670; Thu, 11 Dec 2008 06:27:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 848C08FC13; Thu, 11 Dec 2008 06:27:19 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB6RJDQ056417; Thu, 11 Dec 2008 06:27:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB6RJFS056416; Thu, 11 Dec 2008 06:27:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110627.mBB6RJFS056416@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 06:27:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185910 - head/sys/dev/pccbb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 06:27:19 -0000 Author: imp Date: Thu Dec 11 06:27:18 2008 New Revision: 185910 URL: http://svn.freebsd.org/changeset/base/185910 Log: Update to the interrupt handling code: o Try to be smarter about reading the ExCA CSC register. Now, we only do it for 16-bit cards. Add some experimental code to treat it like a power interrupt, but I'm not 100% sure that I like it. It may be removed upon further testing. It seemed to help in one test case, but the evidence may be inconclusive. This may be beneficial for cleaning up exca_reset and exca_wait_ready. o Check for CSTS events on the socket event register. We ask for it when we're powering up a card, but I don't think we're otherwise using it. Just ACK the interrupt for now. In theory, we can use it instead of the busy wait we do in cbb_cardbus_reset. More research is necessary to see if we can optimize things there when we're waiting for the DEVVENDOR register to become valid. o Rework the comments a bit. Minor tidying up. Etc. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Thu Dec 11 05:56:47 2008 (r185909) +++ head/sys/dev/pccbb/pccbb_pci.c Thu Dec 11 06:27:18 2008 (r185910) @@ -682,40 +682,67 @@ cbb_pci_shutdown(device_t brdev) return (0); } -#define DELTA (CBB_SOCKET_MASK_CD) static int cbb_pci_filt(void *arg) { struct cbb_softc *sc = arg; uint32_t sockevent; + uint8_t csc; int retval = FILTER_STRAY; /* - * Read the socket event. Sometimes, the theory goes, the PCI - * bus is so loaded that it cannot satisfy the read request, so - * we get garbage back from the following read. We have to filter - * out the garbage so that we don't spontaneously reset the card - * under high load. PCI isn't supposed to act like this. No doubt - * this is a bug in the PCI bridge chipset (or cbb brige) that's being - * used in certain amd64 laptops today. Work around the issue by - * assuming that any bits we don't know about being set means that - * we got garbage. + * Some chips also require us to read the old ExCA registe for card + * status change when we route CSC vis PCI. This isn't supposed to be + * required, but it clears the interrupt state on some chipsets. + * Maybe there's a setting that would obviate its need. Maybe we + * should test the status bits and deal with them, but so far we've + * not found any machines that don't also give us the socket status + * indication above. + * + * This call used to be unconditional. However, further research + * suggests that we hit this condition when the card READY interrupt + * fired. So now we only read it for 16-bit cards, and we only claim + * the interrupt if READY is set. If this still causes problems, then + * the next step would be to read this if we have a 16-bit card *OR* + * we have no card. We treat the READY signal as if it were the power + * completion signal. Some bridges may double signal things here, bit + * signalling twice should be OK since we only sleep on the powerintr + * in one place and a double wakeup would be benign there. + */ + if (sc->flags & CBB_16BIT_CARD) { + csc = exca_getb(&sc->exca[0], EXCA_CSC); + if (csc & EXCA_CSC_READY) { + atomic_add_int(&sc->powerintr, 1); + wakeup((void *)&sc->powerintr); + retval = FILTER_HANDLED; + } + } + + /* + * Read the socket event. Sometimes, the theory goes, the PCI bus is + * so loaded that it cannot satisfy the read request, so we get + * garbage back from the following read. We have to filter out the + * garbage so that we don't spontaneously reset the card under high + * load. PCI isn't supposed to act like this. No doubt this is a bug + * in the PCI bridge chipset (or cbb brige) that's being used in + * certain amd64 laptops today. Work around the issue by assuming + * that any bits we don't know about being set means that we got + * garbage. */ sockevent = cbb_get(sc, CBB_SOCKET_EVENT); if (sockevent != 0 && (sockevent & ~CBB_SOCKET_EVENT_VALID_MASK) == 0) { /* - * If anything has happened to the socket, we assume that - * the card is no longer OK, and we shouldn't call its - * ISR. We set cardok as soon as we've attached the - * card. This helps in a noisy eject, which happens - * all too often when users are ejecting their PC Cards. + * If anything has happened to the socket, we assume that the + * card is no longer OK, and we shouldn't call its ISR. We + * set cardok as soon as we've attached the card. This helps + * in a noisy eject, which happens all too often when users + * are ejecting their PC Cards. * - * We use this method in preference to checking to see if - * the card is still there because the check suffers from - * a race condition in the bouncing case. Prior versions - * of the pccard software used a similar trick and achieved - * excellent results. + * We use this method in preference to checking to see if the + * card is still there because the check suffers from a race + * condition in the bouncing case. */ +#define DELTA (CBB_SOCKET_MASK_CD) if (sockevent & DELTA) { cbb_clrb(sc, CBB_SOCKET_MASK, DELTA); cbb_set(sc, CBB_SOCKET_EVENT, DELTA); @@ -723,9 +750,11 @@ cbb_pci_filt(void *arg) cbb_disable_func_intr(sc); wakeup(&sc->intrhand); } +#undef DELTA + /* - * If we get a power interrupt, wakeup anybody that might - * be waiting for one. + * Wakeup anybody waiting for a power interrupt. We have to + * use atomic_add_int for wakups on other cores. */ if (sockevent & CBB_SOCKET_EVENT_POWER) { cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_EVENT_POWER); @@ -733,21 +762,15 @@ cbb_pci_filt(void *arg) atomic_add_int(&sc->powerintr, 1); wakeup((void *)&sc->powerintr); } + + /* + * Status change interrupts aren't presently used in the + * rest of the driver. For now, just ACK them. + */ + if (sockevent & CBB_SOCKET_EVENT_CSTS) + cbb_set(sc, CBB_SOCKET_EVENT, CBB_SOCKET_EVENT_CSTS); retval = FILTER_HANDLED; } - /* - * Some chips also require us to read the old ExCA registe for - * card status change when we route CSC vis PCI. This isn't supposed - * to be required, but it clears the interrupt state on some chipsets. - * Maybe there's a setting that would obviate its need. Maybe we - * should test the status bits and deal with them, but so far we've - * not found any machines that don't also give us the socket status - * indication above. - * - * We have to call this unconditionally because some bridges deliver - * the event independent of the CBB_SOCKET_EVENT_CD above. - */ - exca_getb(&sc->exca[0], EXCA_CSC); return retval; } From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 06:54:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 030461065676; Thu, 11 Dec 2008 06:54:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E76BC8FC16; Thu, 11 Dec 2008 06:54:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB6saxr056967; Thu, 11 Dec 2008 06:54:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB6saef056966; Thu, 11 Dec 2008 06:54:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200812110654.mBB6saef056966@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 11 Dec 2008 06:54:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185912 - head/usr.bin/fetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 06:54:37 -0000 Author: des Date: Thu Dec 11 06:54:36 2008 New Revision: 185912 URL: http://svn.freebsd.org/changeset/base/185912 Log: Apply the same defaults to https as to http. Submitted by: Mike Tancsa MFC after: 1 week Modified: head/usr.bin/fetch/fetch.c Modified: head/usr.bin/fetch/fetch.c ============================================================================== --- head/usr.bin/fetch/fetch.c Thu Dec 11 06:53:53 2008 (r185911) +++ head/usr.bin/fetch/fetch.c Thu Dec 11 06:54:36 2008 (r185912) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -375,7 +375,8 @@ fetch(char *URL, const char *path) } /* HTTP specific flags */ - if (strcmp(url->scheme, SCHEME_HTTP) == 0) { + if (strcmp(url->scheme, SCHEME_HTTP) == 0 || + strcmp(url->scheme, SCHEME_HTTPS) == 0) { if (d_flag) strcat(flags, "d"); if (A_flag) From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 07:00:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 251A61065676; Thu, 11 Dec 2008 07:00:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 15F188FC13; Thu, 11 Dec 2008 07:00:24 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB70Nuu057279; Thu, 11 Dec 2008 07:00:23 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB70N6t057278; Thu, 11 Dec 2008 07:00:23 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110700.mBB70N6t057278@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 07:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185915 - head/sys/mips/adm5120 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 07:00:24 -0000 Author: imp Date: Thu Dec 11 07:00:23 2008 New Revision: 185915 URL: http://svn.freebsd.org/changeset/base/185915 Log: Remove redundant assignment. Modified: head/sys/mips/adm5120/adm5120_machdep.c Modified: head/sys/mips/adm5120/adm5120_machdep.c ============================================================================== --- head/sys/mips/adm5120/adm5120_machdep.c Thu Dec 11 06:57:27 2008 (r185914) +++ head/sys/mips/adm5120/adm5120_machdep.c Thu Dec 11 07:00:23 2008 (r185915) @@ -150,8 +150,5 @@ platform_start(__register_t a0 __unused, cninit(); mips_init(); - /* Set counter_freq for tick_init_params() */ - platform_counter_freq = 175 * 1000 * 1000; - mips_timer_init_params(platform_counter_freq, 0); } From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 08:15:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DB191065680; Thu, 11 Dec 2008 08:15:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E7168FC25; Thu, 11 Dec 2008 08:15:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB8FFXX059056; Thu, 11 Dec 2008 08:15:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB8FFOL059053; Thu, 11 Dec 2008 08:15:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110815.mBB8FFOL059053@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 08:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185922 - in head/gnu/usr.bin/binutils/as: . mips-freebsd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:15:15 -0000 Author: imp Date: Thu Dec 11 08:15:14 2008 New Revision: 185922 URL: http://svn.freebsd.org/changeset/base/185922 Log: Push mips support for as into the tree. Added: head/gnu/usr.bin/binutils/as/mips-freebsd/ head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h (contents, props changed) head/gnu/usr.bin/binutils/as/mips-freebsd/targ-cpu.h (contents, props changed) Modified: head/gnu/usr.bin/binutils/as/Makefile Modified: head/gnu/usr.bin/binutils/as/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/as/Makefile Thu Dec 11 08:08:28 2008 (r185921) +++ head/gnu/usr.bin/binutils/as/Makefile Thu Dec 11 08:15:14 2008 (r185922) @@ -20,6 +20,10 @@ SRCS+= app.c as.c atof-generic.c atof-ie # DEO: why not used? #SRCS+= itbl-ops.c +.if ${TARGET_ARCH} == "mips" +SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l +.endif + .if ${TARGET_ARCH} == "amd64" SRCS+= tc-i386.c .elif ${TARGET_ARCH} == "powerpc" Added: head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/as/mips-freebsd/itbl-cpu.h Thu Dec 11 08:15:14 2008 (r185922) @@ -0,0 +1,19 @@ +/* $FreeBSD$ */ + +#include "itbl-mips.h" + +/* Choose a default ABI for MIPS targets. */ +/* XXX: Where should this be ? */ +#define MIPS_DEFAULT_ABI NO_ABI + +/* Default CPU for MIPS targets. */ +#define MIPS_CPU_STRING_DEFAULT "from-abi" + +/* Generate 64-bit code by default on MIPS targets. */ +#define MIPS_DEFAULT_64BIT 0 + +/* Allow use of E_MIPS_ABI_O32 on MIPS targets. */ +#define USE_E_MIPS_ABI_O32 1 + +/* Use traditional mips */ +#define TE_TMIPS 1 Added: head/gnu/usr.bin/binutils/as/mips-freebsd/targ-cpu.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/as/mips-freebsd/targ-cpu.h Thu Dec 11 08:15:14 2008 (r185922) @@ -0,0 +1,4 @@ +/* $FreeBSD$ */ +#define TE_TMIPS 1 + +#include "tc-mips.h" From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 08:18:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEEA1106564A; Thu, 11 Dec 2008 08:18:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFFD78FC1B; Thu, 11 Dec 2008 08:18:45 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB8IjOf059174; Thu, 11 Dec 2008 08:18:45 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB8IjpT059169; Thu, 11 Dec 2008 08:18:45 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110818.mBB8IjpT059169@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 08:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185923 - head/gnu/usr.bin/binutils/ld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:18:45 -0000 Author: imp Date: Thu Dec 11 08:18:45 2008 New Revision: 185923 URL: http://svn.freebsd.org/changeset/base/185923 Log: Push mips support for ld into the tree. Added: head/gnu/usr.bin/binutils/ld/Makefile.mips (contents, props changed) head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh (contents, props changed) head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh (contents, props changed) head/gnu/usr.bin/binutils/ld/elf64btsmip_fbsd.sh (contents, props changed) head/gnu/usr.bin/binutils/ld/elf64ltsmip_fbsd.sh (contents, props changed) Added: head/gnu/usr.bin/binutils/ld/Makefile.mips ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/Makefile.mips Thu Dec 11 08:18:45 2008 (r185923) @@ -0,0 +1,24 @@ +# $FreeBSD$ + +#xxxIMPxxx: size? +#xxxIMPxxx: TARGET_BIG_ENDIAN is lame. We should use the netbsd convention +# of mipsel and mips. +_sz?=32 +.if defined(TARGET_BIG_ENDIAN) +NATIVE_EMULATION=elf${_sz}btsmip_fbsd +.else +NATIVE_EMULATION=elf${_sz}ltsmip_fbsd +.endif + +SRCS+= e${NATIVE_EMULATION}.c +CLEANFILES+= e${NATIVE_EMULATION}.c + +# nb: elf32 handles both elf32 and elf64 targets +e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ + scripttempl/elf.sc genscripts.sh stringify.sed + sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \ + ${TOOLS_PREFIX}/usr \ + ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ + ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ + ${.CURDIR}/${NATIVE_EMULATION}.sh + Added: head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf32btsmip_fbsd.sh Thu Dec 11 08:18:45 2008 (r185923) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf32btsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes Added: head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf32ltsmip_fbsd.sh Thu Dec 11 08:18:45 2008 (r185923) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf32ltsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes Added: head/gnu/usr.bin/binutils/ld/elf64btsmip_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf64btsmip_fbsd.sh Thu Dec 11 08:18:45 2008 (r185923) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf64btsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes Added: head/gnu/usr.bin/binutils/ld/elf64ltsmip_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/ld/elf64ltsmip_fbsd.sh Thu Dec 11 08:18:45 2008 (r185923) @@ -0,0 +1,4 @@ +# $FreeBSD$ +. ${srcdir}/emulparams/elf64ltsmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 08:20:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1BAE1065672; Thu, 11 Dec 2008 08:20:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92C2F8FC1C; Thu, 11 Dec 2008 08:20:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB8KYcK059242; Thu, 11 Dec 2008 08:20:34 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB8KYFt059239; Thu, 11 Dec 2008 08:20:34 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110820.mBB8KYFt059239@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 08:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185924 - in head/gnu/usr.bin/binutils: libbfd libopcodes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:20:34 -0000 Author: imp Date: Thu Dec 11 08:20:34 2008 New Revision: 185924 URL: http://svn.freebsd.org/changeset/base/185924 Log: Push mips support into the tree. Added: head/gnu/usr.bin/binutils/libbfd/Makefile.mips (contents, props changed) head/gnu/usr.bin/binutils/libopcodes/Makefile.mips (contents, props changed) Modified: head/gnu/usr.bin/binutils/libbfd/bfd.h Added: head/gnu/usr.bin/binutils/libbfd/Makefile.mips ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/libbfd/Makefile.mips Thu Dec 11 08:20:34 2008 (r185924) @@ -0,0 +1,27 @@ +# $FreeBSD$ + +#xxxIMPxxx: endian and size +DEFAULT_VECTOR= bfd_elf32_tradbigmips_vec + +SRCS+= coff-mips.c \ + cpu-mips.c \ + ecoff.c \ + ecofflink.c \ + elf32.c \ + elf64.c \ + elfn32-mips.c \ + elf32-mips.c \ + elf64-mips.c \ + elfxx-mips.c \ + elf32-target.h \ + elf64-target.h \ + elflink.c + +VECS= bfd_elf32_tradbigmips_vec \ + bfd_elf32_tradlittlemips_vec \ + bfd_elf32_ntradbigmips_vec \ + bfd_elf32_ntradlittlemips_vec \ + bfd_elf64_tradbigmips_vec \ + bfd_elf64_tradlittlemips_vec \ + ecoff_little_vec \ + ecoff_big_vec Modified: head/gnu/usr.bin/binutils/libbfd/bfd.h ============================================================================== --- head/gnu/usr.bin/binutils/libbfd/bfd.h Thu Dec 11 08:18:45 2008 (r185923) +++ head/gnu/usr.bin/binutils/libbfd/bfd.h Thu Dec 11 08:20:34 2008 (r185924) @@ -57,7 +57,7 @@ extern "C" { #define BFD_ARCH_SIZE 64 -#if defined(__i386__) || defined(__powerpc__) || defined(__arm__) +#if defined(__i386__) || defined(__powerpc__) || defined(__arm__) || defined(__mips__) #define BFD_HOST_64BIT_LONG 0 #define BFD_HOST_64_BIT long long #define BFD_HOST_U_64_BIT unsigned long long Added: head/gnu/usr.bin/binutils/libopcodes/Makefile.mips ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/gnu/usr.bin/binutils/libopcodes/Makefile.mips Thu Dec 11 08:20:34 2008 (r185924) @@ -0,0 +1,4 @@ +# $FreeBSD$ + +SRCS+= mips-dis.c mips-opc.c mips16-opc.c +CFLAGS+= -DARCH_mips From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 08:22:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E4B1065673; Thu, 11 Dec 2008 08:22:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38A0B8FC12; Thu, 11 Dec 2008 08:22:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBB8MLeB059323; Thu, 11 Dec 2008 08:22:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBB8MKLd059320; Thu, 11 Dec 2008 08:22:20 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200812110822.mBB8MKLd059320@svn.freebsd.org> From: Warner Losh Date: Thu, 11 Dec 2008 08:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:22:21 -0000 Author: imp Date: Thu Dec 11 08:22:20 2008 New Revision: 185925 URL: http://svn.freebsd.org/changeset/base/185925 Log: Push mips support into the tree. Added: head/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh (contents, props changed) Modified: head/contrib/binutils/bfd/config.bfd head/contrib/binutils/gas/config/tc-mips.c Modified: head/contrib/binutils/bfd/config.bfd ============================================================================== --- head/contrib/binutils/bfd/config.bfd Thu Dec 11 08:20:34 2008 (r185924) +++ head/contrib/binutils/bfd/config.bfd Thu Dec 11 08:22:20 2008 (r185925) @@ -768,6 +768,10 @@ case "${targ}" in targ_defvec=bfd_elf32_littlemips_vec targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec" ;; + mips*-*-freebsd*) + targ_defvec=bfd_elf32_tradbigmips_vec + targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf32_ntradbigmisp_vec bfd_elf32_ntradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec" + ;; mips*-*-netbsd*) targ_defvec=bfd_elf32_bigmips_vec targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec" Modified: head/contrib/binutils/gas/config/tc-mips.c ============================================================================== --- head/contrib/binutils/gas/config/tc-mips.c Thu Dec 11 08:20:34 2008 (r185924) +++ head/contrib/binutils/gas/config/tc-mips.c Thu Dec 11 08:22:20 2008 (r185925) @@ -281,6 +281,9 @@ static int mips_32bitmode = 0; #define HAVE_64BIT_OBJECTS (mips_abi == N64_ABI) +/* True if relocations are stored in-place. */ +#define HAVE_IN_PLACE_ADDENDS (!HAVE_NEWABI) + /* We can only have 64bit addresses if the object file format supports it. */ #define HAVE_32BIT_ADDRESSES \ @@ -13020,6 +13023,26 @@ mips_fix_adjustable (fixS *fixp) if (fixp->fx_addsy == NULL) return 1; + /* If symbol SYM is in a mergeable section, relocations of the form + SYM + 0 can usually be made section-relative. The mergeable data + is then identified by the section offset rather than by the symbol. + + However, if we're generating REL LO16 relocations, the offset is split + between the LO16 and parterning high part relocation. The linker will + need to recalculate the complete offset in order to correctly identify + the merge data. + + The linker has traditionally not looked for the parterning high part + relocation, and has thus allowed orphaned R_MIPS_LO16 relocations to be + placed anywhere. Rather than break backwards compatibility by changing + this, it seems better not to force the issue, and instead keep the + original symbol. This will work with either linker behavior. */ + if ((fixp->fx_r_type == BFD_RELOC_LO16 + || reloc_needs_lo_p (fixp->fx_r_type)) + && HAVE_IN_PLACE_ADDENDS + && (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE) != 0) + return 0; + #ifdef OBJ_ELF if (OUTPUT_FLAVOR == bfd_target_elf_flavour && S_GET_OTHER (fixp->fx_addsy) == STO_MIPS16 Added: head/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/binutils/ld/emulparams/elf32bmip_fbsd.sh Thu Dec 11 08:22:20 2008 (r185925) @@ -0,0 +1,3 @@ +. ${srcdir}/emulparams/elf32bmip.sh +. ${srcdir}/emulparams/elf_fbsd.sh +GENERATE_PIE_SCRIPT=yes From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 09:08:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B33921065675; Thu, 11 Dec 2008 09:08:06 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.238]) by mx1.freebsd.org (Postfix) with ESMTP id 754548FC19; Thu, 11 Dec 2008 09:08:06 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so772347rvf.43 for ; Thu, 11 Dec 2008 01:08:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=2wYDaOIebL2LT97HhkwZMOy9jQgF3hMKSQSZsIHBs3Q=; b=MfmtkZJK4SNZQa+WlQzsdVLi5LNdaoRhV/iVb7dxZleW1ysXVzfRisBiNe3S2G15DH mWGdt28c/oqevOA4JVEjZF7I1lyjQ5g3iYS+gikJ4roLmL+S3vBJpWOoXIAzUjC19bLB rGv1ikDXd9j7eDTEvJkgFAp4Sdoo6SyLzQt0g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=oE0mTrHHdhBS1oqLg6e2iY30E2avd20sdHfEf3CPRMLC9PCxvz2QJp8aeHbf71gLTu ZgorxvANITQimTFWBI5cpFdM9eJaq9AIk47csJhLVq5CpwpSnufHSh4nPXMEOxTWlbwB nxrHir/A7CN31ozCHHZbZMe8d8pyHc32m6D5k= Received: by 10.141.152.8 with SMTP id e8mr1153885rvo.273.1228986486230; Thu, 11 Dec 2008 01:08:06 -0800 (PST) Received: by 10.140.158.13 with HTTP; Thu, 11 Dec 2008 01:08:06 -0800 (PST) Message-ID: <7d6fde3d0812110108u3dc979a9tf393a3520c248c59@mail.gmail.com> Date: Thu, 11 Dec 2008 01:08:06 -0800 From: "Garrett Cooper" To: "Warner Losh" In-Reply-To: <200812110822.mBB8MKLd059320@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200812110822.mBB8MKLd059320@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 09:08:06 -0000 On Thu, Dec 11, 2008 at 12:22 AM, Warner Losh wrote: > Author: imp > Date: Thu Dec 11 08:22:20 2008 > New Revision: 185925 > URL: http://svn.freebsd.org/changeset/base/185925 > > Log: > Push mips support into the tree. Hip, hip, hooray for MIPS! -Garrett From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 10:29:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E1C7106564A; Thu, 11 Dec 2008 10:29:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5FBC48FC19; Thu, 11 Dec 2008 10:29:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBATZbP062800; Thu, 11 Dec 2008 10:29:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBATZmH062799; Thu, 11 Dec 2008 10:29:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812111029.mBBATZmH062799@svn.freebsd.org> From: Robert Watson Date: Thu, 11 Dec 2008 10:29:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185928 - head/sys/netipx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 10:29:35 -0000 Author: rwatson Date: Thu Dec 11 10:29:35 2008 New Revision: 185928 URL: http://svn.freebsd.org/changeset/base/185928 Log: Add missing "goto set_head" for SO_IPX_CHECKSUM; otherwise we fall through to the SO_HEADERS_ON_OUTPUT case and set that instead. MFC after: 1 week Found with: Coverity Prevent(tm) Coverity ID: 3988 Modified: head/sys/netipx/ipx_usrreq.c Modified: head/sys/netipx/ipx_usrreq.c ============================================================================== --- head/sys/netipx/ipx_usrreq.c Thu Dec 11 09:52:45 2008 (r185927) +++ head/sys/netipx/ipx_usrreq.c Thu Dec 11 10:29:35 2008 (r185928) @@ -412,6 +412,7 @@ ipx_ctloutput(struct socket *so, struct case SO_IPX_CHECKSUM: mask = IPXP_CHECKSUM; + goto set_head; case SO_HEADERS_ON_OUTPUT: mask = IPXP_RAWOUT; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 11:17:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0AAE1065673; Thu, 11 Dec 2008 11:17:44 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 6FE368FC12; Thu, 11 Dec 2008 11:17:44 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 6A8F86D43F; Thu, 11 Dec 2008 11:17:43 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 51324844B1; Thu, 11 Dec 2008 12:17:43 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Warner Losh References: <200812110822.mBB8MKLd059320@svn.freebsd.org> Date: Thu, 11 Dec 2008 12:17:43 +0100 In-Reply-To: <200812110822.mBB8MKLd059320@svn.freebsd.org> (Warner Losh's message of "Thu, 11 Dec 2008 08:22:20 +0000 (UTC)") Message-ID: <86oczjklk8.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 11:17:44 -0000 Warner Losh writes: > Author: imp > Date: Thu Dec 11 08:22:20 2008 > New Revision: 185925 > URL: http://svn.freebsd.org/changeset/base/185925 > > Log: > Push mips support into the tree. Just to pick a random mips commit - There is something wrong with the mips toolchain. The build breaks in libpam, while building the static version, which includes all modules: ../modules/pam_deny/libpam_deny.a(pam_deny.o)(.text+0x3c): In function `pam= _sm_open_session': /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple definition of `pam= _sm_open_session' ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/src/lib/li= bpam/modules/pam_chroot/pam_chroot.c:54: first defined here [lather, rinse, repeat for every service function in every module] The service functions should be static. The logic PAM uses to determine whether it is building static or shared modules is as follows: #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) The command line used to compile the pam_deny.o that goes into libpam_deny.= a: cc -O2 -pipe -EL -msoft-float -G0 -mno-dsp -mabicalls -I/src/lib/libpam/mo= dules/pam_deny/../../../../contrib/openpam/include -I/src/lib/libpam/module= s/pam_deny/../../libpam -g -Wsystem-headers -Werror -Wall -Wno-format-y2k -= W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-= arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-al= ign -Wunused-parameter -Wno-uninitialized -Wno-pointer-sign -c /src/lib/lib= pam/modules/pam_deny/pam_deny.c The corresponding command line for amd64: cc -O2 -pipe -march=3Dnocona -I/src/lib/libpam/modules/pam_deny/../../../..= /contrib/openpam/include -I/src/lib/libpam/modules/pam_deny/../../libpam -g= -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-u= nused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -W= return-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wun= used-parameter -Wno-uninitialized -Wno-pointer-sign -c /src/lib/libpam/modu= les/pam_deny/pam_deny.c DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 12:44:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FC911065673; Thu, 11 Dec 2008 12:44:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DD588FC1D; Thu, 11 Dec 2008 12:44:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBCiTEH065463; Thu, 11 Dec 2008 12:44:29 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBCiSlj065462; Thu, 11 Dec 2008 12:44:28 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812111244.mBBCiSlj065462@svn.freebsd.org> From: Robert Watson Date: Thu, 11 Dec 2008 12:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185929 - in stable/7/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 12:44:29 -0000 Author: rwatson Date: Thu Dec 11 12:44:28 2008 New Revision: 185929 URL: http://svn.freebsd.org/changeset/base/185929 Log: Merge r185813 from head to stable/7: Update comment on INP_TIMEWAIT to say what it's about, as we caution regarding the misplacement of flags in inp_vflag in an earlier comment. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/in_pcb.h Modified: stable/7/sys/netinet/in_pcb.h ============================================================================== --- stable/7/sys/netinet/in_pcb.h Thu Dec 11 10:29:35 2008 (r185928) +++ stable/7/sys/netinet/in_pcb.h Thu Dec 11 12:44:28 2008 (r185929) @@ -410,7 +410,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_IPV4 0x1 #define INP_IPV6 0x2 #define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_TIMEWAIT 0x8 /* inpcb in TIMEWAIT, ppcb is tcptw */ #define INP_ONESBCAST 0x10 /* send all-ones broadcast */ #define INP_DROPPED 0x20 /* protocol drop flag */ #define INP_SOCKREF 0x40 /* strong socket reference */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 13:30:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E54A106564A; Thu, 11 Dec 2008 13:30:30 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49D8E8FC24; Thu, 11 Dec 2008 13:30:30 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBDUUx0066322; Thu, 11 Dec 2008 13:30:30 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBDUUGe066321; Thu, 11 Dec 2008 13:30:30 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812111330.mBBDUUGe066321@svn.freebsd.org> From: Robert Watson Date: Thu, 11 Dec 2008 13:30:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185930 - in stable/7/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 13:30:30 -0000 Author: rwatson Date: Thu Dec 11 13:30:29 2008 New Revision: 185930 URL: http://svn.freebsd.org/changeset/base/185930 Log: Merge r185855 from head to stable/7: Move flag definitions for t_flags and t_oobflags below the definition of struct tcpcb so that the structure definition is a bit more vertically compact. Can't yet fit it on one printed page, though. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/tcp_var.h Modified: stable/7/sys/netinet/tcp_var.h ============================================================================== --- stable/7/sys/netinet/tcp_var.h Thu Dec 11 12:44:28 2008 (r185929) +++ stable/7/sys/netinet/tcp_var.h Thu Dec 11 13:30:29 2008 (r185930) @@ -101,29 +101,6 @@ struct tcpcb { struct inpcb *t_inpcb; /* back pointer to internet pcb */ int t_state; /* state of this connection */ u_int t_flags; -#define TF_ACKNOW 0x000001 /* ack peer immediately */ -#define TF_DELACK 0x000002 /* ack, but try to delay it */ -#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ -#define TF_NOOPT 0x000008 /* don't use tcp options */ -#define TF_SENTFIN 0x000010 /* have sent FIN */ -#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ -#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ -#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ -#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ -#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ -#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ -#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ -#define TF_NOPUSH 0x001000 /* don't push */ -#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ -#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ -#define TF_LASTIDLE 0x040000 /* connection was previously idle */ -#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ -#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ -#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ -#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ -#define TF_FORCEDATA 0x800000 /* force out a byte */ -#define TF_TSO 0x1000000 /* TSO enabled on this connection */ -#define TF_TOE 0x2000000 /* this connection is offloaded */ tcp_seq snd_una; /* send unacknowledged */ tcp_seq snd_max; /* highest sequence number sent; @@ -177,8 +154,6 @@ struct tcpcb { /* out-of-band data */ char t_oobflags; /* have some */ char t_iobc; /* input character */ -#define TCPOOB_HAVEDATA 0x01 -#define TCPOOB_HADDATA 0x02 /* RFC 1323 variables */ u_char snd_scale; /* window scaling for send window */ u_char rcv_scale; /* window scaling for recv window */ @@ -212,10 +187,43 @@ struct tcpcb { void *t_toe; /* TOE pcb pointer */ }; +/* + * Flags and utility macros for the t_flags field. + */ +#define TF_ACKNOW 0x000001 /* ack peer immediately */ +#define TF_DELACK 0x000002 /* ack, but try to delay it */ +#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ +#define TF_NOOPT 0x000008 /* don't use tcp options */ +#define TF_SENTFIN 0x000010 /* have sent FIN */ +#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ +#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ +#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ +#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ +#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ +#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ +#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ +#define TF_NOPUSH 0x001000 /* don't push */ +#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ +#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ +#define TF_LASTIDLE 0x040000 /* connection was previously idle */ +#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ +#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ +#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ +#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ +#define TF_FORCEDATA 0x800000 /* force out a byte */ +#define TF_TSO 0x1000000 /* TSO enabled on this connection */ +#define TF_TOE 0x2000000 /* this connection is offloaded */ + #define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY) #define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY #define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY +/* + * Flags for the t_oobflags field. + */ +#define TCPOOB_HAVEDATA 0x01 +#define TCPOOB_HADDATA 0x02 + #ifdef TCP_SIGNATURE /* * Defines which are needed by the xform_tcp module and tcp_[in|out]put From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 13:55:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE151065673; Thu, 11 Dec 2008 13:55:37 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (unknown [IPv6:2002:50b1:e8f2:1::143]) by mx1.freebsd.org (Postfix) with ESMTP id B9B028FC21; Thu, 11 Dec 2008 13:55:36 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id 670E73FA9; Thu, 11 Dec 2008 13:55:08 +0000 (GMT) Message-Id: <25FCC66F-902B-49AF-9B9C-07AE3446B13B@rabson.org> From: Doug Rabson To: Paul Saab In-Reply-To: <200812110223.mBB2NnjW049843@svn.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 11 Dec 2008 13:55:32 +0000 References: <200812110223.mBB2NnjW049843@svn.freebsd.org> X-Mailer: Apple Mail (2.929.2) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185902 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 13:55:37 -0000 On 11 Dec 2008, at 02:23, Paul Saab wrote: > Author: ps > Date: Thu Dec 11 02:23:49 2008 > New Revision: 185902 > URL: http://svn.freebsd.org/changeset/base/185902 > > Log: > Avoid a double free in devopen by not freeing the device structure > in zfs_dev_open. This stops a panic in the loader when trying to > read from a zfs device and no zfs devices exist. > > Modified: > head/sys/boot/zfs/zfs.c > > Modified: head/sys/boot/zfs/zfs.c > = > = > = > = > = > = > = > = > ====================================================================== > --- head/sys/boot/zfs/zfs.c Thu Dec 11 01:41:38 2008 (r185901) > +++ head/sys/boot/zfs/zfs.c Thu Dec 11 02:23:49 2008 (r185902) > @@ -474,7 +474,6 @@ zfs_dev_open(struct open_file *f, ...) > * the pool. > */ > unit = dev->d_unit; > - free(dev); > > i = 0; > STAILQ_FOREACH(spa, &zfs_pools, spa_link) { Doesn't this introduce a memory leak in the case where there is a ZFS pool? In that case, zfs_dev_open replaces f->f_devdata with a reference to the pool structure. Probably a better fix would be to move the free(dev) to just before the 'return (0)' statement. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 15:42:59 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77C3A106573E; Thu, 11 Dec 2008 15:42:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637908FC16; Thu, 11 Dec 2008 15:42:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBFgx7Q068830; Thu, 11 Dec 2008 15:42:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBFgxXJ068829; Thu, 11 Dec 2008 15:42:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111542.mBBFgxXJ068829@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 15:42:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185931 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 15:42:59 -0000 Author: bz Date: Thu Dec 11 15:42:59 2008 New Revision: 185931 URL: http://svn.freebsd.org/changeset/base/185931 Log: Whitespace changes only - tabs must have been converted to spaces somehow, when moving the code from p4 to svn. Sponsored by: The FreeBSD Foundation Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Dec 11 13:30:29 2008 (r185930) +++ head/sys/net/if.c Thu Dec 11 15:42:59 2008 (r185931) @@ -169,11 +169,11 @@ static struct filterops netdev_filtops = #ifndef VIMAGE_GLOBALS static struct vnet_symmap vnet_net_symmap[] = { - VNET_SYMMAP(net, ifnet), - VNET_SYMMAP(net, rt_tables), - VNET_SYMMAP(net, rtstat), - VNET_SYMMAP(net, rttrash), - VNET_SYMMAP_END + VNET_SYMMAP(net, ifnet), + VNET_SYMMAP(net, rt_tables), + VNET_SYMMAP(net, rtstat), + VNET_SYMMAP(net, rttrash), + VNET_SYMMAP_END }; VNET_MOD_DECLARE(NET, net, vnet_net_iattach, vnet_net_idetach, From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 15:44:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C057E1065680; Thu, 11 Dec 2008 15:44:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF8408FC16; Thu, 11 Dec 2008 15:44:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBFirkU068919; Thu, 11 Dec 2008 15:44:53 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBFir50068918; Thu, 11 Dec 2008 15:44:53 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111544.mBBFir50068918@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 15:44:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185932 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 15:44:53 -0000 Author: bz Date: Thu Dec 11 15:44:53 2008 New Revision: 185932 URL: http://svn.freebsd.org/changeset/base/185932 Log: Error in case anyone tried to compile with both options VIMAGE and the (temporary) option VIMAGE_GLOBALS. Sponsored by: The FreeBSD Foundation: Modified: head/sys/sys/vimage.h Modified: head/sys/sys/vimage.h ============================================================================== --- head/sys/sys/vimage.h Thu Dec 11 15:42:59 2008 (r185931) +++ head/sys/sys/vimage.h Thu Dec 11 15:44:53 2008 (r185932) @@ -60,6 +60,10 @@ struct vnet_modlink { .vmi_symmap = m_symmap \ }; +#if defined(VIMAGE) && defined(VIMAGE_GLOBALS) +#error "You cannot have both option VIMAGE and option VIMAGE_GLOBALS!" +#endif + #ifdef VIMAGE_GLOBALS #define VSYM(base, sym) (sym) #else From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 15:56:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E05B1065673; Thu, 11 Dec 2008 15:56:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3C4178FC0C; Thu, 11 Dec 2008 15:56:31 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBFuVaa069173; Thu, 11 Dec 2008 15:56:31 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBFuU05069167; Thu, 11 Dec 2008 15:56:30 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812111556.mBBFuU05069167@svn.freebsd.org> From: John Baldwin Date: Thu, 11 Dec 2008 15:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185933 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 15:56:31 -0000 Author: jhb Date: Thu Dec 11 15:56:30 2008 New Revision: 185933 URL: http://svn.freebsd.org/changeset/base/185933 Log: Add constants for fields in the local APIC error status register and a routine to read it. Modified: head/sys/amd64/amd64/local_apic.c head/sys/amd64/include/apicreg.h head/sys/amd64/include/apicvar.h head/sys/i386/i386/local_apic.c head/sys/i386/include/apicreg.h head/sys/i386/include/apicvar.h Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/amd64/amd64/local_apic.c Thu Dec 11 15:56:30 2008 (r185933) @@ -299,6 +299,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + #ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) @@ -644,6 +645,18 @@ lapic_eoi(void) lapic->eoi = 0; } +/* + * Read the contents of the error status register. We have to write + * to the register first before reading from it. + */ +u_int +lapic_error(void) +{ + + lapic->esr = 0; + return (lapic->esr); +} + void lapic_handle_intr(int vector, struct trapframe *frame) { Modified: head/sys/amd64/include/apicreg.h ============================================================================== --- head/sys/amd64/include/apicreg.h Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/amd64/include/apicreg.h Thu Dec 11 15:56:30 2008 (r185933) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: head/sys/amd64/include/apicvar.h ============================================================================== --- head/sys/amd64/include/apicvar.h Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/amd64/include/apicvar.h Thu Dec 11 15:56:30 2008 (r185933) @@ -200,6 +200,7 @@ void lapic_create(u_int apic_id, int boo void lapic_disable(void); void lapic_dump(const char *str); void lapic_eoi(void); +u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/i386/i386/local_apic.c Thu Dec 11 15:56:30 2008 (r185933) @@ -301,6 +301,7 @@ lapic_setup(int boot) /* Program LINT[01] LVT entries. */ lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); + #ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) @@ -646,6 +647,18 @@ lapic_eoi(void) lapic->eoi = 0; } +/* + * Read the contents of the error status register. We have to write + * to the register first before reading from it. + */ +u_int +lapic_error(void) +{ + + lapic->esr = 0; + return (lapic->esr); +} + void lapic_handle_intr(int vector, struct trapframe *frame) { Modified: head/sys/i386/include/apicreg.h ============================================================================== --- head/sys/i386/include/apicreg.h Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/i386/include/apicreg.h Thu Dec 11 15:56:30 2008 (r185933) @@ -260,6 +260,14 @@ typedef struct IOAPIC ioapic_t; # define APIC_TPR_INT 0x000000f0 # define APIC_TPR_SUB 0x0000000f +/* fields in ESR */ +#define APIC_ESR_SEND_CS_ERROR 0x00000001 +#define APIC_ESR_RECEIVE_CS_ERROR 0x00000002 +#define APIC_ESR_SEND_ACCEPT 0x00000004 +#define APIC_ESR_RECEIVE_ACCEPT 0x00000008 +#define APIC_ESR_SEND_ILLEGAL_VECTOR 0x00000020 +#define APIC_ESR_RECEIVE_ILLEGAL_VECTOR 0x00000040 +#define APIC_ESR_ILLEGAL_REGISTER 0x00000080 /* fields in ICR_LOW */ #define APIC_VECTOR_MASK 0x000000ff Modified: head/sys/i386/include/apicvar.h ============================================================================== --- head/sys/i386/include/apicvar.h Thu Dec 11 15:44:53 2008 (r185932) +++ head/sys/i386/include/apicvar.h Thu Dec 11 15:56:30 2008 (r185933) @@ -211,6 +211,7 @@ void lapic_create(u_int apic_id, int boo void lapic_disable(void); void lapic_dump(const char *str); void lapic_eoi(void); +u_int lapic_error(void); int lapic_id(void); void lapic_init(vm_paddr_t addr); int lapic_intr_pending(u_int vector); From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:05:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70D131065675; Thu, 11 Dec 2008 16:05:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 605DE8FC08; Thu, 11 Dec 2008 16:05:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBG57Nj069377; Thu, 11 Dec 2008 16:05:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBG57HC069376; Thu, 11 Dec 2008 16:05:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111605.mBBG57HC069376@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 16:05:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185934 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:05:08 -0000 Author: bz Date: Thu Dec 11 16:05:07 2008 New Revision: 185934 URL: http://svn.freebsd.org/changeset/base/185934 Log: Use the correct INIT_VNET_INET() as the virtualized variable here are in vinet.h not in vinet6.h Sponsored by: The FreeBSD Foundation Modified: head/sys/netinet/tcp_subr.c Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Dec 11 15:56:30 2008 (r185933) +++ head/sys/netinet/tcp_subr.c Thu Dec 11 16:05:07 2008 (r185934) @@ -155,7 +155,7 @@ SYSCTL_V_PROC(V_NET, vnet_inet, _net_ine static int sysctl_net_inet_tcp_mss_v6_check(SYSCTL_HANDLER_ARGS) { - INIT_VNET_INET6(curvnet); + INIT_VNET_INET(curvnet); int error, new; new = V_tcp_v6mssdflt; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:09:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4374D1065670; Thu, 11 Dec 2008 16:09:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 335818FC1D; Thu, 11 Dec 2008 16:09:32 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBG9V7o069490; Thu, 11 Dec 2008 16:09:31 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBG9VC2069489; Thu, 11 Dec 2008 16:09:31 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111609.mBBG9VC2069489@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 16:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185935 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:09:32 -0000 Author: bz Date: Thu Dec 11 16:09:31 2008 New Revision: 185935 URL: http://svn.freebsd.org/changeset/base/185935 Log: Order #includes - also to reduce diffs with vimage branches in p4. Sponsored by: The FreeBSD Foundation Modified: head/sys/kern/kern_poll.c Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Thu Dec 11 16:05:07 2008 (r185934) +++ head/sys/kern/kern_poll.c Thu Dec 11 16:09:31 2008 (r185935) @@ -33,20 +33,19 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include /* needed by net/if.h */ #include #include #include +#include #include /* for IFF_* flags */ #include /* for NETISR_POLL */ #include -#include -#include -#include -#include - static void netisr_poll(void); /* the two netisr handlers */ static void netisr_pollmore(void); static int poll_switch(SYSCTL_HANDLER_ARGS); From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:13:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915681065673; Thu, 11 Dec 2008 16:13:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8188E8FC08; Thu, 11 Dec 2008 16:13:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBGDHdA069604; Thu, 11 Dec 2008 16:13:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBGDHRM069603; Thu, 11 Dec 2008 16:13:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111613.mBBGDHRM069603@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 16:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185936 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:13:17 -0000 Author: bz Date: Thu Dec 11 16:13:17 2008 New Revision: 185936 URL: http://svn.freebsd.org/changeset/base/185936 Log: Put the VIMAGE options together in one place. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Dec 11 16:09:31 2008 (r185935) +++ head/sys/conf/options Thu Dec 11 16:13:17 2008 (r185936) @@ -415,7 +415,6 @@ TCPDEBUG TCP_OFFLOAD_DISABLE opt_inet.h #Disable code to dispatch tcp offloading TCP_SIGNATURE opt_inet.h VLAN_ARRAY opt_vlan.h -VIMAGE_GLOBALS opt_global.h XBONEHACK # @@ -786,3 +785,4 @@ IEEE80211_AMPDU_AGE opt_wlan.h # Virtualize the network stack VIMAGE opt_global.h +VIMAGE_GLOBALS opt_global.h From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:15:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 444631065672; Thu, 11 Dec 2008 16:15:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id DA5EA8FC26; Thu, 11 Dec 2008 16:15:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mBBGFUPn034949; Thu, 11 Dec 2008 11:15:30 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 10:22:42 -0500 User-Agent: KMail/1.9.7 References: <200812110058.mBB0w6HD048102@svn.freebsd.org> In-Reply-To: <200812110058.mBB0w6HD048102@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812111022.42911.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 11 Dec 2008 11:15:30 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8746/Wed Dec 10 23:14:26 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185898 - head/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:15:37 -0000 On Wednesday 10 December 2008 07:58:06 pm Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Dec 11 00:58:05 2008 > New Revision: 185898 > URL: http://svn.freebsd.org/changeset/base/185898 > > Log: > Add 32-bit compat support for AIO. > > jhb probably forgot to commit this file with r185878 and will want to > review this. It unbreaks the build here. > > Obtained from: p4 //depot/user/jhb/lock/compat/freebsd32/freebsd32_signal.h#2 Yes, I missed this file in all the noise of the regen'd files, sorry. :( Thanks for fixing this. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:15:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D94E1065749; Thu, 11 Dec 2008 16:15:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7F6428FC1D; Thu, 11 Dec 2008 16:15:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mBBGFUPo034949; Thu, 11 Dec 2008 11:15:36 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Doug Rabson Date: Thu, 11 Dec 2008 10:42:47 -0500 User-Agent: KMail/1.9.7 References: <200812110223.mBB2NnjW049843@svn.freebsd.org> <25FCC66F-902B-49AF-9B9C-07AE3446B13B@rabson.org> In-Reply-To: <25FCC66F-902B-49AF-9B9C-07AE3446B13B@rabson.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812111042.48029.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 11 Dec 2008 11:15:36 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8746/Wed Dec 10 23:14:26 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Paul Saab Subject: Re: svn commit: r185902 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:15:44 -0000 On Thursday 11 December 2008 08:55:32 am Doug Rabson wrote: > > On 11 Dec 2008, at 02:23, Paul Saab wrote: > > > Author: ps > > Date: Thu Dec 11 02:23:49 2008 > > New Revision: 185902 > > URL: http://svn.freebsd.org/changeset/base/185902 > > > > Log: > > Avoid a double free in devopen by not freeing the device structure > > in zfs_dev_open. This stops a panic in the loader when trying to > > read from a zfs device and no zfs devices exist. > > > > Modified: > > head/sys/boot/zfs/zfs.c > > > > Modified: head/sys/boot/zfs/zfs.c > > = > > = > > = > > = > > = > > = > > = > > = > > ====================================================================== > > --- head/sys/boot/zfs/zfs.c Thu Dec 11 01:41:38 2008 (r185901) > > +++ head/sys/boot/zfs/zfs.c Thu Dec 11 02:23:49 2008 (r185902) > > @@ -474,7 +474,6 @@ zfs_dev_open(struct open_file *f, ...) > > * the pool. > > */ > > unit = dev->d_unit; > > - free(dev); > > > > i = 0; > > STAILQ_FOREACH(spa, &zfs_pools, spa_link) { > > Doesn't this introduce a memory leak in the case where there is a ZFS > pool? In that case, zfs_dev_open replaces f->f_devdata with a > reference to the pool structure. Probably a better fix would be to > move the free(dev) to just before the 'return (0)' statement. Yes, that would work. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:26:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0236A1065677; Thu, 11 Dec 2008 16:26:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5A718FC1E; Thu, 11 Dec 2008 16:26:38 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBGQcgD069884; Thu, 11 Dec 2008 16:26:38 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBGQcbf069870; Thu, 11 Dec 2008 16:26:38 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812111626.mBBGQcbf069870@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 11 Dec 2008 16:26:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185937 - in head/sys: net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:26:39 -0000 Author: bz Date: Thu Dec 11 16:26:38 2008 New Revision: 185937 URL: http://svn.freebsd.org/changeset/base/185937 Log: Put a global variables, which were virtualized but formerly missed under VIMAGE_GLOBAL. Start putting the extern declarations of the virtualized globals under VIMAGE_GLOBAL as the globals themsevles are already. This will help by the time when we are going to remove the globals entirely. While there garbage collect a few dead externs from ip6_var.h. Sponsored by: The FreeBSD Foundation Modified: head/sys/net/raw_cb.h head/sys/netinet/in_pcb.h head/sys/netinet/ip_fw2.c head/sys/netinet/ip_fw_nat.c head/sys/netinet/ip_fw_pfil.c head/sys/netinet/ip_var.h head/sys/netinet/tcp_var.h head/sys/netinet/udp_var.h head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_var.h head/sys/netinet6/nd6.h head/sys/netinet6/tcp6_var.h head/sys/netinet6/vinet6.h Modified: head/sys/net/raw_cb.h ============================================================================== --- head/sys/net/raw_cb.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/net/raw_cb.h Thu Dec 11 16:26:38 2008 (r185937) @@ -55,7 +55,9 @@ struct rawcb { #define RAWRCVQ 8192 #ifdef _KERNEL +#ifdef VIMAGE_GLOBALS extern LIST_HEAD(rawcb_list_head, rawcb) rawcb_list; +#endif extern struct mtx rawcb_mtx; /* Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/in_pcb.h Thu Dec 11 16:26:38 2008 (r185937) @@ -450,6 +450,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af) #ifdef _KERNEL +#ifdef VIMAGE_GLOBALS extern int ipport_reservedhigh; extern int ipport_reservedlow; extern int ipport_lowfirstauto; @@ -463,6 +464,7 @@ extern int ipport_randomcps; extern int ipport_randomtime; extern int ipport_stoprandom; extern int ipport_tcpallocs; +#endif extern struct callout ipport_tick_callout; void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/ip_fw2.c Thu Dec 11 16:26:38 2008 (r185937) @@ -149,7 +149,9 @@ struct ip_fw_ugid { /* * list of rules for layer 3 */ +#ifdef VIMAGE_GLOBALS struct ip_fw_chain layer3_chain; +#endif MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's"); MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables"); Modified: head/sys/netinet/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ip_fw_nat.c Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/ip_fw_nat.c Thu Dec 11 16:26:38 2008 (r185937) @@ -69,9 +69,8 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_IPFW); -extern struct ip_fw_chain layer3_chain; - #ifdef VIMAGE_GLOBALS +extern struct ip_fw_chain layer3_chain; static eventhandler_tag ifaddr_event_tag; #endif Modified: head/sys/netinet/ip_fw_pfil.c ============================================================================== --- head/sys/netinet/ip_fw_pfil.c Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/ip_fw_pfil.c Thu Dec 11 16:26:38 2008 (r185937) @@ -68,10 +68,12 @@ __FBSDID("$FreeBSD$"); #include +#ifdef VIMAGE_GLOBALS int fw_enable = 1; #ifdef INET6 int fw6_enable = 1; #endif +#endif int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/ip_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -175,6 +175,7 @@ struct inpcb; struct route; struct sockopt; +#ifdef VIMAGE_GLOBALS extern struct ipstat ipstat; extern u_short ip_id; /* ip packet ctr, for ids */ extern int ip_do_randomid; @@ -183,12 +184,13 @@ extern int ipforwarding; /* ip forwardi #ifdef IPSTEALTH extern int ipstealth; /* stealth forwarding */ #endif -extern u_char ip_protox[]; +extern int rsvp_on; extern struct socket *ip_rsvpd; /* reservation protocol daemon */ extern struct socket *ip_mrouter; /* multicast routing daemon */ +#endif +extern u_char ip_protox[]; extern int (*legal_vif_num)(int); extern u_long (*ip_mcast_src)(int); -extern int rsvp_on; extern struct pr_usrreqs rip_usrreqs; void inp_freemoptions(struct ip_moptions *); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/tcp_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -513,10 +513,12 @@ SYSCTL_DECL(_net_inet_tcp_sack); MALLOC_DECLARE(M_TCPLOG); #endif +extern int tcp_log_in_vain; + +#ifdef VIMAGE_GLOBALS extern struct inpcbhead tcb; /* head of queue of active tcpcb's */ extern struct inpcbinfo tcbinfo; extern struct tcpstat tcpstat; /* tcp statistics */ -extern int tcp_log_in_vain; extern int tcp_mssdflt; /* XXX */ extern int tcp_minmss; extern int tcp_delack_enabled; @@ -548,6 +550,7 @@ extern int tcp_sack_globalholes; extern int tcp_sc_rst_sock_fail; /* RST on sock alloc failure */ extern int tcp_do_ecn; /* TCP ECN enabled/disabled */ extern int tcp_ecn_maxretries; +#endif /* VIMAGE_GLOBALS */ int tcp_addoptions(struct tcpopt *, u_char *); struct tcpcb * Modified: head/sys/netinet/udp_var.h ============================================================================== --- head/sys/netinet/udp_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet/udp_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -94,12 +94,15 @@ struct udpstat { SYSCTL_DECL(_net_inet_udp); extern struct pr_usrreqs udp_usrreqs; + +#ifdef VIMAGE_GLOBALS extern struct inpcbhead udb; extern struct inpcbinfo udbinfo; -extern u_long udp_sendspace; -extern u_long udp_recvspace; extern struct udpstat udpstat; extern int udp_blackhole; +#endif +extern u_long udp_sendspace; +extern u_long udp_recvspace; extern int udp_log_in_vain; void udp_ctlinput(int, struct sockaddr *, void *); Modified: head/sys/netinet6/in6_proto.c ============================================================================== --- head/sys/netinet6/in6_proto.c Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/in6_proto.c Thu Dec 11 16:26:38 2008 (r185937) @@ -390,9 +390,7 @@ int ip6_keepfaith; time_t ip6_log_time; int ip6stealth; int nd6_onlink_ns_rfc4861; -#endif -#ifdef VIMAGE_GLOBALS /* icmp6 */ /* * BSDI4 defines these variables in in_proto.c... Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/in6_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -470,9 +470,11 @@ struct in6_rrenumreq { #endif #ifdef _KERNEL +#ifdef VIMAGE_GLOBALS extern struct in6_ifaddr *in6_ifaddr; extern struct icmp6stat icmp6stat; +#endif /* VIMAGE_GLOBALS */ #define in6_ifstat_inc(ifp, tag) \ do { \ if (ifp) \ Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/ip6_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -279,6 +279,7 @@ struct ip6aux { #define IP6_HDR_ALIGNED_P(ip) ((((intptr_t) (ip)) & 3) == 0) #endif +#ifdef VIMAGE_GLOBALS extern struct ip6stat ip6stat; /* statistics */ extern int ip6_defhlim; /* default hop limit */ extern int ip6_defmcasthlim; /* default multicast hop limit */ @@ -290,8 +291,10 @@ extern int ip6_rr_prune; /* router renu * walk list every 5 sec. */ extern int ip6_mcast_pmtu; /* enable pMTU discovery for multicast? */ extern int ip6_v6only; +#endif /* VIMAGE_GLOBALS */ extern struct socket *ip6_mrouter; /* multicast routing daemon */ +#ifdef VIMAGE_GLOBALS extern int ip6_sendredirects; /* send IP redirects when forwarding? */ extern int ip6_maxfragpackets; /* Maximum packets in reassembly queue */ extern int ip6_maxfrags; /* Maximum fragments in reassembly queue */ @@ -304,17 +307,13 @@ extern time_t ip6_log_time; extern int ip6_hdrnestlimit; /* upper limit of # of extension headers */ extern int ip6_dad_count; /* DupAddrDetectionTransmits */ -extern int ip6_auto_flowlabel; -extern int ip6_auto_linklocal; - -extern int ip6_anonportmin; /* minimum ephemeral port */ -extern int ip6_anonportmax; /* maximum ephemeral port */ -extern int ip6_lowportmin; /* minimum reserved port */ -extern int ip6_lowportmax; /* maximum reserved port */ +extern int ip6_auto_flowlabel; +extern int ip6_auto_linklocal; extern int ip6_use_tempaddr; /* whether to use temporary addresses. */ extern int ip6_prefer_tempaddr; /* whether to prefer temporary addresses in the source address selection */ +#endif /* VIMAGE_GLOBALS */ extern int ip6_use_defzone; /* whether to use the default scope zone when unspecified */ Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/nd6.h Thu Dec 11 16:26:38 2008 (r185937) @@ -328,6 +328,7 @@ struct nd_pfxrouter { LIST_HEAD(nd_prhead, nd_prefix); /* nd6.c */ +#ifdef VIMAGE_GLOBALS extern int nd6_prune; extern int nd6_delay; extern int nd6_umaxtries; @@ -341,8 +342,6 @@ extern struct nd_prhead nd_prefix; extern int nd6_debug; extern int nd6_onlink_ns_rfc4861; -#define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0) - extern struct callout nd6_timer_ch; /* nd6_rtr.c */ @@ -351,6 +350,9 @@ extern int ip6_desync_factor; /* seconds extern u_int32_t ip6_temp_preferred_lifetime; /* seconds */ extern u_int32_t ip6_temp_valid_lifetime; /* seconds */ extern int ip6_temp_regen_advance; /* seconds */ +#endif /* VIMAGE_GLOBALS */ + +#define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0) union nd_opts { struct nd_opt_hdr *nd_opt_array[8]; /* max = target address list */ Modified: head/sys/netinet6/tcp6_var.h ============================================================================== --- head/sys/netinet6/tcp6_var.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/tcp6_var.h Thu Dec 11 16:26:38 2008 (r185937) @@ -67,7 +67,9 @@ SYSCTL_DECL(_net_inet6_tcp6); #endif +#ifdef VIMAGE_GLOBALS extern int tcp_v6mssdflt; /* XXX */ +#endif struct ip6_hdr; void tcp6_ctlinput __P((int, struct sockaddr *, void *)); Modified: head/sys/netinet6/vinet6.h ============================================================================== --- head/sys/netinet6/vinet6.h Thu Dec 11 16:13:17 2008 (r185936) +++ head/sys/netinet6/vinet6.h Thu Dec 11 16:26:38 2008 (r185937) @@ -77,6 +77,7 @@ struct vnet_inet6 { int _nd6_inuse; int _nd6_allocated; + int _nd6_onlink_ns_rfc4861; struct llinfo_nd6 _llinfo_nd6; struct nd_drhead _nd_defrouter; struct nd_prhead _nd_prefix; @@ -109,7 +110,6 @@ struct vnet_inet6 { int _ip6_keepfaith; int _ip6stealth; time_t _ip6_log_time; - int _nd6_onlink_ns_rfc4861; int _pmtu_expire; int _pmtu_probe; From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 16:48:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE54E1065670; Thu, 11 Dec 2008 16:48:35 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B67008FC0C; Thu, 11 Dec 2008 16:48:35 +0000 (UTC) (envelope-from ps@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBGmZcT070380; Thu, 11 Dec 2008 16:48:35 GMT (envelope-from ps@svn.freebsd.org) Received: (from ps@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBGmZFD070379; Thu, 11 Dec 2008 16:48:35 GMT (envelope-from ps@svn.freebsd.org) Message-Id: <200812111648.mBBGmZFD070379@svn.freebsd.org> From: Paul Saab Date: Thu, 11 Dec 2008 16:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185938 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 16:48:36 -0000 Author: ps Date: Thu Dec 11 16:48:35 2008 New Revision: 185938 URL: http://svn.freebsd.org/changeset/base/185938 Log: Fix a leak introduced in r185902. We should free the devspec if we've successfully found a zfs pool. Modified: head/sys/boot/zfs/zfs.c Modified: head/sys/boot/zfs/zfs.c ============================================================================== --- head/sys/boot/zfs/zfs.c Thu Dec 11 16:26:38 2008 (r185937) +++ head/sys/boot/zfs/zfs.c Thu Dec 11 16:48:35 2008 (r185938) @@ -486,6 +486,7 @@ zfs_dev_open(struct open_file *f, ...) } f->f_devdata = spa; + free(dev); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 17:00:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBBAA1065673; Thu, 11 Dec 2008 17:00:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0558FC1F; Thu, 11 Dec 2008 17:00:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id C1F4941C735; Thu, 11 Dec 2008 18:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id PyE3-VK0sEcm; Thu, 11 Dec 2008 18:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 72CAC41C734; Thu, 11 Dec 2008 18:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 5F2EC4448DD; Thu, 11 Dec 2008 16:57:24 +0000 (UTC) Date: Thu, 11 Dec 2008 16:57:24 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org In-Reply-To: <200812111544.mBBFir50068918@svn.freebsd.org> Message-ID: <20081211165343.T97918@maildrop.int.zabbadoz.net> References: <200812111544.mBBFir50068918@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Subject: Re: svn commit: r185932 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 17:00:09 -0000 On Thu, 11 Dec 2008, Bjoern A. Zeeb wrote: > Author: bz > Date: Thu Dec 11 15:44:53 2008 > New Revision: 185932 > URL: http://svn.freebsd.org/changeset/base/185932 > > Log: > Error in case anyone tried to compile with both options VIMAGE and > the (temporary) option VIMAGE_GLOBALS. Hi, in case anyone wonders what those options mean, do or ill do, there is a wiki page here: http://wiki.freebsd.org/Image/KernelOptions > Sponsored by: The FreeBSD Foundation: > > Modified: > head/sys/sys/vimage.h > > Modified: head/sys/sys/vimage.h > ============================================================================== > --- head/sys/sys/vimage.h Thu Dec 11 15:42:59 2008 (r185931) > +++ head/sys/sys/vimage.h Thu Dec 11 15:44:53 2008 (r185932) > @@ -60,6 +60,10 @@ struct vnet_modlink { > .vmi_symmap = m_symmap \ > }; > > +#if defined(VIMAGE) && defined(VIMAGE_GLOBALS) > +#error "You cannot have both option VIMAGE and option VIMAGE_GLOBALS!" > +#endif > + > #ifdef VIMAGE_GLOBALS > #define VSYM(base, sym) (sym) > #else > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 17:06:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81333106564A; Thu, 11 Dec 2008 17:06:07 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from itchy.rabson.org (unknown [IPv6:2002:50b1:e8f2:1::143]) by mx1.freebsd.org (Postfix) with ESMTP id A4B728FC17; Thu, 11 Dec 2008 17:06:06 +0000 (UTC) (envelope-from dfr@rabson.org) Received: from [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc] (unknown [IPv6:2001:470:909f:1:21b:63ff:feb8:5abc]) by itchy.rabson.org (Postfix) with ESMTP id 0BC433FA8; Thu, 11 Dec 2008 17:05:40 +0000 (GMT) Message-Id: From: Doug Rabson To: Paul Saab In-Reply-To: <200812111648.mBBGmZFD070379@svn.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Date: Thu, 11 Dec 2008 17:06:04 +0000 References: <200812111648.mBBGmZFD070379@svn.freebsd.org> X-Mailer: Apple Mail (2.929.2) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185938 - head/sys/boot/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 17:06:07 -0000 On 11 Dec 2008, at 16:48, Paul Saab wrote: > Author: ps > Date: Thu Dec 11 16:48:35 2008 > New Revision: 185938 > URL: http://svn.freebsd.org/changeset/base/185938 > > Log: > Fix a leak introduced in r185902. We should free the devspec if > we've successfully found a zfs pool. Thanks. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 18:07:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03FE106564A; Thu, 11 Dec 2008 18:07:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C17408FC14; Thu, 11 Dec 2008 18:07:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBI7saQ072008; Thu, 11 Dec 2008 18:07:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBI7sSk072007; Thu, 11 Dec 2008 18:07:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812111807.mBBI7sSk072007@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 11 Dec 2008 18:07:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185939 - in stable/6/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 18:07:55 -0000 Author: kib Date: Thu Dec 11 18:07:54 2008 New Revision: 185939 URL: http://svn.freebsd.org/changeset/base/185939 Log: MFC r185557: Prevent creation of the duplicated negative entries. Requested by: jhb Modified: stable/6/sys/ (props changed) stable/6/sys/kern/vfs_cache.c Modified: stable/6/sys/kern/vfs_cache.c ============================================================================== --- stable/6/sys/kern/vfs_cache.c Thu Dec 11 16:48:35 2008 (r185938) +++ stable/6/sys/kern/vfs_cache.c Thu Dec 11 18:07:54 2008 (r185939) @@ -475,7 +475,7 @@ cache_enter(dvp, vp, cnp) struct vnode *vp; struct componentname *cnp; { - struct namecache *ncp; + struct namecache *ncp, *n2; struct nchashhead *ncpp; u_int32_t hash; int hold; @@ -531,8 +531,6 @@ cache_enter(dvp, vp, cnp) * name. */ if (vp) { - struct namecache *n2; - TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { if (n2->nc_dvp == dvp && n2->nc_nlen == cnp->cn_namelen && @@ -542,7 +540,16 @@ cache_enter(dvp, vp, cnp) return; } } - } + } else { + TAILQ_FOREACH(n2, &ncneg, nc_dst) { + if (n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } numcache++; if (!vp) { From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 18:32:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8F41065672; Thu, 11 Dec 2008 18:32:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9ED8C8FC1C; Thu, 11 Dec 2008 18:32:05 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBIW5td072502; Thu, 11 Dec 2008 18:32:05 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBIW5v0072501; Thu, 11 Dec 2008 18:32:05 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812111832.mBBIW5v0072501@svn.freebsd.org> From: Ed Schouten Date: Thu, 11 Dec 2008 18:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185940 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 18:32:05 -0000 Author: ed Date: Thu Dec 11 18:32:05 2008 New Revision: 185940 URL: http://svn.freebsd.org/changeset/base/185940 Log: Don't forget to add "npts" to rlimit_ident[] as well. When I added RLIMIT_NPTS, I forgot to add it to rlimit_ident[]. Make sure the rlimit_ident[] array is always RLIM_NLIMITS elements big. So if we ever forget to add new rlimits to this list again. it will contain a null pointer, instead of random data. Spotted by: rwatson Modified: head/sys/sys/resource.h Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Thu Dec 11 18:07:54 2008 (r185939) +++ head/sys/sys/resource.h Thu Dec 11 18:32:05 2008 (r185940) @@ -106,7 +106,7 @@ struct rusage { */ #ifdef _RLIMIT_IDENT -static char *rlimit_ident[] = { +static char *rlimit_ident[RLIM_NLIMITS] = { "cpu", "fsize", "data", @@ -118,6 +118,7 @@ static char *rlimit_ident[] = { "nofile", "sbsize", "vmem", + "npts", }; #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 18:46:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E389B106564A; Thu, 11 Dec 2008 18:46:28 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from gritton.org (gritton.org [161.58.222.4]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8DE8FC0C; Thu, 11 Dec 2008 18:46:28 +0000 (UTC) (envelope-from jamie@gritton.org) Received: from guppy.corp.verio.net (fw.oremut02.us.wh.verio.net [198.65.168.24]) (authenticated bits=0) by gritton.org (8.13.6.20060614/8.13.6) with ESMTP id mBBIkQe6046619; Thu, 11 Dec 2008 11:46:27 -0700 (MST) Message-ID: <49415FFD.5070400@gritton.org> Date: Thu, 11 Dec 2008 11:46:21 -0700 From: James Gritton User-Agent: Thunderbird 2.0.0.9 (X11/20080228) MIME-Version: 1.0 To: John Baldwin References: <200812102056.mBAKuJ97042379@svn.freebsd.org> In-Reply-To: <200812102056.mBAKuJ97042379@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.93, clamav-milter version 0.93 on gritton.org X-Virus-Status: Clean Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185878 - in head/sys: compat/freebsd32 kern modules/aio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 18:46:29 -0000 freebsd32_aio_waitcomplete() has a small error: @@ -2824,7 +2824,7 @@ freebsd32_aio_waitcomplete(struct thread *td, struct freebsd32_aio_waitcomplete_args *uap) { - struct timespec ts32; + struct timespec32 ts32; struct timespec ts, *tsp; int error; - Jamie John Baldwin wrote: > Author: jhb > Date: Wed Dec 10 20:56:19 2008 > New Revision: 185878 > URL: http://svn.freebsd.org/changeset/base/185878 > > Log: > - Add 32-bit compat system calls for VFS_AIO. The system calls live in the > aio code and are registered via the recently added SYSCALL32_*() helpers. > - Since the aio code likes to invoke fuword and suword a lot down in the > "bowels" of system calls, add a structure holding a set of operations for > things like storing errors, copying in the aiocb structure, storing > status, etc. The 32-bit system calls use a separate operations vector to > handle fuword32 vs fuword, etc. Also, the oldsigevent handling is now > done by having seperate operation vectors with different aiocb copyin > routines. > - Split out kern_foo() functions for the various AIO system calls so the > 32-bit front ends can manage things like copying in and converting > timespec structures, etc. > - For both the native and 32-bit aio_suspend() and lio_listio() calls, > just use copyin() to read the array of aiocb pointers instead of using > a for loop that iterated over fuword/fuword32. The error handling in > the old case was incomplete (lio_listio() just ignored any aiocb's that > it got an EFAULT trying to read rather than reporting an error), and > possibly slower. > > MFC after: 1 month > > Modified: > head/sys/compat/freebsd32/syscalls.master > head/sys/kern/vfs_aio.c > head/sys/modules/aio/Makefile > > Modified: head/sys/compat/freebsd32/syscalls.master > ============================================================================== > --- head/sys/compat/freebsd32/syscalls.master Wed Dec 10 20:55:44 2008 (r185877) > +++ head/sys/compat/freebsd32/syscalls.master Wed Dec 10 20:56:19 2008 (r185878) > @@ -454,9 +454,13 @@ > u_int nfds, int timeout); } > 253 AUE_ISSETUGID NOPROTO { int issetugid(void); } > 254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); } > -255 AUE_NULL UNIMPL nosys > -256 AUE_NULL UNIMPL nosys > -257 AUE_NULL UNIMPL nosys > +255 AUE_NULL NOSTD { int freebsd32_aio_read( \ > + struct aiocb32 *aiocbp); } > +256 AUE_NULL NOSTD { int freebsd32_aio_write( \ > + struct aiocb32 *aiocbp); } > +257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \ > + struct aiocb32 * const *acb_list, \ > + int nent, struct sigevent *sig); } > 258 AUE_NULL UNIMPL nosys > 259 AUE_NULL UNIMPL nosys > 260 AUE_NULL UNIMPL nosys > @@ -535,13 +539,22 @@ > 312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \ > gid_t sgid); } > 313 AUE_NULL OBSOL signanosleep > -314 AUE_NULL UNIMPL aio_return > -315 AUE_NULL UNIMPL aio_suspend > -316 AUE_NULL UNIMPL aio_cancel > -317 AUE_NULL UNIMPL aio_error > -318 AUE_NULL UNIMPL aio_read > -319 AUE_NULL UNIMPL aio_write > -320 AUE_NULL UNIMPL lio_listio > +314 AUE_NULL NOSTD { int freebsd32_aio_return( \ > + struct aiocb32 *aiocbp); } > +315 AUE_NULL NOSTD { int freebsd32_aio_suspend( \ > + struct aiocb32 * const * aiocbp, int nent, \ > + const struct timespec32 *timeout); } > +316 AUE_NULL NOSTD { int freebsd32_aio_cancel(int fd, \ > + struct aiocb32 *aiocbp); } > +317 AUE_NULL NOSTD { int freebsd32_aio_error( \ > + struct aiocb32 *aiocbp); } > +318 AUE_NULL NOSTD { int freebsd32_oaio_read( \ > + struct oaiocb32 *aiocbp); } > +319 AUE_NULL NOSTD { int freebsd32_oaio_write( \ > + struct oaiocb32 *aiocbp); } > +320 AUE_NULL NOSTD { int freebsd32_olio_listio(int mode, \ > + struct oaiocb32 * const *acb_list, \ > + int nent, struct osigevent32 *sig); } > 321 AUE_NULL NOPROTO { int yield(void); } > 322 AUE_NULL OBSOL thr_sleep > 323 AUE_NULL OBSOL thr_wakeup > @@ -618,7 +631,9 @@ > 358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \ > const char *path, int attrnamespace, \ > const char *attrname); } > -359 AUE_NULL UNIMPL aio_waitcomplete > +359 AUE_NULL NOSTD { int freebsd32_aio_waitcomplete( \ > + struct aiocb32 **aiocbp, \ > + struct timespec32 *timeout); } > 360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \ > uid_t *suid); } > 361 AUE_GETRESGID NOPROTO { int getresgid(gid_t *rgid, gid_t *egid, \ > @@ -766,7 +781,8 @@ > 462 AUE_NULL UNIMPL kmq_unlink > 463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); } > 464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); } > -465 AUE_NULL UNIMPL aio_fsync > +465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \ > + struct aiocb32 *aiocbp); } > 466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \ > lwpid_t lwpid, struct rtprio *rtp); } > 467 AUE_NULL UNIMPL nosys > > Modified: head/sys/kern/vfs_aio.c > ============================================================================== > --- head/sys/kern/vfs_aio.c Wed Dec 10 20:55:44 2008 (r185877) > +++ head/sys/kern/vfs_aio.c Wed Dec 10 20:56:19 2008 (r185878) > @@ -21,6 +21,8 @@ > #include > __FBSDID("$FreeBSD$"); > > +#include "opt_compat.h" > + > #include > #include > #include > @@ -121,6 +123,8 @@ static uint64_t jobseqno; > > FEATURE(aio, "Asynchronous I/O"); > > +static MALLOC_DEFINE(M_LIO, "lio", "listio aio control block list"); > + > static SYSCTL_NODE(_vfs, OID_AUTO, aio, CTLFLAG_RW, 0, "Async IO management"); > > static int max_aio_procs = MAX_AIO_PROCS; > @@ -308,6 +312,20 @@ struct kaioinfo { > #define KAIO_RUNDOWN 0x1 /* process is being run down */ > #define KAIO_WAKEUP 0x2 /* wakeup process when there is a significant event */ > > +/* > + * Operations used to interact with userland aio control blocks. > + * Different ABIs provide their own operations. > + */ > +struct aiocb_ops { > + int (*copyin)(struct aiocb *ujob, struct aiocb *kjob); > + long (*fetch_status)(struct aiocb *ujob); > + long (*fetch_error)(struct aiocb *ujob); > + int (*store_status)(struct aiocb *ujob, long status); > + int (*store_error)(struct aiocb *ujob, long error); > + int (*store_kernelinfo)(struct aiocb *ujob, long jobref); > + int (*store_aiocb)(struct aiocb **ujobp, struct aiocb *ujob); > +}; > + > static TAILQ_HEAD(,aiothreadlist) aio_freeproc; /* (c) Idle daemons */ > static struct sema aio_newproc_sem; > static struct mtx aio_job_mtx; > @@ -321,7 +339,7 @@ static int aio_free_entry(struct aiocbli > static void aio_process(struct aiocblist *aiocbe); > static int aio_newproc(int *); > int aio_aqueue(struct thread *td, struct aiocb *job, > - struct aioliojob *lio, int type, int osigev); > + struct aioliojob *lio, int type, struct aiocb_ops *ops); > static void aio_physwakeup(struct buf *bp); > static void aio_proc_rundown(void *arg, struct proc *p); > static void aio_proc_rundown_exec(void *arg, struct proc *p, struct image_params *imgp); > @@ -333,7 +351,6 @@ static int aio_unload(void); > static void aio_bio_done_notify(struct proc *userp, struct aiocblist *aiocbe, int type); > #define DONE_BUF 1 > #define DONE_QUEUE 2 > -static int do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev); > static int aio_kick(struct proc *userp); > static void aio_kick_nowait(struct proc *userp); > static void aio_kick_helper(void *context, int pending); > @@ -1322,13 +1339,122 @@ aio_swake_cb(struct socket *so, struct s > SOCKBUF_UNLOCK(sb); > } > > +static int > +convert_old_sigevent(struct osigevent *osig, struct sigevent *nsig) > +{ > + > + /* > + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are > + * supported by AIO with the old sigevent structure. > + */ > + nsig->sigev_notify = osig->sigev_notify; > + switch (nsig->sigev_notify) { > + case SIGEV_NONE: > + break; > + case SIGEV_SIGNAL: > + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; > + break; > + case SIGEV_KEVENT: > + nsig->sigev_notify_kqueue = > + osig->__sigev_u.__sigev_notify_kqueue; > + nsig->sigev_value.sival_ptr = osig->sigev_value.sival_ptr; > + break; > + default: > + return (EINVAL); > + } > + return (0); > +} > + > +static int > +aiocb_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) > +{ > + struct oaiocb *ojob; > + int error; > + > + bzero(kjob, sizeof(struct aiocb)); > + error = copyin(ujob, kjob, sizeof(struct oaiocb)); > + if (error) > + return (error); > + ojob = (struct oaiocb *)kjob; > + return (convert_old_sigevent(&ojob->aio_sigevent, &kjob->aio_sigevent)); > +} > + > +static int > +aiocb_copyin(struct aiocb *ujob, struct aiocb *kjob) > +{ > + > + return (copyin(ujob, kjob, sizeof(struct aiocb))); > +} > + > +static long > +aiocb_fetch_status(struct aiocb *ujob) > +{ > + > + return (fuword(&ujob->_aiocb_private.status)); > +} > + > +static long > +aiocb_fetch_error(struct aiocb *ujob) > +{ > + > + return (fuword(&ujob->_aiocb_private.error)); > +} > + > +static int > +aiocb_store_status(struct aiocb *ujob, long status) > +{ > + > + return (suword(&ujob->_aiocb_private.status, status)); > +} > + > +static int > +aiocb_store_error(struct aiocb *ujob, long error) > +{ > + > + return (suword(&ujob->_aiocb_private.error, error)); > +} > + > +static int > +aiocb_store_kernelinfo(struct aiocb *ujob, long jobref) > +{ > + > + return (suword(&ujob->_aiocb_private.kernelinfo, jobref)); > +} > + > +static int > +aiocb_store_aiocb(struct aiocb **ujobp, struct aiocb *ujob) > +{ > + > + return (suword(ujobp, (long)ujob)); > +} > + > +static struct aiocb_ops aiocb_ops = { > + .copyin = aiocb_copyin, > + .fetch_status = aiocb_fetch_status, > + .fetch_error = aiocb_fetch_error, > + .store_status = aiocb_store_status, > + .store_error = aiocb_store_error, > + .store_kernelinfo = aiocb_store_kernelinfo, > + .store_aiocb = aiocb_store_aiocb, > +}; > + > +static struct aiocb_ops aiocb_ops_osigevent = { > + .copyin = aiocb_copyin_old_sigevent, > + .fetch_status = aiocb_fetch_status, > + .fetch_error = aiocb_fetch_error, > + .store_status = aiocb_store_status, > + .store_error = aiocb_store_error, > + .store_kernelinfo = aiocb_store_kernelinfo, > + .store_aiocb = aiocb_store_aiocb, > +}; > + > /* > * Queue a new AIO request. Choosing either the threaded or direct physio VCHR > * technique is done in this code. > */ > int > aio_aqueue(struct thread *td, struct aiocb *job, struct aioliojob *lj, > - int type, int oldsigev) > + int type, struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > struct file *fp; > @@ -1347,13 +1473,13 @@ aio_aqueue(struct thread *td, struct aio > > ki = p->p_aioinfo; > > - suword(&job->_aiocb_private.status, -1); > - suword(&job->_aiocb_private.error, 0); > - suword(&job->_aiocb_private.kernelinfo, -1); > + ops->store_status(job, -1); > + ops->store_error(job, 0); > + ops->store_kernelinfo(job, -1); > > if (num_queue_count >= max_queue_count || > ki->kaio_count >= ki->kaio_qallowed_count) { > - suword(&job->_aiocb_private.error, EAGAIN); > + ops->store_error(job, EAGAIN); > return (EAGAIN); > } > > @@ -1362,16 +1488,9 @@ aio_aqueue(struct thread *td, struct aio > aiocbe->outputcharge = 0; > knlist_init(&aiocbe->klist, AIO_MTX(ki), NULL, NULL, NULL); > > - if (oldsigev) { > - bzero(&aiocbe->uaiocb, sizeof(struct aiocb)); > - error = copyin(job, &aiocbe->uaiocb, sizeof(struct oaiocb)); > - bcopy(&aiocbe->uaiocb.__spare__, &aiocbe->uaiocb.aio_sigevent, > - sizeof(struct osigevent)); > - } else { > - error = copyin(job, &aiocbe->uaiocb, sizeof(struct aiocb)); > - } > + error = ops->copyin(job, &aiocbe->uaiocb); > if (error) { > - suword(&job->_aiocb_private.error, error); > + ops->store_error(job, error); > uma_zfree(aiocb_zone, aiocbe); > return (error); > } > @@ -1380,11 +1499,11 @@ aio_aqueue(struct thread *td, struct aio > aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_SIGNAL && > aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_THREAD_ID && > aiocbe->uaiocb.aio_sigevent.sigev_notify != SIGEV_NONE) { > - suword(&job->_aiocb_private.error, EINVAL); > + ops->store_error(job, EINVAL); > uma_zfree(aiocb_zone, aiocbe); > return (EINVAL); > } > - > + > if ((aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_SIGNAL || > aiocbe->uaiocb.aio_sigevent.sigev_notify == SIGEV_THREAD_ID) && > !_SIG_VALID(aiocbe->uaiocb.aio_sigevent.sigev_signo)) { > @@ -1416,7 +1535,7 @@ aio_aqueue(struct thread *td, struct aio > } > if (error) { > uma_zfree(aiocb_zone, aiocbe); > - suword(&job->_aiocb_private.error, error); > + ops->store_error(job, error); > return (error); > } > > @@ -1436,7 +1555,7 @@ aio_aqueue(struct thread *td, struct aio > jid = jobrefid++; > aiocbe->seqno = jobseqno++; > mtx_unlock(&aio_job_mtx); > - error = suword(&job->_aiocb_private.kernelinfo, jid); > + error = ops->store_kernelinfo(job, jid); > if (error) { > error = EINVAL; > goto aqueue_fail; > @@ -1467,12 +1586,12 @@ aqueue_fail: > if (error) { > fdrop(fp, td); > uma_zfree(aiocb_zone, aiocbe); > - suword(&job->_aiocb_private.error, error); > + ops->store_error(job, error); > goto done; > } > no_kqueue: > > - suword(&job->_aiocb_private.error, EINPROGRESS); > + ops->store_error(job, EINPROGRESS); > aiocbe->uaiocb._aiocb_private.error = EINPROGRESS; > aiocbe->userproc = p; > aiocbe->cred = crhold(td->td_ucred); > @@ -1528,7 +1647,7 @@ no_kqueue: > #if 0 > if (error > 0) { > aiocbe->uaiocb._aiocb_private.error = error; > - suword(&job->_aiocb_private.error, error); > + ops->store_error(job, error); > goto done; > } > #endif > @@ -1643,19 +1762,17 @@ aio_kick_helper(void *context, int pendi > * Support the aio_return system call, as a side-effect, kernel resources are > * released. > */ > -int > -aio_return(struct thread *td, struct aio_return_args *uap) > +static int > +kern_aio_return(struct thread *td, struct aiocb *uaiocb, struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > struct aiocblist *cb; > - struct aiocb *uaiocb; > struct kaioinfo *ki; > int status, error; > > ki = p->p_aioinfo; > if (ki == NULL) > return (EINVAL); > - uaiocb = uap->aiocbp; > AIO_LOCK(ki); > TAILQ_FOREACH(cb, &ki->kaio_done, plist) { > if (cb->uuaiocb == uaiocb) > @@ -1675,8 +1792,8 @@ aio_return(struct thread *td, struct aio > } > aio_free_entry(cb); > AIO_UNLOCK(ki); > - suword(&uaiocb->_aiocb_private.error, error); > - suword(&uaiocb->_aiocb_private.status, status); > + ops->store_error(uaiocb, error); > + ops->store_status(uaiocb, status); > } else { > error = EINVAL; > AIO_UNLOCK(ki); > @@ -1684,37 +1801,32 @@ aio_return(struct thread *td, struct aio > return (error); > } > > +int > +aio_return(struct thread *td, struct aio_return_args *uap) > +{ > + > + return (kern_aio_return(td, uap->aiocbp, &aiocb_ops)); > +} > + > /* > * Allow a process to wakeup when any of the I/O requests are completed. > */ > -int > -aio_suspend(struct thread *td, struct aio_suspend_args *uap) > +static int > +kern_aio_suspend(struct thread *td, int njoblist, struct aiocb **ujoblist, > + struct timespec *ts) > { > struct proc *p = td->td_proc; > struct timeval atv; > - struct timespec ts; > - struct aiocb *const *cbptr, *cbp; > struct kaioinfo *ki; > struct aiocblist *cb, *cbfirst; > - struct aiocb **ujoblist; > - int njoblist; > - int error; > - int timo; > - int i; > - > - if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) > - return (EINVAL); > + int error, i, timo; > > timo = 0; > - if (uap->timeout) { > - /* Get timespec struct. */ > - if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) > - return (error); > - > - if (ts.tv_nsec < 0 || ts.tv_nsec >= 1000000000) > + if (ts) { > + if (ts->tv_nsec < 0 || ts->tv_nsec >= 1000000000) > return (EINVAL); > > - TIMESPEC_TO_TIMEVAL(&atv, &ts); > + TIMESPEC_TO_TIMEVAL(&atv, ts); > if (itimerfix(&atv)) > return (EINVAL); > timo = tvtohz(&atv); > @@ -1724,22 +1836,8 @@ aio_suspend(struct thread *td, struct ai > if (ki == NULL) > return (EAGAIN); > > - njoblist = 0; > - ujoblist = uma_zalloc(aiol_zone, M_WAITOK); > - cbptr = uap->aiocbp; > - > - for (i = 0; i < uap->nent; i++) { > - cbp = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); > - if (cbp == 0) > - continue; > - ujoblist[njoblist] = cbp; > - njoblist++; > - } > - > - if (njoblist == 0) { > - uma_zfree(aiol_zone, ujoblist); > + if (njoblist == 0) > return (0); > - } > > AIO_LOCK(ki); > for (;;) { > @@ -1769,6 +1867,31 @@ aio_suspend(struct thread *td, struct ai > } > RETURN: > AIO_UNLOCK(ki); > + return (error); > +} > + > +int > +aio_suspend(struct thread *td, struct aio_suspend_args *uap) > +{ > + struct timespec ts, *tsp; > + struct aiocb **ujoblist; > + int error; > + > + if (uap->nent < 0 || uap->nent > AIO_LISTIO_MAX) > + return (EINVAL); > + > + if (uap->timeout) { > + /* Get timespec struct. */ > + if ((error = copyin(uap->timeout, &ts, sizeof(ts))) != 0) > + return (error); > + tsp = &ts; > + } else > + tsp = NULL; > + > + ujoblist = uma_zalloc(aiol_zone, M_WAITOK); > + error = copyin(uap->aiocbp, ujoblist, uap->nent * sizeof(ujoblist[0])); > + if (error == 0) > + error = kern_aio_suspend(td, uap->nent, ujoblist, tsp); > uma_zfree(aiol_zone, ujoblist); > return (error); > } > @@ -1876,8 +1999,8 @@ done: > * only. For a user mode async implementation, it would be best to do it in > * a userland subroutine. > */ > -int > -aio_error(struct thread *td, struct aio_error_args *uap) > +static int > +kern_aio_error(struct thread *td, struct aiocb *aiocbp, struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > struct aiocblist *cb; > @@ -1892,7 +2015,7 @@ aio_error(struct thread *td, struct aio_ > > AIO_LOCK(ki); > TAILQ_FOREACH(cb, &ki->kaio_all, allist) { > - if (cb->uuaiocb == uap->aiocbp) { > + if (cb->uuaiocb == aiocbp) { > if (cb->jobstate == JOBST_JOBFINISHED) > td->td_retval[0] = > cb->uaiocb._aiocb_private.error; > @@ -1907,9 +2030,9 @@ aio_error(struct thread *td, struct aio_ > /* > * Hack for failure of aio_aqueue. > */ > - status = fuword(&uap->aiocbp->_aiocb_private.status); > + status = ops->fetch_status(aiocbp); > if (status == -1) { > - td->td_retval[0] = fuword(&uap->aiocbp->_aiocb_private.error); > + td->td_retval[0] = ops->fetch_error(aiocbp); > return (0); > } > > @@ -1917,19 +2040,27 @@ aio_error(struct thread *td, struct aio_ > return (0); > } > > +int > +aio_error(struct thread *td, struct aio_error_args *uap) > +{ > + > + return (kern_aio_error(td, uap->aiocbp, &aiocb_ops)); > +} > + > /* syscall - asynchronous read from a file (REALTIME) */ > int > oaio_read(struct thread *td, struct oaio_read_args *uap) > { > > - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, 1); > + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_READ, > + &aiocb_ops_osigevent)); > } > > int > aio_read(struct thread *td, struct aio_read_args *uap) > { > > - return aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, 0); > + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_READ, &aiocb_ops)); > } > > /* syscall - asynchronous write to a file (REALTIME) */ > @@ -1937,47 +2068,34 @@ int > oaio_write(struct thread *td, struct oaio_write_args *uap) > { > > - return aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, 1); > + return (aio_aqueue(td, (struct aiocb *)uap->aiocbp, NULL, LIO_WRITE, > + &aiocb_ops_osigevent)); > } > > int > aio_write(struct thread *td, struct aio_write_args *uap) > { > > - return aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, 0); > -} > - > -/* syscall - list directed I/O (REALTIME) */ > -int > -olio_listio(struct thread *td, struct olio_listio_args *uap) > -{ > - return do_lio_listio(td, (struct lio_listio_args *)uap, 1); > -} > - > -/* syscall - list directed I/O (REALTIME) */ > -int > -lio_listio(struct thread *td, struct lio_listio_args *uap) > -{ > - return do_lio_listio(td, uap, 0); > + return (aio_aqueue(td, uap->aiocbp, NULL, LIO_WRITE, &aiocb_ops)); > } > > static int > -do_lio_listio(struct thread *td, struct lio_listio_args *uap, int oldsigev) > +kern_lio_listio(struct thread *td, int mode, struct aiocb * const *uacb_list, > + struct aiocb **acb_list, int nent, struct sigevent *sig, > + struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > - struct aiocb *iocb, * const *cbptr; > + struct aiocb *iocb; > struct kaioinfo *ki; > struct aioliojob *lj; > struct kevent kev; > - int nent; > int error; > int nerror; > int i; > > - if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) > + if ((mode != LIO_NOWAIT) && (mode != LIO_WAIT)) > return (EINVAL); > > - nent = uap->nent; > if (nent < 0 || nent > AIO_LISTIO_MAX) > return (EINVAL); > > @@ -1996,21 +2114,13 @@ do_lio_listio(struct thread *td, struct > /* > * Setup signal. > */ > - if (uap->sig && (uap->mode == LIO_NOWAIT)) { > - bzero(&lj->lioj_signal, sizeof(&lj->lioj_signal)); > - error = copyin(uap->sig, &lj->lioj_signal, > - oldsigev ? sizeof(struct osigevent) : > - sizeof(struct sigevent)); > - if (error) { > - uma_zfree(aiolio_zone, lj); > - return (error); > - } > - > + if (sig && (mode == LIO_NOWAIT)) { > + bcopy(sig, &lj->lioj_signal, sizeof(lj->lioj_signal)); > if (lj->lioj_signal.sigev_notify == SIGEV_KEVENT) { > /* Assume only new style KEVENT */ > kev.filter = EVFILT_LIO; > kev.flags = EV_ADD | EV_ENABLE | EV_FLAG1; > - kev.ident = (uintptr_t)uap->acb_list; /* something unique */ > + kev.ident = (uintptr_t)uacb_list; /* something unique */ > kev.data = (intptr_t)lj; > /* pass user defined sigval data */ > kev.udata = lj->lioj_signal.sigev_value.sival_ptr; > @@ -2050,11 +2160,10 @@ do_lio_listio(struct thread *td, struct > * Get pointers to the list of I/O requests. > */ > nerror = 0; > - cbptr = uap->acb_list; > - for (i = 0; i < uap->nent; i++) { > - iocb = (struct aiocb *)(intptr_t)fuword(&cbptr[i]); > - if (((intptr_t)iocb != -1) && ((intptr_t)iocb != 0)) { > - error = aio_aqueue(td, iocb, lj, LIO_NOP, oldsigev); > + for (i = 0; i < nent; i++) { > + iocb = acb_list[i]; > + if (iocb != NULL) { > + error = aio_aqueue(td, iocb, lj, LIO_NOP, ops); > if (error != 0) > nerror++; > } > @@ -2062,7 +2171,7 @@ do_lio_listio(struct thread *td, struct > > error = 0; > AIO_LOCK(ki); > - if (uap->mode == LIO_WAIT) { > + if (mode == LIO_WAIT) { > while (lj->lioj_count - 1 != lj->lioj_finished_count) { > ki->kaio_flags |= KAIO_WAKEUP; > error = msleep(&p->p_aioinfo, AIO_MTX(ki), > @@ -2105,6 +2214,75 @@ do_lio_listio(struct thread *td, struct > return (error); > } > > +/* syscall - list directed I/O (REALTIME) */ > +int > +olio_listio(struct thread *td, struct olio_listio_args *uap) > +{ > + struct aiocb **acb_list; > + struct sigevent *sigp, sig; > + struct osigevent osig; > + int error, nent; > + > + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) > + return (EINVAL); > + > + nent = uap->nent; > + if (nent < 0 || nent > AIO_LISTIO_MAX) > + return (EINVAL); > + > + if (uap->sig && (uap->mode == LIO_NOWAIT)) { > + error = copyin(uap->sig, &osig, sizeof(osig)); > + if (error) > + return (error); > + error = convert_old_sigevent(&osig, &sig); > + if (error) > + return (error); > + sigp = &sig; > + } else > + sigp = NULL; > + > + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); > + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); > + if (error == 0) > + error = kern_lio_listio(td, uap->mode, > + (struct aiocb * const *)uap->acb_list, acb_list, nent, sigp, > + &aiocb_ops_osigevent); > + free(acb_list, M_LIO); > + return (error); > +} > + > +/* syscall - list directed I/O (REALTIME) */ > +int > +lio_listio(struct thread *td, struct lio_listio_args *uap) > +{ > + struct aiocb **acb_list; > + struct sigevent *sigp, sig; > + int error, nent; > + > + if ((uap->mode != LIO_NOWAIT) && (uap->mode != LIO_WAIT)) > + return (EINVAL); > + > + nent = uap->nent; > + if (nent < 0 || nent > AIO_LISTIO_MAX) > + return (EINVAL); > + > + if (uap->sig && (uap->mode == LIO_NOWAIT)) { > + error = copyin(uap->sig, &sig, sizeof(sig)); > + if (error) > + return (error); > + sigp = &sig; > + } else > + sigp = NULL; > + > + acb_list = malloc(sizeof(struct aiocb *) * nent, M_LIO, M_WAITOK); > + error = copyin(uap->acb_list, acb_list, nent * sizeof(acb_list[0])); > + if (error == 0) > + error = kern_lio_listio(td, uap->mode, uap->acb_list, acb_list, > + nent, sigp, &aiocb_ops); > + free(acb_list, M_LIO); > + return (error); > +} > + > /* > * Called from interrupt thread for physio, we should return as fast > * as possible, so we schedule a biohelper task. > @@ -2156,30 +2334,25 @@ biohelper(void *context, int pending) > } > > /* syscall - wait for the next completion of an aio request */ > -int > -aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) > +static int > +kern_aio_waitcomplete(struct thread *td, struct aiocb **aiocbp, > + struct timespec *ts, struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > struct timeval atv; > - struct timespec ts; > struct kaioinfo *ki; > struct aiocblist *cb; > struct aiocb *uuaiocb; > int error, status, timo; > > - suword(uap->aiocbp, (long)NULL); > + ops->store_aiocb(aiocbp, NULL); > > timo = 0; > - if (uap->timeout) { > - /* Get timespec struct. */ > - error = copyin(uap->timeout, &ts, sizeof(ts)); > - if (error) > - return (error); > - > - if ((ts.tv_nsec < 0) || (ts.tv_nsec >= 1000000000)) > + if (ts) { > + if ((ts->tv_nsec < 0) || (ts->tv_nsec >= 1000000000)) > return (EINVAL); > > - TIMESPEC_TO_TIMEVAL(&atv, &ts); > + TIMESPEC_TO_TIMEVAL(&atv, ts); > if (itimerfix(&atv)) > return (EINVAL); > timo = tvtohz(&atv); > @@ -2217,9 +2390,9 @@ aio_waitcomplete(struct thread *td, stru > } > aio_free_entry(cb); > AIO_UNLOCK(ki); > - suword(uap->aiocbp, (long)uuaiocb); > - suword(&uuaiocb->_aiocb_private.error, error); > - suword(&uuaiocb->_aiocb_private.status, status); > + ops->store_aiocb(aiocbp, uuaiocb); > + ops->store_error(uuaiocb, error); > + ops->store_status(uuaiocb, status); > } else > AIO_UNLOCK(ki); > > @@ -2227,17 +2400,43 @@ aio_waitcomplete(struct thread *td, stru > } > > int > -aio_fsync(struct thread *td, struct aio_fsync_args *uap) > +aio_waitcomplete(struct thread *td, struct aio_waitcomplete_args *uap) > +{ > + struct timespec ts, *tsp; > + int error; > + > + if (uap->timeout) { > + /* Get timespec struct. */ > + error = copyin(uap->timeout, &ts, sizeof(ts)); > + if (error) > + return (error); > + tsp = &ts; > + } else > + tsp = NULL; > + > + return (kern_aio_waitcomplete(td, uap->aiocbp, tsp, &aiocb_ops)); > +} > + > +static int > +kern_aio_fsync(struct thread *td, int op, struct aiocb *aiocbp, > + struct aiocb_ops *ops) > { > struct proc *p = td->td_proc; > struct kaioinfo *ki; > > - if (uap->op != O_SYNC) /* XXX lack of O_DSYNC */ > + if (op != O_SYNC) /* XXX lack of O_DSYNC */ > return (EINVAL); > ki = p->p_aioinfo; > if (ki == NULL) > aio_init_aioinfo(p); > - return aio_aqueue(td, uap->aiocbp, NULL, LIO_SYNC, 0); > + return (aio_aqueue(td, aiocbp, NULL, LIO_SYNC, ops)); > +} > + > +int > +aio_fsync(struct thread *td, struct aio_fsync_args *uap) > +{ > + > + return (kern_aio_fsync(td, uap->op, uap->aiocbp, &aiocb_ops)); > } > > /* kqueue attach function */ > @@ -2325,3 +2524,433 @@ filt_lio(struct knote *kn, long hint) > > return (lj->lioj_flags & LIOJ_KEVENT_POSTED); > } > + > +#ifdef COMPAT_IA32 > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +struct __aiocb_private32 { > + int32_t status; > + int32_t error; > + uint32_t kernelinfo; > +}; > + > +typedef struct oaiocb32 { > + int aio_fildes; /* File descriptor */ > + uint64_t aio_offset __packed; /* File offset for I/O */ > + uint32_t aio_buf; /* I/O buffer in process space */ > + uint32_t aio_nbytes; /* Number of bytes for I/O */ > + struct osigevent32 aio_sigevent; /* Signal to deliver */ > + int aio_lio_opcode; /* LIO opcode */ > + int aio_reqprio; /* Request priority -- ignored */ > + struct __aiocb_private32 _aiocb_private; > +} oaiocb32_t; > + > +typedef struct aiocb32 { > + int32_t aio_fildes; /* File descriptor */ > + uint64_t aio_offset __packed; /* File offset for I/O */ > + uint32_t aio_buf; /* I/O buffer in process space */ > + uint32_t aio_nbytes; /* Number of bytes for I/O */ > + int __spare__[2]; > + uint32_t __spare2__; > + int aio_lio_opcode; /* LIO opcode */ > + int aio_reqprio; /* Request priority -- ignored */ > + struct __aiocb_private32 _aiocb_private; > + struct sigevent32 aio_sigevent; /* Signal to deliver */ > +} aiocb32_t; > + > +static int > +convert_old_sigevent32(struct osigevent32 *osig, struct sigevent *nsig) > +{ > + > + /* > + * Only SIGEV_NONE, SIGEV_SIGNAL, and SIGEV_KEVENT are > + * supported by AIO with the old sigevent structure. > + */ > + CP(*osig, *nsig, sigev_notify); > + switch (nsig->sigev_notify) { > + case SIGEV_NONE: > + break; > + case SIGEV_SIGNAL: > + nsig->sigev_signo = osig->__sigev_u.__sigev_signo; > + break; > + case SIGEV_KEVENT: > + nsig->sigev_notify_kqueue = > + osig->__sigev_u.__sigev_notify_kqueue; > + PTRIN_CP(*osig, *nsig, sigev_value.sival_ptr); > + break; > + default: > + return (EINVAL); > + } > + return (0); > +} > + > +static int > +aiocb32_copyin_old_sigevent(struct aiocb *ujob, struct aiocb *kjob) > +{ > + struct oaiocb32 job32; > + int error; > + > + bzero(kjob, sizeof(struct aiocb)); > + error = copyin(ujob, &job32, sizeof(job32)); > + if (error) > + return (error); > + > + CP(job32, *kjob, aio_fildes); > + CP(job32, *kjob, aio_offset); > + PTRIN_CP(job32, *kjob, aio_buf); > + CP(job32, *kjob, aio_nbytes); > + CP(job32, *kjob, aio_lio_opcode); > + CP(job32, *kjob, aio_reqprio); > + CP(job32, *kjob, _aiocb_private.status); > + CP(job32, *kjob, _aiocb_private.error); > + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); > + return (convert_old_sigevent32(&job32.aio_sigevent, > + &kjob->aio_sigevent)); > +} > + > +static int > +convert_sigevent32(struct sigevent32 *sig32, struct sigevent *sig) > +{ > + > + CP(*sig32, *sig, sigev_notify); > + switch (sig->sigev_notify) { > + case SIGEV_NONE: > + break; > + case SIGEV_THREAD_ID: > + CP(*sig32, *sig, sigev_notify_thread_id); > + /* FALLTHROUGH */ > + case SIGEV_SIGNAL: > + CP(*sig32, *sig, sigev_signo); > + break; > + case SIGEV_KEVENT: > + CP(*sig32, *sig, sigev_notify_kqueue); > + PTRIN_CP(*sig32, *sig, sigev_value.sival_ptr); > + break; > + default: > + return (EINVAL); > + } > + return (0); > +} > + > +static int > +aiocb32_copyin(struct aiocb *ujob, struct aiocb *kjob) > +{ > + struct aiocb32 job32; > + int error; > + > + error = copyin(ujob, &job32, sizeof(job32)); > + if (error) > + return (error); > + CP(job32, *kjob, aio_fildes); > + CP(job32, *kjob, aio_offset); > + PTRIN_CP(job32, *kjob, aio_buf); > + CP(job32, *kjob, aio_nbytes); > + CP(job32, *kjob, aio_lio_opcode); > + CP(job32, *kjob, aio_reqprio); > + CP(job32, *kjob, _aiocb_private.status); > + CP(job32, *kjob, _aiocb_private.error); > + PTRIN_CP(job32, *kjob, _aiocb_private.kernelinfo); > + return (convert_sigevent32(&job32.aio_sigevent, &kjob->aio_sigevent)); > +} > + > +static long > +aiocb32_fetch_status(struct aiocb *ujob) > +{ > + struct aiocb32 *ujob32; > + > + ujob32 = (struct aiocb32 *)ujob; > + return (fuword32(&ujob32->_aiocb_private.status)); > +} > + > +static long > +aiocb32_fetch_error(struct aiocb *ujob) > +{ > + struct aiocb32 *ujob32; > + > + ujob32 = (struct aiocb32 *)ujob; > + return (fuword32(&ujob32->_aiocb_private.error)); > +} > + > +static int > +aiocb32_store_status(struct aiocb *ujob, long status) > +{ > + struct aiocb32 *ujob32; > + > + ujob32 = (struct aiocb32 *)ujob; > + return (suword32(&ujob32->_aiocb_private.status, status)); > +} > + > +static int > +aiocb32_store_error(struct aiocb *ujob, long error) > +{ > + struct aiocb32 *ujob32; > + > + ujob32 = (struct aiocb32 *)ujob; > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 19:03:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84931106564A; Thu, 11 Dec 2008 19:03:20 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from core.tav.kiev.ua (tavex.colocall.com [62.149.10.42]) by mx1.freebsd.org (Postfix) with ESMTP id 3BCA88FC14; Thu, 11 Dec 2008 19:03:19 +0000 (UTC) (envelope-from gonzo@bluezbox.com) Received: from 204-174-83-31.static569.dsl.ucc-net.ca ([204.174.83.31] helo=[10.80.5.156]) by core.tav.kiev.ua with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.52 (FreeBSD)) id 1LAqLj-000Es7-9n; Thu, 11 Dec 2008 20:33:25 +0200 Message-ID: <49415CD4.7090904@bluezbox.com> Date: Thu, 11 Dec 2008 10:32:52 -0800 From: Oleksandr Tymoshenko User-Agent: Thunderbird 2.0.0.18 (Windows/20081105) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <200812110822.mBB8MKLd059320@svn.freebsd.org> <86oczjklk8.fsf@ds4.des.no> In-Reply-To: <86oczjklk8.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Core-Spam-Level: ---- X-Core-Spam-Report: Spam detection software, running on the system "core.tav.kiev.ua", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Dag-Erling Smørgrav wrote: > Warner Losh writes: >> Author: imp >> Date: Thu Dec 11 08:22:20 2008 >> New Revision: 185925 >> URL: http://svn.freebsd.org/changeset/base/185925 >> >> Log: >> Push mips support into the tree. > > Just to pick a random mips commit - > > There is something wrong with the mips toolchain. The build breaks in > libpam, while building the static version, which includes all modules: > > ../modules/pam_deny/libpam_deny.a(pam_deny.o)(.text+0x3c): In function `pam_sm_open_session': > /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple definition of `pam_sm_open_session' > ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/src/lib/libpam/modules/pam_chroot/pam_chroot.c:54: first defined here > [lather, rinse, repeat for every service function in every module] > > The service functions should be static. The logic PAM uses to determine > whether it is building static or shared modules is as follows: > > #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) Using ABI calls (-mabicalls) assume -fPIC. This issue is known for a long time now and I proposed a fix but didn't have enough time to get/commit proper solution. We discussed it about three months ago: http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008430.html [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r185925 - in head/contrib/binutils: bfd gas/config ld/emulparams X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 19:03:20 -0000 Dag-Erling Smørgrav wrote: > Warner Losh writes: >> Author: imp >> Date: Thu Dec 11 08:22:20 2008 >> New Revision: 185925 >> URL: http://svn.freebsd.org/changeset/base/185925 >> >> Log: >> Push mips support into the tree. > > Just to pick a random mips commit - > > There is something wrong with the mips toolchain. The build breaks in > libpam, while building the static version, which includes all modules: > > ../modules/pam_deny/libpam_deny.a(pam_deny.o)(.text+0x3c): In function `pam_sm_open_session': > /src/lib/libpam/modules/pam_deny/pam_deny.c:80: multiple definition of `pam_sm_open_session' > ../modules/pam_chroot/libpam_chroot.a(pam_chroot.o)(.text+0x14):/src/lib/libpam/modules/pam_chroot/pam_chroot.c:54: first defined here > [lather, rinse, repeat for every service function in every module] > > The service functions should be static. The logic PAM uses to determine > whether it is building static or shared modules is as follows: > > #if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) Using ABI calls (-mabicalls) assume -fPIC. This issue is known for a long time now and I proposed a fix but didn't have enough time to get/commit proper solution. We discussed it about three months ago: http://lists.freebsd.org/pipermail/freebsd-arch/2008-August/008430.html From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 19:59:36 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C5FB51065670; Thu, 11 Dec 2008 19:59:36 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id A8A578FC0C; Thu, 11 Dec 2008 19:59:36 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id mBBJMlRA028565; Thu, 11 Dec 2008 11:22:47 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id mBBJMlmD028564; Thu, 11 Dec 2008 11:22:47 -0800 (PST) (envelope-from obrien) Date: Thu, 11 Dec 2008 11:22:47 -0800 From: "David O'Brien" To: Luigi Rizzo Message-ID: <20081211192247.GB28382@dragon.NUXI.org> References: <200812021457.mB2Evmha063418@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812021457.mB2Evmha063418@svn.freebsd.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r185562 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 19:59:36 -0000 On Tue, Dec 02, 2008 at 02:57:48PM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Tue Dec 2 14:57:48 2008 > New Revision: 185562 > URL: http://svn.freebsd.org/changeset/base/185562 .. > BIOSes can be hooked to PXE) by pressing F6. There is unfortunately > no room to print the additional menu option. > Also, to make room for the code, the 'Default: ' string is > changed to 'Boot: ' JHB had patches to increase the size of boot0 to two sectors. It was at first deemed unsuitable due to buggy BIOS's. This isn't really an issue any more. After that, other things were done that a single sector was enough space for boot0. What do you think about growing boot0 to two sectors to give more room for features? From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 19:59:37 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 097371065673; Thu, 11 Dec 2008 19:59:37 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id E0F8F8FC1D; Thu, 11 Dec 2008 19:59:36 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id mBBJKArx028480; Thu, 11 Dec 2008 11:20:10 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id mBBJKAx5028479; Thu, 11 Dec 2008 11:20:10 -0800 (PST) (envelope-from obrien) Date: Thu, 11 Dec 2008 11:20:10 -0800 From: "David O'Brien" To: Luigi Rizzo Message-ID: <20081211192010.GA28382@dragon.NUXI.org> References: <200812021457.mB2Evmha063418@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200812021457.mB2Evmha063418@svn.freebsd.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r185562 - head/sys/boot/i386/boot0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 19:59:37 -0000 Luigi, If I understand this correctly: On Tue, Dec 02, 2008 at 02:57:48PM +0000, Luigi Rizzo wrote: > Author: luigi > Date: Tue Dec 2 14:57:48 2008 > New Revision: 185562 > URL: http://svn.freebsd.org/changeset/base/185562 .. > The behaviour of the standard build differs from the previous > version in the following, minor things: > + 'noupdate' is the default, which means the code does not > write back the selection to disk. You can enable the feature > at runtime with boot0cfg, or changing the flags in the Makefile. .. > MFC after: 6 weeks If this means hitting "F2" in head will not longer be remembered, please back out this part of the change. The FreeBSD boot selector has acted this way for over a decade - changing it now is against POLA. If I've misunderstood the comment, never mind. :-) thanks, -- David From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 21:08:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 537811065670; Thu, 11 Dec 2008 21:08:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 428F28FC13; Thu, 11 Dec 2008 21:08:15 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBL8FLp076746; Thu, 11 Dec 2008 21:08:15 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBL8Fe3076745; Thu, 11 Dec 2008 21:08:15 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812112108.mBBL8Fe3076745@svn.freebsd.org> From: Andrew Thompson Date: Thu, 11 Dec 2008 21:08:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185941 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 21:08:15 -0000 Author: thompsa Date: Thu Dec 11 21:08:14 2008 New Revision: 185941 URL: http://svn.freebsd.org/changeset/base/185941 Log: Add entries for some Option, Sierra and Stelera 3G cards. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Thu Dec 11 18:32:05 2008 (r185940) +++ head/sys/dev/usb/usbdevs Thu Dec 11 21:08:14 2008 (r185941) @@ -620,6 +620,7 @@ vendor AMIT 0x18c5 AMIT vendor QCOM 0x18e8 Qcom vendor LINKSYS3 0x1915 Linksys vendor QUALCOMMINC 0x19d2 Qualcomm, Incorporated +vendor STELERA 0x1a8d Stelera Wireless vendor DLINK 0x2001 D-Link vendor PLANEX2 0x2019 Planex Communications vendor ERICSSON 0x2282 Ericsson @@ -1876,6 +1877,7 @@ product OPTION VODAFONEMC3G 0x5000 Vodaf product OPTION GT3G 0x6000 GlobeTrotter 3G datacard product OPTION GT3GQUAD 0x6300 GlobeTrotter 3G QUAD datacard product OPTION GT3GPLUS 0x6600 GlobeTrotter 3G+ datacard +product OPTION GTICON322 0xd033 GlobeTrotter Icon322 storage product OPTION GTMAX36 0x6701 GlobeTrotter Max 3.6 Modem product OPTION GTMAXHSUPA 0x7001 GlobeTrotter HSUPA @@ -2125,12 +2127,14 @@ product SIERRA AIRCARD595 0x0019 Sierra product SIERRA AC595U 0x0120 Sierra Wireless AirCard 595U product SIERRA AC597E 0x0021 Sierra Wireless AirCard 597E product SIERRA C597 0x0023 Sierra Wireless Compass 597 +product SIERRA AC875 0x6820 Sierra Wireless AirCard 875 product SIERRA AC880 0x6850 Sierra Wireless AirCard 880 product SIERRA AC881 0x6851 Sierra Wireless AirCard 881 product SIERRA AC880E 0x6852 Sierra Wireless AirCard 880E product SIERRA AC881E 0x6853 Sierra Wireless AirCard 881E product SIERRA AC880U 0x6855 Sierra Wireless AirCard 880U product SIERRA AC881U 0x6856 Sierra Wireless AirCard 881U +product SIERRA AC885U 0x6880 Sierra Wireless AirCard 885U product SIERRA EM5625 0x0017 EM5625 product SIERRA MC5720 0x0218 MC5720 Wireless Modem product SIERRA MC5720_2 0x0018 MC5720 @@ -2253,6 +2257,10 @@ product SPARKLAN RT2573 0x0004 RT2573 /* Sphairon Access Systems GmbH products */ product SPHAIRON UB801R 0x0110 UB801R +/* Stelera Wireless products */ +product STELERA ZEROCD 0x1000 Zerocd Installer +product STELERA C105 0x1002 Stelera/Bandrish C105 USB + /* STMicroelectronics products */ product STMICRO BIOCPU 0x2016 Biometric Coprocessor product STMICRO COMMUNICATOR 0x7554 USB Communicator From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 21:37:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5EB6010656D3; Thu, 11 Dec 2008 21:37:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 010928FC13; Thu, 11 Dec 2008 21:37:47 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id mBBLbaos037626; Thu, 11 Dec 2008 16:37:42 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: James Gritton Date: Thu, 11 Dec 2008 15:32:17 -0500 User-Agent: KMail/1.9.7 References: <200812102056.mBAKuJ97042379@svn.freebsd.org> <49415FFD.5070400@gritton.org> In-Reply-To: <49415FFD.5070400@gritton.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812111532.17651.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Thu, 11 Dec 2008 16:37:42 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/8747/Thu Dec 11 14:22:53 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185878 - in head/sys: compat/freebsd32 kern modules/aio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 21:37:48 -0000 On Thursday 11 December 2008 01:46:21 pm James Gritton wrote: > freebsd32_aio_waitcomplete() has a small error: > > @@ -2824,7 +2824,7 @@ > freebsd32_aio_waitcomplete(struct thread *td, > struct freebsd32_aio_waitcomplete_args *uap) > { > - struct timespec ts32; > + struct timespec32 ts32; > struct timespec ts, *tsp; > int error; > > - Jamie Oof. :( I think my aiotest thing doesn't call aio_waitcomplete() so I missed this. :( -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 21:44:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B7631065672; Thu, 11 Dec 2008 21:44:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1388FC18; Thu, 11 Dec 2008 21:44:03 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBLi3MB077428; Thu, 11 Dec 2008 21:44:03 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBLi3sY077427; Thu, 11 Dec 2008 21:44:03 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812112144.mBBLi3sY077427@svn.freebsd.org> From: Ed Schouten Date: Thu, 11 Dec 2008 21:44:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185942 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 21:44:03 -0000 Author: ed Date: Thu Dec 11 21:44:02 2008 New Revision: 185942 URL: http://svn.freebsd.org/changeset/base/185942 Log: Add kqueue()-support to pseudo-terminal master devices. One thing I didn't expect many applications to use, was kqueue() on pseudo-terminal master devices. There are applications that use kqueue() on the TTY itself (rtorrent, etc). That doesn't mean we shouldn't implement this. Libraries like libevent use kqueue() by default, which means they wouldn't be able to use kqueue(). The old TTY layer implements a very broken version of kqueue() by performing the actual polling on the TTY device. Discussed with: peter Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Thu Dec 11 21:08:14 2008 (r185941) +++ head/sys/kern/tty_pts.c Thu Dec 11 21:44:02 2008 (r185942) @@ -254,6 +254,14 @@ done: ttydisc_rint_done(tp); } static int +ptsdev_truncate(struct file *fp, off_t length, struct ucred *active_cred, + struct thread *td) +{ + + return (EINVAL); +} + +static int ptsdev_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, struct thread *td) { @@ -423,6 +431,94 @@ ptsdev_poll(struct file *fp, int events, return (revents); } +/* + * kqueue support. + */ + +static void +pts_kqops_read_detach(struct knote *kn) +{ + struct file *fp = kn->kn_fp; + struct tty *tp = fp->f_data; + struct pts_softc *psc = tty_softc(tp); + + knlist_remove(&psc->pts_outpoll.si_note, kn, 0); +} + +static int +pts_kqops_read_event(struct knote *kn, long hint) +{ + struct file *fp = kn->kn_fp; + struct tty *tp = fp->f_data; + struct pts_softc *psc = tty_softc(tp); + + if (psc->pts_flags & PTS_FINISHED) { + kn->kn_flags |= EV_EOF; + return (1); + } else { + kn->kn_data = ttydisc_getc_poll(tp); + return (kn->kn_data > 0); + } +} + +static void +pts_kqops_write_detach(struct knote *kn) +{ + struct file *fp = kn->kn_fp; + struct tty *tp = fp->f_data; + struct pts_softc *psc = tty_softc(tp); + + knlist_remove(&psc->pts_inpoll.si_note, kn, 0); +} + +static int +pts_kqops_write_event(struct knote *kn, long hint) +{ + struct file *fp = kn->kn_fp; + struct tty *tp = fp->f_data; + struct pts_softc *psc = tty_softc(tp); + + if (psc->pts_flags & PTS_FINISHED) { + kn->kn_flags |= EV_EOF; + return (1); + } else { + kn->kn_data = ttydisc_rint_poll(tp); + return (kn->kn_data > 0); + } +} + +static struct filterops pts_kqops_read = + { 1, NULL, pts_kqops_read_detach, pts_kqops_read_event }; +static struct filterops pts_kqops_write = + { 1, NULL, pts_kqops_write_detach, pts_kqops_write_event }; + +static int +ptsdev_kqfilter(struct file *fp, struct knote *kn) +{ + struct tty *tp = fp->f_data; + struct pts_softc *psc = tty_softc(tp); + int error = 0; + + tty_lock(tp); + + switch (kn->kn_filter) { + case EVFILT_READ: + kn->kn_fop = &pts_kqops_read; + knlist_add(&psc->pts_outpoll.si_note, kn, 1); + break; + case EVFILT_WRITE: + kn->kn_fop = &pts_kqops_write; + knlist_add(&psc->pts_inpoll.si_note, kn, 1); + break; + default: + error = EINVAL; + break; + } + + tty_unlock(tp); + return (error); +} + static int ptsdev_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, struct thread *td) @@ -475,8 +571,10 @@ ptsdev_close(struct file *fp, struct thr static struct fileops ptsdev_ops = { .fo_read = ptsdev_read, .fo_write = ptsdev_write, + .fo_truncate = ptsdev_truncate, .fo_ioctl = ptsdev_ioctl, .fo_poll = ptsdev_poll, + .fo_kqfilter = ptsdev_kqfilter, .fo_stat = ptsdev_stat, .fo_close = ptsdev_close, .fo_flags = DFLAG_PASSABLE, @@ -493,6 +591,7 @@ ptsdrv_outwakeup(struct tty *tp) cv_broadcast(&psc->pts_outwait); selwakeup(&psc->pts_outpoll); + KNOTE_LOCKED(&psc->pts_outpoll.si_note, 0); } static void @@ -502,6 +601,7 @@ ptsdrv_inwakeup(struct tty *tp) cv_broadcast(&psc->pts_inwait); selwakeup(&psc->pts_inpoll); + KNOTE_LOCKED(&psc->pts_inpoll.si_note, 0); } static int @@ -566,6 +666,9 @@ ptsdrv_free(void *softc) chgptscnt(psc->pts_uidinfo, -1, 0); uifree(psc->pts_uidinfo); + knlist_destroy(&psc->pts_inpoll.si_note); + knlist_destroy(&psc->pts_outpoll.si_note); + #ifdef PTS_EXTERNAL /* Destroy master device as well. */ if (psc->pts_cdev != NULL) @@ -618,6 +721,8 @@ pts_alloc(int fflags, struct thread *td, uihold(uid); tp = tty_alloc(&pts_class, psc, NULL); + knlist_init(&psc->pts_inpoll.si_note, tp->t_mtx, NULL, NULL, NULL); + knlist_init(&psc->pts_outpoll.si_note, tp->t_mtx, NULL, NULL, NULL); /* Expose the slave device as well. */ tty_makedev(tp, td->td_ucred, "pts/%u", psc->pts_unit); @@ -656,6 +761,8 @@ pts_alloc_external(int fflags, struct th uihold(uid); tp = tty_alloc(&pts_class, psc, NULL); + knlist_init(&psc->pts_inpoll.si_note, tp->t_mtx, NULL, NULL, NULL); + knlist_init(&psc->pts_outpoll.si_note, tp->t_mtx, NULL, NULL, NULL); /* Expose the slave device as well. */ tty_makedev(tp, td->td_ucred, "%s", name); From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 22:28:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0E7B1065675; Thu, 11 Dec 2008 22:28:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 855898FC18; Thu, 11 Dec 2008 22:28:29 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBMSTDv078322; Thu, 11 Dec 2008 22:28:29 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBMST21078321; Thu, 11 Dec 2008 22:28:29 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812112228.mBBMST21078321@svn.freebsd.org> From: Robert Watson Date: Thu, 11 Dec 2008 22:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185944 - in stable/7/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 22:28:29 -0000 Author: rwatson Date: Thu Dec 11 22:28:29 2008 New Revision: 185944 URL: http://svn.freebsd.org/changeset/base/185944 Log: Merge r185857 from head to stable/7: Move syncache flag definitions below data structure, compress some vertical whitespace. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/tcp_syncache.c Modified: stable/7/sys/netinet/tcp_syncache.c ============================================================================== --- stable/7/sys/netinet/tcp_syncache.c Thu Dec 11 22:20:36 2008 (r185943) +++ stable/7/sys/netinet/tcp_syncache.c Thu Dec 11 22:28:29 2008 (r185944) @@ -115,7 +115,6 @@ struct syncache { struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ - u_int32_t sc_tsreflect; /* timestamp to reflect */ u_int32_t sc_ts; /* our timestamp to send */ u_int32_t sc_tsoff; /* ts offset w/ syncookies */ @@ -123,7 +122,6 @@ struct syncache { tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ struct mbuf *sc_ipopts; /* source route */ - u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* IPv4 TTL */ @@ -131,13 +129,6 @@ struct syncache { u_int8_t sc_requested_s_scale:4, sc_requested_r_scale:4; u_int8_t sc_flags; -#define SCF_NOOPT 0x01 /* no TCP options */ -#define SCF_WINSCALE 0x02 /* negotiated window scaling */ -#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ - /* MSS is implicit */ -#define SCF_UNREACH 0x10 /* icmp unreachable received */ -#define SCF_SIGNATURE 0x20 /* send MD5 digests */ -#define SCF_SACK 0x80 /* send SACK option */ #ifndef TCP_OFFLOAD_DISABLE struct toe_usrreqs *sc_tu; /* TOE operations */ void *sc_toepcb; /* TOE protocol block */ @@ -148,6 +139,17 @@ struct syncache { struct ucred *sc_cred; /* cred cache for jail checks */ }; +/* + * Flags for the sc_flags field. + */ +#define SCF_NOOPT 0x01 /* no TCP options */ +#define SCF_WINSCALE 0x02 /* negotiated window scaling */ +#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ + /* MSS is implicit */ +#define SCF_UNREACH 0x10 /* icmp unreachable received */ +#define SCF_SIGNATURE 0x20 /* send MD5 digests */ +#define SCF_SACK 0x80 /* send SACK option */ + #ifdef TCP_OFFLOAD_DISABLE #define TOEPCB_ISSET(sc) (0) #else From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 22:51:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C62081065695; Thu, 11 Dec 2008 22:51:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 800568FC21; Thu, 11 Dec 2008 22:51:11 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBMpB4x078754; Thu, 11 Dec 2008 22:51:11 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBMpB1Z078753; Thu, 11 Dec 2008 22:51:11 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812112251.mBBMpB1Z078753@svn.freebsd.org> From: Kip Macy Date: Thu, 11 Dec 2008 22:51:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185945 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 22:51:11 -0000 Author: kmacy Date: Thu Dec 11 22:51:11 2008 New Revision: 185945 URL: http://svn.freebsd.org/changeset/base/185945 Log: Add entry for if_transmit and if_qflush Modified: head/share/man/man9/ifnet.9 Modified: head/share/man/man9/ifnet.9 ============================================================================== --- head/share/man/man9/ifnet.9 Thu Dec 11 22:28:29 2008 (r185944) +++ head/share/man/man9/ifnet.9 Thu Dec 11 22:51:11 2008 (r185945) @@ -103,6 +103,10 @@ .Ft void .Fn \*(lp*if_start\*(rp "struct ifnet *ifp" .Ft int +.Fn \*(lp*if_transmit\*(rp "struct ifnet *ifp" "struct mbuf *m" +.Ft void +.Fn \*(lp*if_qflush\*(rp "struct ifnet *ifp" +.Ft int .Fn \*(lp*if_ioctl\*(rp "struct ifnet *ifp" "int cmd" "caddr_t data" .Ft void .Fn \*(lp*if_watchdog\*(rp "struct ifnet *ifp" @@ -350,6 +354,20 @@ framing, e.g., Ethernet. Output a packet on interface .Fa ifp , or queue it on the output queue if the interface is already active. +.It Fn if_transmit +Transmit a packet on an interface or queue it if the interface is +in use. This function will return +.Dv ENOBUFS +if the devices software and hardware queues are both full. This +function must be installed after +.It Fn if_qflush +Free mbufs in internally managed queues when the interface is marked down. +This function must be installed after +.Fn if_attach +to override the default implementation. This function is exposed in order +to allow drivers to manage their own queues and to reduce the latency +caused by a frequently gratuitous enqueue / dequeue pair to ifq. The +suggested internal software queueing mechanism is buf_ring. .It Fn if_start Start queued output on an interface. This function is exposed in @@ -363,7 +381,8 @@ flag is not set. (Thus, .Dv IFF_OACTIVE does not literally mean that output is active, but rather that the -device's internal output queue is full.) +device's internal output queue is full.) Please note that this function +will soon be deprecated. .It Fn if_done Not used. We are not even sure what it was ever for. From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 23:13:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C0E51065673; Thu, 11 Dec 2008 23:13:04 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBEDC8FC18; Thu, 11 Dec 2008 23:13:03 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBND3cm079372; Thu, 11 Dec 2008 23:13:03 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBND2Xq079336; Thu, 11 Dec 2008 23:13:02 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812112313.mBBND2Xq079336@svn.freebsd.org> From: Andrew Thompson Date: Thu, 11 Dec 2008 23:13:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185948 - in head/sys/dev/usb2: bluetooth controller core ethernet input misc serial sound storage template wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 23:13:04 -0000 Author: thompsa Date: Thu Dec 11 23:13:02 2008 New Revision: 185948 URL: http://svn.freebsd.org/changeset/base/185948 Log: Format and wrap function declarations. Modified: head/sys/dev/usb2/bluetooth/ng_ubt2.c head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/core/usb2_busdma.c head/sys/dev/usb2/core/usb2_busdma.h head/sys/dev/usb2/core/usb2_compat_linux.c head/sys/dev/usb2/core/usb2_compat_linux.h head/sys/dev/usb2/core/usb2_config_td.h head/sys/dev/usb2/core/usb2_core.h head/sys/dev/usb2/core/usb2_dev.c head/sys/dev/usb2/core/usb2_dev.h head/sys/dev/usb2/core/usb2_device.c head/sys/dev/usb2/core/usb2_device.h head/sys/dev/usb2/core/usb2_dynamic.h head/sys/dev/usb2/core/usb2_error.c head/sys/dev/usb2/core/usb2_generic.c head/sys/dev/usb2/core/usb2_handle_request.c head/sys/dev/usb2/core/usb2_hid.h head/sys/dev/usb2/core/usb2_hub.h head/sys/dev/usb2/core/usb2_lookup.h head/sys/dev/usb2/core/usb2_mbuf.h head/sys/dev/usb2/core/usb2_msctest.h head/sys/dev/usb2/core/usb2_parse.h head/sys/dev/usb2/core/usb2_process.h head/sys/dev/usb2/core/usb2_request.h head/sys/dev/usb2/core/usb2_sw_transfer.h head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/core/usb2_transfer.h head/sys/dev/usb2/ethernet/if_aue2.c head/sys/dev/usb2/ethernet/if_axe2.c head/sys/dev/usb2/ethernet/if_cdce2.c head/sys/dev/usb2/ethernet/if_cue2.c head/sys/dev/usb2/ethernet/if_kue2.c head/sys/dev/usb2/ethernet/if_udav2.c head/sys/dev/usb2/ethernet/usb2_ethernet.h head/sys/dev/usb2/input/ukbd2.c head/sys/dev/usb2/misc/udbp2.c head/sys/dev/usb2/misc/ufm2.c head/sys/dev/usb2/serial/uark2.c head/sys/dev/usb2/serial/ubsa2.c head/sys/dev/usb2/serial/ubser2.c head/sys/dev/usb2/serial/uchcom2.c head/sys/dev/usb2/serial/ucycom2.c head/sys/dev/usb2/serial/ufoma2.c head/sys/dev/usb2/serial/uftdi2.c head/sys/dev/usb2/serial/ugensa2.c head/sys/dev/usb2/serial/uipaq2.c head/sys/dev/usb2/serial/ulpt2.c head/sys/dev/usb2/serial/umct2.c head/sys/dev/usb2/serial/umodem2.c head/sys/dev/usb2/serial/umoscom2.c head/sys/dev/usb2/serial/uplcom2.c head/sys/dev/usb2/serial/usb2_serial.c head/sys/dev/usb2/serial/usb2_serial.h head/sys/dev/usb2/serial/uvisor2.c head/sys/dev/usb2/serial/uvscom2.c head/sys/dev/usb2/sound/uaudio2.c head/sys/dev/usb2/sound/uaudio2.h head/sys/dev/usb2/storage/umass2.c head/sys/dev/usb2/template/usb2_template.c head/sys/dev/usb2/wlan/if_rum2.c head/sys/dev/usb2/wlan/if_ural2.c head/sys/dev/usb2/wlan/if_zyd2.c Modified: head/sys/dev/usb2/bluetooth/ng_ubt2.c ============================================================================== --- head/sys/dev/usb2/bluetooth/ng_ubt2.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/bluetooth/ng_ubt2.c Thu Dec 11 23:13:02 2008 (r185948) @@ -193,10 +193,10 @@ static usb2_callback_t ubt_bulk_write_cl static usb2_callback_t ubt_isoc_read_callback; static usb2_callback_t ubt_isoc_write_callback; -static int ubt_modevent(module_t mod, int event, void *data); -static void ubt_intr_read_complete(node_p node, hook_p hook, void *arg1, int arg2); -static void ubt_bulk_read_complete(node_p node, hook_p hook, void *arg1, int arg2); -static void ubt_isoc_read_complete(node_p node, hook_p hook, void *arg1, int arg2); +static int ubt_modevent(module_t, int, void *); +static void ubt_intr_read_complete(node_p, hook_p, void *, int); +static void ubt_bulk_read_complete(node_p, hook_p, void *, int); +static void ubt_isoc_read_complete(node_p, hook_p, void *, int); /* USB config */ static const struct usb2_config ubt_config_if_0[UBT_IF_0_N_TRANSFER] = { Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/controller/at91dci.c Thu Dec 11 23:13:02 2008 (r185948) @@ -99,10 +99,10 @@ static at91dci_cmd_t at91dci_setup_rx; static at91dci_cmd_t at91dci_data_rx; static at91dci_cmd_t at91dci_data_tx; static at91dci_cmd_t at91dci_data_tx_sync; -static void at91dci_device_done(struct usb2_xfer *xfer, usb2_error_t error); -static void at91dci_do_poll(struct usb2_bus *bus); -static void at91dci_root_ctrl_poll(struct at91dci_softc *sc); -static void at91dci_standard_done(struct usb2_xfer *xfer); +static void at91dci_device_done(struct usb2_xfer *, usb2_error_t); +static void at91dci_do_poll(struct usb2_bus *); +static void at91dci_root_ctrl_poll(struct at91dci_softc *); +static void at91dci_standard_done(struct usb2_xfer *); static usb2_sw_transfer_func_t at91dci_root_intr_done; static usb2_sw_transfer_func_t at91dci_root_ctrl_done; Modified: head/sys/dev/usb2/controller/musb2_otg.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/controller/musb2_otg.c Thu Dec 11 23:13:02 2008 (r185948) @@ -93,11 +93,11 @@ static musbotg_cmd_t musbotg_setup_data_ static musbotg_cmd_t musbotg_setup_status; static musbotg_cmd_t musbotg_data_rx; static musbotg_cmd_t musbotg_data_tx; -static void musbotg_device_done(struct usb2_xfer *xfer, usb2_error_t error); -static void musbotg_do_poll(struct usb2_bus *bus); -static void musbotg_root_ctrl_poll(struct musbotg_softc *sc); -static void musbotg_standard_done(struct usb2_xfer *xfer); -static void musbotg_interrupt_poll(struct musbotg_softc *sc); +static void musbotg_device_done(struct usb2_xfer *, usb2_error_t); +static void musbotg_do_poll(struct usb2_bus *); +static void musbotg_root_ctrl_poll(struct musbotg_softc *); +static void musbotg_standard_done(struct usb2_xfer *); +static void musbotg_interrupt_poll(struct musbotg_softc *); static usb2_sw_transfer_func_t musbotg_root_intr_done; static usb2_sw_transfer_func_t musbotg_root_ctrl_done; Modified: head/sys/dev/usb2/controller/uhci2.c ============================================================================== --- head/sys/dev/usb2/controller/uhci2.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/controller/uhci2.c Thu Dec 11 23:13:02 2008 (r185948) @@ -139,13 +139,13 @@ extern struct usb2_pipe_methods uhci_roo extern struct usb2_pipe_methods uhci_root_intr_methods; static usb2_config_td_command_t uhci_root_ctrl_task; -static void uhci_root_ctrl_poll(struct uhci_softc *sc); -static void uhci_do_poll(struct usb2_bus *bus); -static void uhci_device_done(struct usb2_xfer *xfer, usb2_error_t error); -static void uhci_transfer_intr_enqueue(struct usb2_xfer *xfer); -static void uhci_root_intr_check(void *arg); -static void uhci_timeout(void *arg); -static uint8_t uhci_check_transfer(struct usb2_xfer *xfer); +static void uhci_root_ctrl_poll(struct uhci_softc *); +static void uhci_do_poll(struct usb2_bus *); +static void uhci_device_done(struct usb2_xfer *, usb2_error_t); +static void uhci_transfer_intr_enqueue(struct usb2_xfer *); +static void uhci_root_intr_check(void *); +static void uhci_timeout(void *); +static uint8_t uhci_check_transfer(struct usb2_xfer *); void uhci_iterate_hw_softc(struct usb2_bus *bus, usb2_bus_mem_sub_cb_t *cb) Modified: head/sys/dev/usb2/controller/usb2_controller.c ============================================================================== --- head/sys/dev/usb2/controller/usb2_controller.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/controller/usb2_controller.c Thu Dec 11 23:13:02 2008 (r185948) @@ -48,11 +48,17 @@ static device_probe_t usb2_probe; static device_attach_t usb2_attach; static device_detach_t usb2_detach; -static void usb2_attach_sub(device_t dev, struct usb2_bus *bus); -static void usb2_post_init(void *arg); -static void usb2_bus_mem_flush_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align); -static void usb2_bus_mem_alloc_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align); -static void usb2_bus_mem_free_all_cb(struct usb2_bus *bus, struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align); +static void usb2_attach_sub(device_t, struct usb2_bus *); +static void usb2_post_init(void *); +static void usb2_bus_mem_flush_all_cb(struct usb2_bus *, + struct usb2_page_cache *, struct usb2_page *, uint32_t, + uint32_t); +static void usb2_bus_mem_alloc_all_cb(struct usb2_bus *, + struct usb2_page_cache *, struct usb2_page *, uint32_t, + uint32_t); +static void usb2_bus_mem_free_all_cb(struct usb2_bus *, + struct usb2_page_cache *, struct usb2_page *, uint32_t, + uint32_t); /* static variables */ Modified: head/sys/dev/usb2/controller/uss820dci.c ============================================================================== --- head/sys/dev/usb2/controller/uss820dci.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/controller/uss820dci.c Thu Dec 11 23:13:02 2008 (r185948) @@ -88,12 +88,13 @@ static uss820dci_cmd_t uss820dci_setup_r static uss820dci_cmd_t uss820dci_data_rx; static uss820dci_cmd_t uss820dci_data_tx; static uss820dci_cmd_t uss820dci_data_tx_sync; -static void uss820dci_device_done(struct usb2_xfer *xfer, usb2_error_t error); -static void uss820dci_do_poll(struct usb2_bus *bus); -static void uss820dci_root_ctrl_poll(struct uss820dci_softc *sc); -static void uss820dci_standard_done(struct usb2_xfer *xfer); -static void uss820dci_intr_set(struct usb2_xfer *xfer, uint8_t set); -static void uss820dci_update_shared_1(struct uss820dci_softc *sc, uint8_t reg, uint8_t keep_mask, uint8_t set_mask); +static void uss820dci_device_done(struct usb2_xfer *, usb2_error_t); +static void uss820dci_do_poll(struct usb2_bus *); +static void uss820dci_root_ctrl_poll(struct uss820dci_softc *); +static void uss820dci_standard_done(struct usb2_xfer *); +static void uss820dci_intr_set(struct usb2_xfer *, uint8_t); +static void uss820dci_update_shared_1(struct uss820dci_softc *, uint8_t, + uint8_t, uint8_t); static usb2_sw_transfer_func_t uss820dci_root_intr_done; static usb2_sw_transfer_func_t uss820dci_root_ctrl_done; Modified: head/sys/dev/usb2/core/usb2_busdma.c ============================================================================== --- head/sys/dev/usb2/core/usb2_busdma.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_busdma.c Thu Dec 11 23:13:02 2008 (r185948) @@ -39,22 +39,22 @@ #include #include -static void usb2_dma_tag_create(struct usb2_dma_tag *udt, uint32_t size, uint32_t align); -static void usb2_dma_tag_destroy(struct usb2_dma_tag *udt); +static void usb2_dma_tag_create(struct usb2_dma_tag *, uint32_t, uint32_t); +static void usb2_dma_tag_destroy(struct usb2_dma_tag *); #ifdef __FreeBSD__ -static void usb2_dma_lock_cb(void *arg, bus_dma_lock_op_t op); -static int32_t usb2_m_copy_in_cb(void *arg, void *src, uint32_t count); -static void usb2_pc_alloc_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static void usb2_pc_load_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error); -static void usb2_pc_common_mem_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error, uint8_t isload); - +static void usb2_dma_lock_cb(void *, bus_dma_lock_op_t); +static int32_t usb2_m_copy_in_cb(void *, void *, uint32_t); +static void usb2_pc_alloc_mem_cb(void *, bus_dma_segment_t *, int, int); +static void usb2_pc_load_mem_cb(void *, bus_dma_segment_t *, int, int); +static void usb2_pc_common_mem_cb(void *, bus_dma_segment_t *, int, int, + uint8_t); #endif #ifdef __NetBSD__ -static int32_t usb2_m_copy_in_cb(void *arg, caddr_t src, uint32_t count); -static void usb2_pc_common_mem_cb(struct usb2_page_cache *pc, bus_dma_segment_t *segs, int nseg, int error, uint8_t isload); - +static int32_t usb2_m_copy_in_cb(void *, caddr_t, uint32_t); +static void usb2_pc_common_mem_cb(struct usb2_page_cache *, + bus_dma_segment_t *, int, int, uint8_t); #endif /*------------------------------------------------------------------------* Modified: head/sys/dev/usb2/core/usb2_busdma.h ============================================================================== --- head/sys/dev/usb2/core/usb2_busdma.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_busdma.h Thu Dec 11 23:13:02 2008 (r185948) @@ -143,24 +143,38 @@ struct usb2_dma_tag { /* function prototypes */ -int usb2_uiomove(struct usb2_page_cache *pc, struct uio *uio, uint32_t pc_offset, uint32_t len); -struct usb2_dma_tag *usb2_dma_tag_find(struct usb2_dma_parent_tag *udpt, uint32_t size, uint32_t align); -uint8_t usb2_pc_alloc_mem(struct usb2_page_cache *pc, struct usb2_page *pg, uint32_t size, uint32_t align); +int usb2_uiomove(struct usb2_page_cache *pc, struct uio *uio, + uint32_t pc_offset, uint32_t len); +struct usb2_dma_tag *usb2_dma_tag_find(struct usb2_dma_parent_tag *udpt, + uint32_t size, uint32_t align); +uint8_t usb2_pc_alloc_mem(struct usb2_page_cache *pc, struct usb2_page *pg, + uint32_t size, uint32_t align); uint8_t usb2_pc_dmamap_create(struct usb2_page_cache *pc, uint32_t size); -uint8_t usb2_pc_load_mem(struct usb2_page_cache *pc, uint32_t size, uint8_t sync); +uint8_t usb2_pc_load_mem(struct usb2_page_cache *pc, uint32_t size, + uint8_t sync); void usb2_bdma_done_event(struct usb2_dma_parent_tag *udpt); void usb2_bdma_post_sync(struct usb2_xfer *xfer); void usb2_bdma_pre_sync(struct usb2_xfer *xfer); void usb2_bdma_work_loop(struct usb2_xfer_queue *pq); -void usb2_bzero(struct usb2_page_cache *cache, uint32_t offset, uint32_t len); -void usb2_copy_in(struct usb2_page_cache *cache, uint32_t offset, const void *ptr, uint32_t len); -int usb2_copy_in_user(struct usb2_page_cache *cache, uint32_t offset, const void *ptr, uint32_t len); -void usb2_copy_out(struct usb2_page_cache *cache, uint32_t offset, void *ptr, uint32_t len); -int usb2_copy_out_user(struct usb2_page_cache *cache, uint32_t offset, void *ptr, uint32_t len); -void usb2_dma_tag_setup(struct usb2_dma_parent_tag *udpt, struct usb2_dma_tag *udt, bus_dma_tag_t dmat, struct mtx *mtx, usb2_dma_callback_t *func, struct usb2_xfer_root *info, uint8_t ndmabits, uint8_t nudt); +void usb2_bzero(struct usb2_page_cache *cache, uint32_t offset, + uint32_t len); +void usb2_copy_in(struct usb2_page_cache *cache, uint32_t offset, + const void *ptr, uint32_t len); +int usb2_copy_in_user(struct usb2_page_cache *cache, uint32_t offset, + const void *ptr, uint32_t len); +void usb2_copy_out(struct usb2_page_cache *cache, uint32_t offset, + void *ptr, uint32_t len); +int usb2_copy_out_user(struct usb2_page_cache *cache, uint32_t offset, + void *ptr, uint32_t len); +void usb2_dma_tag_setup(struct usb2_dma_parent_tag *udpt, + struct usb2_dma_tag *udt, bus_dma_tag_t dmat, struct mtx *mtx, + usb2_dma_callback_t *func, struct usb2_xfer_root *info, + uint8_t ndmabits, uint8_t nudt); void usb2_dma_tag_unsetup(struct usb2_dma_parent_tag *udpt); -void usb2_get_page(struct usb2_page_cache *pc, uint32_t offset, struct usb2_page_search *res); -void usb2_m_copy_in(struct usb2_page_cache *cache, uint32_t dst_offset, struct mbuf *m, uint32_t src_offset, uint32_t src_len); +void usb2_get_page(struct usb2_page_cache *pc, uint32_t offset, + struct usb2_page_search *res); +void usb2_m_copy_in(struct usb2_page_cache *cache, uint32_t dst_offset, + struct mbuf *m, uint32_t src_offset, uint32_t src_len); void usb2_pc_cpu_flush(struct usb2_page_cache *pc); void usb2_pc_cpu_invalidate(struct usb2_page_cache *pc); void usb2_pc_dmamap_destroy(struct usb2_page_cache *pc); Modified: head/sys/dev/usb2/core/usb2_compat_linux.c ============================================================================== --- head/sys/dev/usb2/core/usb2_compat_linux.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_compat_linux.c Thu Dec 11 23:13:02 2008 (r185948) @@ -67,14 +67,17 @@ static usb2_callback_t usb_linux_non_iso static usb_complete_t usb_linux_wait_complete; -static uint16_t usb_max_isoc_frames(struct usb_device *dev); -static int usb_start_wait_urb(struct urb *urb, uint32_t timeout, uint16_t *p_actlen); -static const struct usb_device_id *usb_linux_lookup_id(const struct usb_device_id *id, struct usb2_attach_arg *uaa); -static struct usb_driver *usb_linux_get_usb_driver(struct usb_linux_softc *sc); -static struct usb_device *usb_linux_create_usb_device(struct usb2_device *udev, device_t dev); -static void usb_linux_cleanup_interface(struct usb_device *dev, struct usb_interface *iface); -static void usb_linux_complete(struct usb2_xfer *xfer); -static int usb_unlink_urb_sub(struct urb *urb, uint8_t drain); +static uint16_t usb_max_isoc_frames(struct usb_device *); +static int usb_start_wait_urb(struct urb *, uint32_t, uint16_t *); +static const struct usb_device_id *usb_linux_lookup_id( + const struct usb_device_id *, struct usb2_attach_arg *); +static struct usb_driver *usb_linux_get_usb_driver(struct usb_linux_softc *); +static struct usb_device *usb_linux_create_usb_device(struct usb2_device *, + device_t); +static void usb_linux_cleanup_interface(struct usb_device *, + struct usb_interface *); +static void usb_linux_complete(struct usb2_xfer *); +static int usb_unlink_urb_sub(struct urb *, uint8_t); /*------------------------------------------------------------------------* * FreeBSD USB interface Modified: head/sys/dev/usb2/core/usb2_compat_linux.h ============================================================================== --- head/sys/dev/usb2/core/usb2_compat_linux.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_compat_linux.h Thu Dec 11 23:13:02 2008 (r185948) @@ -439,16 +439,23 @@ struct urb { int usb_submit_urb(struct urb *urb, uint16_t mem_flags); int usb_unlink_urb(struct urb *urb); int usb_clear_halt(struct usb_device *dev, struct usb_host_endpoint *uhe); -int usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *pipe, uint8_t request, uint8_t requesttype, uint16_t value, uint16_t index, void *data, uint16_t size, uint32_t timeout); -int usb_set_interface(struct usb_device *dev, uint8_t ifnum, uint8_t alternate); -int usb_setup_endpoint(struct usb_device *dev, struct usb_host_endpoint *uhe, uint32_t bufsize); +int usb_control_msg(struct usb_device *dev, struct usb_host_endpoint *pipe, + uint8_t request, uint8_t requesttype, uint16_t value, + uint16_t index, void *data, uint16_t size, uint32_t timeout); +int usb_set_interface(struct usb_device *dev, uint8_t ifnum, + uint8_t alternate); +int usb_setup_endpoint(struct usb_device *dev, + struct usb_host_endpoint *uhe, uint32_t bufsize); -struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev, uint8_t type, uint8_t ep); +struct usb_host_endpoint *usb_find_host_endpoint(struct usb_device *dev, + uint8_t type, uint8_t ep); struct urb *usb_alloc_urb(uint16_t iso_packets, uint16_t mem_flags); -struct usb_host_interface *usb_altnum_to_altsetting(const struct usb_interface *intf, uint8_t alt_index); +struct usb_host_interface *usb_altnum_to_altsetting( + const struct usb_interface *intf, uint8_t alt_index); struct usb_interface *usb_ifnum_to_if(struct usb_device *dev, uint8_t iface_no); -void *usb_buffer_alloc(struct usb_device *dev, uint32_t size, uint16_t mem_flags, uint8_t *dma_addr); +void *usb_buffer_alloc(struct usb_device *dev, uint32_t size, + uint16_t mem_flags, uint8_t *dma_addr); void *usb_get_intfdata(struct usb_interface *intf); void usb_buffer_free(struct usb_device *dev, uint32_t size, void *addr, uint8_t dma_addr); Modified: head/sys/dev/usb2/core/usb2_config_td.h ============================================================================== --- head/sys/dev/usb2/core/usb2_config_td.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_config_td.h Thu Dec 11 23:13:02 2008 (r185948) @@ -60,10 +60,15 @@ struct usb2_config_td { /* prototypes */ -uint8_t usb2_config_td_setup(struct usb2_config_td *ctd, void *priv_sc, struct mtx *priv_mtx, usb2_config_td_end_of_commands_t *p_func_eoc, uint16_t item_size, uint16_t item_count); +uint8_t usb2_config_td_setup(struct usb2_config_td *ctd, void *priv_sc, + struct mtx *priv_mtx, usb2_config_td_end_of_commands_t *p_func_eoc, + uint16_t item_size, uint16_t item_count); void usb2_config_td_drain(struct usb2_config_td *ctd); void usb2_config_td_unsetup(struct usb2_config_td *ctd); -void usb2_config_td_queue_command(struct usb2_config_td *ctd, usb2_config_td_command_t *pre_func, usb2_config_td_command_t *post_func, uint16_t command_sync, uint16_t command_ref); +void usb2_config_td_queue_command(struct usb2_config_td *ctd, + usb2_config_td_command_t *pre_func, + usb2_config_td_command_t *post_func, uint16_t command_sync, + uint16_t command_ref); uint8_t usb2_config_td_is_gone(struct usb2_config_td *ctd); uint8_t usb2_config_td_sleep(struct usb2_config_td *ctd, uint32_t timeout); uint8_t usb2_config_td_sync(struct usb2_config_td *ctd); Modified: head/sys/dev/usb2/core/usb2_core.h ============================================================================== --- head/sys/dev/usb2/core/usb2_core.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_core.h Thu Dec 11 23:13:02 2008 (r185948) @@ -426,17 +426,28 @@ typedef struct malloc_type *usb2_malloc_ /* prototypes */ const char *usb2_errstr(usb2_error_t error); -struct usb2_config_descriptor *usb2_get_config_descriptor(struct usb2_device *udev); -struct usb2_device_descriptor *usb2_get_device_descriptor(struct usb2_device *udev); -struct usb2_interface *usb2_get_iface(struct usb2_device *udev, uint8_t iface_index); -struct usb2_interface_descriptor *usb2_get_interface_descriptor(struct usb2_interface *iface); -uint8_t usb2_clear_stall_callback(struct usb2_xfer *xfer1, struct usb2_xfer *xfer2); +struct usb2_config_descriptor *usb2_get_config_descriptor( + struct usb2_device *udev); +struct usb2_device_descriptor *usb2_get_device_descriptor( + struct usb2_device *udev); +struct usb2_interface *usb2_get_iface(struct usb2_device *udev, + uint8_t iface_index); +struct usb2_interface_descriptor *usb2_get_interface_descriptor( + struct usb2_interface *iface); +uint8_t usb2_clear_stall_callback(struct usb2_xfer *xfer1, + struct usb2_xfer *xfer2); uint8_t usb2_get_interface_altindex(struct usb2_interface *iface); -usb2_error_t usb2_set_alt_interface_index(struct usb2_device *udev, uint8_t iface_index, uint8_t alt_index); +usb2_error_t usb2_set_alt_interface_index(struct usb2_device *udev, + uint8_t iface_index, uint8_t alt_index); uint8_t usb2_get_speed(struct usb2_device *udev); -usb2_error_t usb2_transfer_setup(struct usb2_device *udev, const uint8_t *ifaces, struct usb2_xfer **pxfer, const struct usb2_config *setup_start, uint16_t n_setup, void *priv_sc, struct mtx *priv_mtx); -void usb2_set_frame_data(struct usb2_xfer *xfer, void *ptr, uint32_t frindex); -void usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset, uint32_t frindex); +usb2_error_t usb2_transfer_setup(struct usb2_device *udev, + const uint8_t *ifaces, struct usb2_xfer **pxfer, + const struct usb2_config *setup_start, uint16_t n_setup, + void *priv_sc, struct mtx *priv_mtx); +void usb2_set_frame_data(struct usb2_xfer *xfer, void *ptr, + uint32_t frindex); +void usb2_set_frame_offset(struct usb2_xfer *xfer, uint32_t offset, + uint32_t frindex); void usb2_start_hardware(struct usb2_xfer *xfer); void usb2_transfer_clear_stall(struct usb2_xfer *xfer); void usb2_transfer_drain(struct usb2_xfer *xfer); @@ -444,10 +455,13 @@ void usb2_transfer_set_stall(struct usb2 void usb2_transfer_start(struct usb2_xfer *xfer); void usb2_transfer_stop(struct usb2_xfer *xfer); void usb2_transfer_unsetup(struct usb2_xfer **pxfer, uint16_t n_setup); -usb2_error_t usb2_ref_device(struct file *fp, struct usb2_location *ploc, uint32_t devloc); +usb2_error_t usb2_ref_device(struct file *fp, struct usb2_location *ploc, + uint32_t devloc); void usb2_unref_device(struct usb2_location *ploc); -void usb2_set_parent_iface(struct usb2_device *udev, uint8_t iface_index, uint8_t parent_index); -void usb2_set_iface_perm(struct usb2_device *udev, uint8_t iface_index, uint32_t uid, uint32_t gid, uint16_t mode); +void usb2_set_parent_iface(struct usb2_device *udev, uint8_t iface_index, + uint8_t parent_index); +void usb2_set_iface_perm(struct usb2_device *udev, uint8_t iface_index, + uint32_t uid, uint32_t gid, uint16_t mode); uint8_t usb2_get_bus_index(struct usb2_device *udev); uint8_t usb2_get_device_index(struct usb2_device *udev); Modified: head/sys/dev/usb2/core/usb2_dev.c ============================================================================== --- head/sys/dev/usb2/core/usb2_dev.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_dev.c Thu Dec 11 23:13:02 2008 (r185948) @@ -72,19 +72,22 @@ SYSCTL_INT(_hw_usb2_dev, OID_AUTO, debug /* prototypes */ -static uint32_t usb2_path_convert_one(const char **pp); -static uint32_t usb2_path_convert(const char *path); -static int usb2_check_access(int fflags, struct usb2_perm *puser); -static int usb2_fifo_open(struct usb2_fifo *f, struct file *fp, struct thread *td, int fflags); -static void usb2_fifo_close(struct usb2_fifo *f, struct thread *td, int fflags); -static void usb2_dev_init(void *arg); -static void usb2_dev_init_post(void *arg); -static void usb2_dev_uninit(void *arg); -static int usb2_fifo_uiomove(struct usb2_fifo *f, void *cp, int n, struct uio *uio); -static void usb2_fifo_check_methods(struct usb2_fifo_methods *pm); -static void usb2_clone(void *arg, USB_UCRED char *name, int namelen, struct cdev **dev); -static struct usb2_fifo *usb2_fifo_alloc(void); -static struct usb2_pipe *usb2_dev_get_pipe(struct usb2_device *udev, uint8_t iface_index, uint8_t ep_index, uint8_t dir); +static uint32_t usb2_path_convert_one(const char **); +static uint32_t usb2_path_convert(const char *); +static int usb2_check_access(int, struct usb2_perm *); +static int usb2_fifo_open(struct usb2_fifo *, struct file *, + struct thread *, int); +static void usb2_fifo_close(struct usb2_fifo *, struct thread *, int); +static void usb2_dev_init(void *); +static void usb2_dev_init_post(void *); +static void usb2_dev_uninit(void *); +static int usb2_fifo_uiomove(struct usb2_fifo *, void *, int, + struct uio *); +static void usb2_fifo_check_methods(struct usb2_fifo_methods *); +static void usb2_clone(void *, USB_UCRED char *, int, struct cdev **); +static struct usb2_fifo *usb2_fifo_alloc(void); +static struct usb2_pipe *usb2_dev_get_pipe(struct usb2_device *, uint8_t, + uint8_t, uint8_t); static d_fdopen_t usb2_fdopen; static d_close_t usb2_close; Modified: head/sys/dev/usb2/core/usb2_dev.h ============================================================================== --- head/sys/dev/usb2/core/usb2_dev.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_dev.h Thu Dec 11 23:13:02 2008 (r185948) @@ -130,27 +130,39 @@ struct usb2_fifo_sc { int usb2_fifo_wait(struct usb2_fifo *fifo); void usb2_fifo_signal(struct usb2_fifo *fifo); -int usb2_fifo_alloc_buffer(struct usb2_fifo *f, uint32_t bufsize, uint16_t nbuf); +int usb2_fifo_alloc_buffer(struct usb2_fifo *f, uint32_t bufsize, + uint16_t nbuf); void usb2_fifo_free_buffer(struct usb2_fifo *f); -int usb2_fifo_attach(struct usb2_device *udev, void *priv_sc, struct mtx *priv_mtx, struct usb2_fifo_methods *pm, struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit, uint8_t iface_index); +int usb2_fifo_attach(struct usb2_device *udev, void *priv_sc, + struct mtx *priv_mtx, struct usb2_fifo_methods *pm, + struct usb2_fifo_sc *f_sc, uint16_t unit, uint16_t subunit, + uint8_t iface_index); void usb2_fifo_detach(struct usb2_fifo_sc *f_sc); uint32_t usb2_fifo_put_bytes_max(struct usb2_fifo *fifo); -void usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, uint32_t offset, uint32_t len, uint8_t what); -void usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr, uint32_t len, uint8_t what); +void usb2_fifo_put_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, + uint32_t offset, uint32_t len, uint8_t what); +void usb2_fifo_put_data_linear(struct usb2_fifo *fifo, void *ptr, + uint32_t len, uint8_t what); uint8_t usb2_fifo_put_data_buffer(struct usb2_fifo *f, void *ptr, uint32_t len); void usb2_fifo_put_data_error(struct usb2_fifo *fifo); -uint8_t usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, uint32_t offset, uint32_t len, uint32_t *actlen, uint8_t what); -uint8_t usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr, uint32_t len, uint32_t *actlen, uint8_t what); -uint8_t usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr, uint32_t *plen); +uint8_t usb2_fifo_get_data(struct usb2_fifo *fifo, struct usb2_page_cache *pc, + uint32_t offset, uint32_t len, uint32_t *actlen, uint8_t what); +uint8_t usb2_fifo_get_data_linear(struct usb2_fifo *fifo, void *ptr, + uint32_t len, uint32_t *actlen, uint8_t what); +uint8_t usb2_fifo_get_data_buffer(struct usb2_fifo *f, void **pptr, + uint32_t *plen); void usb2_fifo_get_data_error(struct usb2_fifo *fifo); uint8_t usb2_fifo_opened(struct usb2_fifo *fifo); void usb2_fifo_free(struct usb2_fifo *f); void usb2_fifo_reset(struct usb2_fifo *f); -int usb2_check_thread_perm(struct usb2_device *udev, struct thread *td, int fflags, uint8_t iface_index, uint8_t ep_index); +int usb2_check_thread_perm(struct usb2_device *udev, struct thread *td, + int fflags, uint8_t iface_index, uint8_t ep_index); void usb2_fifo_wakeup(struct usb2_fifo *f); -struct usb2_symlink *usb2_alloc_symlink(const char *target, const char *fmt,...); +struct usb2_symlink *usb2_alloc_symlink(const char *target, + const char *fmt,...); void usb2_free_symlink(struct usb2_symlink *ps); uint32_t usb2_lookup_symlink(const char *src_ptr, uint8_t src_len); -int usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry, uint32_t user_len); +int usb2_read_symlink(uint8_t *user_ptr, uint32_t startentry, + uint32_t user_len); #endif /* _USB2_DEV_H_ */ Modified: head/sys/dev/usb2/core/usb2_device.c ============================================================================== --- head/sys/dev/usb2/core/usb2_device.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_device.c Thu Dec 11 23:13:02 2008 (r185948) @@ -56,18 +56,24 @@ /* function prototypes */ -static void usb2_fill_pipe_data(struct usb2_device *udev, uint8_t iface_index, struct usb2_endpoint_descriptor *edesc, struct usb2_pipe *pipe); -static void usb2_free_pipe_data(struct usb2_device *udev, uint8_t iface_index, uint8_t iface_mask); -static void usb2_free_iface_data(struct usb2_device *udev); -static void usb2_detach_device_sub(struct usb2_device *udev, device_t *ppdev, uint8_t free_subdev); -static uint8_t usb2_probe_and_attach_sub(struct usb2_device *udev, struct usb2_attach_arg *uaa); -static void usb2_init_attach_arg(struct usb2_device *udev, struct usb2_attach_arg *uaa); -static void usb2_suspend_resume_sub(struct usb2_device *udev, device_t dev, uint8_t do_suspend); -static void usb2_clear_stall_proc(struct usb2_proc_msg *_pm); -static void usb2_check_strings(struct usb2_device *udev); -static usb2_error_t usb2_fill_iface_data(struct usb2_device *udev, uint8_t iface_index, uint8_t alt_index); -static void usb2_notify_addq(const char *type, struct usb2_device *udev); -static void usb2_fifo_free_wrap(struct usb2_device *udev, uint8_t iface_index, uint8_t flag); +static void usb2_fill_pipe_data(struct usb2_device *, uint8_t, + struct usb2_endpoint_descriptor *, struct usb2_pipe *); +static void usb2_free_pipe_data(struct usb2_device *, uint8_t, uint8_t); +static void usb2_free_iface_data(struct usb2_device *); +static void usb2_detach_device_sub(struct usb2_device *, device_t *, + uint8_t); +static uint8_t usb2_probe_and_attach_sub(struct usb2_device *, + struct usb2_attach_arg *); +static void usb2_init_attach_arg(struct usb2_device *, + struct usb2_attach_arg *); +static void usb2_suspend_resume_sub(struct usb2_device *, device_t, + uint8_t); +static void usb2_clear_stall_proc(struct usb2_proc_msg *_pm); +static void usb2_check_strings(struct usb2_device *); +static usb2_error_t usb2_fill_iface_data(struct usb2_device *, uint8_t, + uint8_t); +static void usb2_notify_addq(const char *type, struct usb2_device *); +static void usb2_fifo_free_wrap(struct usb2_device *, uint8_t, uint8_t); /* static structures */ Modified: head/sys/dev/usb2/core/usb2_device.h ============================================================================== --- head/sys/dev/usb2/core/usb2_device.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_device.h Thu Dec 11 23:13:02 2008 (r185948) @@ -144,19 +144,30 @@ struct usb2_device { /* function prototypes */ -struct usb2_device *usb2_alloc_device(device_t parent_dev, struct usb2_bus *bus, struct usb2_device *parent_hub, uint8_t depth, uint8_t port_index, uint8_t port_no, uint8_t speed, uint8_t usb2_mode); -struct usb2_pipe *usb2_get_pipe(struct usb2_device *udev, uint8_t iface_index, const struct usb2_config *setup); +struct usb2_device *usb2_alloc_device(device_t parent_dev, struct usb2_bus *bus, + struct usb2_device *parent_hub, uint8_t depth, + uint8_t port_index, uint8_t port_no, uint8_t speed, + uint8_t usb2_mode); +struct usb2_pipe *usb2_get_pipe(struct usb2_device *udev, uint8_t iface_index, + const struct usb2_config *setup); struct usb2_pipe *usb2_get_pipe_by_addr(struct usb2_device *udev, uint8_t ea_val); -usb2_error_t usb2_interface_count(struct usb2_device *udev, uint8_t *count); -usb2_error_t usb2_probe_and_attach(struct usb2_device *udev, uint8_t iface_index); -usb2_error_t usb2_reset_iface_endpoints(struct usb2_device *udev, uint8_t iface_index); -usb2_error_t usb2_set_config_index(struct usb2_device *udev, uint8_t index); -usb2_error_t usb2_set_endpoint_stall(struct usb2_device *udev, struct usb2_pipe *pipe, uint8_t do_stall); -usb2_error_t usb2_suspend_resume(struct usb2_device *udev, uint8_t do_suspend); -void usb2_detach_device(struct usb2_device *udev, uint8_t iface_index, uint8_t free_subdev); +usb2_error_t usb2_interface_count(struct usb2_device *udev, uint8_t *count); +usb2_error_t usb2_probe_and_attach(struct usb2_device *udev, + uint8_t iface_index); +usb2_error_t usb2_reset_iface_endpoints(struct usb2_device *udev, + uint8_t iface_index); +usb2_error_t usb2_set_config_index(struct usb2_device *udev, uint8_t index); +usb2_error_t usb2_set_endpoint_stall(struct usb2_device *udev, + struct usb2_pipe *pipe, uint8_t do_stall); +usb2_error_t usb2_suspend_resume(struct usb2_device *udev, + uint8_t do_suspend); +void usb2_detach_device(struct usb2_device *udev, uint8_t iface_index, + uint8_t free_subdev); void usb2_devinfo(struct usb2_device *udev, char *dst_ptr, uint16_t dst_len); void usb2_free_device(struct usb2_device *udev); -void *usb2_find_descriptor(struct usb2_device *udev, void *id, uint8_t iface_index, uint8_t type, uint8_t type_mask, uint8_t subtype, uint8_t subtype_mask); +void *usb2_find_descriptor(struct usb2_device *udev, void *id, + uint8_t iface_index, uint8_t type, uint8_t type_mask, + uint8_t subtype, uint8_t subtype_mask); void usb_linux_free_device(struct usb_device *dev); #endif /* _USB2_DEVICE_H_ */ Modified: head/sys/dev/usb2/core/usb2_dynamic.h ============================================================================== --- head/sys/dev/usb2/core/usb2_dynamic.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_dynamic.h Thu Dec 11 23:13:02 2008 (r185948) @@ -35,11 +35,16 @@ struct usb2_device_request; /* typedefs */ -typedef usb2_error_t (usb2_temp_setup_by_index_t)(struct usb2_device *udev, uint16_t index); -typedef uint8_t (usb2_test_quirk_t)(const struct usb2_lookup_info *info, uint16_t quirk); -typedef int (usb2_quirk_ioctl_t)(unsigned long cmd, caddr_t data, int fflag, struct thread *td); -typedef void (usb2_temp_get_desc_t)(struct usb2_device *udev, struct usb2_device_request *req, const void **pPtr, uint16_t *pLength); -typedef void (usb2_temp_unsetup_t)(struct usb2_device *udev); +typedef usb2_error_t (usb2_temp_setup_by_index_t)(struct usb2_device *udev, + uint16_t index); +typedef uint8_t (usb2_test_quirk_t)(const struct usb2_lookup_info *info, + uint16_t quirk); +typedef int (usb2_quirk_ioctl_t)(unsigned long cmd, caddr_t data, + int fflag, struct thread *td); +typedef void (usb2_temp_get_desc_t)(struct usb2_device *udev, + struct usb2_device_request *req, const void **pPtr, + uint16_t *pLength); +typedef void (usb2_temp_unsetup_t)(struct usb2_device *udev); /* global function pointers */ Modified: head/sys/dev/usb2/core/usb2_error.c ============================================================================== --- head/sys/dev/usb2/core/usb2_error.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_error.c Thu Dec 11 23:13:02 2008 (r185948) @@ -39,6 +39,5 @@ USB_MAKE_DEBUG_TABLE(USB_ERR); const char * usb2_errstr(usb2_error_t err) { - return ((err < USB_ERR_MAX) ? - USB_ERR[err] : "USB_ERR_UNKNOWN"); + return ((err < USB_ERR_MAX) ? USB_ERR[err] : "USB_ERR_UNKNOWN"); } Modified: head/sys/dev/usb2/core/usb2_generic.c ============================================================================== --- head/sys/dev/usb2/core/usb2_generic.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_generic.c Thu Dec 11 23:13:02 2008 (r185948) @@ -72,17 +72,19 @@ static usb2_fifo_cmd_t ugen_start_read; static usb2_fifo_cmd_t ugen_start_write; static usb2_fifo_cmd_t ugen_stop_io; -static int ugen_transfer_setup(struct usb2_fifo *f, const struct usb2_config *setup, uint8_t n_setup); -static int ugen_open_pipe_write(struct usb2_fifo *f); -static int ugen_open_pipe_read(struct usb2_fifo *f); -static int ugen_set_config(struct usb2_fifo *f, uint8_t index); -static int ugen_set_interface(struct usb2_fifo *f, uint8_t iface_index, uint8_t alt_index); -static int ugen_get_cdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *pgd); -static int ugen_get_sdesc(struct usb2_fifo *f, struct usb2_gen_descriptor *ugd); -static int usb2_gen_fill_deviceinfo(struct usb2_fifo *f, struct usb2_device_info *di); -static int ugen_re_enumerate(struct usb2_fifo *f); -static int ugen_iface_ioctl(struct usb2_fifo *f, u_long cmd, void *addr, int fflags); -static uint8_t ugen_fs_get_complete(struct usb2_fifo *f, uint8_t *pindex); +static int ugen_transfer_setup(struct usb2_fifo *, + const struct usb2_config *, uint8_t); +static int ugen_open_pipe_write(struct usb2_fifo *); +static int ugen_open_pipe_read(struct usb2_fifo *); +static int ugen_set_config(struct usb2_fifo *, uint8_t); +static int ugen_set_interface(struct usb2_fifo *, uint8_t, uint8_t); +static int ugen_get_cdesc(struct usb2_fifo *, struct usb2_gen_descriptor *); +static int ugen_get_sdesc(struct usb2_fifo *, struct usb2_gen_descriptor *); +static int usb2_gen_fill_deviceinfo(struct usb2_fifo *, + struct usb2_device_info *); +static int ugen_re_enumerate(struct usb2_fifo *); +static int ugen_iface_ioctl(struct usb2_fifo *, u_long, void *, int); +static uint8_t ugen_fs_get_complete(struct usb2_fifo *, uint8_t *); static int ugen_fs_uninit(struct usb2_fifo *f); /* structures */ Modified: head/sys/dev/usb2/core/usb2_handle_request.c ============================================================================== --- head/sys/dev/usb2/core/usb2_handle_request.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_handle_request.c Thu Dec 11 23:13:02 2008 (r185948) @@ -52,12 +52,15 @@ enum { /* function prototypes */ -static uint8_t usb2_handle_get_stall(struct usb2_device *udev, uint8_t ea_val); -static usb2_error_t usb2_handle_remote_wakeup(struct usb2_xfer *xfer, uint8_t is_on); -static usb2_error_t usb2_handle_request(struct usb2_xfer *xfer); -static usb2_error_t usb2_handle_set_config(struct usb2_xfer *xfer, uint8_t conf_no); -static usb2_error_t usb2_handle_set_stall(struct usb2_xfer *xfer, uint8_t ep, uint8_t do_stall); -static usb2_error_t usb2_handle_iface_request(struct usb2_xfer *xfer, void **ppdata, uint16_t *plen, struct usb2_device_request req, uint16_t off, uint8_t state); +static uint8_t usb2_handle_get_stall(struct usb2_device *, uint8_t); +static usb2_error_t usb2_handle_remote_wakeup(struct usb2_xfer *, uint8_t); +static usb2_error_t usb2_handle_request(struct usb2_xfer *); +static usb2_error_t usb2_handle_set_config(struct usb2_xfer *, uint8_t); +static usb2_error_t usb2_handle_set_stall(struct usb2_xfer *, uint8_t, + uint8_t); +static usb2_error_t usb2_handle_iface_request(struct usb2_xfer *, void **, + uint16_t *, struct usb2_device_request, uint16_t, + uint8_t); /*------------------------------------------------------------------------* * usb2_handle_request_callback Modified: head/sys/dev/usb2/core/usb2_hid.h ============================================================================== --- head/sys/dev/usb2/core/usb2_hid.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_hid.h Thu Dec 11 23:13:02 2008 (r185948) @@ -80,10 +80,16 @@ struct hid_data *hid_start_parse(const v void hid_end_parse(struct hid_data *s); int hid_get_item(struct hid_data *s, struct hid_item *h); int hid_report_size(const void *buf, int len, enum hid_kind k, uint8_t *id); -int hid_locate(const void *desc, int size, uint32_t usage, enum hid_kind kind, struct hid_location *loc, uint32_t *flags); -uint32_t hid_get_data(const uint8_t *buf, uint32_t len, struct hid_location *loc); +int hid_locate(const void *desc, int size, uint32_t usage, + enum hid_kind kind, struct hid_location *loc, uint32_t *flags); +uint32_t hid_get_data(const uint8_t *buf, uint32_t len, + struct hid_location *loc); int hid_is_collection(const void *desc, int size, uint32_t usage); -struct usb2_hid_descriptor *hid_get_descriptor_from_usb(struct usb2_config_descriptor *cd, struct usb2_interface_descriptor *id); -usb2_error_t usb2_req_get_hid_desc(struct usb2_device *udev, struct mtx *mtx, void **descp, uint16_t *sizep, usb2_malloc_type mem, uint8_t iface_index); +struct usb2_hid_descriptor *hid_get_descriptor_from_usb( + struct usb2_config_descriptor *cd, + struct usb2_interface_descriptor *id); +usb2_error_t usb2_req_get_hid_desc(struct usb2_device *udev, struct mtx *mtx, + void **descp, uint16_t *sizep, usb2_malloc_type mem, + uint8_t iface_index); #endif /* _USB2_CORE_HID_H_ */ Modified: head/sys/dev/usb2/core/usb2_hub.h ============================================================================== --- head/sys/dev/usb2/core/usb2_hub.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_hub.h Thu Dec 11 23:13:02 2008 (r185948) @@ -65,10 +65,13 @@ struct usb2_hub { /* function prototypes */ -uint8_t usb2_intr_schedule_adjust(struct usb2_device *udev, int16_t len, uint8_t slot); +uint8_t usb2_intr_schedule_adjust(struct usb2_device *udev, int16_t len, + uint8_t slot); void usb2_fs_isoc_schedule_init_all(struct usb2_fs_isoc_schedule *fss); -void usb2_bus_port_set_device(struct usb2_bus *bus, struct usb2_port *up, struct usb2_device *udev, uint8_t device_index); -struct usb2_device *usb2_bus_port_get_device(struct usb2_bus *bus, struct usb2_port *up); +void usb2_bus_port_set_device(struct usb2_bus *bus, struct usb2_port *up, + struct usb2_device *udev, uint8_t device_index); +struct usb2_device *usb2_bus_port_get_device(struct usb2_bus *bus, + struct usb2_port *up); void usb2_needs_explore(struct usb2_bus *bus, uint8_t do_probe); void usb2_needs_explore_all(void); Modified: head/sys/dev/usb2/core/usb2_lookup.h ============================================================================== --- head/sys/dev/usb2/core/usb2_lookup.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_lookup.h Thu Dec 11 23:13:02 2008 (r185948) @@ -113,7 +113,10 @@ struct usb2_device_id { #define USB_GET_DRIVER_INFO(did) \ (((const uint8_t *)((did)->driver_info)) - ((const uint8_t *)0)) -const struct usb2_device_id *usb2_lookup_id_by_info(const struct usb2_device_id *id, uint32_t sizeof_id, const struct usb2_lookup_info *info); -int usb2_lookup_id_by_uaa(const struct usb2_device_id *id, uint32_t sizeof_id, struct usb2_attach_arg *uaa); +const struct usb2_device_id *usb2_lookup_id_by_info( + const struct usb2_device_id *id, uint32_t sizeof_id, + const struct usb2_lookup_info *info); +int usb2_lookup_id_by_uaa(const struct usb2_device_id *id, + uint32_t sizeof_id, struct usb2_attach_arg *uaa); #endif /* _USB2_LOOKUP_H_ */ Modified: head/sys/dev/usb2/core/usb2_mbuf.h ============================================================================== --- head/sys/dev/usb2/core/usb2_mbuf.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_mbuf.h Thu Dec 11 23:13:02 2008 (r185948) @@ -95,6 +95,7 @@ struct usb2_ifqueue { } while (0) /* prototypes */ -void *usb2_alloc_mbufs(struct malloc_type *type, struct usb2_ifqueue *ifq, uint32_t block_size, uint16_t nblocks); +void *usb2_alloc_mbufs(struct malloc_type *type, struct usb2_ifqueue *ifq, + uint32_t block_size, uint16_t nblocks); #endif /* _USB2_MBUF_H_ */ Modified: head/sys/dev/usb2/core/usb2_msctest.h ============================================================================== --- head/sys/dev/usb2/core/usb2_msctest.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_msctest.h Thu Dec 11 23:13:02 2008 (r185948) @@ -27,8 +27,10 @@ #ifndef _USB2_MSCTEST_H_ #define _USB2_MSCTEST_H_ -usb2_error_t usb2_test_autoinstall(struct usb2_device *udev, uint8_t iface_index, uint8_t do_eject); -usb2_error_t usb2_test_huawei(struct usb2_device *udev, struct usb2_attach_arg *uaa); +usb2_error_t usb2_test_autoinstall(struct usb2_device *udev, + uint8_t iface_index, uint8_t do_eject); +usb2_error_t usb2_test_huawei(struct usb2_device *udev, + struct usb2_attach_arg *uaa); int usb2_lookup_huawei(struct usb2_attach_arg *uaa); /* Huawei specific defines */ Modified: head/sys/dev/usb2/core/usb2_parse.h ============================================================================== --- head/sys/dev/usb2/core/usb2_parse.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_parse.h Thu Dec 11 23:13:02 2008 (r185948) @@ -27,9 +27,14 @@ #ifndef _USB2_PARSE_H_ #define _USB2_PARSE_H_ -struct usb2_descriptor *usb2_desc_foreach(struct usb2_config_descriptor *cd, struct usb2_descriptor *desc); -struct usb2_interface_descriptor *usb2_find_idesc(struct usb2_config_descriptor *cd, uint8_t iface_index, uint8_t alt_index); -struct usb2_endpoint_descriptor *usb2_find_edesc(struct usb2_config_descriptor *cd, uint8_t iface_index, uint8_t alt_index, uint8_t ep_index); +struct usb2_descriptor *usb2_desc_foreach(struct usb2_config_descriptor *cd, + struct usb2_descriptor *desc); +struct usb2_interface_descriptor *usb2_find_idesc( + struct usb2_config_descriptor *cd, uint8_t iface_index, + uint8_t alt_index); +struct usb2_endpoint_descriptor *usb2_find_edesc( + struct usb2_config_descriptor *cd, uint8_t iface_index, + uint8_t alt_index, uint8_t ep_index); uint16_t usb2_get_no_endpoints(struct usb2_config_descriptor *cd); uint16_t usb2_get_no_alts(struct usb2_config_descriptor *cd, uint8_t ifaceno); Modified: head/sys/dev/usb2/core/usb2_process.h ============================================================================== --- head/sys/dev/usb2/core/usb2_process.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_process.h Thu Dec 11 23:13:02 2008 (r185948) @@ -79,7 +79,8 @@ struct usb2_process { uint8_t usb2_proc_cwait(struct usb2_process *up, int timeout); uint8_t usb2_proc_is_gone(struct usb2_process *up); -uint8_t usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx, uint8_t prio); +uint8_t usb2_proc_setup(struct usb2_process *up, struct mtx *p_mtx, + uint8_t prio); void usb2_proc_csignal(struct usb2_process *up); void usb2_proc_drain(struct usb2_process *up); void usb2_proc_mwait(struct usb2_process *up, void *pm0, void *pm1); Modified: head/sys/dev/usb2/core/usb2_request.h ============================================================================== --- head/sys/dev/usb2/core/usb2_request.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_request.h Thu Dec 11 23:13:02 2008 (r185948) @@ -27,32 +27,67 @@ #ifndef _USB2_REQUEST_H_ #define _USB2_REQUEST_H_ -usb2_error_t usb2_do_request_flags(struct usb2_device *udev, struct mtx *mtx, struct usb2_device_request *req, void *data, uint32_t flags, uint16_t *actlen, uint32_t timeout); -usb2_error_t usb2_req_clear_hub_feature(struct usb2_device *udev, struct mtx *mtx, uint16_t sel); -usb2_error_t usb2_req_clear_port_feature(struct usb2_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel); -usb2_error_t usb2_req_get_alt_interface_no(struct usb2_device *udev, struct mtx *mtx, uint8_t *alt_iface_no, uint8_t iface_index); -usb2_error_t usb2_req_get_config(struct usb2_device *udev, struct mtx *mtx, uint8_t *pconf); -usb2_error_t usb2_req_get_config_desc(struct usb2_device *udev, struct mtx *mtx, struct usb2_config_descriptor *d, uint8_t conf_index); -usb2_error_t usb2_req_get_config_desc_full(struct usb2_device *udev, struct mtx *mtx, struct usb2_config_descriptor **ppcd, struct malloc_type *mtype, uint8_t conf_index); -usb2_error_t usb2_req_get_desc(struct usb2_device *udev, struct mtx *mtx, void *desc, uint16_t min_len, uint16_t max_len, uint16_t id, uint8_t type, uint8_t index, uint8_t retries); -usb2_error_t usb2_req_get_device_desc(struct usb2_device *udev, struct mtx *mtx, struct usb2_device_descriptor *d); -usb2_error_t usb2_req_get_device_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_status *st); -usb2_error_t usb2_req_get_hub_descriptor(struct usb2_device *udev, struct mtx *mtx, struct usb2_hub_descriptor *hd, uint8_t nports); -usb2_error_t usb2_req_get_hub_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_hub_status *st); -usb2_error_t usb2_req_get_port_status(struct usb2_device *udev, struct mtx *mtx, struct usb2_port_status *ps, uint8_t port); -usb2_error_t usb2_req_get_report(struct usb2_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id); -usb2_error_t usb2_req_get_report_descriptor(struct usb2_device *udev, struct mtx *mtx, void *d, uint16_t size, uint8_t iface_index); -usb2_error_t usb2_req_get_string_any(struct usb2_device *udev, struct mtx *mtx, char *buf, uint16_t len, uint8_t string_index); -usb2_error_t usb2_req_get_string_desc(struct usb2_device *udev, struct mtx *mtx, void *sdesc, uint16_t max_len, uint16_t lang_id, uint8_t string_index); -usb2_error_t usb2_req_reset_port(struct usb2_device *udev, struct mtx *mtx, uint8_t port); -usb2_error_t usb2_req_set_address(struct usb2_device *udev, struct mtx *mtx, uint16_t addr); -usb2_error_t usb2_req_set_alt_interface_no(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint8_t alt_no); -usb2_error_t usb2_req_set_config(struct usb2_device *udev, struct mtx *mtx, uint8_t conf); -usb2_error_t usb2_req_set_hub_feature(struct usb2_device *udev, struct mtx *mtx, uint16_t sel); -usb2_error_t usb2_req_set_idle(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint8_t duration, uint8_t id); -usb2_error_t usb2_req_set_port_feature(struct usb2_device *udev, struct mtx *mtx, uint8_t port, uint16_t sel); -usb2_error_t usb2_req_set_protocol(struct usb2_device *udev, struct mtx *mtx, uint8_t iface_index, uint16_t report); -usb2_error_t usb2_req_set_report(struct usb2_device *udev, struct mtx *mtx, void *data, uint16_t len, uint8_t iface_index, uint8_t type, uint8_t id); +usb2_error_t usb2_do_request_flags(struct usb2_device *udev, struct mtx *mtx, + struct usb2_device_request *req, void *data, uint32_t flags, + uint16_t *actlen, uint32_t timeout); +usb2_error_t usb2_req_clear_hub_feature(struct usb2_device *udev, + struct mtx *mtx, uint16_t sel); +usb2_error_t usb2_req_clear_port_feature(struct usb2_device *udev, + struct mtx *mtx, uint8_t port, uint16_t sel); +usb2_error_t usb2_req_get_alt_interface_no(struct usb2_device *udev, + struct mtx *mtx, uint8_t *alt_iface_no, + uint8_t iface_index); +usb2_error_t usb2_req_get_config(struct usb2_device *udev, struct mtx *mtx, + uint8_t *pconf); +usb2_error_t usb2_req_get_config_desc(struct usb2_device *udev, struct mtx *mtx, + struct usb2_config_descriptor *d, uint8_t conf_index); +usb2_error_t usb2_req_get_config_desc_full(struct usb2_device *udev, + struct mtx *mtx, struct usb2_config_descriptor **ppcd, + struct malloc_type *mtype, uint8_t conf_index); +usb2_error_t usb2_req_get_desc(struct usb2_device *udev, struct mtx *mtx, + void *desc, uint16_t min_len, uint16_t max_len, uint16_t id, + uint8_t type, uint8_t index, uint8_t retries); +usb2_error_t usb2_req_get_device_desc(struct usb2_device *udev, struct mtx *mtx, + struct usb2_device_descriptor *d); +usb2_error_t usb2_req_get_device_status(struct usb2_device *udev, + struct mtx *mtx, struct usb2_status *st); +usb2_error_t usb2_req_get_hub_descriptor(struct usb2_device *udev, + struct mtx *mtx, struct usb2_hub_descriptor *hd, + uint8_t nports); +usb2_error_t usb2_req_get_hub_status(struct usb2_device *udev, struct mtx *mtx, + struct usb2_hub_status *st); +usb2_error_t usb2_req_get_port_status(struct usb2_device *udev, struct mtx *mtx, + struct usb2_port_status *ps, uint8_t port); +usb2_error_t usb2_req_get_report(struct usb2_device *udev, struct mtx *mtx, + void *data, uint16_t len, uint8_t iface_index, uint8_t type, + uint8_t id); +usb2_error_t usb2_req_get_report_descriptor(struct usb2_device *udev, + struct mtx *mtx, void *d, uint16_t size, + uint8_t iface_index); +usb2_error_t usb2_req_get_string_any(struct usb2_device *udev, struct mtx *mtx, + char *buf, uint16_t len, uint8_t string_index); +usb2_error_t usb2_req_get_string_desc(struct usb2_device *udev, struct mtx *mtx, + void *sdesc, uint16_t max_len, uint16_t lang_id, + uint8_t string_index); +usb2_error_t usb2_req_reset_port(struct usb2_device *udev, struct mtx *mtx, + uint8_t port); +usb2_error_t usb2_req_set_address(struct usb2_device *udev, struct mtx *mtx, + uint16_t addr); +usb2_error_t usb2_req_set_alt_interface_no(struct usb2_device *udev, + struct mtx *mtx, uint8_t iface_index, uint8_t alt_no); +usb2_error_t usb2_req_set_config(struct usb2_device *udev, struct mtx *mtx, + uint8_t conf); +usb2_error_t usb2_req_set_hub_feature(struct usb2_device *udev, struct mtx *mtx, + uint16_t sel); +usb2_error_t usb2_req_set_idle(struct usb2_device *udev, struct mtx *mtx, + uint8_t iface_index, uint8_t duration, uint8_t id); +usb2_error_t usb2_req_set_port_feature(struct usb2_device *udev, + struct mtx *mtx, uint8_t port, uint16_t sel); +usb2_error_t usb2_req_set_protocol(struct usb2_device *udev, struct mtx *mtx, + uint8_t iface_index, uint16_t report); +usb2_error_t usb2_req_set_report(struct usb2_device *udev, struct mtx *mtx, + void *data, uint16_t len, uint8_t iface_index, + uint8_t type, uint8_t id); usb2_error_t usb2_req_re_enumerate(struct usb2_device *udev, struct mtx *mtx); #define usb2_do_request(u,m,r,d) \ Modified: head/sys/dev/usb2/core/usb2_sw_transfer.h ============================================================================== --- head/sys/dev/usb2/core/usb2_sw_transfer.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_sw_transfer.h Thu Dec 11 23:13:02 2008 (r185948) @@ -56,6 +56,7 @@ struct usb2_sw_transfer { /* prototypes */ -void usb2_sw_transfer(struct usb2_sw_transfer *std, usb2_sw_transfer_func_t *func); +void usb2_sw_transfer(struct usb2_sw_transfer *std, + usb2_sw_transfer_func_t *func); #endif /* _USB2_SW_TRANSFER_H_ */ Modified: head/sys/dev/usb2/core/usb2_transfer.c ============================================================================== --- head/sys/dev/usb2/core/usb2_transfer.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_transfer.c Thu Dec 11 23:13:02 2008 (r185948) @@ -119,17 +119,17 @@ static const struct usb2_config usb2_con /* function prototypes */ -static void usb2_update_max_frame_size(struct usb2_xfer *xfer); -static uint32_t usb2_get_dma_delay(struct usb2_bus *bus); -static void usb2_transfer_unsetup_sub(struct usb2_xfer_root *info, uint8_t needs_delay); -static void usb2_control_transfer_init(struct usb2_xfer *xfer); -static uint8_t usb2_start_hardware_sub(struct usb2_xfer *xfer); -static void usb2_callback_proc(struct usb2_proc_msg *_pm); -static void usb2_callback_ss_done_defer(struct usb2_xfer *xfer); -static void usb2_callback_wrapper(struct usb2_xfer_queue *pq); -static void usb2_dma_delay_done_cb(void *arg); -static void usb2_transfer_start_cb(void *arg); -static uint8_t usb2_callback_wrapper_sub(struct usb2_xfer *xfer); +static void usb2_update_max_frame_size(struct usb2_xfer *); +static uint32_t usb2_get_dma_delay(struct usb2_bus *); +static void usb2_transfer_unsetup_sub(struct usb2_xfer_root *, uint8_t); +static void usb2_control_transfer_init(struct usb2_xfer *); +static uint8_t usb2_start_hardware_sub(struct usb2_xfer *); +static void usb2_callback_proc(struct usb2_proc_msg *); +static void usb2_callback_ss_done_defer(struct usb2_xfer *); +static void usb2_callback_wrapper(struct usb2_xfer_queue *); +static void usb2_dma_delay_done_cb(void *); +static void usb2_transfer_start_cb(void *); +static uint8_t usb2_callback_wrapper_sub(struct usb2_xfer *); /*------------------------------------------------------------------------* * usb2_update_max_frame_size Modified: head/sys/dev/usb2/core/usb2_transfer.h ============================================================================== --- head/sys/dev/usb2/core/usb2_transfer.h Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/core/usb2_transfer.h Thu Dec 11 23:13:02 2008 (r185948) @@ -103,20 +103,26 @@ struct usb2_setup_params { /* function prototypes */ uint8_t usb2_transfer_pending(struct usb2_xfer *xfer); -uint8_t usb2_transfer_setup_sub_malloc(struct usb2_setup_params *parm, struct usb2_page_cache **ppc, uint32_t size, uint32_t align, uint32_t count); -void usb2_command_wrapper(struct usb2_xfer_queue *pq, struct usb2_xfer *xfer); +uint8_t usb2_transfer_setup_sub_malloc(struct usb2_setup_params *parm, + struct usb2_page_cache **ppc, uint32_t size, uint32_t align, + uint32_t count); +void usb2_command_wrapper(struct usb2_xfer_queue *pq, + struct usb2_xfer *xfer); void usb2_pipe_enter(struct usb2_xfer *xfer); void usb2_pipe_start(struct usb2_xfer_queue *pq); void usb2_transfer_dequeue(struct usb2_xfer *xfer); void usb2_transfer_done(struct usb2_xfer *xfer, usb2_error_t error); -void usb2_transfer_enqueue(struct usb2_xfer_queue *pq, struct usb2_xfer *xfer); +void usb2_transfer_enqueue(struct usb2_xfer_queue *pq, + struct usb2_xfer *xfer); void usb2_transfer_setup_sub(struct usb2_setup_params *parm); void usb2_default_transfer_setup(struct usb2_device *udev); -void usb2_clear_data_toggle(struct usb2_device *udev, struct usb2_pipe *pipe); +void usb2_clear_data_toggle(struct usb2_device *udev, + struct usb2_pipe *pipe); void usb2_do_poll(struct usb2_xfer **ppxfer, uint16_t max); usb2_callback_t usb2_do_request_callback; usb2_callback_t usb2_handle_request_callback; usb2_callback_t usb2_do_clear_stall_callback; -void usb2_transfer_timeout_ms(struct usb2_xfer *xfer, void (*cb) (void *arg), uint32_t ms); +void usb2_transfer_timeout_ms(struct usb2_xfer *xfer, + void (*cb) (void *arg), uint32_t ms); #endif /* _USB2_TRANSFER_H_ */ Modified: head/sys/dev/usb2/ethernet/if_aue2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_aue2.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/ethernet/if_aue2.c Thu Dec 11 23:13:02 2008 (r185948) @@ -190,13 +190,15 @@ static usb2_callback_t aue_bulk_read_cal static usb2_callback_t aue_bulk_write_clear_stall_callback; static usb2_callback_t aue_bulk_write_callback; -static void aue_cfg_do_request(struct aue_softc *sc, struct usb2_device_request *req, void *data); -static uint8_t aue_cfg_csr_read_1(struct aue_softc *sc, uint16_t reg); -static uint16_t aue_cfg_csr_read_2(struct aue_softc *sc, uint16_t reg); -static void aue_cfg_csr_write_1(struct aue_softc *sc, uint16_t reg, uint8_t val); -static void aue_cfg_csr_write_2(struct aue_softc *sc, uint16_t reg, uint16_t val); -static void aue_cfg_eeprom_getword(struct aue_softc *sc, uint8_t addr, uint8_t *dest); -static void aue_cfg_read_eeprom(struct aue_softc *sc, uint8_t *dest, uint16_t off, uint16_t len); +static void aue_cfg_do_request(struct aue_softc *, + struct usb2_device_request *, void *); +static uint8_t aue_cfg_csr_read_1(struct aue_softc *, uint16_t); +static uint16_t aue_cfg_csr_read_2(struct aue_softc *, uint16_t); +static void aue_cfg_csr_write_1(struct aue_softc *, uint16_t, uint8_t); +static void aue_cfg_csr_write_2(struct aue_softc *, uint16_t, uint16_t); +static void aue_cfg_eeprom_getword(struct aue_softc *, uint8_t, uint8_t *); +static void aue_cfg_read_eeprom(struct aue_softc *, uint8_t *, uint16_t, + uint16_t); static miibus_readreg_t aue_cfg_miibus_readreg; static miibus_writereg_t aue_cfg_miibus_writereg; @@ -213,15 +215,15 @@ static usb2_config_td_command_t aue_cfg_ static usb2_config_td_command_t aue_cfg_pre_stop; static usb2_config_td_command_t aue_cfg_stop; -static void aue_cfg_reset_pegasus_II(struct aue_softc *sc); -static void aue_cfg_reset(struct aue_softc *sc); -static void aue_start_cb(struct ifnet *ifp); -static void aue_init_cb(void *arg); -static void aue_start_transfers(struct aue_softc *sc); -static int aue_ifmedia_upd_cb(struct ifnet *ifp); -static void aue_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr); -static int aue_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); -static void aue_watchdog(void *arg); +static void aue_cfg_reset_pegasus_II(struct aue_softc *); +static void aue_cfg_reset(struct aue_softc *); +static void aue_start_cb(struct ifnet *); +static void aue_init_cb(void *); +static void aue_start_transfers(struct aue_softc *); +static int aue_ifmedia_upd_cb(struct ifnet *); +static void aue_ifmedia_sts_cb(struct ifnet *, struct ifmediareq *); +static int aue_ioctl_cb(struct ifnet *, u_long, caddr_t); +static void aue_watchdog(void *); static const struct usb2_config aue_config[AUE_ENDPT_MAX] = { Modified: head/sys/dev/usb2/ethernet/if_axe2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_axe2.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/ethernet/if_axe2.c Thu Dec 11 23:13:02 2008 (r185948) @@ -159,8 +159,6 @@ static usb2_callback_t axe_bulk_read_cal static usb2_callback_t axe_bulk_write_clear_stall_callback; static usb2_callback_t axe_bulk_write_callback; -static void axe_cfg_cmd(struct axe_softc *sc, uint16_t cmd, uint16_t index, uint16_t val, void *buf); - static miibus_readreg_t axe_cfg_miibus_readreg; static miibus_writereg_t axe_cfg_miibus_writereg; static miibus_statchg_t axe_cfg_miibus_statchg; @@ -176,16 +174,18 @@ static usb2_config_td_command_t axe_cfg_ static usb2_config_td_command_t axe_cfg_pre_stop; static usb2_config_td_command_t axe_cfg_stop; -static int axe_ifmedia_upd_cb(struct ifnet *ifp); -static void axe_ifmedia_sts_cb(struct ifnet *ifp, struct ifmediareq *ifmr); -static void axe_cfg_reset(struct axe_softc *sc); -static void axe_start_cb(struct ifnet *ifp); -static void axe_start_transfers(struct axe_softc *sc); -static void axe_init_cb(void *arg); -static int axe_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); -static void axe_watchdog(void *arg); -static void axe_cfg_ax88178_init(struct axe_softc *); -static void axe_cfg_ax88772_init(struct axe_softc *); +static int axe_ifmedia_upd_cb(struct ifnet *); +static void axe_ifmedia_sts_cb(struct ifnet *, struct ifmediareq *); +static void axe_cfg_reset(struct axe_softc *); +static void axe_start_cb(struct ifnet *); +static void axe_start_transfers(struct axe_softc *); +static void axe_init_cb(void *); +static int axe_ioctl_cb(struct ifnet *, u_long, caddr_t); +static void axe_watchdog(void *); +static void axe_cfg_cmd(struct axe_softc *, uint16_t, uint16_t, uint16_t, + void *); +static void axe_cfg_ax88178_init(struct axe_softc *); +static void axe_cfg_ax88772_init(struct axe_softc *); static const struct usb2_config axe_config[AXE_ENDPT_MAX] = { Modified: head/sys/dev/usb2/ethernet/if_cdce2.c ============================================================================== --- head/sys/dev/usb2/ethernet/if_cdce2.c Thu Dec 11 23:04:34 2008 (r185947) +++ head/sys/dev/usb2/ethernet/if_cdce2.c Thu Dec 11 23:13:02 2008 (r185948) @@ -81,14 +81,14 @@ static usb2_callback_t cdce_bulk_read_ca static usb2_callback_t cdce_intr_read_callback; static usb2_callback_t cdce_intr_write_callback; -static void cdce_start_cb(struct ifnet *ifp); -static void cdce_start_transfers(struct cdce_softc *sc); -static uint32_t cdce_m_crc32(struct mbuf *m, uint32_t src_offset, uint32_t src_len); -static void cdce_stop(struct cdce_softc *sc); -static int cdce_ioctl_cb(struct ifnet *ifp, u_long command, caddr_t data); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Dec 11 23:17:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD0E8106568C; Thu, 11 Dec 2008 23:17:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8E0F8FC1B; Thu, 11 Dec 2008 23:17:48 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBBNHm9A079541; Thu, 11 Dec 2008 23:17:48 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBBNHm77079533; Thu, 11 Dec 2008 23:17:48 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812112317.mBBNHm77079533@svn.freebsd.org> From: Andrew Thompson Date: Thu, 11 Dec 2008 23:17:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185950 - in head/sys/dev/usb2: bluetooth controller core ethernet image input misc quirk serial sound storage template wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 23:17:49 -0000 Author: thompsa Date: Thu Dec 11 23:17:48 2008 New Revision: 185950 URL: http://svn.freebsd.org/changeset/base/185950 Log: Remove superfluous return statements from the end of void functions. Modified: head/sys/dev/usb2/bluetooth/ng_ubt2.c head/sys/dev/usb2/bluetooth/ubtbcmfw2.c head/sys/dev/usb2/controller/at91dci.c head/sys/dev/usb2/controller/at91dci_atmelarm.c head/sys/dev/usb2/controller/ehci2.c head/sys/dev/usb2/controller/ehci2_pci.c head/sys/dev/usb2/controller/musb2_otg.c head/sys/dev/usb2/controller/musb2_otg_atmelarm.c head/sys/dev/usb2/controller/ohci2.c head/sys/dev/usb2/controller/uhci2.c head/sys/dev/usb2/controller/usb2_controller.c head/sys/dev/usb2/controller/uss820dci.c head/sys/dev/usb2/core/usb2_busdma.c head/sys/dev/usb2/core/usb2_compat_linux.c head/sys/dev/usb2/core/usb2_config_td.c head/sys/dev/usb2/core/usb2_debug.c head/sys/dev/usb2/core/usb2_dev.c head/sys/dev/usb2/core/usb2_device.c head/sys/dev/usb2/core/usb2_dynamic.c head/sys/dev/usb2/core/usb2_generic.c head/sys/dev/usb2/core/usb2_handle_request.c head/sys/dev/usb2/core/usb2_hub.c head/sys/dev/usb2/core/usb2_msctest.c head/sys/dev/usb2/core/usb2_process.c head/sys/dev/usb2/core/usb2_request.c head/sys/dev/usb2/core/usb2_sw_transfer.c head/sys/dev/usb2/core/usb2_transfer.c head/sys/dev/usb2/core/usb2_util.c head/sys/dev/usb2/ethernet/if_aue2.c head/sys/dev/usb2/ethernet/if_axe2.c head/sys/dev/usb2/ethernet/if_cdce2.c head/sys/dev/usb2/ethernet/if_cue2.c head/sys/dev/usb2/ethernet/if_kue2.c head/sys/dev/usb2/ethernet/if_rue2.c head/sys/dev/usb2/ethernet/if_udav2.c head/sys/dev/usb2/ethernet/usb2_ethernet.c head/sys/dev/usb2/image/uscanner2.c head/sys/dev/usb2/input/uhid2.c head/sys/dev/usb2/input/ukbd2.c head/sys/dev/usb2/input/ums2.c head/sys/dev/usb2/misc/udbp2.c head/sys/dev/usb2/quirk/usb2_quirk.c head/sys/dev/usb2/serial/uark2.c head/sys/dev/usb2/serial/ubsa2.c head/sys/dev/usb2/serial/ubser2.c head/sys/dev/usb2/serial/uchcom2.c head/sys/dev/usb2/serial/ucycom2.c head/sys/dev/usb2/serial/ufoma2.c head/sys/dev/usb2/serial/uftdi2.c head/sys/dev/usb2/serial/ugensa2.c head/sys/dev/usb2/serial/uipaq2.c head/sys/dev/usb2/serial/ulpt2.c head/sys/dev/usb2/serial/umct2.c head/sys/dev/usb2/serial/umodem2.c head/sys/dev/usb2/serial/umoscom2.c head/sys/dev/usb2/serial/uplcom2.c head/sys/dev/usb2/serial/usb2_serial.c head/sys/dev/usb2/serial/uvisor2.c head/sys/dev/usb2/serial/uvscom2.c head/sys/dev/usb2/sound/uaudio2.c head/sys/dev/usb2/storage/ata-usb2.c head/sys/dev/usb2/storage/umass2.c head/sys/dev/usb2/storage/urio2.c head/sys/dev/usb2/storage/ustorage2_fs.c head/sys/dev/usb2/template/usb2_template.c head/sys/dev/usb2/wlan/if_rum2.c head/sys/dev/usb2/wlan/if_ural2.c head/sys/dev/usb2/wlan/if_zyd2.c Modified: head/sys/dev/usb2/bluetooth/ng_ubt2.c ============================================================================== --- head/sys/dev/usb2/bluetooth/ng_ubt2.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/bluetooth/ng_ubt2.c Thu Dec 11 23:17:48 2008 (r185950) @@ -818,7 +818,6 @@ ubt_intr_read_clear_stall_callback(struc sc->sc_flags &= ~UBT_FLAG_INTR_STALL; usb2_transfer_start(xfer_other); } - return; } static void @@ -883,8 +882,6 @@ done: usb2_transfer_start(sc->sc_xfer_if_0[2]); mtx_unlock(&sc->sc_mtx); - - return; } static void @@ -972,7 +969,6 @@ ubt_bulk_read_clear_stall_callback(struc sc->sc_flags &= ~UBT_FLAG_READ_STALL; usb2_transfer_start(xfer_other); } - return; } static void @@ -1040,8 +1036,6 @@ done: usb2_transfer_start(sc->sc_xfer_if_0[1]); mtx_unlock(&sc->sc_mtx); - - return; } static void @@ -1121,7 +1115,6 @@ ubt_bulk_write_clear_stall_callback(stru sc->sc_flags &= ~UBT_FLAG_WRITE_STALL; usb2_transfer_start(xfer_other); } - return; } static void @@ -1265,8 +1258,6 @@ done: } mtx_unlock(&sc->sc_mtx); - - return; } static void Modified: head/sys/dev/usb2/bluetooth/ubtbcmfw2.c ============================================================================== --- head/sys/dev/usb2/bluetooth/ubtbcmfw2.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/bluetooth/ubtbcmfw2.c Thu Dec 11 23:17:48 2008 (r185950) @@ -305,7 +305,6 @@ ubtbcmfw_write_clear_stall_callback(stru sc->sc_flags &= ~UBTBCMFW_FLAG_WRITE_STALL; usb2_transfer_start(xfer_other); } - return; } static void @@ -351,7 +350,6 @@ ubtbcmfw_read_clear_stall_callback(struc sc->sc_flags &= ~UBTBCMFW_FLAG_READ_STALL; usb2_transfer_start(xfer_other); } - return; } static void @@ -360,7 +358,6 @@ ubtbcmfw_start_read(struct usb2_fifo *fi struct ubtbcmfw_softc *sc = fifo->priv_sc0; usb2_transfer_start(sc->sc_xfer[1]); - return; } static void @@ -370,7 +367,6 @@ ubtbcmfw_stop_read(struct usb2_fifo *fif usb2_transfer_stop(sc->sc_xfer[3]); usb2_transfer_stop(sc->sc_xfer[1]); - return; } static void @@ -379,7 +375,6 @@ ubtbcmfw_start_write(struct usb2_fifo *f struct ubtbcmfw_softc *sc = fifo->priv_sc0; usb2_transfer_start(sc->sc_xfer[0]); - return; } static void @@ -389,7 +384,6 @@ ubtbcmfw_stop_write(struct usb2_fifo *fi usb2_transfer_stop(sc->sc_xfer[2]); usb2_transfer_stop(sc->sc_xfer[0]); - return; } static int @@ -424,7 +418,6 @@ ubtbcmfw_close(struct usb2_fifo *fifo, i if (fflags & (FREAD | FWRITE)) { usb2_fifo_free_buffer(fifo); } - return; } static int Modified: head/sys/dev/usb2/controller/at91dci.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/controller/at91dci.c Thu Dec 11 23:17:48 2008 (r185950) @@ -200,7 +200,6 @@ at91dci_get_hw_ep_profile(struct usb2_de } else { *ppf = NULL; } - return; } static void @@ -219,7 +218,6 @@ at91dci_clocks_on(struct at91dci_softc * /* enable Transceiver */ AT91_UDP_WRITE_4(sc, AT91_UDP_TXVC, 0); } - return; } static void @@ -237,7 +235,6 @@ at91dci_clocks_off(struct at91dci_softc } sc->sc_flags.clocks_off = 1; } - return; } static void @@ -250,7 +247,6 @@ at91dci_pull_up(struct at91dci_softc *sc sc->sc_flags.d_pulled_up = 1; (sc->sc_pull_up) (sc->sc_pull_arg); } - return; } static void @@ -262,7 +258,6 @@ at91dci_pull_down(struct at91dci_softc * sc->sc_flags.d_pulled_up = 0; (sc->sc_pull_down) (sc->sc_pull_arg); } - return; } static void @@ -279,8 +274,6 @@ at91dci_wakeup_peer(struct at91dci_softc return; } AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); - - return; } static void @@ -304,8 +297,6 @@ at91dci_rem_wakeup_set(struct usb2_devic } AT91_UDP_WRITE_4(sc, AT91_UDP_GSTATE, temp); - - return; } static void @@ -315,8 +306,6 @@ at91dci_set_address(struct at91dci_softc AT91_UDP_WRITE_4(sc, AT91_UDP_FADDR, addr | AT91_UDP_FADDR_EN); - - return; } static uint8_t @@ -756,7 +745,6 @@ repeat: goto repeat; } } - return; } static void @@ -792,8 +780,6 @@ at91dci_vbus_interrupt(struct usb2_bus * } USB_BUS_UNLOCK(&sc->sc_bus); - - return; } void @@ -880,8 +866,6 @@ at91dci_interrupt(struct at91dci_softc * at91dci_interrupt_poll(sc); } USB_BUS_UNLOCK(&sc->sc_bus); - - return; } static void @@ -906,7 +890,6 @@ at91dci_setup_standard_chain_sub(struct td->did_stall = 0; td->short_pkt = temp->short_pkt; td->alt_next = temp->setup_alt_next; - return; } static void @@ -1054,7 +1037,6 @@ at91dci_setup_standard_chain(struct usb2 td = xfer->td_transfer_first; td->fifo_bank = 1; } - return; } static void @@ -1071,8 +1053,6 @@ at91dci_timeout(void *arg) at91dci_device_done(xfer, USB_ERR_TIMEOUT); USB_BUS_UNLOCK(&sc->sc_bus); - - return; } static void @@ -1104,7 +1084,6 @@ at91dci_start_standard_chain(struct usb2 &at91dci_timeout, xfer->timeout); } } - return; } static void @@ -1240,7 +1219,6 @@ at91dci_standard_done(struct usb2_xfer * } done: at91dci_device_done(xfer, err); - return; } /*------------------------------------------------------------------------* @@ -1270,7 +1248,6 @@ at91dci_device_done(struct usb2_xfer *xf } /* dequeue transfer and start next transfer */ usb2_transfer_done(xfer, error); - return; } static void @@ -1296,7 +1273,6 @@ at91dci_set_stall(struct usb2_device *ud csr_val = AT91_UDP_READ_4(sc, csr_reg); AT91_CSR_ACK(csr_val, AT91_UDP_CSR_FORCESTALL); AT91_UDP_WRITE_4(sc, csr_reg, csr_val); - return; } static void @@ -1393,8 +1369,6 @@ at91dci_clear_stall_sub(struct at91dci_s /* enable endpoint */ AT91_UDP_WRITE_4(sc, AT91_UDP_CSR(ep_no), csr_val); - - return; } static void @@ -1423,7 +1397,6 @@ at91dci_clear_stall(struct usb2_device * (ed->bEndpointAddress & UE_ADDR), (ed->bmAttributes & UE_XFERTYPE), (ed->bEndpointAddress & (UE_DIR_IN | UE_DIR_OUT))); - return; } usb2_error_t @@ -1511,8 +1484,6 @@ at91dci_uninit(struct at91dci_softc *sc) at91dci_pull_down(sc); at91dci_clocks_off(sc); USB_BUS_UNLOCK(&sc->sc_bus); - - return; } void @@ -1536,7 +1507,6 @@ at91dci_do_poll(struct usb2_bus *bus) at91dci_interrupt_poll(sc); at91dci_root_ctrl_poll(sc); USB_BUS_UNLOCK(&sc->sc_bus); - return; } /*------------------------------------------------------------------------* @@ -1552,7 +1522,6 @@ static void at91dci_device_bulk_close(struct usb2_xfer *xfer) { at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -1567,7 +1536,6 @@ at91dci_device_bulk_start(struct usb2_xf /* setup TDs */ at91dci_setup_standard_chain(xfer); at91dci_start_standard_chain(xfer); - return; } struct usb2_pipe_methods at91dci_device_bulk_methods = @@ -1593,7 +1561,6 @@ static void at91dci_device_ctrl_close(struct usb2_xfer *xfer) { at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -1608,7 +1575,6 @@ at91dci_device_ctrl_start(struct usb2_xf /* setup TDs */ at91dci_setup_standard_chain(xfer); at91dci_start_standard_chain(xfer); - return; } struct usb2_pipe_methods at91dci_device_ctrl_methods = @@ -1634,7 +1600,6 @@ static void at91dci_device_intr_close(struct usb2_xfer *xfer) { at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -1649,7 +1614,6 @@ at91dci_device_intr_start(struct usb2_xf /* setup TDs */ at91dci_setup_standard_chain(xfer); at91dci_start_standard_chain(xfer); - return; } struct usb2_pipe_methods at91dci_device_intr_methods = @@ -1675,7 +1639,6 @@ static void at91dci_device_isoc_fs_close(struct usb2_xfer *xfer) { at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -1728,7 +1691,6 @@ at91dci_device_isoc_fs_enter(struct usb2 /* setup TDs */ at91dci_setup_standard_chain(xfer); - return; } static void @@ -1736,7 +1698,6 @@ at91dci_device_isoc_fs_start(struct usb2 { /* start TD chain */ at91dci_start_standard_chain(xfer); - return; } struct usb2_pipe_methods at91dci_device_isoc_fs_methods = @@ -1771,7 +1732,6 @@ at91dci_root_ctrl_close(struct usb2_xfer sc->sc_root_ctrl.xfer = NULL; } at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } /* @@ -1876,8 +1836,6 @@ at91dci_root_ctrl_start(struct usb2_xfer usb2_config_td_queue_command( &sc->sc_config_td, NULL, &at91dci_root_ctrl_task, 0, 0); - - return; } static void @@ -1885,7 +1843,6 @@ at91dci_root_ctrl_task(struct at91dci_so struct at91dci_config_copy *cc, uint16_t refcount) { at91dci_root_ctrl_poll(sc); - return; } static void @@ -2294,7 +2251,6 @@ at91dci_root_ctrl_poll(struct at91dci_so { usb2_sw_transfer(&sc->sc_root_ctrl, &at91dci_root_ctrl_done); - return; } struct usb2_pipe_methods at91dci_root_ctrl_methods = @@ -2325,7 +2281,6 @@ at91dci_root_intr_close(struct usb2_xfer sc->sc_root_intr.xfer = NULL; } at91dci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2340,7 +2295,6 @@ at91dci_root_intr_start(struct usb2_xfer struct at91dci_softc *sc = xfer->usb2_sc; sc->sc_root_intr.xfer = xfer; - return; } struct usb2_pipe_methods at91dci_root_intr_methods = @@ -2465,7 +2419,6 @@ at91dci_xfer_setup(struct usb2_setup_par } xfer->td_start[0] = last_obj; - return; } static void @@ -2530,7 +2483,6 @@ at91dci_pipe_init(struct usb2_device *ud break; } } - return; } struct usb2_bus_methods at91dci_bus_methods = Modified: head/sys/dev/usb2/controller/at91dci_atmelarm.c ============================================================================== --- head/sys/dev/usb2/controller/at91dci_atmelarm.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/controller/at91dci_atmelarm.c Thu Dec 11 23:17:48 2008 (r185950) @@ -87,7 +87,6 @@ at91_vbus_interrupt(struct at91_udp_soft vbus_val = at91_pio_gpio_get(VBUS_BASE, VBUS_MASK); (sc->sc_dci.sc_bus.methods->vbus_interrupt) (&sc->sc_dci.sc_bus, vbus_val); - return; } static void @@ -97,7 +96,6 @@ at91_udp_clocks_on(void *arg) at91_pmc_clock_enable(sc->sc_iclk); at91_pmc_clock_enable(sc->sc_fclk); - return; } static void @@ -107,21 +105,18 @@ at91_udp_clocks_off(void *arg) at91_pmc_clock_disable(sc->sc_fclk); at91_pmc_clock_disable(sc->sc_iclk); - return; } static void at91_udp_pull_up(void *arg) { at91_pio_gpio_set(PULLUP_BASE, PULLUP_MASK); - return; } static void at91_udp_pull_down(void *arg) { at91_pio_gpio_clear(PULLUP_BASE, PULLUP_MASK); - return; } static int Modified: head/sys/dev/usb2/controller/ehci2.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/controller/ehci2.c Thu Dec 11 23:17:48 2008 (r185950) @@ -152,7 +152,6 @@ ehci_iterate_hw_softc(struct usb2_bus *b sc->sc_hw.isoc_fs_start_pg + i, sizeof(ehci_sitd_t), EHCI_SITD_ALIGN); } - return; } static usb2_error_t @@ -509,8 +508,6 @@ ehci_detach(struct ehci_softc *sc) USB_BUS_UNLOCK(&sc->sc_bus); usb2_callout_drain(&sc->sc_tmo_pcd); - - return; } void @@ -565,7 +562,6 @@ ehci_suspend(struct ehci_softc *sc) "config timeout\n"); } USB_BUS_UNLOCK(&sc->sc_bus); - return; } void @@ -632,8 +628,6 @@ ehci_resume(struct ehci_softc *sc) /* catch any lost interrupts */ ehci_do_poll(&sc->sc_bus); - - return; } void @@ -727,7 +721,6 @@ ehci_dump_regs(ehci_softc_t *sc) printf("port %d status=0x%08x\n", i, EOREAD4(sc, EHCI_PORTSC(i))); } - return; } static void @@ -757,7 +750,6 @@ ehci_dump_link(uint32_t link, int type) } printf(">"); } - return; } static void @@ -793,7 +785,6 @@ ehci_dump_qtd(ehci_qtd_t *qtd) printf(" buffer_hi[%d]=0x%08x\n", s, le32toh(qtd->qtd_buffer_hi[s])); } - return; } static uint8_t @@ -821,7 +812,6 @@ ehci_dump_sqtds(ehci_qtd_t *sqtd) if (sqtd) { printf("dump aborted, too many TDs\n"); } - return; } static void @@ -854,7 +844,6 @@ ehci_dump_sqh(ehci_qh_t *qh) printf("\n"); printf("Overlay qTD:\n"); ehci_dump_qtd((void *)&qh->qh_qtd); - return; } static void @@ -881,7 +870,6 @@ ehci_dump_sitd(ehci_sitd_t *sitd) le32toh(sitd->sitd_bp[1]), le32toh(sitd->sitd_bp_hi[0]), le32toh(sitd->sitd_bp_hi[1])); - return; } static void @@ -929,7 +917,6 @@ ehci_dump_itd(ehci_itd_t *itd) le32toh(itd->itd_bp_hi[4]), le32toh(itd->itd_bp_hi[5]), le32toh(itd->itd_bp_hi[6])); - return; } static void @@ -958,7 +945,6 @@ ehci_dump_isoc(ehci_softc_t *sc) ehci_dump_sitd(sitd); sitd = sitd->prev; } - return; } #endif @@ -977,7 +963,6 @@ ehci_transfer_intr_enqueue(struct usb2_x if (xfer->timeout != 0) { usb2_transfer_timeout_ms(xfer, &ehci_timeout, xfer->timeout); } - return; } #define EHCI_APPEND_FS_TD(std,last) (last) = _ehci_append_fs_td(std,last) @@ -1285,7 +1270,6 @@ ehci_non_isoc_done(struct usb2_xfer *xfe } done: ehci_device_done(xfer, err); - return; } /*------------------------------------------------------------------------* @@ -1429,7 +1413,6 @@ ehci_pcd_enable(ehci_softc_t *sc) &ehci_root_intr_done); USB_BUS_UNLOCK(&sc->sc_bus); - return; } static void @@ -1447,7 +1430,6 @@ repeat: goto repeat; } } - return; } /*------------------------------------------------------------------------* @@ -1520,7 +1502,6 @@ ehci_interrupt(ehci_softc_t *sc) done: USB_BUS_UNLOCK(&sc->sc_bus); - return; } /* @@ -1540,8 +1521,6 @@ ehci_timeout(void *arg) ehci_device_done(xfer, USB_ERR_TIMEOUT); USB_BUS_UNLOCK(&sc->sc_bus); - - return; } static void @@ -1553,7 +1532,6 @@ ehci_do_poll(struct usb2_bus *bus) ehci_interrupt_poll(sc); ehci_root_ctrl_poll(sc); USB_BUS_UNLOCK(&sc->sc_bus); - return; } static void @@ -1726,8 +1704,6 @@ restart: } temp->td = td; temp->td_next = td_next; - - return; } static void @@ -1956,7 +1932,6 @@ ehci_setup_standard_chain(struct usb2_xf usb2_pc_cpu_flush(qh->page_cache); EHCI_APPEND_QH(qh, *qh_last); - return; } static void @@ -2048,8 +2023,6 @@ ehci_isoc_fs_done(ehci_softc_t *sc, stru } xfer->aframes = xfer->nframes; - - return; } static void @@ -2113,8 +2086,6 @@ ehci_isoc_hs_done(ehci_softc_t *sc, stru } } xfer->aframes = xfer->nframes; - - return; } /* NOTE: "done" can be run two times in a row, @@ -2165,7 +2136,6 @@ ehci_device_done(struct usb2_xfer *xfer, } /* dequeue transfer and start next transfer */ usb2_transfer_done(xfer, error); - return; } /*------------------------------------------------------------------------* @@ -2181,7 +2151,6 @@ static void ehci_device_bulk_close(struct usb2_xfer *xfer) { ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2200,7 +2169,6 @@ ehci_device_bulk_start(struct usb2_xfer /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); - return; } struct usb2_pipe_methods ehci_device_bulk_methods = @@ -2226,7 +2194,6 @@ static void ehci_device_ctrl_close(struct usb2_xfer *xfer) { ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2245,7 +2212,6 @@ ehci_device_ctrl_start(struct usb2_xfer /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); - return; } struct usb2_pipe_methods ehci_device_ctrl_methods = @@ -2312,7 +2278,6 @@ ehci_device_intr_open(struct usb2_xfer * DPRINTFN(3, "best=%d interval=%d\n", best, xfer->interval); - return; } static void @@ -2327,7 +2292,6 @@ ehci_device_intr_close(struct usb2_xfer sc->sc_intr_stat[xfer->qh_pos]--; ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2346,7 +2310,6 @@ ehci_device_intr_start(struct usb2_xfer /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); - return; } struct usb2_pipe_methods ehci_device_intr_methods = @@ -2400,14 +2363,12 @@ ehci_device_isoc_fs_open(struct usb2_xfe usb2_pc_cpu_flush(td->page_cache); } } - return; } static void ehci_device_isoc_fs_close(struct usb2_xfer *xfer) { ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2626,8 +2587,6 @@ ehci_device_isoc_fs_enter(struct usb2_xf /* update isoc_next */ xfer->pipe->isoc_next = (pp_last - &sc->sc_isoc_fs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - - return; } static void @@ -2635,7 +2594,6 @@ ehci_device_isoc_fs_start(struct usb2_xf { /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); - return; } struct usb2_pipe_methods ehci_device_isoc_fs_methods = @@ -2695,14 +2653,12 @@ ehci_device_isoc_hs_open(struct usb2_xfe usb2_pc_cpu_flush(td->page_cache); } } - return; } static void ehci_device_isoc_hs_close(struct usb2_xfer *xfer) { ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -2898,8 +2854,6 @@ ehci_device_isoc_hs_enter(struct usb2_xf /* update isoc_next */ xfer->pipe->isoc_next = (pp_last - &sc->sc_isoc_hs_p_last[0]) & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1); - - return; } static void @@ -2907,7 +2861,6 @@ ehci_device_isoc_hs_start(struct usb2_xf { /* put transfer on interrupt queue */ ehci_transfer_intr_enqueue(xfer); - return; } struct usb2_pipe_methods ehci_device_isoc_hs_methods = @@ -2942,7 +2895,6 @@ ehci_root_ctrl_close(struct usb2_xfer *x sc->sc_root_ctrl.xfer = NULL; } ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } /* data structures and routines @@ -3052,8 +3004,6 @@ ehci_root_ctrl_start(struct usb2_xfer *x usb2_config_td_queue_command (&sc->sc_config_td, NULL, &ehci_root_ctrl_task, 0, 0); - - return; } static void @@ -3061,7 +3011,6 @@ ehci_root_ctrl_task(struct ehci_softc *s struct usb2_config_td_cc *cc, uint16_t refcount) { ehci_root_ctrl_poll(sc); - return; } static void @@ -3459,7 +3408,6 @@ ehci_root_ctrl_poll(struct ehci_softc *s { usb2_sw_transfer(&sc->sc_root_ctrl, &ehci_root_ctrl_done); - return; } struct usb2_pipe_methods ehci_root_ctrl_methods = @@ -3490,7 +3438,6 @@ ehci_root_intr_close(struct usb2_xfer *x sc->sc_root_intr.xfer = NULL; } ehci_device_done(xfer, USB_ERR_CANCELLED); - return; } static void @@ -3505,7 +3452,6 @@ ehci_root_intr_start(struct usb2_xfer *x ehci_softc_t *sc = xfer->usb2_sc; sc->sc_root_intr.xfer = xfer; - return; } struct usb2_pipe_methods ehci_root_intr_methods = @@ -3772,7 +3718,6 @@ alloc_dma_set: xfer->flags_int.curr_dma_set = 1; goto alloc_dma_set; } - return; } static void @@ -3853,7 +3798,6 @@ ehci_get_dma_delay(struct usb2_bus *bus, * the transfer descriptor(s) and QH */ *pus = (188); /* microseconds */ - return; } struct usb2_bus_methods ehci_bus_methods = Modified: head/sys/dev/usb2/controller/ehci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ehci2_pci.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/controller/ehci2_pci.c Thu Dec 11 23:17:48 2008 (r185950) @@ -468,7 +468,6 @@ ehci_pci_takecontroller(device_t self) usb2_pause_mtx(NULL, 10); /* wait 10ms */ } } - return; } static driver_t ehci_driver = Modified: head/sys/dev/usb2/controller/musb2_otg.c ============================================================================== --- head/sys/dev/usb2/controller/musb2_otg.c Thu Dec 11 23:15:15 2008 (r185949) +++ head/sys/dev/usb2/controller/musb2_otg.c Thu Dec 11 23:17:48 2008 (r185950) @@ -133,7 +133,6 @@ musbotg_get_hw_ep_profile(struct usb2_de } else { *ppf = NULL; } - return; } static void @@ -151,7 +150,6 @@ musbotg_clocks_on(struct musbotg_softc * /* XXX enable Transceiver */ } - return; } static void @@ -168,7 +166,6 @@ musbotg_clocks_off(struct musbotg_softc } sc->sc_flags.clocks_off = 1; } - return; } static void @@ -183,7 +180,6 @@ musbotg_pull_common(struct musbotg_softc temp &= ~MUSB2_MASK_SOFTC; MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); - return; } static void @@ -196,7 +192,6 @@ musbotg_pull_up(struct musbotg_softc *sc sc->sc_flags.d_pulled_up = 1; musbotg_pull_common(sc, 1); } - return; } static void @@ -208,7 +203,6 @@ musbotg_pull_down(struct musbotg_softc * sc->sc_flags.d_pulled_up = 0; musbotg_pull_common(sc, 0); } - return; } static void @@ -239,14 +233,12 @@ musbotg_wakeup_peer(struct usb2_xfer *xf temp = MUSB2_READ_1(sc, MUSB2_REG_POWER); temp &= ~MUSB2_MASK_RESUME; MUSB2_WRITE_1(sc, MUSB2_REG_POWER, temp); - return; } static void musbotg_rem_wakeup_set(struct usb2_device *udev, uint8_t is_on) { DPRINTFN(4, "is_on=%u\n", is_on); - return; } static void @@ -255,7 +247,6 @@ musbotg_set_address(struct musbotg_softc DPRINTFN(4, "addr=%d\n", addr); addr &= 0x7F; MUSB2_WRITE_1(sc, MUSB2_REG_FADDR, addr); - return; } static uint8_t @@ -971,8 +962,6 @@ repeat: goto repeat; } } - - return; } static void @@ -1008,8 +997,6 @@ musbotg_vbus_interrupt(struct usb2_bus * } USB_BUS_UNLOCK(&sc->sc_bus); - - return; } void @@ -1117,8 +1104,6 @@ repeat: goto repeat; USB_BUS_UNLOCK(&sc->sc_bus); - - return; } static void @@ -1142,7 +1127,6 @@ musbotg_setup_standard_chain_sub(struct td->did_stall = 0; td->short_pkt = temp->short_pkt; td->alt_next = temp->setup_alt_next; - return; } static void @@ -1262,7 +1246,6 @@ musbotg_setup_standard_chain(struct usb2 /* must have at least one frame! */ td = temp.td; xfer->td_transfer_last = td; - return; } static void @@ -1279,8 +1262,6 @@ musbotg_timeout(void *arg) musbotg_device_done(xfer, USB_ERR_TIMEOUT); USB_BUS_UNLOCK(&sc->sc_bus); - - return; } static void @@ -1321,7 +1302,6 @@ musbotg_ep_int_set(struct usb2_xfer *xfe MUSB2_WRITE_2(sc, MUSB2_REG_INTTXE, temp); } } - return; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 00:57:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A1251065670; Fri, 12 Dec 2008 00:57:39 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 490378FC12; Fri, 12 Dec 2008 00:57:39 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC0vd0C081653; Fri, 12 Dec 2008 00:57:39 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC0vdX7081650; Fri, 12 Dec 2008 00:57:39 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120057.mBC0vdX7081650@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 00:57:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185956 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 00:57:39 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 00:57:38 2008 New Revision: 185956 URL: http://svn.freebsd.org/changeset/base/185956 Log: Add a new VOP, VOP_VPTOCNP, which translates a vnode to its component name on a best-effort basis. Teach vn_fullpath to use this new VOP if a regular VFS cache lookup fails. This VOP is designed to supplement the VFS cache to provide a better chance that a vnode-to-name lookup will succeed. Currently, an implementation for devfs is being committed. The default implementation is to return ENOENT. A big thanks to kib for the mentorship on this, and to pho for running it through his stress test suite. Reviewed by: arch Approved by: kib Modified: head/sys/kern/vfs_cache.c head/sys/kern/vfs_default.c head/sys/kern/vnode_if.src Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Fri Dec 12 00:56:00 2008 (r185955) +++ head/sys/kern/vfs_cache.c Fri Dec 12 00:57:38 2008 (r185956) @@ -169,6 +169,7 @@ SYSCTL_OPAQUE(_vfs_cache, OID_AUTO, nchs static void cache_zap(struct namecache *ncp); +static int vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen); static int vn_fullpath1(struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen); @@ -840,6 +841,38 @@ vn_fullpath_global(struct thread *td, st return (error); } +static int +vn_vptocnp(struct vnode **vp, char **bp, char *buf, u_int *buflen) +{ + struct vnode *dvp; + int error, vfslocked; + + vhold(*vp); + CACHE_UNLOCK(); + vfslocked = VFS_LOCK_GIANT((*vp)->v_mount); + vn_lock(*vp, LK_SHARED | LK_RETRY); + vdrop(*vp); + error = VOP_VPTOCNP(*vp, &dvp, buf, buflen); + VOP_UNLOCK(*vp, 0); + VFS_UNLOCK_GIANT(vfslocked); + if (error) { + numfullpathfail2++; + return (error); + } + *bp = buf + *buflen; + *vp = dvp; + CACHE_LOCK(); + if ((*vp)->v_iflag & VI_DOOMED) { + /* forced unmount */ + CACHE_UNLOCK(); + vdrop(*vp); + return (ENOENT); + } + vdrop(*vp); + + return (0); +} + /* * The magic behind kern___getcwd() and vn_fullpath(). */ @@ -851,7 +884,8 @@ vn_fullpath1(struct thread *td, struct v int error, i, slash_prefixed; struct namecache *ncp; - bp = buf + buflen - 1; + buflen--; + bp = buf + buflen; *bp = '\0'; error = 0; slash_prefixed = 0; @@ -860,58 +894,77 @@ vn_fullpath1(struct thread *td, struct v numfullpathcalls++; if (vp->v_type != VDIR) { ncp = TAILQ_FIRST(&vp->v_cache_dst); - if (!ncp) { - numfullpathfail2++; - CACHE_UNLOCK(); - return (ENOENT); + if (ncp != NULL) { + for (i = ncp->nc_nlen - 1; i >= 0 && bp > buf; i--) + *--bp = ncp->nc_name[i]; + if (bp == buf) { + numfullpathfail4++; + CACHE_UNLOCK(); + return (ENOMEM); + } + vp = ncp->nc_dvp; + } else { + error = vn_vptocnp(&vp, &bp, buf, &buflen); + if (error) { + return (error); + } } - for (i = ncp->nc_nlen - 1; i >= 0 && bp > buf; i--) - *--bp = ncp->nc_name[i]; - if (bp == buf) { + *--bp = '/'; + buflen--; + if (buflen < 0) { numfullpathfail4++; CACHE_UNLOCK(); return (ENOMEM); } - *--bp = '/'; slash_prefixed = 1; - vp = ncp->nc_dvp; } while (vp != rdir && vp != rootvnode) { if (vp->v_vflag & VV_ROOT) { if (vp->v_iflag & VI_DOOMED) { /* forced unmount */ + CACHE_UNLOCK(); error = EBADF; break; } vp = vp->v_mount->mnt_vnodecovered; continue; } - if (vp->v_dd == NULL) { + if (vp->v_type != VDIR) { numfullpathfail1++; + CACHE_UNLOCK(); error = ENOTDIR; break; } ncp = TAILQ_FIRST(&vp->v_cache_dst); - if (!ncp) { - numfullpathfail2++; - error = ENOENT; - break; + if (ncp != NULL) { + MPASS(ncp->nc_dvp == vp->v_dd); + buflen -= ncp->nc_nlen - 1; + for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) + *--bp = ncp->nc_name[i]; + if (bp == buf) { + numfullpathfail4++; + CACHE_UNLOCK(); + error = ENOMEM; + break; + } + vp = ncp->nc_dvp; + } else { + error = vn_vptocnp(&vp, &bp, buf, &buflen); + if (error) { + break; + } } - MPASS(ncp->nc_dvp == vp->v_dd); - for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) - *--bp = ncp->nc_name[i]; - if (bp == buf) { + *--bp = '/'; + buflen--; + if (buflen < 0) { numfullpathfail4++; + CACHE_UNLOCK(); error = ENOMEM; break; } - *--bp = '/'; slash_prefixed = 1; - vp = ncp->nc_dvp; } - if (error) { - CACHE_UNLOCK(); + if (error) return (error); - } if (!slash_prefixed) { if (bp == buf) { numfullpathfail4++; Modified: head/sys/kern/vfs_default.c ============================================================================== --- head/sys/kern/vfs_default.c Fri Dec 12 00:56:00 2008 (r185955) +++ head/sys/kern/vfs_default.c Fri Dec 12 00:57:38 2008 (r185956) @@ -98,6 +98,7 @@ struct vop_vector default_vnodeops = { .vop_revoke = VOP_PANIC, .vop_strategy = vop_nostrategy, .vop_unlock = vop_stdunlock, + .vop_vptocnp = VOP_ENOENT, .vop_vptofh = vop_stdvptofh, }; @@ -138,6 +139,13 @@ vop_einval(struct vop_generic_args *ap) } int +vop_enoent(struct vop_generic_args *ap) +{ + + return (ENOENT); +} + +int vop_null(struct vop_generic_args *ap) { Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Fri Dec 12 00:56:00 2008 (r185955) +++ head/sys/kern/vnode_if.src Fri Dec 12 00:57:38 2008 (r185956) @@ -595,3 +595,13 @@ vop_vptofh { IN struct vnode *vp; IN struct fid *fhp; }; + +%% vptocnp vp L L L +%% vptocnp vpp - U - + +vop_vptocnp { + IN struct vnode *vp; + OUT struct vnode **vpp; + INOUT char *buf; + INOUT int *buflen; +}; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 00:58:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA8CA1065675; Fri, 12 Dec 2008 00:58:52 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA5FE8FC12; Fri, 12 Dec 2008 00:58:52 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC0wq4q081717; Fri, 12 Dec 2008 00:58:52 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC0wqAR081716; Fri, 12 Dec 2008 00:58:52 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120058.mBC0wqAR081716@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 00:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185957 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 00:58:52 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 00:58:52 2008 New Revision: 185957 URL: http://svn.freebsd.org/changeset/base/185957 Log: Add a new error VOP, VOP_ENOENT. This function will simply return ENOENT. Reviewed by: arch Approved by: kib Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Fri Dec 12 00:57:38 2008 (r185956) +++ head/sys/sys/vnode.h Fri Dec 12 00:58:52 2008 (r185957) @@ -659,6 +659,7 @@ int vop_stdvptofh(struct vop_vptofh_args int vop_eopnotsupp(struct vop_generic_args *ap); int vop_ebadf(struct vop_generic_args *ap); int vop_einval(struct vop_generic_args *ap); +int vop_enoent(struct vop_generic_args *ap); int vop_enotty(struct vop_generic_args *ap); int vop_null(struct vop_generic_args *ap); int vop_panic(struct vop_generic_args *ap); @@ -723,6 +724,7 @@ extern struct vop_vector default_vnodeop #define VOP_EBADF ((void*)(uintptr_t)vop_ebadf) #define VOP_ENOTTY ((void*)(uintptr_t)vop_enotty) #define VOP_EINVAL ((void*)(uintptr_t)vop_einval) +#define VOP_ENOENT ((void*)(uintptr_t)vop_enoent) #define VOP_EOPNOTSUPP ((void*)(uintptr_t)vop_eopnotsupp) /* vfs_hash.c */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 00:59:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DDE7106564A; Fri, 12 Dec 2008 00:59:36 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8DEEB8FC23; Fri, 12 Dec 2008 00:59:36 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC0xaFw081766; Fri, 12 Dec 2008 00:59:36 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC0xaXg081765; Fri, 12 Dec 2008 00:59:36 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120059.mBC0xaXg081765@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 00:59:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185958 - head/sys/fs/deadfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 00:59:36 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 00:59:36 2008 New Revision: 185958 URL: http://svn.freebsd.org/changeset/base/185958 Log: Add a simple VOP_VPTOCNP implementation for deadfs which returns EBADF. Reviewed by: arch Approved by: kib Modified: head/sys/fs/deadfs/dead_vnops.c Modified: head/sys/fs/deadfs/dead_vnops.c ============================================================================== --- head/sys/fs/deadfs/dead_vnops.c Fri Dec 12 00:58:52 2008 (r185957) +++ head/sys/fs/deadfs/dead_vnops.c Fri Dec 12 00:59:36 2008 (r185958) @@ -78,6 +78,7 @@ struct vop_vector dead_vnodeops = { .vop_rmdir = VOP_PANIC, .vop_setattr = VOP_EBADF, .vop_symlink = VOP_PANIC, + .vop_vptocnp = VOP_EBADF, .vop_write = dead_write, }; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 01:00:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A69C1065688; Fri, 12 Dec 2008 01:00:39 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A1A68FC28; Fri, 12 Dec 2008 01:00:39 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC10cbb081843; Fri, 12 Dec 2008 01:00:38 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC10cwZ081842; Fri, 12 Dec 2008 01:00:38 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120100.mBC10cwZ081842@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 01:00:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185959 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 01:00:39 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 01:00:38 2008 New Revision: 185959 URL: http://svn.freebsd.org/changeset/base/185959 Log: Implement VOP_VPTOCNP for devfs. Directory and character device vnodes are properly translated to their component names. Reviewed by: arch Approved by: kib Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Fri Dec 12 00:59:36 2008 (r185958) +++ head/sys/fs/devfs/devfs_vnops.c Fri Dec 12 01:00:38 2008 (r185959) @@ -185,6 +185,69 @@ devfs_clear_cdevpriv(void) devfs_fpdrop(fp); } +static int +devfs_vptocnp(struct vop_vptocnp_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct vnode **dvp = ap->a_vpp; + struct devfs_mount *dmp; + char *buf = ap->a_buf; + int *buflen = ap->a_buflen; + struct devfs_dirent *dd, *de; + int i, error; + + dmp = VFSTODEVFS(vp->v_mount); + i = *buflen; + dd = vp->v_data; + error = 0; + + sx_xlock(&dmp->dm_lock); + + if (vp->v_type == VCHR) { + i -= strlen(dd->de_cdp->cdp_c.si_name); + if (i < 0) { + error = ENOMEM; + goto finished; + } + bcopy(dd->de_cdp->cdp_c.si_name, buf + i, + strlen(dd->de_cdp->cdp_c.si_name)); + de = dd->de_dir; + } else if (vp->v_type == VDIR) { + if (dd == dmp->dm_rootdir) { + *dvp = vp; + vhold(*dvp); + goto finished; + } + i -= dd->de_dirent->d_namlen; + if (i < 0) { + error = ENOMEM; + goto finished; + } + bcopy(dd->de_dirent->d_name, buf + i, + dd->de_dirent->d_namlen); + de = dd; + } else { + error = ENOENT; + goto finished; + } + *buflen = i; + de = TAILQ_FIRST(&de->de_dlist); /* "." */ + de = TAILQ_NEXT(de, de_list); /* ".." */ + de = de->de_dir; + mtx_lock(&devfs_de_interlock); + *dvp = de->de_vnode; + if (*dvp != NULL) { + VI_LOCK(*dvp); + mtx_unlock(&devfs_de_interlock); + vholdl(*dvp); + VI_UNLOCK(*dvp); + } else + error = ENOENT; +finished: + sx_xunlock(&dmp->dm_lock); + return (error); +} + /* * Construct the fully qualified path name relative to the mountpoint */ @@ -1465,6 +1528,7 @@ static struct vop_vector devfs_vnodeops .vop_setlabel = devfs_setlabel, #endif .vop_symlink = devfs_symlink, + .vop_vptocnp = devfs_vptocnp, }; static struct vop_vector devfs_specops = { @@ -1499,6 +1563,7 @@ static struct vop_vector devfs_specops = #endif .vop_strategy = VOP_PANIC, .vop_symlink = VOP_PANIC, + .vop_vptocnp = devfs_vptocnp, .vop_write = VOP_PANIC, }; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 01:08:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC1C61065676; Fri, 12 Dec 2008 01:08:28 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BADFA8FC0C; Fri, 12 Dec 2008 01:08:28 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC18S0p082095; Fri, 12 Dec 2008 01:08:28 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC18SaU082093; Fri, 12 Dec 2008 01:08:28 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120108.mBC18SaU082093@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 01:08:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185961 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 01:08:29 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 01:08:28 2008 New Revision: 185961 URL: http://svn.freebsd.org/changeset/base/185961 Log: Add a man page for VOP_VPTOCNP. Reviewed by: arch Approved by: kib Added: head/share/man/man9/VOP_VPTOCNP.9 (contents, props changed) Modified: head/share/man/man9/Makefile Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Fri Dec 12 01:01:03 2008 (r185960) +++ head/share/man/man9/Makefile Fri Dec 12 01:08:28 2008 (r185961) @@ -348,6 +348,7 @@ MAN= accept_filter.9 \ VOP_SETACL.9 \ VOP_SETEXTATTR.9 \ VOP_STRATEGY.9 \ + VOP_VPTOCNP.9 \ VOP_VPTOFH.9 \ vput.9 \ vref.9 \ Added: head/share/man/man9/VOP_VPTOCNP.9 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man9/VOP_VPTOCNP.9 Fri Dec 12 01:08:28 2008 (r185961) @@ -0,0 +1,110 @@ +.\" -*- nroff -*- +.\" +.\" Copyright (c) 2008 Joe Marcus Clarke +.\" +.\" All rights reserved. +.\" +.\" This program is free software. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR +.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT, +.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd December 7, 2008 +.Os +.Dt VOP_VPTOCNP 9 +.Sh NAME +.Nm VOP_VPTOCNP +.Nd translate a vnode to its component name +.Sh SYNOPSIS +.In sys/param.h +.In sys/vnode.h +.Ft int +.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "char *buf" "int *buflen" +.Sh DESCRIPTION +This translates a vnode into its component name, and writes that name to +the head of the buffer specified by +.Fa buf +.Bl -tag -width buflen +.It Fa vp +The vnode to translate. +.It Fa dvp +The vnode of the parent directory of +.Fa vp . +.It Fa buf +The buffer into which to preprend the component name. +.It Fa buflen +The remaining size of the buffer. +.El +.Pp +The default implementation of +.Nm +simply returns ENOENT. +.Sh LOCKS +The vnode should be locked on entry and will still be locked on exit. The +parent directory vnode will be unlocked on a successful exit. However, it +will have its hold count incremented. +.Sh RETURN VALUES +Zero is returned on success, otherwise an error code is returned. +.Sh PSEUDOCODE +.Bd -literal +int +vop_vptocnp(struct vnode *vp, struct vnode **dvp, char *buf, int *buflen) +{ + int error = 0; + + /* + * Translate the vnode to its component name. + * + * Decrement the component name's length from buflen. + * + * Obtain the vnode's parent directory vnode. + */ + ...; + + /* + * Increment the parent directory's hold count. + */ + vhold(*dvp); + + return error; +} +.Ed +.Sh ERRORS +.Bl -tag -width Er +.It Bq Er ENOMEM +The buffer was not large enough to hold the vnode's component name. +.It Bq Er ENOENT +The vnode was not found on the file system. +.El +.Sh SEE ALSO +.Xr VOP_LOOKUP 9 , +.Xr vnode 9 +.Sh NOTES +This interface is a work in progress. +.Sh HISTORY +The function +.Nm +appeared in +.Fx 8.0 . +.Sh AUTHORS +This manual page was written by +.An Joe Marcus Clarke . From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 01:26:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 612DB106567B; Fri, 12 Dec 2008 01:26:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 510F78FC1D; Fri, 12 Dec 2008 01:26:12 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC1QCUu082456; Fri, 12 Dec 2008 01:26:12 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC1QCrF082455; Fri, 12 Dec 2008 01:26:12 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200812120126.mBC1QCrF082455@svn.freebsd.org> From: Pyun YongHyeon Date: Fri, 12 Dec 2008 01:26:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185962 - head/sys/dev/vr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 01:26:12 -0000 Author: yongari Date: Fri Dec 12 01:26:11 2008 New Revision: 185962 URL: http://svn.freebsd.org/changeset/base/185962 Log: It seems there are still issues on multicast perfect filtering. Disable it until I find spare time to analyze the issue. Reported by: Goran Lowkrantz hidden-powers DOT com> MFC after: 3 days Modified: head/sys/dev/vr/if_vr.c Modified: head/sys/dev/vr/if_vr.c ============================================================================== --- head/sys/dev/vr/if_vr.c Fri Dec 12 01:08:28 2008 (r185961) +++ head/sys/dev/vr/if_vr.c Fri Dec 12 01:26:11 2008 (r185962) @@ -133,7 +133,7 @@ static struct vr_type { 0, "VIA VT6105 Rhine III 10/100BaseTX" }, { VIA_VENDORID, VIA_DEVICEID_RHINE_III_M, - VR_Q_CSUM | VR_Q_CAM, + VR_Q_CSUM, "VIA VT6105M Rhine III 10/100BaseTX" }, { DELTA_VENDORID, DELTA_DEVICEID_RHINE_II, VR_Q_NEEDALIGN, From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 01:36:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B52811065670; Fri, 12 Dec 2008 01:36:50 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4DF38FC08; Fri, 12 Dec 2008 01:36:50 +0000 (UTC) (envelope-from csjp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC1aopV082692; Fri, 12 Dec 2008 01:36:50 GMT (envelope-from csjp@svn.freebsd.org) Received: (from csjp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC1aope082691; Fri, 12 Dec 2008 01:36:50 GMT (envelope-from csjp@svn.freebsd.org) Message-Id: <200812120136.mBC1aope082691@svn.freebsd.org> From: "Christian S.J. Peron" Date: Fri, 12 Dec 2008 01:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185963 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 01:36:50 -0000 Author: csjp Date: Fri Dec 12 01:36:50 2008 New Revision: 185963 URL: http://svn.freebsd.org/changeset/base/185963 Log: Consider processes attaching/detaching from tun(4) devices as being link state changes. This change modifies tunopen and tunclose to call the if_link_state_change() function. Among other things, this will result in devd(8) receiving events from devctl(4) for linkup/link down. This allows us to do several useful things, including initializing tunnel parameters and adding routes. Discussed on: freebsd-net@ MFC after: 2 weeks Modified: head/sys/net/if_tun.c Modified: head/sys/net/if_tun.c ============================================================================== --- head/sys/net/if_tun.c Fri Dec 12 01:26:11 2008 (r185962) +++ head/sys/net/if_tun.c Fri Dec 12 01:36:50 2008 (r185963) @@ -426,6 +426,7 @@ tunopen(struct cdev *dev, int flag, int tp->tun_flags |= TUN_OPEN; mtx_unlock(&tp->tun_mtx); ifp = TUN2IFP(tp); + if_link_state_change(ifp, LINK_STATE_UP); TUNDEBUG(ifp, "open\n"); return (0); @@ -482,6 +483,7 @@ tunclose(struct cdev *dev, int foo, int ifp->if_drv_flags &= ~IFF_DRV_RUNNING; splx(s); } + if_link_state_change(ifp, LINK_STATE_DOWN); CURVNET_RESTORE(); funsetown(&tp->tun_sigio); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 01:47:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49146106564A; Fri, 12 Dec 2008 01:47:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38FA68FC16; Fri, 12 Dec 2008 01:47:00 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC1l0bR082926; Fri, 12 Dec 2008 01:47:00 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC1l0vg082925; Fri, 12 Dec 2008 01:47:00 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812120147.mBC1l0vg082925@svn.freebsd.org> From: Andrew Thompson Date: Fri, 12 Dec 2008 01:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185964 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 01:47:00 -0000 Author: thompsa Date: Fri Dec 12 01:46:59 2008 New Revision: 185964 URL: http://svn.freebsd.org/changeset/base/185964 Log: Pass RTF_RNH_LOCKED to rtalloc1 sunce the node head is locked, this avoids a recursive lock panic on inet6 detach. Reviewed by: kmacy Modified: head/sys/netinet6/in6_ifattach.c Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Fri Dec 12 01:36:50 2008 (r185963) +++ head/sys/netinet6/in6_ifattach.c Fri Dec 12 01:46:59 2008 (r185964) @@ -834,7 +834,7 @@ in6_ifdetach(struct ifnet *ifp) /* XXX grab lock first to avoid LOR */ if (V_rt_tables[0][AF_INET6] != NULL) { RADIX_NODE_HEAD_LOCK(V_rt_tables[0][AF_INET6]); - rt = rtalloc1((struct sockaddr *)&sin6, 0, 0UL); + rt = rtalloc1((struct sockaddr *)&sin6, RTF_RNH_LOCKED, 0UL); if (rt) { if (rt->rt_ifp == ifp) rtexpunge(rt); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 02:07:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5F21065675; Fri, 12 Dec 2008 02:07:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D4838FC18; Fri, 12 Dec 2008 02:07:46 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC27ksf083327; Fri, 12 Dec 2008 02:07:46 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC27jKg083326; Fri, 12 Dec 2008 02:07:46 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812120207.mBC27jKg083326@svn.freebsd.org> From: Kip Macy Date: Fri, 12 Dec 2008 02:07:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185965 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 02:07:46 -0000 Author: kmacy Date: Fri Dec 12 02:07:45 2008 New Revision: 185965 URL: http://svn.freebsd.org/changeset/base/185965 Log: RTF_RNH_LOCKED needs to be passed in the flags arg not report, apologies to thompsa Modified: head/sys/netinet6/in6_ifattach.c Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Fri Dec 12 01:46:59 2008 (r185964) +++ head/sys/netinet6/in6_ifattach.c Fri Dec 12 02:07:45 2008 (r185965) @@ -834,7 +834,7 @@ in6_ifdetach(struct ifnet *ifp) /* XXX grab lock first to avoid LOR */ if (V_rt_tables[0][AF_INET6] != NULL) { RADIX_NODE_HEAD_LOCK(V_rt_tables[0][AF_INET6]); - rt = rtalloc1((struct sockaddr *)&sin6, RTF_RNH_LOCKED, 0UL); + rt = rtalloc1((struct sockaddr *)&sin6, 0, RTF_RNH_LOCKED); if (rt) { if (rt->rt_ifp == ifp) rtexpunge(rt); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 04:29:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1928A106564A; Fri, 12 Dec 2008 04:29:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 087AF8FC0C; Fri, 12 Dec 2008 04:29:48 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC4TlOl086384; Fri, 12 Dec 2008 04:29:47 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC4Tlvc086383; Fri, 12 Dec 2008 04:29:47 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200812120429.mBC4Tlvc086383@svn.freebsd.org> From: Joe Marcus Clarke Date: Fri, 12 Dec 2008 04:29:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185968 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 04:29:48 -0000 Author: marcus (doc,ports committer) Date: Fri Dec 12 04:29:47 2008 New Revision: 185968 URL: http://svn.freebsd.org/changeset/base/185968 Log: Bump __FreeBSD_version for the new VOP_VPTOCNP addition. Approved by: kib (implicit) Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Dec 12 03:23:50 2008 (r185967) +++ head/sys/sys/param.h Fri Dec 12 04:29:47 2008 (r185968) @@ -57,7 +57,7 @@ * is created, otherwise 1. */ #undef __FreeBSD_version -#define __FreeBSD_version 800057 /* Master, propagated to newvers */ +#define __FreeBSD_version 800058 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 05:42:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C558C1065672; Fri, 12 Dec 2008 05:42:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B46518FC08; Fri, 12 Dec 2008 05:42:57 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC5gvIP087790; Fri, 12 Dec 2008 05:42:57 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC5gvg9087789; Fri, 12 Dec 2008 05:42:57 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200812120542.mBC5gvg9087789@svn.freebsd.org> From: John Baldwin Date: Fri, 12 Dec 2008 05:42:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185969 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 05:42:57 -0000 Author: jhb Date: Fri Dec 12 05:42:57 2008 New Revision: 185969 URL: http://svn.freebsd.org/changeset/base/185969 Log: - Drop a reference to an older 'kdb' debugger that FreeBSD never had. - Tweak a word choice. - Drop a reference to Alpha. Modified: head/share/man/man4/ddb.4 Modified: head/share/man/man4/ddb.4 ============================================================================== --- head/share/man/man4/ddb.4 Fri Dec 12 04:29:47 2008 (r185968) +++ head/share/man/man4/ddb.4 Fri Dec 12 05:42:57 2008 (r185969) @@ -102,10 +102,7 @@ is possible, include: .Sh DESCRIPTION The .Nm -kernel debugger has most of the features of the old -.Nm kdb , -but with a more rational syntax -inspired by +kernel debugger is an interactive debugger with a syntax inspired by .Xr gdb 1 . If linked into the running kernel, it can be invoked locally with the @@ -202,7 +199,7 @@ the .Nm emacs control keys, the usual .Tn ANSI -arrow keys might be used to +arrow keys may be used to browse through the history buffer, and move the cursor within the current line. .Sh COMMANDS @@ -254,8 +251,6 @@ display as an instruction display as an instruction with possible alternate formats depending on the machine: .Bl -tag -width ".Tn powerpc" -compact -.It Tn alpha -Show the registers of the instruction. .It Tn amd64 No alternate format. .It Tn i386 From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 05:45:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CBC11065742; Fri, 12 Dec 2008 05:45:40 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B9048FC19; Fri, 12 Dec 2008 05:45:40 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBC5jejY087900; Fri, 12 Dec 2008 05:45:40 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBC5jeqx087899; Fri, 12 Dec 2008 05:45:40 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812120545.mBC5jeqx087899@svn.freebsd.org> From: Kip Macy Date: Fri, 12 Dec 2008 05:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185970 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 05:45:40 -0000 Author: kmacy Date: Fri Dec 12 05:45:39 2008 New Revision: 185970 URL: http://svn.freebsd.org/changeset/base/185970 Log: fix support and capabilities MFC after: 3 days Modified: head/share/man/man4/cxgb.4 Modified: head/share/man/man4/cxgb.4 ============================================================================== --- head/share/man/man4/cxgb.4 Fri Dec 12 05:42:57 2008 (r185969) +++ head/share/man/man4/cxgb.4 Fri Dec 12 05:45:39 2008 (r185970) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2007, Chelsio Inc +.\" Copyright (c) 2007-2008, Chelsio Inc .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -56,7 +56,8 @@ if_cxgb_load="YES" The .Nm driver supports Transmit/Receive checksum offload, -Jumbo Frames as well as TCP segmentation offload (TSO). +Jumbo Frames, TCP segmentation offload (TSO), Large Receive Offload (LRO), +VLAN hardware insertion / extraction, and VLAN checksum offload. For further hardware information, see .Pa http://www.chelsio.com/ . .Pp @@ -76,7 +77,7 @@ For more information on configuring this .Sh HARDWARE The .Nm -driver supports 10 Gigabit Ethernet adapters based on the T3 and T3B chipset: +driver supports 10 Gigabit and 1 Gigabit Ethernet adapters based on the T3 and T3B chipset: .Pp .Bl -bullet -compact .It @@ -111,7 +112,7 @@ go to the Chelsio support website at: If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to -.Aq help@chelsio.com . +.Aq support@chelsio.com . .Sh SEE ALSO .Xr altq 4 , .Xr arp 4 , From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 11:10:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D22F1065670; Fri, 12 Dec 2008 11:10:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C1F38FC08; Fri, 12 Dec 2008 11:10:10 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCBAAPS095833; Fri, 12 Dec 2008 11:10:10 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCBAAWI095832; Fri, 12 Dec 2008 11:10:10 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121110.mBCBAAWI095832@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 11:10:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185980 - head/sys/fs/devfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 11:10:10 -0000 Author: kib Date: Fri Dec 12 11:10:10 2008 New Revision: 185980 URL: http://svn.freebsd.org/changeset/base/185980 Log: Do not leak defs_de_interlock on error. Another pointy hat for my collection. Modified: head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Fri Dec 12 07:34:42 2008 (r185979) +++ head/sys/fs/devfs/devfs_vnops.c Fri Dec 12 11:10:10 2008 (r185980) @@ -241,8 +241,10 @@ devfs_vptocnp(struct vop_vptocnp_args *a mtx_unlock(&devfs_de_interlock); vholdl(*dvp); VI_UNLOCK(*dvp); - } else + } else { + mtx_unlock(&devfs_de_interlock); error = ENOENT; + } finished: sx_xunlock(&dmp->dm_lock); return (error); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 11:43:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79C1A106567B; Fri, 12 Dec 2008 11:43:48 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6829A8FC1E; Fri, 12 Dec 2008 11:43:48 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCBhmIV096455; Fri, 12 Dec 2008 11:43:48 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCBhmNg096451; Fri, 12 Dec 2008 11:43:48 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812121143.mBCBhmNg096451@svn.freebsd.org> From: Ken Smith Date: Fri, 12 Dec 2008 11:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185981 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 11:43:48 -0000 Author: kensmith Date: Fri Dec 12 11:43:48 2008 New Revision: 185981 URL: http://svn.freebsd.org/changeset/base/185981 Log: Begin the sysinstall cleanup. Remove the support for configuring OSF binary compatibility. Modified: head/usr.sbin/sysinstall/config.c head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/config.c ============================================================================== --- head/usr.sbin/sysinstall/config.c Fri Dec 12 11:10:10 2008 (r185980) +++ head/usr.sbin/sysinstall/config.c Fri Dec 12 11:43:48 2008 (r185981) @@ -548,17 +548,6 @@ configLinux(dialogMenuItem *self) } #endif -#ifdef __alpha__ -int -configOSF1(dialogMenuItem *self) -{ - - variable_set2(VAR_OSF1_ENABLE, "YES", 1); - Mkdir("/compat/osf1"); - return DITEM_SUCCESS; -} -#endif - int configSecurelevel(dialogMenuItem *self) { Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Fri Dec 12 11:10:10 2008 (r185980) +++ head/usr.sbin/sysinstall/install.c Fri Dec 12 11:43:48 2008 (r185981) @@ -692,12 +692,6 @@ nodisks: (void)configLinux(self); #endif -#ifdef __alpha__ - dialog_clear_norefresh(); - if (!msgYesNo("Would you like to enable OSF/1 binary compatibility?")) - (void)configOSF1(self); -#endif - #ifdef WITH_MICE dialog_clear_norefresh(); if (!msgNoYes("Does this system have a PS/2, serial, or bus mouse?")) Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:10:10 2008 (r185980) +++ head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:43:48 2008 (r185981) @@ -1257,10 +1257,6 @@ DMenu MenuStartup = { { " SVR4", "This host wants to be able to run SVR4 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "svr4_enable=YES" }, #endif -#ifdef __alpha__ - { " OSF/1", "This host wants to be able to run DEC OSF/1 binaries.", - dmenuVarCheck, configOSF1, NULL, VAR_OSF1_ENABLE "=YES" }, -#endif { " quotas", "This host wishes to check quotas on startup.", dmenuVarCheck, dmenuToggleVariable, NULL, "check_quotas=YES" }, { NULL } }, Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:10:10 2008 (r185980) +++ head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:43:48 2008 (r185981) @@ -169,7 +169,6 @@ #define VAR_NO_HOME "noHome" #define VAR_NONINTERACTIVE "nonInteractive" #define VAR_NOVELL "novell" -#define VAR_OSF1_ENABLE "osf1_enable" #define VAR_RPCBIND_ENABLE "rpcbind_enable" #define VAR_NTPDATE_FLAGS "ntpdate_flags" #define VAR_PACKAGE "package" @@ -533,9 +532,6 @@ extern int configSaverTimeout(dialogMenu extern int configLinux(dialogMenuItem *self); #endif extern int configNTP(dialogMenuItem *self); -#ifdef __alpha__ -extern int configOSF1(dialogMenuItem *self); -#endif extern int configCountry(dialogMenuItem *self); extern int configUsers(dialogMenuItem *self); extern int configRouter(dialogMenuItem *self); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 11:58:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A15B1065672; Fri, 12 Dec 2008 11:58:27 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 887598FC19; Fri, 12 Dec 2008 11:58:27 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCBwRm9096824; Fri, 12 Dec 2008 11:58:27 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCBwRPT096820; Fri, 12 Dec 2008 11:58:27 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812121158.mBCBwRPT096820@svn.freebsd.org> From: Ken Smith Date: Fri, 12 Dec 2008 11:58:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185982 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 11:58:27 -0000 Author: kensmith Date: Fri Dec 12 11:58:27 2008 New Revision: 185982 URL: http://svn.freebsd.org/changeset/base/185982 Log: Remove the offer to install Linux compatibility on i386 in the mainline portion of sysinstall. Leave it to be treated as a regular package along with all the other packages... Modified: head/usr.sbin/sysinstall/config.c head/usr.sbin/sysinstall/install.c head/usr.sbin/sysinstall/menus.c head/usr.sbin/sysinstall/sysinstall.h Modified: head/usr.sbin/sysinstall/config.c ============================================================================== --- head/usr.sbin/sysinstall/config.c Fri Dec 12 11:43:48 2008 (r185981) +++ head/usr.sbin/sysinstall/config.c Fri Dec 12 11:58:27 2008 (r185982) @@ -531,23 +531,6 @@ configUsers(dialogMenuItem *self) return DITEM_SUCCESS; } -#ifdef WITH_LINUX -int -configLinux(dialogMenuItem *self) -{ - WINDOW *w = savescr(); - int i; - - dialog_clear_norefresh(); - variable_set2(VAR_LINUX_ENABLE, "YES", 1); - Mkdir("/compat/linux"); - msgNotify("Installing Linux compatibility library..."); - i = package_add("linux_base-fc"); - restorescr(w); - return i; -} -#endif - int configSecurelevel(dialogMenuItem *self) { Modified: head/usr.sbin/sysinstall/install.c ============================================================================== --- head/usr.sbin/sysinstall/install.c Fri Dec 12 11:43:48 2008 (r185981) +++ head/usr.sbin/sysinstall/install.c Fri Dec 12 11:58:27 2008 (r185982) @@ -686,12 +686,6 @@ nodisks: if (!msgYesNo("Would you like to set this machine's time zone now?")) systemExecute("tzsetup"); -#ifdef WITH_LINUX - dialog_clear_norefresh(); - if (!msgYesNo("Would you like to enable Linux binary compatibility?")) - (void)configLinux(self); -#endif - #ifdef WITH_MICE dialog_clear_norefresh(); if (!msgNoYes("Does this system have a PS/2, serial, or bus mouse?")) Modified: head/usr.sbin/sysinstall/menus.c ============================================================================== --- head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:43:48 2008 (r185981) +++ head/usr.sbin/sysinstall/menus.c Fri Dec 12 11:58:27 2008 (r185982) @@ -1247,10 +1247,6 @@ DMenu MenuStartup = { dmenuVarCheck, dmenuToggleVariable, NULL, "accounting_enable=YES" }, { " lpd", "This host has a printer and wants to run lpd.", dmenuVarCheck, dmenuToggleVariable, NULL, "lpd_enable=YES" }, -#ifdef WITH_LINUX - { " Linux", "This host wants to be able to run Linux binaries.", - dmenuVarCheck, configLinux, NULL, VAR_LINUX_ENABLE "=YES" }, -#endif #ifdef __i386__ { " SCO", "This host wants to be able to run IBCS2 binaries.", dmenuVarCheck, dmenuToggleVariable, NULL, "ibcs2_enable=YES" }, Modified: head/usr.sbin/sysinstall/sysinstall.h ============================================================================== --- head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:43:48 2008 (r185981) +++ head/usr.sbin/sysinstall/sysinstall.h Fri Dec 12 11:58:27 2008 (r185982) @@ -61,10 +61,6 @@ #define WITH_SLICES #endif -#if defined(__i386__) -#define WITH_LINUX -#endif - /* device limits */ #define DEV_NAME_MAX 128 /* The maximum length of a device name */ #define DEV_MAX 100 /* The maximum number of devices we'll deal with */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 12:06:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 159EF106564A; Fri, 12 Dec 2008 12:06:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04AAC8FC16; Fri, 12 Dec 2008 12:06:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCC6SEB097020; Fri, 12 Dec 2008 12:06:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCC6SES097018; Fri, 12 Dec 2008 12:06:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121206.mBCC6SES097018@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 12:06:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185983 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 12:06:29 -0000 Author: kib Date: Fri Dec 12 12:06:28 2008 New Revision: 185983 URL: http://svn.freebsd.org/changeset/base/185983 Log: The userland_sysctl() function retries sysctl_root() until returned error is not EAGAIN. Several sysctls that inspect another process use p_candebug() for checking access right for the curproc. p_candebug() returns EAGAIN for some reasons, in particular, for the process doing exec() now. If execing process tries to lock Giant, we get a livelock, because sysctl handlers are covered by Giant, and often do not sleep. Break the livelock by dropping Giant and allowing other threads to execute in the EAGAIN loop. Also, do not return EAGAIN from p_candebug() when process is executing, use more appropriate EBUSY error [1]. Reported and tested by: pho Suggested by: rwatson [1] Reviewed by: rwatson, des MFC after: 1 week Modified: head/sys/kern/kern_prot.c head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Fri Dec 12 11:58:27 2008 (r185982) +++ head/sys/kern/kern_prot.c Fri Dec 12 12:06:28 2008 (r185983) @@ -1679,7 +1679,7 @@ p_candebug(struct thread *td, struct pro * should be moved to the caller's of p_candebug(). */ if ((p->p_flag & P_INEXEC) != 0) - return (EAGAIN); + return (EBUSY); return (0); } Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Fri Dec 12 11:58:27 2008 (r185982) +++ head/sys/kern/kern_sysctl.c Fri Dec 12 12:06:28 2008 (r185983) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -1416,11 +1417,16 @@ userland_sysctl(struct thread *td, int * SYSCTL_LOCK(); CURVNET_SET(TD_TO_VNET(curthread)); - do { + for (;;) { req.oldidx = 0; req.newidx = 0; error = sysctl_root(0, name, namelen, &req); - } while (error == EAGAIN); + if (error != EAGAIN) + break; + DROP_GIANT(); + uio_yield(); + PICKUP_GIANT(); + } if (req.lock == REQ_WIRED && req.validlen > 0) vsunlock(req.oldptr, req.validlen); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 12:12:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAE0C106564A; Fri, 12 Dec 2008 12:12:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D98C88FC12; Fri, 12 Dec 2008 12:12:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCCCaIh097169; Fri, 12 Dec 2008 12:12:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCCCaEn097166; Fri, 12 Dec 2008 12:12:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121212.mBCCCaEn097166@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 12:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185984 - in head/sys: compat/linprocfs fs/procfs kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 12:12:37 -0000 Author: kib Date: Fri Dec 12 12:12:36 2008 New Revision: 185984 URL: http://svn.freebsd.org/changeset/base/185984 Log: Reference the vmspace of the process being inspected by procfs, linprocfs and sysctl kern_proc_vmmap handlers. Reported and tested by: pho Reviewed by: rwatson, des MFC after: 1 week Modified: head/sys/compat/linprocfs/linprocfs.c head/sys/fs/procfs/procfs_map.c head/sys/kern/kern_proc.c Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Fri Dec 12 12:06:28 2008 (r185983) +++ head/sys/compat/linprocfs/linprocfs.c Fri Dec 12 12:12:36 2008 (r185984) @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -874,7 +875,8 @@ linprocfs_doprocenviron(PFS_FILL_ARGS) static int linprocfs_doprocmaps(PFS_FILL_ARGS) { - vm_map_t map = &p->p_vmspace->vm_map; + struct vmspace *vm; + vm_map_t map; vm_map_entry_t entry, tmp_entry; vm_object_t obj, tobj, lobj; vm_offset_t e_start, e_end; @@ -899,6 +901,10 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) return (EOPNOTSUPP); error = 0; + vm = vmspace_acquire_ref(p); + if (vm == NULL) + return (ESRCH); + map = &vm->vm_map; vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { @@ -985,6 +991,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) } } vm_map_unlock_read(map); + vmspace_free(vm); return (error); } Modified: head/sys/fs/procfs/procfs_map.c ============================================================================== --- head/sys/fs/procfs/procfs_map.c Fri Dec 12 12:06:28 2008 (r185983) +++ head/sys/fs/procfs/procfs_map.c Fri Dec 12 12:12:36 2008 (r185984) @@ -53,6 +53,7 @@ #include #include +#include #include #include #include @@ -82,7 +83,8 @@ extern struct sysentvec ia32_freebsd_sys int procfs_doprocmap(PFS_FILL_ARGS) { - vm_map_t map = &p->p_vmspace->vm_map; + struct vmspace *vm; + vm_map_t map; vm_map_entry_t entry, tmp_entry; struct vnode *vp; char *fullpath, *freepath; @@ -109,6 +111,10 @@ procfs_doprocmap(PFS_FILL_ARGS) } #endif + vm = vmspace_acquire_ref(p); + if (vm == NULL) + return (ESRCH); + map = &vm->vm_map; vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { @@ -235,5 +241,6 @@ procfs_doprocmap(PFS_FILL_ARGS) } } vm_map_unlock_read(map); + vmspace_free(vm); return (error); } Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Fri Dec 12 12:06:28 2008 (r185983) +++ head/sys/kern/kern_proc.c Fri Dec 12 12:12:36 2008 (r185984) @@ -1357,6 +1357,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A struct vnode *vp; struct proc *p; vm_map_t map; + struct vmspace *vm; name = (int *)arg1; if ((p = pfind((pid_t)name[0])) == NULL) @@ -1371,7 +1372,11 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A } _PHOLD(p); PROC_UNLOCK(p); - + vm = vmspace_acquire_ref(p); + if (vm == NULL) { + PRELE(p); + return (ESRCH); + } kve = malloc(sizeof(*kve), M_TEMP, M_WAITOK); map = &p->p_vmspace->vm_map; /* XXXRW: More locking required? */ @@ -1501,6 +1506,7 @@ sysctl_kern_proc_ovmmap(SYSCTL_HANDLER_A } } vm_map_unlock_read(map); + vmspace_free(vm); PRELE(p); free(kve, M_TEMP); return (error); @@ -1523,6 +1529,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR int error, *name; struct vnode *vp; struct proc *p; + struct vmspace *vm; vm_map_t map; name = (int *)arg1; @@ -1538,10 +1545,14 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR } _PHOLD(p); PROC_UNLOCK(p); - + vm = vmspace_acquire_ref(p); + if (vm == NULL) { + PRELE(p); + return (ESRCH); + } kve = malloc(sizeof(*kve), M_TEMP, M_WAITOK); - map = &p->p_vmspace->vm_map; /* XXXRW: More locking required? */ + map = &vm->vm_map; /* XXXRW: More locking required? */ vm_map_lock_read(map); for (entry = map->header.next; entry != &map->header; entry = entry->next) { @@ -1672,6 +1683,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR } } vm_map_unlock_read(map); + vmspace_free(vm); PRELE(p); free(kve, M_TEMP); return (error); From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 13:09:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADC571065670; Fri, 12 Dec 2008 13:09:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B86A8FC18; Fri, 12 Dec 2008 13:09:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCD9qr1098321; Fri, 12 Dec 2008 13:09:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCD9qWW098320; Fri, 12 Dec 2008 13:09:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121309.mBCD9qWW098320@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 13:09:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185985 - in stable/7/sys: . amd64/amd64 contrib/pf dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 13:09:52 -0000 Author: kib Date: Fri Dec 12 13:09:52 2008 New Revision: 185985 URL: http://svn.freebsd.org/changeset/base/185985 Log: MFC r185634: Improve db_backtrace() for compat ia32 on amd64. 32bit image enters the kernel via Xint0x80_syscall(). Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/db_trace.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/amd64/amd64/db_trace.c ============================================================================== --- stable/7/sys/amd64/amd64/db_trace.c Fri Dec 12 12:12:36 2008 (r185984) +++ stable/7/sys/amd64/amd64/db_trace.c Fri Dec 12 13:09:52 2008 (r185985) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -318,6 +320,10 @@ db_nextframe(struct amd64_frame **fp, db frame_type = INTERRUPT; else if (strcmp(name, "Xfast_syscall") == 0) frame_type = SYSCALL; +#ifdef COMPAT_IA32 + else if (strcmp(name, "Xint0x80_syscall") == 0) + frame_type = SYSCALL; +#endif /* XXX: These are interrupts with trap frames. */ else if (strcmp(name, "Xtimerint") == 0 || strcmp(name, "Xcpustop") == 0 || From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 13:21:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 726B91065673; Fri, 12 Dec 2008 13:21:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60DE68FC24; Fri, 12 Dec 2008 13:21:31 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCDLVG2098579; Fri, 12 Dec 2008 13:21:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCDLVZ1098578; Fri, 12 Dec 2008 13:21:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121321.mBCDLVZ1098578@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 13:21:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185986 - in releng/7.1/sys: . amd64/amd64 contrib/pf dev/cxgb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 13:21:31 -0000 Author: kib Date: Fri Dec 12 13:21:31 2008 New Revision: 185986 URL: http://svn.freebsd.org/changeset/base/185986 Log: MFC r185634: Improve db_backtrace() for compat ia32 on amd64. 32bit image enters the kernel via Xint0x80_syscall(). Approved by: re (kensmith) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/amd64/amd64/db_trace.c releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) Modified: releng/7.1/sys/amd64/amd64/db_trace.c ============================================================================== --- releng/7.1/sys/amd64/amd64/db_trace.c Fri Dec 12 13:09:52 2008 (r185985) +++ releng/7.1/sys/amd64/amd64/db_trace.c Fri Dec 12 13:21:31 2008 (r185986) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_compat.h" + #include #include #include @@ -318,6 +320,10 @@ db_nextframe(struct amd64_frame **fp, db frame_type = INTERRUPT; else if (strcmp(name, "Xfast_syscall") == 0) frame_type = SYSCALL; +#ifdef COMPAT_IA32 + else if (strcmp(name, "Xint0x80_syscall") == 0) + frame_type = SYSCALL; +#endif /* XXX: These are interrupts with trap frames. */ else if (strcmp(name, "Xtimerint") == 0 || strcmp(name, "Xcpustop") == 0 || From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 14:03:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDDC81065673; Fri, 12 Dec 2008 14:03:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD7588FC23; Fri, 12 Dec 2008 14:03:04 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCE34gD099395; Fri, 12 Dec 2008 14:03:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCE34qv099394; Fri, 12 Dec 2008 14:03:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200812121403.mBCE34qv099394@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 12 Dec 2008 14:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185987 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 14:03:05 -0000 Author: kib Date: Fri Dec 12 14:03:04 2008 New Revision: 185987 URL: http://svn.freebsd.org/changeset/base/185987 Log: Uio_yield() already does DROP_GIANT/PICKUP_GIANT, no need to repeat this around the call. Noted by: bde Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Fri Dec 12 13:21:31 2008 (r185986) +++ head/sys/kern/kern_sysctl.c Fri Dec 12 14:03:04 2008 (r185987) @@ -1423,9 +1423,7 @@ userland_sysctl(struct thread *td, int * error = sysctl_root(0, name, namelen, &req); if (error != EAGAIN) break; - DROP_GIANT(); uio_yield(); - PICKUP_GIANT(); } if (req.lock == REQ_WIRED && req.validlen > 0) From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 14:57:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD09B1065675; Fri, 12 Dec 2008 14:57:25 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C9818FC13; Fri, 12 Dec 2008 14:57:25 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCEvPGr000689; Fri, 12 Dec 2008 14:57:25 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCEvPZL000688; Fri, 12 Dec 2008 14:57:25 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812121457.mBCEvPZL000688@svn.freebsd.org> From: Joseph Koshy Date: Fri, 12 Dec 2008 14:57:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185989 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 14:57:25 -0000 Author: jkoshy Date: Fri Dec 12 14:57:25 2008 New Revision: 185989 URL: http://svn.freebsd.org/changeset/base/185989 Log: Add a field to disambiguate between multiple threads awaiting callchain capture. Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Fri Dec 12 14:06:21 2008 (r185988) +++ head/sys/sys/pmc.h Fri Dec 12 14:57:25 2008 (r185989) @@ -814,6 +814,7 @@ struct pmc_sample { uint8_t ps_cpu; /* cpu number */ uint8_t ps_flags; /* other flags */ pid_t ps_pid; /* process PID or -1 */ + struct thread *ps_td; /* which thread */ struct pmc *ps_pmc; /* interrupting PMC */ uintptr_t *ps_pc; /* (const) callchain start */ }; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 15:56:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 791FB1065680; Fri, 12 Dec 2008 15:56:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6922F8FC1C; Fri, 12 Dec 2008 15:56:38 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCFucD9001838; Fri, 12 Dec 2008 15:56:38 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCFucKf001837; Fri, 12 Dec 2008 15:56:38 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <200812121556.mBCFucKf001837@svn.freebsd.org> From: Luigi Rizzo Date: Fri, 12 Dec 2008 15:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185990 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 15:56:38 -0000 Author: luigi Date: Fri Dec 12 15:56:38 2008 New Revision: 185990 URL: http://svn.freebsd.org/changeset/base/185990 Log: Move the check for the ending char in the partition name where it was before -- the check is only made when getdisklabel() returns valid info. On passing, use MAXPARTITIONS to identify the max partition number, instead of the hardwired 'h' MFC after: 4 weeks Modified: head/sbin/newfs/newfs.c Modified: head/sbin/newfs/newfs.c ============================================================================== --- head/sbin/newfs/newfs.c Fri Dec 12 14:57:25 2008 (r185989) +++ head/sbin/newfs/newfs.c Fri Dec 12 15:56:38 2008 (r185990) @@ -354,11 +354,6 @@ main(int argc, char *argv[]) mediasize = st.st_size; /* set fssize from the partition */ } else { - part_name = special[strlen(special) - 1]; - if ((part_name < 'a' || part_name > 'h') && !isdigit(part_name)) - errx(1, "%s: can't figure out file system partition", - special); - if (sectorsize == 0) if (ioctl(disk.d_fd, DIOCGSECTORSIZE, §orsize) == -1) sectorsize = 0; /* back out on error for safety */ @@ -368,6 +363,12 @@ main(int argc, char *argv[]) pp = NULL; lp = getdisklabel(special); if (lp != NULL) { + if (!is_file) /* already set for files */ + part_name = special[strlen(special) - 1]; + if ((part_name < 'a' || part_name - 'a' >= MAXPARTITIONS) && + !isdigit(part_name)) + errx(1, "%s: can't figure out file system partition", + special); cp = &part_name; if (isdigit(*cp)) pp = &lp->d_partitions[RAW_PART]; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:09:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 925501065672; Fri, 12 Dec 2008 16:09:34 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 816DF8FC08; Fri, 12 Dec 2008 16:09:34 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCG9YZQ002216; Fri, 12 Dec 2008 16:09:34 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCG9Ye4002214; Fri, 12 Dec 2008 16:09:34 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812121609.mBCG9Ye4002214@svn.freebsd.org> From: Joseph Koshy Date: Fri, 12 Dec 2008 16:09:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185991 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:09:34 -0000 Author: jkoshy Date: Fri Dec 12 16:09:34 2008 New Revision: 185991 URL: http://svn.freebsd.org/changeset/base/185991 Log: Expose symbol `PMC_FN_USER_CALLCHAIN' to assembler code. Modified: head/sys/amd64/amd64/genassym.c head/sys/i386/i386/genassym.c Modified: head/sys/amd64/amd64/genassym.c ============================================================================== --- head/sys/amd64/amd64/genassym.c Fri Dec 12 15:56:38 2008 (r185990) +++ head/sys/amd64/amd64/genassym.c Fri Dec 12 16:09:34 2008 (r185991) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_compat.h" +#include "opt_hwpmc_hooks.h" #include "opt_kstack_pages.h" #include @@ -44,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif #include #include #include @@ -216,3 +220,7 @@ ASSYM(KUC32SEL, GSEL(GUCODE32_SEL, SEL_U ASSYM(SEL_RPL_MASK, SEL_RPL_MASK); ASSYM(MSR_GSBASE, MSR_GSBASE); + +#ifdef HWPMC_HOOKS +ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN); +#endif Modified: head/sys/i386/i386/genassym.c ============================================================================== --- head/sys/i386/i386/genassym.c Fri Dec 12 15:56:38 2008 (r185990) +++ head/sys/i386/i386/genassym.c Fri Dec 12 16:09:34 2008 (r185991) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include "opt_apic.h" #include "opt_compat.h" +#include "opt_hwpmc_hooks.h" #include "opt_kstack_pages.h" #include @@ -44,6 +45,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef HWPMC_HOOKS +#include +#endif #include #include #include @@ -234,3 +238,7 @@ ASSYM(BUS_SPACE_HANDLE_IAT, offsetof(str ASSYM(PC_CR3, offsetof(struct pcpu, pc_cr3)); ASSYM(HYPERVISOR_VIRT_START, __HYPERVISOR_VIRT_START); #endif + +#ifdef HWPMC_HOOKS +ASSYM(PMC_FN_USER_CALLCHAIN, PMC_FN_USER_CALLCHAIN); +#endif From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:12:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A44671065672; Fri, 12 Dec 2008 16:12:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 933ED8FC12; Fri, 12 Dec 2008 16:12:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCGCJeC002311; Fri, 12 Dec 2008 16:12:19 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCGCJsC002310; Fri, 12 Dec 2008 16:12:19 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812121612.mBCGCJsC002310@svn.freebsd.org> From: Robert Watson Date: Fri, 12 Dec 2008 16:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185992 - in releng/7.1/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:12:19 -0000 Author: rwatson Date: Fri Dec 12 16:12:19 2008 New Revision: 185992 URL: http://svn.freebsd.org/changeset/base/185992 Log: Merge r185929 from stable/7 to releng/7.1: Merge r185813 from head to stable/7: Update comment on INP_TIMEWAIT to say what it's about, as we caution regarding the misplacement of flags in inp_vflag in an earlier comment. Approved by: re (gnn) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/netinet/in_pcb.h Modified: releng/7.1/sys/netinet/in_pcb.h ============================================================================== --- releng/7.1/sys/netinet/in_pcb.h Fri Dec 12 16:09:34 2008 (r185991) +++ releng/7.1/sys/netinet/in_pcb.h Fri Dec 12 16:12:19 2008 (r185992) @@ -410,7 +410,7 @@ void inp_4tuple_get(struct inpcb *inp, #define INP_IPV4 0x1 #define INP_IPV6 0x2 #define INP_IPV6PROTO 0x4 /* opened under IPv6 protocol */ -#define INP_TIMEWAIT 0x8 /* .. probably doesn't go here */ +#define INP_TIMEWAIT 0x8 /* inpcb in TIMEWAIT, ppcb is tcptw */ #define INP_ONESBCAST 0x10 /* send all-ones broadcast */ #define INP_DROPPED 0x20 /* protocol drop flag */ #define INP_SOCKREF 0x40 /* strong socket reference */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:14:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E6231065673; Fri, 12 Dec 2008 16:14:53 +0000 (UTC) (envelope-from paul.m.saab@gmail.com) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.170]) by mx1.freebsd.org (Postfix) with ESMTP id 09D808FC13; Fri, 12 Dec 2008 16:14:52 +0000 (UTC) (envelope-from paul.m.saab@gmail.com) Received: by wf-out-1314.google.com with SMTP id 24so1460959wfg.7 for ; Fri, 12 Dec 2008 08:14:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=a3d5G6RTH1pVsuY4nDLc3TW/vQBzgvblAsg2U9AmT98=; b=tAWcX2C3DBigKmsTzL+Mog3Og/KyfgDZGXMVHTCgaV/dzk4a9RAEmQk6iyqiR4gc9z KDlKZV5zqGFv2FAwOWNs063Wq3wbVmAQ9XY2VJ54WMTy9RVGeUFnhojgd/hJfsoA3bvy pp1a0VbAxl1gubeRUlPtYSjFtJx9v9QfEPLD4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=LMiIgTcuOrlJRIAHIMACJvgkrLO6wxWRHk2hzTpBgRq3MSAnBJcc2c4fW6lZQ1VltF MfRzjqlD6ASo96zjoBSUPwjUgXmCmfZr0p335iwIKMZ23wmKzUayqDW/hyqmOwItOMgr iOGESapiKSsyY/fAbdhV135OBeUZCkhXIEO8o= Received: by 10.142.135.13 with SMTP id i13mr1412692wfd.217.1229098492783; Fri, 12 Dec 2008 08:14:52 -0800 (PST) Received: by 10.142.125.20 with HTTP; Fri, 12 Dec 2008 08:14:52 -0800 (PST) Message-ID: <5c0ff6a70812120814t2c184ec1jc05953a3db9ed319@mail.gmail.com> Date: Fri, 12 Dec 2008 08:14:52 -0800 From: "Paul Saab" Sender: paul.m.saab@gmail.com To: "Luigi Rizzo" In-Reply-To: <200812121556.mBCFucKf001837@svn.freebsd.org> MIME-Version: 1.0 References: <200812121556.mBCFucKf001837@svn.freebsd.org> X-Google-Sender-Auth: c4170f85f645aa02 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185990 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:14:53 -0000 This still will not work. zfs can have arbitrary names. On Fri, Dec 12, 2008 at 7:56 AM, Luigi Rizzo wrote: > Author: luigi > Date: Fri Dec 12 15:56:38 2008 > New Revision: 185990 > URL: http://svn.freebsd.org/changeset/base/185990 > > Log: > Move the check for the ending char in the partition name where > it was before -- the check is only made when getdisklabel() > returns valid info. > On passing, use MAXPARTITIONS to identify the max partition number, > instead of the hardwired 'h' > > MFC after: 4 weeks > > Modified: > head/sbin/newfs/newfs.c > > Modified: head/sbin/newfs/newfs.c > > ============================================================================== > --- head/sbin/newfs/newfs.c Fri Dec 12 14:57:25 2008 (r185989) > +++ head/sbin/newfs/newfs.c Fri Dec 12 15:56:38 2008 (r185990) > @@ -354,11 +354,6 @@ main(int argc, char *argv[]) > mediasize = st.st_size; > /* set fssize from the partition */ > } else { > - part_name = special[strlen(special) - 1]; > - if ((part_name < 'a' || part_name > 'h') && > !isdigit(part_name)) > - errx(1, "%s: can't figure out file system partition", > - special); > - > if (sectorsize == 0) > if (ioctl(disk.d_fd, DIOCGSECTORSIZE, §orsize) == -1) > sectorsize = 0; /* back out on error for safety */ > @@ -368,6 +363,12 @@ main(int argc, char *argv[]) > pp = NULL; > lp = getdisklabel(special); > if (lp != NULL) { > + if (!is_file) /* already set for files */ > + part_name = special[strlen(special) - 1]; > + if ((part_name < 'a' || part_name - 'a' >= MAXPARTITIONS) > && > + !isdigit(part_name)) > + errx(1, "%s: can't figure out file system > partition", > + special); > cp = &part_name; > if (isdigit(*cp)) > pp = &lp->d_partitions[RAW_PART]; > From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:32:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38CD41065670; Fri, 12 Dec 2008 16:32:06 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id E870F8FC0C; Fri, 12 Dec 2008 16:32:05 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 22AC673098; Fri, 12 Dec 2008 17:37:11 +0100 (CET) Date: Fri, 12 Dec 2008 17:37:11 +0100 From: Luigi Rizzo To: Paul Saab Message-ID: <20081212163711.GB18908@onelab2.iet.unipi.it> References: <200812121556.mBCFucKf001837@svn.freebsd.org> <5c0ff6a70812120814t2c184ec1jc05953a3db9ed319@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5c0ff6a70812120814t2c184ec1jc05953a3db9ed319@mail.gmail.com> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, Luigi Rizzo , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r185990 - head/sbin/newfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:32:06 -0000 On Fri, Dec 12, 2008 at 08:14:52AM -0800, Paul Saab wrote: > This still will not work. zfs can have arbitrary names. So let me understand: this part of the code now is exactly as it was two weeks ago, before i touched it. So, are you (and Peter) addressing a pre-existing bug, or could you explain me what is broken now ? Also, are you actually seeing the bug when you run the program, or you just think there might be one ? cheers luigi > On Fri, Dec 12, 2008 at 7:56 AM, Luigi Rizzo wrote: > > > Author: luigi > > Date: Fri Dec 12 15:56:38 2008 > > New Revision: 185990 > > URL: http://svn.freebsd.org/changeset/base/185990 > > > > Log: > > Move the check for the ending char in the partition name where > > it was before -- the check is only made when getdisklabel() > > returns valid info. > > On passing, use MAXPARTITIONS to identify the max partition number, > > instead of the hardwired 'h' > > > > MFC after: 4 weeks > > > > Modified: > > head/sbin/newfs/newfs.c > > > > Modified: head/sbin/newfs/newfs.c > > > > ============================================================================== > > --- head/sbin/newfs/newfs.c Fri Dec 12 14:57:25 2008 (r185989) > > +++ head/sbin/newfs/newfs.c Fri Dec 12 15:56:38 2008 (r185990) > > @@ -354,11 +354,6 @@ main(int argc, char *argv[]) > > mediasize = st.st_size; > > /* set fssize from the partition */ > > } else { > > - part_name = special[strlen(special) - 1]; > > - if ((part_name < 'a' || part_name > 'h') && > > !isdigit(part_name)) > > - errx(1, "%s: can't figure out file system partition", > > - special); > > - > > if (sectorsize == 0) > > if (ioctl(disk.d_fd, DIOCGSECTORSIZE, §orsize) == -1) > > sectorsize = 0; /* back out on error for safety */ > > @@ -368,6 +363,12 @@ main(int argc, char *argv[]) > > pp = NULL; > > lp = getdisklabel(special); > > if (lp != NULL) { > > + if (!is_file) /* already set for files */ > > + part_name = special[strlen(special) - 1]; > > + if ((part_name < 'a' || part_name - 'a' >= MAXPARTITIONS) > > && > > + !isdigit(part_name)) > > + errx(1, "%s: can't figure out file system > > partition", > > + special); > > cp = &part_name; > > if (isdigit(*cp)) > > pp = &lp->d_partitions[RAW_PART]; > > From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:37:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50644106564A; Fri, 12 Dec 2008 16:37:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E8E98FC20; Fri, 12 Dec 2008 16:37:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCGbF7o002912; Fri, 12 Dec 2008 16:37:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCGbFVL002911; Fri, 12 Dec 2008 16:37:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812121637.mBCGbFVL002911@svn.freebsd.org> From: Robert Watson Date: Fri, 12 Dec 2008 16:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185993 - in releng/7.1/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:37:15 -0000 Author: rwatson Date: Fri Dec 12 16:37:15 2008 New Revision: 185993 URL: http://svn.freebsd.org/changeset/base/185993 Log: Merge r185930 from stable/7 to releng/7.1: Merge r185855 from head to stable/7: Move flag definitions for t_flags and t_oobflags below the definition of struct tcpcb so that the structure definition is a bit more vertically compact. Can't yet fit it on one printed page, though. Approved by: re (gnn) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/netinet/tcp_var.h Modified: releng/7.1/sys/netinet/tcp_var.h ============================================================================== --- releng/7.1/sys/netinet/tcp_var.h Fri Dec 12 16:12:19 2008 (r185992) +++ releng/7.1/sys/netinet/tcp_var.h Fri Dec 12 16:37:15 2008 (r185993) @@ -101,29 +101,6 @@ struct tcpcb { struct inpcb *t_inpcb; /* back pointer to internet pcb */ int t_state; /* state of this connection */ u_int t_flags; -#define TF_ACKNOW 0x000001 /* ack peer immediately */ -#define TF_DELACK 0x000002 /* ack, but try to delay it */ -#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ -#define TF_NOOPT 0x000008 /* don't use tcp options */ -#define TF_SENTFIN 0x000010 /* have sent FIN */ -#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ -#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ -#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ -#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ -#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ -#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ -#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ -#define TF_NOPUSH 0x001000 /* don't push */ -#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ -#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ -#define TF_LASTIDLE 0x040000 /* connection was previously idle */ -#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ -#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ -#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ -#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ -#define TF_FORCEDATA 0x800000 /* force out a byte */ -#define TF_TSO 0x1000000 /* TSO enabled on this connection */ -#define TF_TOE 0x2000000 /* this connection is offloaded */ tcp_seq snd_una; /* send unacknowledged */ tcp_seq snd_max; /* highest sequence number sent; @@ -177,8 +154,6 @@ struct tcpcb { /* out-of-band data */ char t_oobflags; /* have some */ char t_iobc; /* input character */ -#define TCPOOB_HAVEDATA 0x01 -#define TCPOOB_HADDATA 0x02 /* RFC 1323 variables */ u_char snd_scale; /* window scaling for send window */ u_char rcv_scale; /* window scaling for recv window */ @@ -212,10 +187,43 @@ struct tcpcb { void *t_toe; /* TOE pcb pointer */ }; +/* + * Flags and utility macros for the t_flags field. + */ +#define TF_ACKNOW 0x000001 /* ack peer immediately */ +#define TF_DELACK 0x000002 /* ack, but try to delay it */ +#define TF_NODELAY 0x000004 /* don't delay packets to coalesce */ +#define TF_NOOPT 0x000008 /* don't use tcp options */ +#define TF_SENTFIN 0x000010 /* have sent FIN */ +#define TF_REQ_SCALE 0x000020 /* have/will request window scaling */ +#define TF_RCVD_SCALE 0x000040 /* other side has requested scaling */ +#define TF_REQ_TSTMP 0x000080 /* have/will request timestamps */ +#define TF_RCVD_TSTMP 0x000100 /* a timestamp was received in SYN */ +#define TF_SACK_PERMIT 0x000200 /* other side said I could SACK */ +#define TF_NEEDSYN 0x000400 /* send SYN (implicit state) */ +#define TF_NEEDFIN 0x000800 /* send FIN (implicit state) */ +#define TF_NOPUSH 0x001000 /* don't push */ +#define TF_MORETOCOME 0x010000 /* More data to be appended to sock */ +#define TF_LQ_OVERFLOW 0x020000 /* listen queue overflow */ +#define TF_LASTIDLE 0x040000 /* connection was previously idle */ +#define TF_RXWIN0SENT 0x080000 /* sent a receiver win 0 in response */ +#define TF_FASTRECOVERY 0x100000 /* in NewReno Fast Recovery */ +#define TF_WASFRECOVERY 0x200000 /* was in NewReno Fast Recovery */ +#define TF_SIGNATURE 0x400000 /* require MD5 digests (RFC2385) */ +#define TF_FORCEDATA 0x800000 /* force out a byte */ +#define TF_TSO 0x1000000 /* TSO enabled on this connection */ +#define TF_TOE 0x2000000 /* this connection is offloaded */ + #define IN_FASTRECOVERY(tp) (tp->t_flags & TF_FASTRECOVERY) #define ENTER_FASTRECOVERY(tp) tp->t_flags |= TF_FASTRECOVERY #define EXIT_FASTRECOVERY(tp) tp->t_flags &= ~TF_FASTRECOVERY +/* + * Flags for the t_oobflags field. + */ +#define TCPOOB_HAVEDATA 0x01 +#define TCPOOB_HADDATA 0x02 + #ifdef TCP_SIGNATURE /* * Defines which are needed by the xform_tcp module and tcp_[in|out]put From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:41:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B06471065670; Fri, 12 Dec 2008 16:41:12 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F0A58FC12; Fri, 12 Dec 2008 16:41:12 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCGfCKe003074; Fri, 12 Dec 2008 16:41:12 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCGfC82003073; Fri, 12 Dec 2008 16:41:12 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200812121641.mBCGfC82003073@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 12 Dec 2008 16:41:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185994 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:41:12 -0000 Author: ambrisko Date: Fri Dec 12 16:41:12 2008 New Revision: 185994 URL: http://svn.freebsd.org/changeset/base/185994 Log: Add in some more device ID's and a generic catch-all. Submitted by: LSI Modified: head/sys/dev/mfi/mfi_pci.c Modified: head/sys/dev/mfi/mfi_pci.c ============================================================================== --- head/sys/dev/mfi/mfi_pci.c Fri Dec 12 16:37:15 2008 (r185993) +++ head/sys/dev/mfi/mfi_pci.c Fri Dec 12 16:41:12 2008 (r185994) @@ -123,6 +123,9 @@ struct mfi_ident { {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2, "Dell PERC H700 Adapter"}, {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2, "Dell PERC H700 Integrated"}, {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2, "Dell PERC H700 Modular"}, + {0x1000, 0x0079, 0x1028, 0x1f19, MFI_FLAGS_GEN2, "Dell PERC H700"}, + {0x1000, 0x0079, 0x1028, 0x1f1b, MFI_FLAGS_GEN2, "Dell PERC H800"}, + {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "Dell PERC H700/800"}, {0x1000, 0x0078, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, {0x1000, 0x007c, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 16:52:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14B5A1065670; Fri, 12 Dec 2008 16:52:34 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 90E7C8FC12; Fri, 12 Dec 2008 16:52:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCGqXSX003490; Fri, 12 Dec 2008 16:52:33 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCGqXhW003489; Fri, 12 Dec 2008 16:52:33 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812121652.mBCGqXhW003489@svn.freebsd.org> From: Robert Watson Date: Fri, 12 Dec 2008 16:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185995 - in releng/7.1/sys: . contrib/pf dev/cxgb netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 16:52:34 -0000 Author: rwatson Date: Fri Dec 12 16:52:33 2008 New Revision: 185995 URL: http://svn.freebsd.org/changeset/base/185995 Log: Merge r185944 from stable/7 to releng/7.1: Merge r185857 from head to stable/7: Move syncache flag definitions below data structure, compress some vertical whitespace. Approved by: re (gnn) Modified: releng/7.1/sys/ (props changed) releng/7.1/sys/contrib/pf/ (props changed) releng/7.1/sys/dev/cxgb/ (props changed) releng/7.1/sys/netinet/tcp_syncache.c Modified: releng/7.1/sys/netinet/tcp_syncache.c ============================================================================== --- releng/7.1/sys/netinet/tcp_syncache.c Fri Dec 12 16:41:12 2008 (r185994) +++ releng/7.1/sys/netinet/tcp_syncache.c Fri Dec 12 16:52:33 2008 (r185995) @@ -115,7 +115,6 @@ struct syncache { struct in_conninfo sc_inc; /* addresses */ int sc_rxttime; /* retransmit time */ u_int16_t sc_rxmits; /* retransmit counter */ - u_int32_t sc_tsreflect; /* timestamp to reflect */ u_int32_t sc_ts; /* our timestamp to send */ u_int32_t sc_tsoff; /* ts offset w/ syncookies */ @@ -123,7 +122,6 @@ struct syncache { tcp_seq sc_irs; /* seq from peer */ tcp_seq sc_iss; /* our ISS */ struct mbuf *sc_ipopts; /* source route */ - u_int16_t sc_peer_mss; /* peer's MSS */ u_int16_t sc_wnd; /* advertised window */ u_int8_t sc_ip_ttl; /* IPv4 TTL */ @@ -131,13 +129,6 @@ struct syncache { u_int8_t sc_requested_s_scale:4, sc_requested_r_scale:4; u_int8_t sc_flags; -#define SCF_NOOPT 0x01 /* no TCP options */ -#define SCF_WINSCALE 0x02 /* negotiated window scaling */ -#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ - /* MSS is implicit */ -#define SCF_UNREACH 0x10 /* icmp unreachable received */ -#define SCF_SIGNATURE 0x20 /* send MD5 digests */ -#define SCF_SACK 0x80 /* send SACK option */ #ifndef TCP_OFFLOAD_DISABLE struct toe_usrreqs *sc_tu; /* TOE operations */ void *sc_toepcb; /* TOE protocol block */ @@ -148,6 +139,17 @@ struct syncache { struct ucred *sc_cred; /* cred cache for jail checks */ }; +/* + * Flags for the sc_flags field. + */ +#define SCF_NOOPT 0x01 /* no TCP options */ +#define SCF_WINSCALE 0x02 /* negotiated window scaling */ +#define SCF_TIMESTAMP 0x04 /* negotiated timestamps */ + /* MSS is implicit */ +#define SCF_UNREACH 0x10 /* icmp unreachable received */ +#define SCF_SIGNATURE 0x20 /* send MD5 digests */ +#define SCF_SACK 0x80 /* send SACK option */ + #ifdef TCP_OFFLOAD_DISABLE #define TOEPCB_ISSET(sc) (0) #else From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 17:34:38 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id DCD7E106575A; Fri, 12 Dec 2008 17:34:36 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Fri, 12 Dec 2008 12:34:24 -0500 User-Agent: KMail/1.6.2 References: <200812121641.mBCGfC82003073@svn.freebsd.org> In-Reply-To: <200812121641.mBCGfC82003073@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200812121234.26683.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, Doug Ambrisko , svn-src-all@FreeBSD.org Subject: Re: svn commit: r185994 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 17:34:38 -0000 On Friday 12 December 2008 11:41 am, Doug Ambrisko wrote: > Author: ambrisko > Date: Fri Dec 12 16:41:12 2008 > New Revision: 185994 > URL: http://svn.freebsd.org/changeset/base/185994 > > Log: > Add in some more device ID's and a generic catch-all. > > Submitted by: LSI > > Modified: > head/sys/dev/mfi/mfi_pci.c > > Modified: head/sys/dev/mfi/mfi_pci.c The catch-all entry is redundant: {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, Jung-uk Kim From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 17:37:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 675C3106564A; Fri, 12 Dec 2008 17:37:56 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 336368FC08; Fri, 12 Dec 2008 17:37:56 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 12 Dec 2008 09:38:14 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id mBCHbt9Z041711; Fri, 12 Dec 2008 09:37:55 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.1/8.14.1/Submit) id mBCHbtAU041710; Fri, 12 Dec 2008 09:37:55 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200812121737.mBCHbtAU041710@ambrisko.com> In-Reply-To: <200812121234.26683.jkim@FreeBSD.org> To: Jung-uk Kim Date: Fri, 12 Dec 2008 09:37:55 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: svn-src-head@FreeBSD.org, Doug Ambrisko , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r185994 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 17:37:56 -0000 Jung-uk Kim writes: | On Friday 12 December 2008 11:41 am, Doug Ambrisko wrote: | > Author: ambrisko | > Date: Fri Dec 12 16:41:12 2008 | > New Revision: 185994 | > URL: http://svn.freebsd.org/changeset/base/185994 | > | > Log: | > Add in some more device ID's and a generic catch-all. | > | > Submitted by: LSI | > | > Modified: | > head/sys/dev/mfi/mfi_pci.c | > | > Modified: head/sys/dev/mfi/mfi_pci.c | | The catch-all entry is redundant: | | {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, Missed that. I'll fix that and re-sort. I missed it since it was out of order. Thanks, Doug A. From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 18:17:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84D9F1065675; Fri, 12 Dec 2008 18:17:23 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7242B8FC19; Fri, 12 Dec 2008 18:17:23 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCIHNUb005232; Fri, 12 Dec 2008 18:17:23 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCIHNHd005230; Fri, 12 Dec 2008 18:17:23 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <200812121817.mBCIHNHd005230@svn.freebsd.org> From: Sean Bruno Date: Fri, 12 Dec 2008 18:17:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185996 - head/usr.sbin/fwcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 18:17:23 -0000 Author: sbruno Date: Fri Dec 12 18:17:23 2008 New Revision: 185996 URL: http://svn.freebsd.org/changeset/base/185996 Log: Reviewed by: (Dieter)freebsd@sopwith.solgatos.com Approved by: slong scottl@samsco.org MFC after: 2 weeks Final cleanup of fwcontrol. NetBSD compatibility Cleanup errors in usage() display Finish up error handling via errx/warnx Generate error on unparsed command line syntax Change device(devbase) to open into the form /dev/fwX.X Modified: head/usr.sbin/fwcontrol/fwcontrol.c head/usr.sbin/fwcontrol/fwmpegts.c Modified: head/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.c Fri Dec 12 16:52:33 2008 (r185995) +++ head/usr.sbin/fwcontrol/fwcontrol.c Fri Dec 12 18:17:23 2008 (r185996) @@ -32,8 +32,10 @@ * SUCH DAMAGE. */ +#if defined(__FreeBSD__) #include __FBSDID("$FreeBSD$"); +#endif #include #include @@ -42,11 +44,22 @@ __FBSDID("$FreeBSD$"); #include #include #include +#if defined(__FreeBSD__) #include #include #include #include #include +#elif defined(__NetBSD__) +#include "eui64.h" +#include +#include +#include +#include +#else +#warning "You need to add support for your OS" +#endif + #include #include @@ -66,7 +79,7 @@ static void usage(void) { fprintf(stderr, - "fwcontrol [-u bus_num] [-prt] [-c node] [-d node] [-o node] [-s node]\n" + "%s [-u bus_num] [-prt] [-c node] [-d node] [-o node] [-s node]\n" "\t [-l file] [-g gap_count] [-f force_root ] [-b pri_req]\n" "\t [-M mode] [-R filename] [-S filename] [-m EUI64 | hostname]\n" "\t-u: specify bus number\n" @@ -78,14 +91,15 @@ usage(void) "\t-o: send link-on packet to the node\n" "\t-s: write RESET_START register on the node\n" "\t-l: load and parse hex dump file of configuration ROM\n" - "\t-g: broadcast gap_count by phy_config packet\n" - "\t-f: broadcast force_root by phy_config packet\n" + "\t-g: set gap count\n" + "\t-f: force root node\n" "\t-b: set PRIORITY_BUDGET register on all supported nodes\n" "\t-M: specify dv or mpeg\n" "\t-R: Receive DV or MPEG TS stream\n" "\t-S: Send DV stream\n" - "\t-m: set fwmem target\n"); - exit(EX_USAGE); + "\t-m: set fwmem target\n" + , getprogname() ); + fprintf(stderr, "\n"); } static void @@ -488,7 +502,7 @@ load_crom(char *filename, u_int32_t *p) int len=1024, i; if ((file = fopen(filename, "r")) == NULL) - err(1, "load_crom"); + err(1, "load_crom %s", filename); for (i = 0; i < len/(4*8); i ++) { fscanf(file, DUMP_FORMAT, p, p+1, p+2, p+3, p+4, p+5, p+6, p+7); @@ -691,7 +705,7 @@ detect_recv_fn(int fd, char ich) */ len = read(fd, buf, RECV_NUM_PACKET * RECV_PACKET_SZ); if (len < 0) - err(EX_IOERR, "%s: error reading from device\n", __func__); + err(EX_IOERR, "%s: error reading from device", __func__); ptr = (u_int32_t *) buf; ciph = (struct ciphdr *)(ptr + 1); @@ -757,10 +771,12 @@ main(int argc, char **argv) if (argc < 2) { for (current_board = 0; current_board < MAX_BOARDS; current_board++) { - snprintf(devbase, sizeof(devbase), "%s%d", device_string, current_board); + snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); if (open_dev(&fd, devbase) < 0) { if (current_board == 0) { usage(); + err(EX_IOERR, "%s: Error opening firewire controller #%d %s", + __func__, current_board, devbase); } return(EIO); } @@ -777,7 +793,7 @@ main(int argc, char **argv) case 'b': priority_budget = strtol(optarg, NULL, 0); if (priority_budget < 0 || priority_budget > INT32_MAX) - errx(EX_USAGE, "%s: invalid number: %s", __func__, optarg); + errx(EX_USAGE, "%s: priority_budget out of range: %s", __func__, optarg); command_set = true; open_needed = true; display_board_only = false; @@ -787,7 +803,7 @@ main(int argc, char **argv) if (crom_string == NULL) err(EX_SOFTWARE, "%s:crom_string malloc", __func__); if ( (strtol(crom_string, NULL, 0) < 0) || strtol(crom_string, NULL, 0) > MAX_BOARDS) - err(EX_USAGE, "%s:Invalid value for node", __func__); + errx(EX_USAGE, "%s:Invalid value for node", __func__); strcpy(crom_string, optarg); display_crom = 1; open_needed = true; @@ -808,7 +824,7 @@ main(int argc, char **argv) #define MAX_PHY_CONFIG 0x3f set_root_node = strtol(optarg, NULL, 0); if ( (set_root_node < 0) || (set_root_node > MAX_PHY_CONFIG) ) - err(EX_USAGE, "%s:set_root_node out of range", __func__); + errx(EX_USAGE, "%s:set_root_node out of range", __func__); open_needed = true; command_set = true; display_board_only = false; @@ -816,7 +832,7 @@ main(int argc, char **argv) case 'g': set_gap_count = strtol(optarg, NULL, 0); if ( (set_gap_count < 0) || (set_gap_count > MAX_PHY_CONFIG) ) - err(EX_USAGE, "%s:set_gap_count out of range", __func__); + errx(EX_USAGE, "%s:set_gap_count out of range", __func__); open_needed = true; command_set = true; display_board_only = false; @@ -834,12 +850,12 @@ main(int argc, char **argv) display_board_only = false; if (eui64_hostton(optarg, &target) != 0 && eui64_aton(optarg, &target) != 0) - err(EX_USAGE, "%s: invalid target: %s", __func__, optarg); + errx(EX_USAGE, "%s: invalid target: %s", __func__, optarg); break; case 'o': send_link_on = str2node(fd, optarg); - if ( (send_link_on < 0) || (send_link_on > INT32_MAX) ) - err(EX_USAGE, "%s: node out of range: %s\n",__func__, optarg); + if ( (send_link_on < 0) || (send_link_on > MAX_PHY_CONFIG) ) + errx(EX_USAGE, "%s: node out of range: %s\n",__func__, optarg); open_needed = true; command_set = true; display_board_only = false; @@ -858,8 +874,8 @@ main(int argc, char **argv) break; case 's': send_reset_start = str2node(fd, optarg); - if ( (send_reset_start < 0) || (send_reset_start > INT32_MAX) ) - err(EX_USAGE, "%s: node out of range: %s\n", __func__, optarg); + if ( (send_reset_start < 0) || (send_reset_start > MAX_PHY_CONFIG) ) + errx(EX_USAGE, "%s: node out of range: %s\n", __func__, optarg); open_needed = true; command_set = true; display_board_only = false; @@ -909,13 +925,27 @@ main(int argc, char **argv) command_set = true; display_board_only = false; break; + case '?': default: usage(); + warnc(EINVAL, "%s: Unknown command line arguments", __func__); return 0; } } /* end while */ /* + * Catch the error case when the user + * executes the command with non ''-'' + * delimited arguments. + * Generate the usage() display and exit. + */ + if (!command_set && !display_board_only) { + usage(); + warnc(EINVAL, "%s: Unknown command line arguments", __func__); + return 0; + } + + /* * If -u is passed, execute * command for that card only. * @@ -924,9 +954,9 @@ main(int argc, char **argv) * */ if(open_needed){ - snprintf(devbase, sizeof(devbase), "%s%d", device_string, current_board); + snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); if (open_dev(&fd, devbase) < 0) { - errx(EX_IOERR, "%s: Error opening board #%d\n", __func__, current_board); + err(EX_IOERR, "%s: Error opening firewire controller #%d %s", __func__, current_board, devbase); } } /* @@ -947,7 +977,7 @@ main(int argc, char **argv) */ if (send_bus_reset) { if(ioctl(fd, FW_IBUSRST, &tmp) < 0) - err(EX_IOERR, "%s: ioctl", __func__); + err(EX_IOERR, "%s: Ioctl of bus reset failed for %s", __func__, devbase); } /* * Print out the CROM for this node "-c" @@ -996,8 +1026,16 @@ main(int argc, char **argv) if (set_fwmem_target) { eui.hi = ntohl(*(u_int32_t*)&(target.octet[0])); eui.lo = ntohl(*(u_int32_t*)&(target.octet[4])); +#if defined(__FreeBSD__) sysctl_set_int("hw.firewire.fwmem.eui64_hi", eui.hi); sysctl_set_int("hw.firewire.fwmem.eui64_lo", eui.lo); +#elif defined(__NetBSD__) + sysctl_set_int("hw.fwmem.eui64_hi", eui.hi); + sysctl_set_int("hw.fwmem.eui64_lo", eui.lo); +#else +#warning "You need to add support for your OS" +#endif + } /* @@ -1028,9 +1066,9 @@ main(int argc, char **argv) recvfn = detect_recv_fn(fd, TAG | CHANNEL); close(fd); } - snprintf(devbase, sizeof(devbase), "%s%d", device_string, current_board); + snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); if (open_dev(&fd, devbase) < 0) - errx(EX_IOERR, "%s: Error opening board #%d in recv_data\n", __func__, current_board); + err(EX_IOERR, "%s: Error opening firewire controller #%d %s in recv_data\n", __func__, current_board, devbase); (*recvfn)(fd, recv_data, TAG | CHANNEL, -1); free(recv_data); } Modified: head/usr.sbin/fwcontrol/fwmpegts.c ============================================================================== --- head/usr.sbin/fwcontrol/fwmpegts.c Fri Dec 12 16:52:33 2008 (r185995) +++ head/usr.sbin/fwcontrol/fwmpegts.c Fri Dec 12 18:17:23 2008 (r185996) @@ -52,8 +52,16 @@ #include #include +#if defined(__FreeBSD__) #include #include +#elif defined(__NetBSD__) +#include +#include +#else +#warning "You need to add support for your OS" +#endif + #include "fwmethods.h" From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 18:26:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C39561065676; Fri, 12 Dec 2008 18:26:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2DE18FC08; Fri, 12 Dec 2008 18:26:08 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCIQ8iN005474; Fri, 12 Dec 2008 18:26:08 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCIQ811005473; Fri, 12 Dec 2008 18:26:08 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812121826.mBCIQ811005473@svn.freebsd.org> From: Andrew Thompson Date: Fri, 12 Dec 2008 18:26:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185997 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 18:26:08 -0000 Author: thompsa Date: Fri Dec 12 18:26:08 2008 New Revision: 185997 URL: http://svn.freebsd.org/changeset/base/185997 Log: Use correct AIPTEK2 name for vendor 0x04fc, now that the PENCAM_MEGA_1_3 product is paired with it. Obtained from: NetBSD Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 12 18:17:23 2008 (r185996) +++ head/sys/dev/usb/usbdevs Fri Dec 12 18:26:08 2008 (r185997) @@ -205,7 +205,7 @@ vendor ELAN 0x04f3 Elan vendor NEWNEX 0x04f7 Newnex vendor BROTHER 0x04f9 Brother Industries vendor DALLAS 0x04fa Dallas Semiconductor -vendor SUNPLUS 0x04fc Sunplus +vendor AIPTEK2 0x04fc AIPTEK International vendor PFU 0x04fe PFU vendor FUJIKURA 0x0501 Fujikura/DDK vendor ACER 0x0502 Acer From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 18:34:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED5AA1065746; Fri, 12 Dec 2008 18:34:27 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC8368FC1E; Fri, 12 Dec 2008 18:34:27 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCIYRrK005684; Fri, 12 Dec 2008 18:34:27 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCIYR0j005683; Fri, 12 Dec 2008 18:34:27 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812121834.mBCIYR0j005683@svn.freebsd.org> From: Andrew Thompson Date: Fri, 12 Dec 2008 18:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185998 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 18:34:28 -0000 Author: thompsa Date: Fri Dec 12 18:34:27 2008 New Revision: 185998 URL: http://svn.freebsd.org/changeset/base/185998 Log: The TWINKLECAM entry is under CHICONY2, remove MICRODIA. Obtained from: NetBSD Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Dec 12 18:26:08 2008 (r185997) +++ head/sys/dev/usb/usbdevs Fri Dec 12 18:34:27 2008 (r185998) @@ -503,7 +503,7 @@ vendor ADDONICS2 0x0bf6 Addonics Technol vendor FSC 0x0bf8 Fujitsu Siemens Computers vendor AGATE 0x0c08 Agate Technologies vendor DMI 0x0c0b DMI -vendor MICRODIA 0x0c45 Chicony +vendor CHICONY2 0x0c45 Chicony vendor SEALEVEL 0x0c52 Sealevel System vendor LUWEN 0x0c76 Luwen vendor KYOCERA2 0x0c88 Kyocera Wireless Corp. @@ -1688,9 +1688,6 @@ product MSI RT2573_2 0x6877 RT2573 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 -/* Microdia products */ -product MICRODIA TWINKLECAM 0x600d TwinkleCam USB camera - /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 20:29:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE72D10656F4; Fri, 12 Dec 2008 20:29:34 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADF9F8FC1A; Fri, 12 Dec 2008 20:29:34 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCKTYYs007882; Fri, 12 Dec 2008 20:29:34 GMT (envelope-from ambrisko@svn.freebsd.org) Received: (from ambrisko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCKTYUm007881; Fri, 12 Dec 2008 20:29:34 GMT (envelope-from ambrisko@svn.freebsd.org) Message-Id: <200812122029.mBCKTYUm007881@svn.freebsd.org> From: Doug Ambrisko Date: Fri, 12 Dec 2008 20:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185999 - head/sys/dev/mfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 20:29:34 -0000 Author: ambrisko Date: Fri Dec 12 20:29:34 2008 New Revision: 185999 URL: http://svn.freebsd.org/changeset/base/185999 Log: Sort the PCI device's and make the catch-all for new Dell cards only apply to Dell. This gets rid of the duplicate catch-all that I introduced that jkim caught. Prompted by: jkim Reviewed by: jkim Modified: head/sys/dev/mfi/mfi_pci.c Modified: head/sys/dev/mfi/mfi_pci.c ============================================================================== --- head/sys/dev/mfi/mfi_pci.c Fri Dec 12 18:34:27 2008 (r185998) +++ head/sys/dev/mfi/mfi_pci.c Fri Dec 12 20:29:34 2008 (r185999) @@ -114,21 +114,21 @@ struct mfi_ident { int flags; const char *desc; } mfi_identifiers[] = { - {0x1000, 0x0411, 0xffff, 0xffff, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, /* Brocton IOP */ - {0x1000, 0x0413, 0xffff, 0xffff, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, /* Verde ZCR */ - {0x1028, 0x0015, 0xffff, 0xffff, MFI_FLAGS_1064R, "Dell PERC 5/i"}, {0x1000, 0x0060, 0x1028, 0xffff, MFI_FLAGS_1078, "Dell PERC 6"}, - {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, + {0x1000, 0x0060, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, + {0x1000, 0x0078, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, {0x1000, 0x0079, 0x1028, 0x1f15, MFI_FLAGS_GEN2, "Dell PERC H800 Adapter"}, {0x1000, 0x0079, 0x1028, 0x1f16, MFI_FLAGS_GEN2, "Dell PERC H700 Adapter"}, {0x1000, 0x0079, 0x1028, 0x1f17, MFI_FLAGS_GEN2, "Dell PERC H700 Integrated"}, {0x1000, 0x0079, 0x1028, 0x1f18, MFI_FLAGS_GEN2, "Dell PERC H700 Modular"}, {0x1000, 0x0079, 0x1028, 0x1f19, MFI_FLAGS_GEN2, "Dell PERC H700"}, {0x1000, 0x0079, 0x1028, 0x1f1b, MFI_FLAGS_GEN2, "Dell PERC H800"}, - {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "Dell PERC H700/800"}, - {0x1000, 0x0078, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, + {0x1000, 0x0079, 0x1028, 0xffff, MFI_FLAGS_GEN2, "Dell PERC H700/H800"}, {0x1000, 0x0079, 0xffff, 0xffff, MFI_FLAGS_GEN2, "LSI MegaSAS Gen2"}, {0x1000, 0x007c, 0xffff, 0xffff, MFI_FLAGS_1078, "LSI MegaSAS 1078"}, + {0x1000, 0x0411, 0xffff, 0xffff, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, /* Brocton IOP */ + {0x1000, 0x0413, 0xffff, 0xffff, MFI_FLAGS_1064R, "LSI MegaSAS 1064R"}, /* Verde ZCR */ + {0x1028, 0x0015, 0xffff, 0xffff, MFI_FLAGS_1064R, "Dell PERC 5/i"}, {0, 0, 0, 0, 0, NULL} }; From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 21:57:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05681106564A; Fri, 12 Dec 2008 21:57:17 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E94BA8FC1A; Fri, 12 Dec 2008 21:57:16 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCLvGC3009572; Fri, 12 Dec 2008 21:57:16 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCLvGRP009570; Fri, 12 Dec 2008 21:57:16 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812122157.mBCLvGRP009570@svn.freebsd.org> From: Andrew Thompson Date: Fri, 12 Dec 2008 21:57:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186001 - head/sys/dev/usb2/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 21:57:17 -0000 Author: thompsa Date: Fri Dec 12 21:57:16 2008 New Revision: 186001 URL: http://svn.freebsd.org/changeset/base/186001 Log: It seems usb2 needs the devtable regenerated after editing usbdevs. Modified: head/sys/dev/usb2/include/usb2_devid.h head/sys/dev/usb2/include/usb2_devtable.h Modified: head/sys/dev/usb2/include/usb2_devid.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devid.h Fri Dec 12 21:45:10 2008 (r186000) +++ head/sys/dev/usb2/include/usb2_devid.h Fri Dec 12 21:57:16 2008 (r186001) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.383 2008/11/12 13:58:59 keramida Exp + * FreeBSD: head/sys/dev/usb/usbdevs 185998 2008-12-12 18:34:27Z thompsa */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -212,7 +212,7 @@ #define USB_VENDOR_NEWNEX 0x04f7 /* Newnex */ #define USB_VENDOR_BROTHER 0x04f9 /* Brother Industries */ #define USB_VENDOR_DALLAS 0x04fa /* Dallas Semiconductor */ -#define USB_VENDOR_SUNPLUS 0x04fc /* Sunplus */ +#define USB_VENDOR_AIPTEK2 0x04fc /* AIPTEK International */ #define USB_VENDOR_PFU 0x04fe /* PFU */ #define USB_VENDOR_FUJIKURA 0x0501 /* Fujikura/DDK */ #define USB_VENDOR_ACER 0x0502 /* Acer */ @@ -510,7 +510,7 @@ #define USB_VENDOR_FSC 0x0bf8 /* Fujitsu Siemens Computers */ #define USB_VENDOR_AGATE 0x0c08 /* Agate Technologies */ #define USB_VENDOR_DMI 0x0c0b /* DMI */ -#define USB_VENDOR_MICRODIA 0x0c45 /* Chicony */ +#define USB_VENDOR_CHICONY2 0x0c45 /* Chicony */ #define USB_VENDOR_SEALEVEL 0x0c52 /* Sealevel System */ #define USB_VENDOR_LUWEN 0x0c76 /* Luwen */ #define USB_VENDOR_KYOCERA2 0x0c88 /* Kyocera Wireless Corp. */ @@ -627,6 +627,7 @@ #define USB_VENDOR_QCOM 0x18e8 /* Qcom */ #define USB_VENDOR_LINKSYS3 0x1915 /* Linksys */ #define USB_VENDOR_QUALCOMMINC 0x19d2 /* Qualcomm, Incorporated */ +#define USB_VENDOR_STELERA 0x1a8d /* Stelera Wireless */ #define USB_VENDOR_DLINK 0x2001 /* D-Link */ #define USB_VENDOR_PLANEX2 0x2019 /* Planex Communications */ #define USB_VENDOR_ERICSSON 0x2282 /* Ericsson */ @@ -802,7 +803,7 @@ /* AIPTEK products */ #define USB_PRODUCT_AIPTEK_POCKETCAM3M 0x2011 /* PocketCAM 3Mega */ -#define USB_PRODUCT_SUNPLUS_PENCAM_MEGA_1_3 0x504a /* PenCam Mega 1.3 */ +#define USB_PRODUCT_AIPTEK2_PENCAM_MEGA_1_3 0x504a /* PenCam Mega 1.3 */ /* AirPrime products */ #define USB_PRODUCT_AIRPRIME_PC5220 0x0112 /* CDMA Wireless PC Card */ @@ -1014,7 +1015,7 @@ /* Chicony products */ #define USB_PRODUCT_CHICONY_KB8933 0x0001 /* KB-8933 keyboard */ -#define USB_PRODUCT_MICRODIA_TWINKLECAM 0x600d /* TwinkleCam USB camera */ +#define USB_PRODUCT_CHICONY2_TWINKLECAM 0x600d /* TwinkleCam USB camera */ /* CH Products */ #define USB_PRODUCT_CHPRODUCTS_PROTHROTTLE 0x00f1 /* Pro Throttle */ @@ -1436,6 +1437,7 @@ #define USB_PRODUCT_HP_OJ4215 0x3d11 /* OfficeJet 4215 */ #define USB_PRODUCT_HP_HN210E 0x811c /* Ethernet HN210E */ #define USB_PRODUCT_HP2_C500 0x6002 /* PhotoSmart C500 */ +#define USB_PRODUCT_HP_HS2300 0x1e1d /* hs2300 HSDPA (aka MC8775) */ /* HTC products */ #define USB_PRODUCT_HTC_WINMOBILE 0x00ce /* HTC USB Sync */ @@ -1693,9 +1695,6 @@ #define USB_PRODUCT_MSI_RT2573_3 0xa861 /* RT2573 */ #define USB_PRODUCT_MSI_RT2573_4 0xa874 /* RT2573 */ -/* Microdia products */ -#define USB_PRODUCT_MICRODIA_TWINKLECAM 0x600d /* TwinkleCam USB camera */ - /* Microsoft products */ #define USB_PRODUCT_MICROSOFT_SIDEPREC 0x0008 /* SideWinder Precision Pro */ #define USB_PRODUCT_MICROSOFT_INTELLIMOUSE 0x0009 /* IntelliMouse */ @@ -1882,6 +1881,7 @@ #define USB_PRODUCT_OPTION_GT3G 0x6000 /* GlobeTrotter 3G datacard */ #define USB_PRODUCT_OPTION_GT3GQUAD 0x6300 /* GlobeTrotter 3G QUAD datacard */ #define USB_PRODUCT_OPTION_GT3GPLUS 0x6600 /* GlobeTrotter 3G+ datacard */ +#define USB_PRODUCT_OPTION_GTICON322 0xd033 /* GlobeTrotter Icon322 storage */ #define USB_PRODUCT_OPTION_GTMAX36 0x6701 /* GlobeTrotter Max 3.6 Modem */ #define USB_PRODUCT_OPTION_GTMAXHSUPA 0x7001 /* GlobeTrotter HSUPA */ @@ -2131,12 +2131,14 @@ #define USB_PRODUCT_SIERRA_AC595U 0x0120 /* Sierra Wireless AirCard 595U */ #define USB_PRODUCT_SIERRA_AC597E 0x0021 /* Sierra Wireless AirCard 597E */ #define USB_PRODUCT_SIERRA_C597 0x0023 /* Sierra Wireless Compass 597 */ +#define USB_PRODUCT_SIERRA_AC875 0x6820 /* Sierra Wireless AirCard 875 */ #define USB_PRODUCT_SIERRA_AC880 0x6850 /* Sierra Wireless AirCard 880 */ #define USB_PRODUCT_SIERRA_AC881 0x6851 /* Sierra Wireless AirCard 881 */ #define USB_PRODUCT_SIERRA_AC880E 0x6852 /* Sierra Wireless AirCard 880E */ #define USB_PRODUCT_SIERRA_AC881E 0x6853 /* Sierra Wireless AirCard 881E */ #define USB_PRODUCT_SIERRA_AC880U 0x6855 /* Sierra Wireless AirCard 880U */ #define USB_PRODUCT_SIERRA_AC881U 0x6856 /* Sierra Wireless AirCard 881U */ +#define USB_PRODUCT_SIERRA_AC885U 0x6880 /* Sierra Wireless AirCard 885U */ #define USB_PRODUCT_SIERRA_EM5625 0x0017 /* EM5625 */ #define USB_PRODUCT_SIERRA_MC5720 0x0218 /* MC5720 Wireless Modem */ #define USB_PRODUCT_SIERRA_MC5720_2 0x0018 /* MC5720 */ @@ -2259,6 +2261,10 @@ /* Sphairon Access Systems GmbH products */ #define USB_PRODUCT_SPHAIRON_UB801R 0x0110 /* UB801R */ +/* Stelera Wireless products */ +#define USB_PRODUCT_STELERA_ZEROCD 0x1000 /* Zerocd Installer */ +#define USB_PRODUCT_STELERA_C105 0x1002 /* Stelera/Bandrish C105 USB */ + /* STMicroelectronics products */ #define USB_PRODUCT_STMICRO_BIOCPU 0x2016 /* Biometric Coprocessor */ #define USB_PRODUCT_STMICRO_COMMUNICATOR 0x7554 /* USB Communicator */ Modified: head/sys/dev/usb2/include/usb2_devtable.h ============================================================================== --- head/sys/dev/usb2/include/usb2_devtable.h Fri Dec 12 21:45:10 2008 (r186000) +++ head/sys/dev/usb2/include/usb2_devtable.h Fri Dec 12 21:57:16 2008 (r186001) @@ -4,7 +4,7 @@ * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * FreeBSD: src/sys/dev/usb/usbdevs,v 1.383 2008/11/12 13:58:59 keramida Exp + * FreeBSD: head/sys/dev/usb/usbdevs 185998 2008-12-12 18:34:27Z thompsa */ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ @@ -599,9 +599,9 @@ const struct usb_knowndev usb_knowndevs[ "PocketCAM 3Mega", }, { - USB_VENDOR_SUNPLUS, USB_PRODUCT_SUNPLUS_PENCAM_MEGA_1_3, + USB_VENDOR_AIPTEK2, USB_PRODUCT_AIPTEK2_PENCAM_MEGA_1_3, 0, - "Sunplus", + "AIPTEK International", "PenCam Mega 1.3", }, { @@ -1397,7 +1397,7 @@ const struct usb_knowndev usb_knowndevs[ "KB-8933 keyboard", }, { - USB_VENDOR_MICRODIA, USB_PRODUCT_MICRODIA_TWINKLECAM, + USB_VENDOR_CHICONY2, USB_PRODUCT_CHICONY2_TWINKLECAM, 0, "Chicony", "TwinkleCam USB camera", @@ -3125,6 +3125,12 @@ const struct usb_knowndev usb_knowndevs[ "PhotoSmart C500", }, { + USB_VENDOR_HP, USB_PRODUCT_HP_HS2300, + 0, + "Hewlett Packard", + "hs2300 HSDPA (aka MC8775)", + }, + { USB_VENDOR_HTC, USB_PRODUCT_HTC_WINMOBILE, 0, "HTC", @@ -4145,12 +4151,6 @@ const struct usb_knowndev usb_knowndevs[ "RT2573", }, { - USB_VENDOR_MICRODIA, USB_PRODUCT_MICRODIA_TWINKLECAM, - 0, - "Chicony", - "TwinkleCam USB camera", - }, - { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_SIDEPREC, 0, "Microsoft", @@ -4925,6 +4925,12 @@ const struct usb_knowndev usb_knowndevs[ "GlobeTrotter 3G+ datacard", }, { + USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTICON322, + 0, + "Option N.V:", + "GlobeTrotter Icon322 storage", + }, + { USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAX36, 0, "Option N.V:", @@ -5921,6 +5927,12 @@ const struct usb_knowndev usb_knowndevs[ "Sierra Wireless Compass 597", }, { + USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC875, + 0, + "Sierra Wireless", + "Sierra Wireless AirCard 875", + }, + { USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC880, 0, "Sierra Wireless", @@ -5957,6 +5969,12 @@ const struct usb_knowndev usb_knowndevs[ "Sierra Wireless AirCard 881U", }, { + USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_AC885U, + 0, + "Sierra Wireless", + "Sierra Wireless AirCard 885U", + }, + { USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_EM5625, 0, "Sierra Wireless", @@ -6461,6 +6479,18 @@ const struct usb_knowndev usb_knowndevs[ "UB801R", }, { + USB_VENDOR_STELERA, USB_PRODUCT_STELERA_ZEROCD, + 0, + "Stelera Wireless", + "Zerocd Installer", + }, + { + USB_VENDOR_STELERA, USB_PRODUCT_STELERA_C105, + 0, + "Stelera Wireless", + "Stelera/Bandrish C105 USB", + }, + { USB_VENDOR_STMICRO, USB_PRODUCT_STMICRO_BIOCPU, 0, "STMicroelectronics", @@ -8099,9 +8129,9 @@ const struct usb_knowndev usb_knowndevs[ NULL, }, { - USB_VENDOR_SUNPLUS, 0, + USB_VENDOR_AIPTEK2, 0, USB_KNOWNDEV_NOPROD, - "Sunplus", + "AIPTEK International", NULL, }, { @@ -9887,7 +9917,7 @@ const struct usb_knowndev usb_knowndevs[ NULL, }, { - USB_VENDOR_MICRODIA, 0, + USB_VENDOR_CHICONY2, 0, USB_KNOWNDEV_NOPROD, "Chicony", NULL, @@ -10589,6 +10619,12 @@ const struct usb_knowndev usb_knowndevs[ NULL, }, { + USB_VENDOR_STELERA, 0, + USB_KNOWNDEV_NOPROD, + "Stelera Wireless", + NULL, + }, + { USB_VENDOR_DLINK, 0, USB_KNOWNDEV_NOPROD, "D-Link", From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 22:51:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60C37106564A; Fri, 12 Dec 2008 22:51:02 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 519148FC08; Fri, 12 Dec 2008 22:51:02 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCMp2VY010623; Fri, 12 Dec 2008 22:51:02 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCMp2S8010622; Fri, 12 Dec 2008 22:51:02 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812122251.mBCMp2S8010622@svn.freebsd.org> From: Ken Smith Date: Fri, 12 Dec 2008 22:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186002 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 22:51:02 -0000 Author: kensmith Date: Fri Dec 12 22:51:01 2008 New Revision: 186002 URL: http://svn.freebsd.org/changeset/base/186002 Log: Turn releng/6.4 over to so@. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Dec 12 21:57:16 2008 (r186001) +++ svnadmin/conf/approvers Fri Dec 12 22:51:01 2008 (r186002) @@ -21,8 +21,7 @@ #^stable/6/ re ^releng/7.1/ re ^releng/7.0/ (security-officer|so) -^releng/6.4/ re -^releng/6.[0-3]/ (security-officer|so) +^releng/6.[0-4]/ (security-officer|so) ^releng/5.[0-5]/ (security-officer|so) ^releng/4.[3-9]/ (security-officer|so) ^releng/4.1[01]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Fri Dec 12 23:17:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A143D106564A; Fri, 12 Dec 2008 23:17:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9145A8FC26; Fri, 12 Dec 2008 23:17:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBCNH0nc011387; Fri, 12 Dec 2008 23:17:00 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBCNH0M7011383; Fri, 12 Dec 2008 23:17:00 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200812122317.mBCNH0M7011383@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 12 Dec 2008 23:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186009 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 23:17:00 -0000 Author: jkim Date: Fri Dec 12 23:17:00 2008 New Revision: 186009 URL: http://svn.freebsd.org/changeset/base/186009 Log: Add more CPUID bits from AMD CPUID Specification Rev. 2.28. Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/include/specialreg.h head/sys/i386/i386/identcpu.c head/sys/i386/include/specialreg.h Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Fri Dec 12 23:13:40 2008 (r186008) +++ head/sys/amd64/amd64/identcpu.c Fri Dec 12 23:17:00 2008 (r186009) @@ -322,15 +322,15 @@ printcpuinfo(void) "\003SVM" /* Secure Virtual Mode */ "\004ExtAPIC" /* Extended APIC register */ "\005CR8" /* CR8 in legacy mode */ - "\006" - "\007" - "\010" + "\006ABM" /* LZCNT instruction */ + "\007SSE4A" /* SSE4A */ + "\010MAS" /* Misaligned SSE mode */ "\011Prefetch" /* 3DNow! Prefetch/PrefetchW */ - "\012" - "\013" - "\014" - "\015" - "\016" + "\012OSVW" /* OS visible workaround */ + "\013IBS" /* Instruction based sampling */ + "\014SSE5" /* SSE5 */ + "\015SKINIT" /* SKINIT/STGI */ + "\016WDT" /* Watchdog timer */ "\017" "\020" "\021" Modified: head/sys/amd64/include/specialreg.h ============================================================================== --- head/sys/amd64/include/specialreg.h Fri Dec 12 23:13:40 2008 (r186008) +++ head/sys/amd64/include/specialreg.h Fri Dec 12 23:17:00 2008 (r186009) @@ -150,7 +150,15 @@ #define AMDID2_SVM 0x00000004 #define AMDID2_EXT_APIC 0x00000008 #define AMDID2_CR8 0x00000010 +#define AMDID2_ABM 0x00000020 +#define AMDID2_SSE4A 0x00000040 +#define AMDID2_MAS 0x00000080 #define AMDID2_PREFETCH 0x00000100 +#define AMDID2_OSVW 0x00000200 +#define AMDID2_IBS 0x00000400 +#define AMDID2_SSE5 0x00000800 +#define AMDID2_SKINIT 0x00001000 +#define AMDID2_WDT 0x00002000 /* * CPUID instruction 1 eax info Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Fri Dec 12 23:13:40 2008 (r186008) +++ head/sys/i386/i386/identcpu.c Fri Dec 12 23:17:00 2008 (r186009) @@ -826,15 +826,15 @@ printcpuinfo(void) "\003SVM" /* Secure Virtual Mode */ "\004ExtAPIC" /* Extended APIC register */ "\005CR8" /* CR8 in legacy mode */ - "\006" - "\007" - "\010" + "\006ABM" /* LZCNT instruction */ + "\007SSE4A" /* SSE4A */ + "\010MAS" /* Misaligned SSE mode */ "\011Prefetch" /* 3DNow! Prefetch/PrefetchW */ - "\012" - "\013" - "\014" - "\015" - "\016" + "\012OSVW" /* OS visible workaround */ + "\013IBS" /* Instruction based sampling */ + "\014SSE5" /* SSE5 */ + "\015SKINIT" /* SKINIT/STGI */ + "\016WDT" /* Watchdog timer */ "\017" "\020" "\021" Modified: head/sys/i386/include/specialreg.h ============================================================================== --- head/sys/i386/include/specialreg.h Fri Dec 12 23:13:40 2008 (r186008) +++ head/sys/i386/include/specialreg.h Fri Dec 12 23:17:00 2008 (r186009) @@ -147,7 +147,15 @@ #define AMDID2_SVM 0x00000004 #define AMDID2_EXT_APIC 0x00000008 #define AMDID2_CR8 0x00000010 +#define AMDID2_ABM 0x00000020 +#define AMDID2_SSE4A 0x00000040 +#define AMDID2_MAS 0x00000080 #define AMDID2_PREFETCH 0x00000100 +#define AMDID2_OSVW 0x00000200 +#define AMDID2_IBS 0x00000400 +#define AMDID2_SSE5 0x00000800 +#define AMDID2_SKINIT 0x00001000 +#define AMDID2_WDT 0x00002000 /* * CPUID instruction 1 eax info From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:44:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E29C71065672; Sat, 13 Dec 2008 03:44:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF6448FC08; Sat, 13 Dec 2008 03:44:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3iiKH016862; Sat, 13 Dec 2008 03:44:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3ii3e016861; Sat, 13 Dec 2008 03:44:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130344.mBD3ii3e016861@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186014 - head/sys/dev/ath/ath_hal/ar5312 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:44:45 -0000 Author: sam Date: Sat Dec 13 03:44:44 2008 New Revision: 186014 URL: http://svn.freebsd.org/changeset/base/186014 Log: remove conflicting decl Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312.h Sat Dec 13 02:56:08 2008 (r186013) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312.h Sat Dec 13 03:44:44 2008 (r186014) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312.h,v 1.5 2008/11/22 07:37:40 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AR5312_H_ #define _ATH_AR5312_H_ @@ -38,8 +38,6 @@ AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV1 || \ AH_PRIVATE(ah)->ah_devid == AR5212_AR2317_REV2) -extern struct ath_hal * ar5312Attach(uint16_t devid, HAL_SOFTC sc, - HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *status); extern HAL_BOOL ar5312IsInterruptPending(struct ath_hal *ah); /* AR5312 */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:45:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C806D106564A; Sat, 13 Dec 2008 03:45:00 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B499D8FC12; Sat, 13 Dec 2008 03:45:00 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3j0hk016904; Sat, 13 Dec 2008 03:45:00 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3j0Aa016902; Sat, 13 Dec 2008 03:45:00 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130345.mBD3j0Aa016902@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186015 - head/sys/dev/ath/ath_hal/ar5312 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:45:01 -0000 Author: sam Date: Sat Dec 13 03:45:00 2008 New Revision: 186015 URL: http://svn.freebsd.org/changeset/base/186015 Log: remove duplicate case Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Sat Dec 13 03:44:44 2008 (r186014) +++ head/sys/dev/ath/ath_hal/ar5312/ar5312_attach.c Sat Dec 13 03:45:00 2008 (r186015) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5312_attach.c,v 1.8 2008/11/27 22:30:03 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -318,7 +318,6 @@ ar5312Probe(uint16_t vendorid, uint16_t case AR5212_AR2313_REV8: return "Atheros 2313 WiSoC"; case AR5212_AR2315_REV6: - case AR5212_AR2315_REV6: case AR5212_AR2315_REV7: return "Atheros 2315 WiSoC"; case AR5212_AR2317_REV1: From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:45:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBDEB1065690; Sat, 13 Dec 2008 03:45:54 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A87768FC20; Sat, 13 Dec 2008 03:45:54 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3jssw016961; Sat, 13 Dec 2008 03:45:54 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3jstl016960; Sat, 13 Dec 2008 03:45:54 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130345.mBD3jstl016960@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:45:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186016 - head/sys/dev/ath/ath_hal/ar5212 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:45:54 -0000 Author: sam Date: Sat Dec 13 03:45:54 2008 New Revision: 186016 URL: http://svn.freebsd.org/changeset/base/186016 Log: fix static const order Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ar5212/ar5111.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5111.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5111.c Sat Dec 13 03:45:00 2008 (r186015) +++ head/sys/dev/ath/ath_hal/ar5212/ar5111.c Sat Dec 13 03:45:54 2008 (r186016) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ar5111.c,v 1.7 2008/11/10 04:08:03 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -90,7 +90,7 @@ ar5111SetChannel(struct ath_hal *ah, HA uint16_t channel5111; /* 11a channel for 5111 */ } CHAN_INFO_2GHZ; - const static CHAN_INFO_2GHZ chan2GHzData[] = { + static const CHAN_INFO_2GHZ chan2GHzData[] = { { 1, 0x46, 96 }, /* 2312 -19 */ { 1, 0x46, 97 }, /* 2317 -18 */ { 1, 0x46, 98 }, /* 2322 -17 */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:47:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A331E1065672; Sat, 13 Dec 2008 03:47:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 901B88FC16; Sat, 13 Dec 2008 03:47:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3lg4C017039; Sat, 13 Dec 2008 03:47:42 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3lgF9017038; Sat, 13 Dec 2008 03:47:42 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130347.mBD3lgF9017038@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186017 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:47:42 -0000 Author: sam Date: Sat Dec 13 03:47:42 2008 New Revision: 186017 URL: http://svn.freebsd.org/changeset/base/186017 Log: fix static const order Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v3.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Sat Dec 13 03:45:54 2008 (r186016) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v3.c Sat Dec 13 03:47:42 2008 (r186017) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_eeprom_v3.c,v 1.4 2008/11/27 22:39:42 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -26,9 +26,9 @@ static void getPcdacInterceptsFromPcdacMinMax(HAL_EEPROM *ee, uint16_t pcdacMin, uint16_t pcdacMax, uint16_t *vp) { - const static uint16_t intercepts3[] = + static const uint16_t intercepts3[] = { 0, 5, 10, 20, 30, 50, 70, 85, 90, 95, 100 }; - const static uint16_t intercepts3_2[] = + static const uint16_t intercepts3_2[] = { 0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 }; const uint16_t *ip = ee->ee_version < AR_EEPROM_VER3_2 ? intercepts3 : intercepts3_2; From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:48:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02388106564A; Sat, 13 Dec 2008 03:48:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E39378FC14; Sat, 13 Dec 2008 03:48:33 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3mXkV017111; Sat, 13 Dec 2008 03:48:33 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3mXm3017110; Sat, 13 Dec 2008 03:48:33 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130348.mBD3mXm3017110@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186018 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:48:34 -0000 Author: sam Date: Sat Dec 13 03:48:33 2008 New Revision: 186018 URL: http://svn.freebsd.org/changeset/base/186018 Log: add const Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ah.c (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sat Dec 13 03:47:42 2008 (r186017) +++ head/sys/dev/ath/ath_hal/ah.c Sat Dec 13 03:48:33 2008 (r186018) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah.c,v 1.15 2008/11/15 22:15:44 sam Exp $ + * $FreeBSD$ */ #include "opt_ah.h" @@ -32,7 +32,7 @@ OS_SET_DECLARE(ah_chips, struct ath_hal_ const char* ath_hal_probe(uint16_t vendorid, uint16_t devid) { - struct ath_hal_chip **pchip; + struct ath_hal_chip * const *pchip; OS_SET_FOREACH(pchip, ah_chips) { const char *name = (*pchip)->probe(vendorid, devid); @@ -53,7 +53,7 @@ struct ath_hal* ath_hal_attach(uint16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st, HAL_BUS_HANDLE sh, HAL_STATUS *error) { - struct ath_hal_chip **pchip; + struct ath_hal_chip * const *pchip; OS_SET_FOREACH(pchip, ah_chips) { struct ath_hal_chip *chip = *pchip; @@ -88,7 +88,7 @@ OS_SET_DECLARE(ah_rfs, struct ath_hal_rf struct ath_hal_rf * ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode) { - struct ath_hal_rf **prf; + struct ath_hal_rf * const *prf; OS_SET_FOREACH(prf, ah_rfs) { struct ath_hal_rf *rf = *prf; From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:49:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 324C91065672; Sat, 13 Dec 2008 03:49:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1FDF58FC1C; Sat, 13 Dec 2008 03:49:02 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3n2rx017156; Sat, 13 Dec 2008 03:49:02 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3n2ol017155; Sat, 13 Dec 2008 03:49:02 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130349.mBD3n2ol017155@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:49:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186019 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:49:02 -0000 Author: sam Date: Sat Dec 13 03:49:01 2008 New Revision: 186019 URL: http://svn.freebsd.org/changeset/base/186019 Log: remove dead code Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Sat Dec 13 03:48:33 2008 (r186018) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.c Sat Dec 13 03:49:01 2008 (r186019) @@ -160,18 +160,6 @@ v14EepromDiag(struct ath_hal *ah, int re return AH_FALSE; } -/* XXX conditionalize by target byte order */ -#ifndef bswap16 -static __inline__ uint16_t -__bswap16(uint16_t _x) -{ - return ((uint16_t)( - (((const uint8_t *)(&_x))[0] ) | - (((const uint8_t *)(&_x))[1]<< 8)) - ); -} -#endif - /* Do structure specific swaps if Eeprom format is non native to host */ static void eepromSwap(struct ar5416eeprom *ee) From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 03:50:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D44E71065672; Sat, 13 Dec 2008 03:50:31 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C185D8FC12; Sat, 13 Dec 2008 03:50:31 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD3oVdc017240; Sat, 13 Dec 2008 03:50:31 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD3oViw017239; Sat, 13 Dec 2008 03:50:31 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200812130350.mBD3oViw017239@svn.freebsd.org> From: Sam Leffler Date: Sat, 13 Dec 2008 03:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186020 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 03:50:31 -0000 Author: sam Date: Sat Dec 13 03:50:31 2008 New Revision: 186020 URL: http://svn.freebsd.org/changeset/base/186020 Log: o remove dead code o fix AH_RF macro expansion to be as intended (worked before unintentionally) Obtained from: netbsd Modified: head/sys/dev/ath/ath_hal/ah_internal.h (contents, props changed) Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Sat Dec 13 03:49:01 2008 (r186019) +++ head/sys/dev/ath/ath_hal/ah_internal.h Sat Dec 13 03:50:31 2008 (r186020) @@ -14,7 +14,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $Id: ah_internal.h,v 1.21 2008/11/27 22:29:27 sam Exp $ + * $FreeBSD$ */ #ifndef _ATH_AH_INTERAL_H_ #define _ATH_AH_INTERAL_H_ @@ -42,23 +42,6 @@ #define offsetof(type, field) ((size_t)(&((type *)0)->field)) #endif -/* - * Remove const in a way that keeps the compiler happy. - * This works for gcc but may require other magic for - * other compilers (not sure where this should reside). - * Note that uintptr_t is C99. - */ -#ifndef __DECONST -#ifndef _UINTPTR_T -#if AH_WORDSIZE == 64 -typedef unsigned long int uintptr_t; -#else -typedef unsigned int uintptr_t; -#endif -#endif -#define __DECONST(type, var) ((type)(uintptr_t)(const void *)(var)) -#endif - typedef struct { uint16_t start; /* first register */ uint16_t end; /* ending register or zero */ @@ -114,12 +97,12 @@ struct ath_hal_rf { }; #ifndef AH_RF #define AH_RF(_name, _probe, _attach) \ -static struct ath_hal_rf name##_rf = { \ - .name = #_name, \ +static struct ath_hal_rf _name##_rf = { \ + .name = __STRING(_name), \ .probe = _probe, \ .attach = _attach \ }; \ -OS_DATA_SET(ah_rfs, name##_rf) +OS_DATA_SET(ah_rfs, _name##_rf) #endif struct ath_hal_rf *ath_hal_rfprobe(struct ath_hal *ah, HAL_STATUS *ecode); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 06:04:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E1ED1065670; Sat, 13 Dec 2008 06:04:35 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1C828FC13; Sat, 13 Dec 2008 06:04:34 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD64YYT020557; Sat, 13 Dec 2008 06:04:34 GMT (envelope-from silby@svn.freebsd.org) Received: (from silby@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD64Y5x020556; Sat, 13 Dec 2008 06:04:34 GMT (envelope-from silby@svn.freebsd.org) Message-Id: <200812130604.mBD64Y5x020556@svn.freebsd.org> From: Mike Silbersack Date: Sat, 13 Dec 2008 06:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186026 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 06:04:35 -0000 Author: silby Date: Sat Dec 13 06:04:34 2008 New Revision: 186026 URL: http://svn.freebsd.org/changeset/base/186026 Log: Add the sysctl debug.acpi.batt.batt_sleep_ms. On some laptops with smart batteries, enabling battery monitoring software causes keystrokes from atkbd to be lost. This has also been reported on Linux, and is apparently due to the keyboard and I2C line for the battery being routed through the same chip. Whether that's accurate or not, adding extra sleeps to the status checking code causes the problem to go away. I've been running this for nearly six months now on my laptop, it works like a charm. Reviewed by: Nate Lawson (in a previous revision) MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_smbat.c Modified: head/sys/dev/acpica/acpi_smbat.c ============================================================================== --- head/sys/dev/acpica/acpi_smbat.c Sat Dec 13 06:01:54 2008 (r186025) +++ head/sys/dev/acpica/acpi_smbat.c Sat Dec 13 06:04:34 2008 (r186026) @@ -61,6 +61,23 @@ static int acpi_smbat_get_bst(device_t d ACPI_SERIAL_DECL(smbat, "ACPI Smart Battery"); +SYSCTL_DECL(_debug_acpi); +SYSCTL_NODE(_debug_acpi, OID_AUTO, batt, CTLFLAG_RD, NULL, "Battery debugging"); + +/* On some laptops with smart batteries, enabling battery monitoring + * software causes keystrokes from atkbd to be lost. This has also been + * reported on Linux, and is apparently due to the keyboard and I2C line + * for the battery being routed through the same chip. Whether that's + * accurate or not, adding extra sleeps to the status checking code + * causes the problem to go away. + * + * If you experience that problem, try a value of 10ms and move up + * from there. + */ +static int batt_sleep_ms; +SYSCTL_INT(_debug_acpi_batt, OID_AUTO, batt_sleep_ms, CTLFLAG_RW, &batt_sleep_ms, 0, + "Sleep during battery status updates to prevent keystroke loss."); + static device_method_t acpi_smbat_methods[] = { /* device interface */ DEVMETHOD(device_probe, acpi_smbat_probe), @@ -176,6 +193,9 @@ acpi_smbus_read_2(struct acpi_smbat_soft ACPI_SERIAL_ASSERT(smbat); + if (batt_sleep_ms) + AcpiOsSleep(batt_sleep_ms); + val = addr; error = ACPI_EC_WRITE(sc->ec_dev, sc->sb_base_addr + SMBUS_ADDR, val, 1); @@ -194,6 +214,9 @@ acpi_smbus_read_2(struct acpi_smbat_soft if (error) goto out; + if (batt_sleep_ms) + AcpiOsSleep(batt_sleep_ms); + for (to = SMBUS_TIMEOUT; to != 0; to--) { error = ACPI_EC_READ(sc->ec_dev, sc->sb_base_addr + SMBUS_PRTCL, &val, 1); @@ -239,6 +262,9 @@ acpi_smbus_read_multi_1(struct acpi_smba ACPI_SERIAL_ASSERT(smbat); + if (batt_sleep_ms) + AcpiOsSleep(batt_sleep_ms); + val = addr; error = ACPI_EC_WRITE(sc->ec_dev, sc->sb_base_addr + SMBUS_ADDR, val, 1); @@ -257,6 +283,9 @@ acpi_smbus_read_multi_1(struct acpi_smba if (error) goto out; + if (batt_sleep_ms) + AcpiOsSleep(batt_sleep_ms); + for (to = SMBUS_TIMEOUT; to != 0; to--) { error = ACPI_EC_READ(sc->ec_dev, sc->sb_base_addr + SMBUS_PRTCL, &val, 1); @@ -292,6 +321,9 @@ acpi_smbus_read_multi_1(struct acpi_smba if (len > val) len = val; + if (batt_sleep_ms) + AcpiOsSleep(batt_sleep_ms); + while (len--) { error = ACPI_EC_READ(sc->ec_dev, sc->sb_base_addr + SMBUS_DATA + len, &val, 1); @@ -299,6 +331,8 @@ acpi_smbus_read_multi_1(struct acpi_smba goto out; ptr[len] = val; + if (batt_sleep_ms) + AcpiOsSleep(1); } out: From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 07:21:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 302561065673; Sat, 13 Dec 2008 07:21:21 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id 06A748FC17; Sat, 13 Dec 2008 07:21:20 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from [10.123.2.23] (p53.kientzle.com [66.166.149.53]) by kientzle.com (8.12.9/8.12.9) with ESMTP id mBD7LKtv081686; Fri, 12 Dec 2008 23:21:20 -0800 (PST) (envelope-from kientzle@freebsd.org) Message-ID: <4943626C.5000005@freebsd.org> Date: Fri, 12 Dec 2008 23:21:16 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060422 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John Baldwin References: <200812060657.mB66vjXM086176@svn.freebsd.org> <200812081148.00728.jhb@freebsd.org> In-Reply-To: <200812081148.00728.jhb@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185682 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 07:21:21 -0000 John Baldwin wrote: > On Saturday 06 December 2008 01:57:45 am Tim Kientzle wrote: > >>Author: kientzle >>Date: Sat Dec 6 06:57:45 2008 >>New Revision: 185682 >>URL: http://svn.freebsd.org/changeset/base/185682 >> >>Log: >> Strip ";1" and trailing "." from ISO9660 entries. >> This seems a better match for people's expectations. > > Err, maybe strip whatever version is present? The '1' is a version number and > in theory you can have newer versions. I think the intention was to allow > replacing files by growing an ISO fs with version '2' files "replacing" > version '1', etc. My thinking here was that if you have different versions, then you probably care about the versions. In that case, it seems the right thing is to keep enough version numbers so the files can still be disambiguated. Of course, it's probably a moot point; I'd be surprised to ever see a disc that actually has multiple version numbers. Tim From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 07:23:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EE931065673; Sat, 13 Dec 2008 07:23:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F85D8FC1A; Sat, 13 Dec 2008 07:23:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD7NtuW022202; Sat, 13 Dec 2008 07:23:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD7NtjM022201; Sat, 13 Dec 2008 07:23:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200812130723.mBD7NtjM022201@svn.freebsd.org> From: Ed Schouten Date: Sat, 13 Dec 2008 07:23:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186030 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 07:23:55 -0000 Author: ed Date: Sat Dec 13 07:23:55 2008 New Revision: 186030 URL: http://svn.freebsd.org/changeset/base/186030 Log: Add FIONREAD to pseudo-terminal master devices. All ioctl()'s that aren't implemented by pts(4) are forwarded to the TTY itself. Unfortunately this is not correct for FIONREAD, because it will give the wrong amount of bytes that are available to read. Tested by: keramida Reminded by: keramida Modified: head/sys/kern/tty_pts.c Modified: head/sys/kern/tty_pts.c ============================================================================== --- head/sys/kern/tty_pts.c Sat Dec 13 07:03:16 2008 (r186029) +++ head/sys/kern/tty_pts.c Sat Dec 13 07:23:55 2008 (r186030) @@ -273,6 +273,16 @@ ptsdev_ioctl(struct file *fp, u_long cmd case FIONBIO: /* This device supports non-blocking operation. */ return (0); + case FIONREAD: + tty_lock(tp); + if (psc->pts_flags & PTS_FINISHED) { + /* Force read() to be called. */ + *(int *)data = 1; + } else { + *(int *)data = ttydisc_getc_poll(tp); + } + tty_unlock(tp); + return (0); case FIODGNAME: { struct fiodgname_arg *fgn; const char *p; From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 07:45:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 518771065673; Sat, 13 Dec 2008 07:45:49 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 417398FC14; Sat, 13 Dec 2008 07:45:49 +0000 (UTC) (envelope-from silby@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD7jmJL022620; Sat, 13 Dec 2008 07:45:48 GMT (envelope-from silby@svn.freebsd.org) Received: (from silby@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD7jmXs022619; Sat, 13 Dec 2008 07:45:48 GMT (envelope-from silby@svn.freebsd.org) Message-Id: <200812130745.mBD7jmXs022619@svn.freebsd.org> From: Mike Silbersack Date: Sat, 13 Dec 2008 07:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186031 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 07:45:49 -0000 Author: silby Date: Sat Dec 13 07:45:48 2008 New Revision: 186031 URL: http://svn.freebsd.org/changeset/base/186031 Log: Quick change to r186026. One of the conditionals was: if (batt_sleep_ms) AcpiOsSleep(1); where the rest are all: if (batt_sleep_ms) AcpiOsSleep(batt_sleep_ms); I can't recall why that one was different, so change it to match the rest. Pointed out by: Christoph Mallon MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_smbat.c Modified: head/sys/dev/acpica/acpi_smbat.c ============================================================================== --- head/sys/dev/acpica/acpi_smbat.c Sat Dec 13 07:23:55 2008 (r186030) +++ head/sys/dev/acpica/acpi_smbat.c Sat Dec 13 07:45:48 2008 (r186031) @@ -332,7 +332,7 @@ acpi_smbus_read_multi_1(struct acpi_smba ptr[len] = val; if (batt_sleep_ms) - AcpiOsSleep(1); + AcpiOsSleep(batt_sleep_ms); } out: From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 09:33:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6ED1065676; Sat, 13 Dec 2008 09:33:03 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B3998FC14; Sat, 13 Dec 2008 09:33:03 +0000 (UTC) (envelope-from schweikh@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBD9X3AC024734; Sat, 13 Dec 2008 09:33:03 GMT (envelope-from schweikh@svn.freebsd.org) Received: (from schweikh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBD9X3Cx024733; Sat, 13 Dec 2008 09:33:03 GMT (envelope-from schweikh@svn.freebsd.org) Message-Id: <200812130933.mBD9X3Cx024733@svn.freebsd.org> From: Jens Schweikhardt Date: Sat, 13 Dec 2008 09:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186034 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 09:33:03 -0000 Author: schweikh Date: Sat Dec 13 09:33:03 2008 New Revision: 186034 URL: http://svn.freebsd.org/changeset/base/186034 Log: Typo/rewording. Modified: head/share/man/man4/acpi_aiboost.4 Modified: head/share/man/man4/acpi_aiboost.4 ============================================================================== --- head/share/man/man4/acpi_aiboost.4 Sat Dec 13 08:32:13 2008 (r186033) +++ head/share/man/man4/acpi_aiboost.4 Sat Dec 13 09:33:03 2008 (r186034) @@ -56,8 +56,8 @@ The driver uses ACPI as the backend to f descriptions and provides its data via the .Xr sysctl 8 interface, under dev.acpi_aiboost.0 namespace. -Descriptions for these values are set to sysctl description, -which can be see with sysctl -d. +Descriptions for these values are available +with sysctl -d. .Pp The .Nm From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 12:03:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E11281065688; Sat, 13 Dec 2008 12:03:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE9108FC0C; Sat, 13 Dec 2008 12:03:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDC3Lxp028927; Sat, 13 Dec 2008 12:03:21 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDC3LU9028926; Sat, 13 Dec 2008 12:03:21 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200812131203.mBDC3LU9028926@svn.freebsd.org> From: Robert Watson Date: Sat, 13 Dec 2008 12:03:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186036 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 12:03:22 -0000 Author: rwatson Date: Sat Dec 13 12:03:21 2008 New Revision: 186036 URL: http://svn.freebsd.org/changeset/base/186036 Log: Line wrap very long line in struct packet_filter_hook definition. MFC after: pretty soon Modified: head/sys/net/pfil.h Modified: head/sys/net/pfil.h ============================================================================== --- head/sys/net/pfil.h Sat Dec 13 10:19:28 2008 (r186035) +++ head/sys/net/pfil.h Sat Dec 13 12:03:21 2008 (r186036) @@ -49,7 +49,8 @@ struct inpcb; */ struct packet_filter_hook { TAILQ_ENTRY(packet_filter_hook) pfil_link; - int (*pfil_func)(void *, struct mbuf **, struct ifnet *, int, struct inpcb *); + int (*pfil_func)(void *, struct mbuf **, struct ifnet *, int, + struct inpcb *); void *pfil_arg; int pfil_flags; }; From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 13:07:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA136106567C; Sat, 13 Dec 2008 13:07:12 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A68328FC1F; Sat, 13 Dec 2008 13:07:12 +0000 (UTC) (envelope-from jkoshy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDD7CPX030120; Sat, 13 Dec 2008 13:07:12 GMT (envelope-from jkoshy@svn.freebsd.org) Received: (from jkoshy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDD7C68030116; Sat, 13 Dec 2008 13:07:12 GMT (envelope-from jkoshy@svn.freebsd.org) Message-Id: <200812131307.mBDD7C68030116@svn.freebsd.org> From: Joseph Koshy Date: Sat, 13 Dec 2008 13:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186037 - in head/sys: amd64/amd64 dev/hwpmc i386/i386 kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 13:07:12 -0000 Author: jkoshy Date: Sat Dec 13 13:07:12 2008 New Revision: 186037 URL: http://svn.freebsd.org/changeset/base/186037 Log: - Bug fix: prevent a thread from migrating between CPUs between the time it is marked for user space callchain capture in the NMI handler and the time the callchain capture callback runs. - Improve code and control flow clarity by invoking hwpmc(4)'s user space callchain capture callback directly from low-level code. Reviewed by: jhb (kern/subr_trap.c) Testing (various patch revisions): gnn, Fabien Thomas , Artem Belevich Modified: head/sys/amd64/amd64/exception.S head/sys/dev/hwpmc/hwpmc_mod.c head/sys/i386/i386/exception.s head/sys/kern/subr_trap.c Modified: head/sys/amd64/amd64/exception.S ============================================================================== --- head/sys/amd64/amd64/exception.S Sat Dec 13 12:03:21 2008 (r186036) +++ head/sys/amd64/amd64/exception.S Sat Dec 13 13:07:12 2008 (r186037) @@ -480,16 +480,20 @@ outofnmi: /* * At this point the processor has exited NMI mode and is running * with interrupts turned off on the normal kernel stack. - * We turn interrupts back on, and take the usual 'doreti' exit - * path. * * If a pending NMI gets recognized at or after this point, it - * will cause a kernel callchain to be traced. Since this path - * is only taken for NMI interrupts from user space, our `swapgs' - * state is correct for taking the doreti path. + * will cause a kernel callchain to be traced. + * + * We turn interrupts back on, and call the user callchain capture hook. */ + movq pmc_hook,%rax + orq %rax,%rax + jz nocallchain + movq PCPU(CURTHREAD),%rdi /* thread */ + movq $PMC_FN_USER_CALLCHAIN,%rsi /* command */ + movq %rsp,%rdx /* frame */ sti - jmp doreti + call *%rax nocallchain: #endif testl %ebx,%ebx Modified: head/sys/dev/hwpmc/hwpmc_mod.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_mod.c Sat Dec 13 12:03:21 2008 (r186036) +++ head/sys/dev/hwpmc/hwpmc_mod.c Sat Dec 13 13:07:12 2008 (r186037) @@ -1863,8 +1863,11 @@ pmc_hook_handler(struct thread *td, int /* * Record a call chain. */ + KASSERT(td == curthread, ("[pmc,%d] td != curthread", + __LINE__)); pmc_capture_user_callchain(PCPU_GET(cpuid), (struct trapframe *) arg); + td->td_pflags &= ~TDP_CALLCHAIN; break; default: @@ -3794,30 +3797,28 @@ pmc_syscall_handler(struct thread *td, v */ static void -pmc_post_callchain_ast(void) +pmc_post_callchain_callback(void) { struct thread *td; td = curthread; + KASSERT((td->td_pflags & TDP_CALLCHAIN) == 0, + ("[pmc,%d] thread %p already marked for callchain capture", + __LINE__, (void *) td)); + /* - * Mark this thread as needing processing in ast(). - * td->td_pflags will be safe to touch as the process was in - * user space when it was interrupted. + * Mark this thread as needing callchain capture. + * `td->td_pflags' will be safe to touch because this thread + * was in user space when it was interrupted. */ td->td_pflags |= TDP_CALLCHAIN; /* - * Again, since we've entered this function directly from - * userland, `td' is guaranteed to be not locked by this CPU, - * so its safe to try acquire the thread lock even though we - * are executing in an NMI context. We need to acquire this - * lock before touching `td_flags' because other CPUs may be - * in the process of touching this field. - */ - thread_lock(td); - td->td_flags |= TDF_ASTPENDING; - thread_unlock(td); + * Don't let this thread migrate between CPUs until callchain + * capture completes. + */ + sched_pin(); return; } @@ -3869,6 +3870,10 @@ pmc_process_interrupt(int cpu, struct pm (int) (psb->ps_write - psb->ps_samples), (int) (psb->ps_read - psb->ps_samples)); + KASSERT(pm->pm_runcount >= 0, + ("[pmc,%d] pm=%p runcount %d", __LINE__, (void *) pm, + pm->pm_runcount)); + atomic_add_rel_32(&pm->pm_runcount, 1); /* hold onto PMC */ ps->ps_pmc = pm; if ((td = curthread) && td->td_proc) @@ -3876,6 +3881,7 @@ pmc_process_interrupt(int cpu, struct pm else ps->ps_pid = -1; ps->ps_cpu = cpu; + ps->ps_td = td; ps->ps_flags = inuserspace ? PMC_CC_F_USERSPACE : 0; callchaindepth = (pm->pm_flags & PMC_F_CALLCHAIN) ? @@ -3893,7 +3899,7 @@ pmc_process_interrupt(int cpu, struct pm pmc_save_kernel_callchain(ps->ps_pc, callchaindepth, tf); else { - pmc_post_callchain_ast(); + pmc_post_callchain_callback(); callchaindepth = PMC_SAMPLE_INUSE; } } @@ -3925,20 +3931,41 @@ pmc_capture_user_callchain(int cpu, stru { int i; struct pmc *pm; + struct thread *td; struct pmc_sample *ps; struct pmc_samplebuffer *psb; +#ifdef INVARIANTS + int ncallchains; +#endif + + sched_unpin(); /* Can migrate safely now. */ psb = pmc_pcpu[cpu]->pc_sb; + td = curthread; + + KASSERT(td->td_pflags & TDP_CALLCHAIN, + ("[pmc,%d] Retrieving callchain for thread that doesn't want it", + __LINE__)); + +#ifdef INVARIANTS + ncallchains = 0; +#endif /* * Iterate through all deferred callchain requests. */ - for (i = 0; i < pmc_nsamples; i++) { + ps = psb->ps_samples; + for (i = 0; i < pmc_nsamples; i++, ps++) { - ps = &psb->ps_samples[i]; if (ps->ps_nsamples != PMC_SAMPLE_INUSE) continue; + if (ps->ps_td != td) + continue; + + KASSERT(ps->ps_cpu == cpu, + ("[pmc,%d] cpu mismatch ps_cpu=%d pcpu=%d", __LINE__, + ps->ps_cpu, PCPU_GET(cpuid))); pm = ps->ps_pmc; @@ -3946,14 +3973,26 @@ pmc_capture_user_callchain(int cpu, stru ("[pmc,%d] Retrieving callchain for PMC that doesn't " "want it", __LINE__)); + KASSERT(pm->pm_runcount > 0, + ("[pmc,%d] runcount %d", __LINE__, pm->pm_runcount)); + /* * Retrieve the callchain and mark the sample buffer * as 'processable' by the timer tick sweep code. */ ps->ps_nsamples = pmc_save_user_callchain(ps->ps_pc, pmc_callchaindepth, tf); + +#ifdef INVARIANTS + ncallchains++; +#endif + } + KASSERT(ncallchains > 0, + ("[pmc,%d] cpu %d didn't find a sample to collect", __LINE__, + cpu)); + return; } @@ -3991,6 +4030,11 @@ pmc_process_samples(int cpu) } pm = ps->ps_pmc; + + KASSERT(pm->pm_runcount > 0, + ("[pmc,%d] pm=%p runcount %d", __LINE__, (void *) pm, + pm->pm_runcount)); + po = pm->pm_owner; KASSERT(PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm)), Modified: head/sys/i386/i386/exception.s ============================================================================== --- head/sys/i386/i386/exception.s Sat Dec 13 12:03:21 2008 (r186036) +++ head/sys/i386/i386/exception.s Sat Dec 13 13:07:12 2008 (r186037) @@ -438,9 +438,18 @@ doreti_nmi: iret outofnmi: /* - * Clear interrupts and jump to AST handling code. + * Call the callchain capture hook after turning interrupts back on. */ + movl pmc_hook,%ecx + orl %ecx,%ecx + jz doreti_exit + pushl %esp /* frame pointer */ + pushl $PMC_FN_USER_CALLCHAIN /* command */ + movl PCPU(CURTHREAD),%eax + pushl %eax /* curthread */ sti + call *%ecx + addl $12,%esp jmp doreti_ast ENTRY(end_exceptions) #endif Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sat Dec 13 12:03:21 2008 (r186036) +++ head/sys/kern/subr_trap.c Sat Dec 13 13:07:12 2008 (r186037) @@ -44,7 +44,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_hwpmc_hooks.h" #include "opt_ktrace.h" #include "opt_mac.h" #ifdef __i386__ @@ -179,13 +178,6 @@ ast(struct trapframe *framep) td->td_profil_ticks = 0; td->td_pflags &= ~TDP_OWEUPC; } -#if defined(HWPMC_HOOKS) - if (td->td_pflags & TDP_CALLCHAIN) { - PMC_CALL_HOOK_UNLOCKED(td, PMC_FN_USER_CALLCHAIN, - (void *) framep); - td->td_pflags &= ~TDP_CALLCHAIN; - } -#endif if (flags & TDF_ALRMPEND) { PROC_LOCK(p); psignal(p, SIGVTALRM); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 14:14:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC9EC1065670; Sat, 13 Dec 2008 14:14:56 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AAD128FC0C; Sat, 13 Dec 2008 14:14:56 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDEEuvX031377; Sat, 13 Dec 2008 14:14:56 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDEEu0A031376; Sat, 13 Dec 2008 14:14:56 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200812131414.mBDEEu0A031376@svn.freebsd.org> From: Ulf Lilleengen Date: Sat, 13 Dec 2008 14:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186038 - head/sbin/geom/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 14:14:56 -0000 Author: lulf Date: Sat Dec 13 14:14:56 2008 New Revision: 186038 URL: http://svn.freebsd.org/changeset/base/186038 Log: - When writing metadata to a geom provider, open the it as read-write since it might do subsequent reads from other providers. This stopped geli (and probably other classes using g_metadata_store as well) from being put on top of gvinum raid5 volumes. Note: The reason it fails in the gvinum raid5 case is that gvinum will read back the old parity stripe before calculating the new parity stripe to be written out again. The write will then fail because the underlying disk to be read is opened write only. MFC after: 1 week Modified: head/sbin/geom/misc/subr.c Modified: head/sbin/geom/misc/subr.c ============================================================================== --- head/sbin/geom/misc/subr.c Sat Dec 13 13:07:12 2008 (r186037) +++ head/sbin/geom/misc/subr.c Sat Dec 13 14:14:56 2008 (r186038) @@ -211,7 +211,7 @@ g_metadata_store(const char *name, u_cha sector = NULL; error = 0; - fd = open(path, O_WRONLY); + fd = open(path, O_RDWR); if (fd == -1) return (errno); mediasize = g_get_mediasize(name); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 15:44:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F34501065675; Sat, 13 Dec 2008 15:44:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1B2B8FC1A; Sat, 13 Dec 2008 15:44:29 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDFiT81033058; Sat, 13 Dec 2008 15:44:29 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDFiTVG033057; Sat, 13 Dec 2008 15:44:29 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131544.mBDFiTVG033057@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 15:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186039 - head/usr.bin/cpuset X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 15:44:30 -0000 Author: ru Date: Sat Dec 13 15:44:29 2008 New Revision: 186039 URL: http://svn.freebsd.org/changeset/base/186039 Log: Sync manpage's synopsis with program's usage(). Trim whitespace at EOL. Modified: head/usr.bin/cpuset/cpuset.1 Modified: head/usr.bin/cpuset/cpuset.1 ============================================================================== --- head/usr.bin/cpuset/cpuset.1 Sat Dec 13 14:14:56 2008 (r186038) +++ head/usr.bin/cpuset/cpuset.1 Sat Dec 13 15:44:29 2008 (r186039) @@ -35,7 +35,7 @@ .Nm .Op Fl l Ar cpu-list .Op Fl s Ar setid -.Ar cmd +.Ar cmd ... .Nm .Op Fl l Ar cpu-list .Op Fl s Ar setid @@ -43,10 +43,10 @@ .Nm .Op Fl cr .Op Fl l Ar cpu-list -.Op Fl j Ar jailid | Fl p Ar pid | Fl r Ar tid | Fl s Ar setid | Fl x Ar irq +.Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Nm .Op Fl cgir -.Op Fl j Ar jailid | Fl p Ar pid | Fl r Ar tid | Fl s Ar setid | Fl x Ar irq +.Op Fl j Ar jailid | Fl p Ar pid | Fl t Ar tid | Fl s Ar setid | Fl x Ar irq .Sh DESCRIPTION The .Nm @@ -104,7 +104,7 @@ target specifier. .It Fl g Causes .Nm -to print either a list of valid CPUs or, using +to print either a list of valid CPUs or, using .Fl i , the id of the target. .It Fl i @@ -119,14 +119,14 @@ Specification may include numbers separated by '-' for ranges and commas separating individual numbers. .It Fl p Ar pid Specifies a pid as the target of the operation. -.It Fl s Ar setid +.It Fl s Ar setid Specifies a set id as the target of the operation. .It Fl r The requested operation should reference the root set available via the target specifier. .It Fl t Ar tid Specifies a thread id as the target of the operation. -.It Fl x Ar irq +.It Fl x Ar irq Specifies an irq as the target of the operation. .El .Sh EXIT STATUS From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 15:47:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46736106564A; Sat, 13 Dec 2008 15:47:47 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34C7A8FC0C; Sat, 13 Dec 2008 15:47:47 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDFll6v033153; Sat, 13 Dec 2008 15:47:47 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDFll7H033152; Sat, 13 Dec 2008 15:47:47 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131547.mBDFll7H033152@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 15:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186040 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 15:47:47 -0000 Author: ru Date: Sat Dec 13 15:47:46 2008 New Revision: 186040 URL: http://svn.freebsd.org/changeset/base/186040 Log: Added FreeBSD 7.1. Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 15:44:29 2008 (r186039) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 15:47:46 2008 (r186040) @@ -69,6 +69,7 @@ . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-8.0 8.0 . .ec From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 16:13:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EBDE1065672; Sat, 13 Dec 2008 16:13:37 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3678FC12; Sat, 13 Dec 2008 16:13:37 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDGDbPI033649; Sat, 13 Dec 2008 16:13:37 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDGDb8v033648; Sat, 13 Dec 2008 16:13:37 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131613.mBDGDb8v033648@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 16:13:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186041 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 16:13:37 -0000 Author: ru Date: Sat Dec 13 16:13:37 2008 New Revision: 186041 URL: http://svn.freebsd.org/changeset/base/186041 Log: Added FreeBSD 6.4. Modified: head/gnu/usr.bin/groff/tmac/mdoc.local Modified: head/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- head/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 15:47:46 2008 (r186040) +++ head/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 16:13:37 2008 (r186041) @@ -69,6 +69,7 @@ . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 .ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-8.0 8.0 . From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 16:53:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1EB71065670; Sat, 13 Dec 2008 16:53:35 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF51F8FC14; Sat, 13 Dec 2008 16:53:35 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDGrZKk034547; Sat, 13 Dec 2008 16:53:35 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDGrZPW034546; Sat, 13 Dec 2008 16:53:35 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131653.mBDGrZPW034546@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 16:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186042 - releng/7.1/lib/libc releng/7.1/lib/libc/stdio stable/7/lib/libc stable/7/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 16:53:35 -0000 Author: ru Date: Sat Dec 13 16:53:35 2008 New Revision: 186042 URL: http://svn.freebsd.org/changeset/base/186042 Log: MFC: Fix fread() to return a correct value on platforms where sizeof(int) != sizeof(size_t), i.e. on all 64-bit platforms. Approved by: re (kib) Modified: releng/7.1/lib/libc/ (props changed) releng/7.1/lib/libc/stdio/fread.c Changes in other areas also in this revision: Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdio/fread.c Modified: releng/7.1/lib/libc/stdio/fread.c ============================================================================== --- releng/7.1/lib/libc/stdio/fread.c Sat Dec 13 16:13:37 2008 (r186041) +++ releng/7.1/lib/libc/stdio/fread.c Sat Dec 13 16:53:35 2008 (r186042) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); size_t fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp) { - int ret; + size_t ret; FLOCKFILE(fp); ret = __fread(buf, size, count, fp); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 16:53:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9B221065673; Sat, 13 Dec 2008 16:53:35 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D69208FC16; Sat, 13 Dec 2008 16:53:35 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDGrZRF034553; Sat, 13 Dec 2008 16:53:35 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDGrZkM034552; Sat, 13 Dec 2008 16:53:35 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131653.mBDGrZkM034552@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 16:53:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186042 - releng/7.1/lib/libc releng/7.1/lib/libc/stdio stable/7/lib/libc stable/7/lib/libc/stdio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 16:53:36 -0000 Author: ru Date: Sat Dec 13 16:53:35 2008 New Revision: 186042 URL: http://svn.freebsd.org/changeset/base/186042 Log: MFC: Fix fread() to return a correct value on platforms where sizeof(int) != sizeof(size_t), i.e. on all 64-bit platforms. Approved by: re (kib) Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdio/fread.c Changes in other areas also in this revision: Modified: releng/7.1/lib/libc/ (props changed) releng/7.1/lib/libc/stdio/fread.c Modified: stable/7/lib/libc/stdio/fread.c ============================================================================== --- stable/7/lib/libc/stdio/fread.c Sat Dec 13 16:13:37 2008 (r186041) +++ stable/7/lib/libc/stdio/fread.c Sat Dec 13 16:53:35 2008 (r186042) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); size_t fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict fp) { - int ret; + size_t ret; FLOCKFILE(fp); ret = __fread(buf, size, count, fp); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 17:48:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B66A01065673; Sat, 13 Dec 2008 17:48:06 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A506C8FC08; Sat, 13 Dec 2008 17:48:06 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDHm694035567; Sat, 13 Dec 2008 17:48:06 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDHm6Ie035565; Sat, 13 Dec 2008 17:48:06 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <200812131748.mBDHm6Ie035565@svn.freebsd.org> From: Ruslan Ermilov Date: Sat, 13 Dec 2008 17:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186043 - head/usr.bin/fetch X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 17:48:06 -0000 Author: ru Date: Sat Dec 13 17:48:06 2008 New Revision: 186043 URL: http://svn.freebsd.org/changeset/base/186043 Log: Improve usage and sync SYNOPSIS with usage. Modified: head/usr.bin/fetch/fetch.1 head/usr.bin/fetch/fetch.c Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Sat Dec 13 16:53:35 2008 (r186042) +++ head/usr.bin/fetch/fetch.1 Sat Dec 13 17:48:06 2008 (r186043) @@ -37,17 +37,23 @@ .Nd retrieve a file by Uniform Resource Locator .Sh SYNOPSIS .Nm -.Op Fl 146AFMPRUadlmnpqrsv +.Op Fl 146AadFlMmnPpqRrsUv .Op Fl B Ar bytes +.Op Fl N Ar file +.Op Fl o Ar file .Op Fl S Ar bytes .Op Fl T Ar seconds +.Op Fl w Ar seconds +.Ar URL ... +.Nm +.Op Fl 146AadFlMmnPpqRrsUv +.Op Fl B Ar bytes .Op Fl N Ar file .Op Fl o Ar file +.Op Fl S Ar bytes +.Op Fl T Ar seconds .Op Fl w Ar seconds -.Op Fl h Ar host -.Op Fl c Ar dir -.Op Fl f Ar file -.Op Ar URL ... +.Fl h Ar host Fl f Ar file Oo Fl c Ar dir Oc .Sh DESCRIPTION The .Nm @@ -59,7 +65,7 @@ command line. .Pp The following options are available: .Bl -tag -width Fl -.It Fl \&1 +.It Fl 1 Stop and return exit code 0 at the first successfully retrieved file. .It Fl 4 Forces Modified: head/usr.bin/fetch/fetch.c ============================================================================== --- head/usr.bin/fetch/fetch.c Sat Dec 13 16:53:35 2008 (r186042) +++ head/usr.bin/fetch/fetch.c Sat Dec 13 17:48:06 2008 (r186043) @@ -711,10 +711,11 @@ fetch(char *URL, const char *path) static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n", - "usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile]", - " [-S bytes] [-B bytes] [-T seconds] [-w seconds]", - " [-h host -f file [-c dir] | URL ...]"); + fprintf(stderr, "%s\n%s\n%s\n%s\n", +"usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] URL ...", +" fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [-N file] [-o file] [-S bytes]", +" [-T seconds] [-w seconds] -h host -f file [-c dir]"); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 18:29:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 848A31065679; Sat, 13 Dec 2008 18:29:49 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 718E98FC13; Sat, 13 Dec 2008 18:29:49 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDITn1b036330; Sat, 13 Dec 2008 18:29:49 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDITnGp036329; Sat, 13 Dec 2008 18:29:49 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812131829.mBDITnGp036329@svn.freebsd.org> From: Ken Smith Date: Sat, 13 Dec 2008 18:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186044 - stable/7/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 18:29:49 -0000 Author: kensmith Date: Sat Dec 13 18:29:48 2008 New Revision: 186044 URL: http://svn.freebsd.org/changeset/base/186044 Log: Due to a mis-understanding on my part with Ruslan I haven't been updating this like I should have been. Mis-understanding is cleared up I think. Change default operating system for upcoming release. Add release names not in contrib/groff/tmac/doc-common yet. Submitted by: ru Approved by: re (implicit) Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/7/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 17:48:06 2008 (r186043) +++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 18:29:48 2008 (r186044) @@ -64,10 +64,12 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~7.0 +.ds doc-default-operating-system FreeBSD\~7.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 +.ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-8.0 8.0 . .ec From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 18:33:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4287106564A; Sat, 13 Dec 2008 18:33:22 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A21678FC16; Sat, 13 Dec 2008 18:33:22 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDIXMVR036447; Sat, 13 Dec 2008 18:33:22 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDIXM78036446; Sat, 13 Dec 2008 18:33:22 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812131833.mBDIXM78036446@svn.freebsd.org> From: Ken Smith Date: Sat, 13 Dec 2008 18:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186045 - releng/7.1/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 18:33:22 -0000 Author: kensmith Date: Sat Dec 13 18:33:22 2008 New Revision: 186045 URL: http://svn.freebsd.org/changeset/base/186045 Log: Change default operating system for upcoming release. Add FreeBSD releases not in contrib/groff/tmac/doc-common yet. Submitted by: ru Approved by: re (implicit) Modified: releng/7.1/gnu/usr.bin/groff/tmac/mdoc.local Modified: releng/7.1/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- releng/7.1/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 18:29:48 2008 (r186044) +++ releng/7.1/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 18:33:22 2008 (r186045) @@ -64,10 +64,12 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~7.0 +.ds doc-default-operating-system FreeBSD\~7.1 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 +.ds doc-operating-system-FreeBSD-7.1 7.1 .ds doc-operating-system-FreeBSD-8.0 8.0 . .ec From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 18:49:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDC651065672; Sat, 13 Dec 2008 18:49:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB4C88FC13; Sat, 13 Dec 2008 18:49:01 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDIn1ta036836; Sat, 13 Dec 2008 18:49:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDIn1NV036834; Sat, 13 Dec 2008 18:49:01 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812131849.mBDIn1NV036834@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 13 Dec 2008 18:49:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186046 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 18:49:02 -0000 Author: nwhitehorn Date: Sat Dec 13 18:49:01 2008 New Revision: 186046 URL: http://svn.freebsd.org/changeset/base/186046 Log: Use a static free packet queue instead of using malloc() to allocate new ADB packets. This fixes some locking problems. Modified: head/sys/powerpc/powermac/cuda.c head/sys/powerpc/powermac/cudavar.h Modified: head/sys/powerpc/powermac/cuda.c ============================================================================== --- head/sys/powerpc/powermac/cuda.c Sat Dec 13 18:33:22 2008 (r186045) +++ head/sys/powerpc/powermac/cuda.c Sat Dec 13 18:49:01 2008 (r186046) @@ -104,8 +104,6 @@ static devclass_t cuda_devclass; DRIVER_MODULE(cuda, macio, cuda_driver, cuda_devclass, 0, 0); DRIVER_MODULE(adb, cuda, adb_driver, adb_devclass, 0, 0); -MALLOC_DEFINE(M_CUDA, "cuda", "CUDA packet queue"); - static void cuda_intr(void *arg); static uint8_t cuda_read_reg(struct cuda_softc *sc, u_int offset); static void cuda_write_reg(struct cuda_softc *sc, u_int offset, uint8_t value); @@ -178,6 +176,10 @@ cuda_attach(device_t dev) STAILQ_INIT(&sc->sc_inq); STAILQ_INIT(&sc->sc_outq); + STAILQ_INIT(&sc->sc_freeq); + + for (i = 0; i < CUDA_MAXPACKETS; i++) + STAILQ_INSERT_TAIL(&sc->sc_freeq, &sc->sc_pkts[i], pkt_q); /* Init CUDA */ @@ -348,11 +350,17 @@ cuda_send(void *cookie, int poll, int le mtx_lock(&sc->sc_mutex); - pkt = malloc(sizeof(struct cuda_packet), M_CUDA, M_WAITOK); + pkt = STAILQ_FIRST(&sc->sc_freeq); + if (pkt == NULL) { + mtx_unlock(&sc->sc_mutex); + return (-1); + } + pkt->len = length - 1; pkt->type = msg[0]; memcpy(pkt->data, &msg[1], pkt->len); + STAILQ_REMOVE_HEAD(&sc->sc_freeq, pkt_q); STAILQ_INSERT_TAIL(&sc->sc_outq, pkt, pkt_q); /* @@ -389,8 +397,8 @@ cuda_send_outbound(struct cuda_softc *sc memcpy(sc->sc_out, &pkt->type, pkt->len + 1); sc->sc_sent = 0; - free(pkt, M_CUDA); STAILQ_REMOVE_HEAD(&sc->sc_outq, pkt_q); + STAILQ_INSERT_TAIL(&sc->sc_freeq, pkt, pkt_q); sc->sc_waiting = 1; @@ -455,9 +463,9 @@ cuda_send_inbound(struct cuda_softc *sc) break; } - free(pkt,M_CUDA); - mtx_lock(&sc->sc_mutex); + + STAILQ_INSERT_TAIL(&sc->sc_freeq, pkt, pkt_q); } mtx_unlock(&sc->sc_mutex); @@ -559,18 +567,22 @@ switch_start: cuda_idle(sc); /* Queue up the packet */ - pkt = malloc(sizeof(struct cuda_packet), M_CUDA, - M_WAITOK); + pkt = STAILQ_FIRST(&sc->sc_freeq); + if (pkt != NULL) { + /* If we have a free packet, process it */ + + pkt->len = sc->sc_received - 2; + pkt->type = sc->sc_in[1]; + memcpy(pkt->data, &sc->sc_in[2], pkt->len); - pkt->len = sc->sc_received - 2; - pkt->type = sc->sc_in[1]; - memcpy(pkt->data, &sc->sc_in[2], pkt->len); + STAILQ_REMOVE_HEAD(&sc->sc_freeq, pkt_q); + STAILQ_INSERT_TAIL(&sc->sc_inq, pkt, pkt_q); - STAILQ_INSERT_TAIL(&sc->sc_inq, pkt, pkt_q); + process_inbound = 1; + } sc->sc_state = CUDA_IDLE; sc->sc_received = 0; - process_inbound = 1; /* * If there is something waiting to be sent out, Modified: head/sys/powerpc/powermac/cudavar.h ============================================================================== --- head/sys/powerpc/powermac/cudavar.h Sat Dec 13 18:33:22 2008 (r186045) +++ head/sys/powerpc/powermac/cudavar.h Sat Dec 13 18:49:01 2008 (r186046) @@ -35,6 +35,7 @@ #define _POWERPC_CUDAVAR_H_ #define CUDA_DEVSTR "Apple CUDA I/O Controller" +#define CUDA_MAXPACKETS 10 /* Cuda addresses */ #define CUDA_ADB 0 @@ -99,8 +100,10 @@ struct cuda_softc { int sc_out_length; int sc_received; + struct cuda_packet sc_pkts[CUDA_MAXPACKETS]; struct cuda_pktq sc_inq; struct cuda_pktq sc_outq; + struct cuda_pktq sc_freeq; }; #endif /* _POWERPC_CUDAVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 19:11:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F1AE1065673; Sat, 13 Dec 2008 19:11:47 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C3078FC08; Sat, 13 Dec 2008 19:11:47 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDJBkta037297; Sat, 13 Dec 2008 19:11:46 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDJBkcQ037296; Sat, 13 Dec 2008 19:11:46 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200812131911.mBDJBkcQ037296@svn.freebsd.org> From: Ken Smith Date: Sat, 13 Dec 2008 19:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186047 - stable/6/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 19:11:47 -0000 Author: kensmith Date: Sat Dec 13 19:11:46 2008 New Revision: 186047 URL: http://svn.freebsd.org/changeset/base/186047 Log: Due to a mis-understanding on my part with Ruslan I haven't been updating this like I should have been. Mis-understanding is cleared up I think. Change default operating system for upcoming release. Add release names not in contrib/groff/tmac/doc-common yet. Submitted by: ru Modified: stable/6/gnu/usr.bin/groff/tmac/mdoc.local Modified: stable/6/gnu/usr.bin/groff/tmac/mdoc.local ============================================================================== --- stable/6/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 18:49:01 2008 (r186046) +++ stable/6/gnu/usr.bin/groff/tmac/mdoc.local Sat Dec 13 19:11:46 2008 (r186047) @@ -62,10 +62,11 @@ .ds doc-volume-as-arm arm . .\" Default .Os value -.ds doc-default-operating-system FreeBSD\~6.2 +.ds doc-default-operating-system FreeBSD\~6.4 . .\" FreeBSD releases not found in doc-common .ds doc-operating-system-FreeBSD-6.3 6.3 +.ds doc-operating-system-FreeBSD-6.4 6.4 . .ec . From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 19:13:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A17106564A; Sat, 13 Dec 2008 19:13:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E35D98FC19; Sat, 13 Dec 2008 19:13:03 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDJD3uv037366; Sat, 13 Dec 2008 19:13:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDJD38C037353; Sat, 13 Dec 2008 19:13:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812131913.mBDJD38C037353@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 13 Dec 2008 19:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186048 - in head/sys: contrib/pf/net net netinet netinet6 netipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 19:13:04 -0000 Author: bz Date: Sat Dec 13 19:13:03 2008 New Revision: 186048 URL: http://svn.freebsd.org/changeset/base/186048 Log: Second round of putting global variables, which were virtualized but formerly missed under VIMAGE_GLOBAL. Put the extern declarations of the virtualized globals under VIMAGE_GLOBAL as the globals themsevles are already. This will help by the time when we are going to remove the globals entirely. Sponsored by: The FreeBSD Foundation Modified: head/sys/contrib/pf/net/pf_if.c head/sys/net/if_var.h head/sys/netinet/icmp6.h head/sys/netinet/icmp_var.h head/sys/netinet/in_var.h head/sys/netinet/ip_fw.h head/sys/netinet/ip_fw2.c head/sys/netinet/tcp_var.h head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_var.h head/sys/netinet6/raw_ip6.h head/sys/netipsec/ipip_var.h Modified: head/sys/contrib/pf/net/pf_if.c ============================================================================== --- head/sys/contrib/pf/net/pf_if.c Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/contrib/pf/net/pf_if.c Sat Dec 13 19:13:03 2008 (r186048) @@ -115,8 +115,10 @@ void pfi_change_group_event(void * __u void pfi_detach_group_event(void * __unused, struct ifg_group *); void pfi_ifaddr_event(void * __unused, struct ifnet *); +#ifdef VIMAGE_GLOBALS extern struct ifgrouphead ifg_head; #endif +#endif RB_PROTOTYPE(pfi_ifhead, pfi_kif, pfik_tree, pfi_if_compare); RB_GENERATE(pfi_ifhead, pfi_kif, pfik_tree, pfi_if_compare); Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/net/if_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -659,10 +659,12 @@ struct ifnet *ifnet_byindex(u_short idx) struct ifaddr *ifaddr_byindex(u_short idx); struct cdev *ifdev_byindex(u_short idx); +#ifdef VIMAGE_GLOBALS extern struct ifnethead ifnet; -extern int ifqmaxlen; extern struct ifnet *loif; /* first loopback interface */ extern int if_index; +#endif +extern int ifqmaxlen; int if_addgroup(struct ifnet *, const char *); int if_delgroup(struct ifnet *, const char *); Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/icmp6.h Sat Dec 13 19:13:03 2008 (r186048) @@ -707,8 +707,10 @@ do { \ } \ } while (/*CONSTCOND*/ 0) +#ifdef VIMAGE_GLOBALS extern int icmp6_rediraccept; /* accept/process redirects */ extern int icmp6_redirtimeout; /* cache time for redirect routes */ +#endif #define ICMP6_NODEINFO_FQDNOK 0x1 #define ICMP6_NODEINFO_NODEADDROK 0x2 Modified: head/sys/netinet/icmp_var.h ============================================================================== --- head/sys/netinet/icmp_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/icmp_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -74,7 +74,9 @@ struct icmpstat { #ifdef _KERNEL SYSCTL_DECL(_net_inet_icmp); +#ifdef VIMAGE_GLOBALS extern struct icmpstat icmpstat; /* icmp statistics */ +#endif extern int badport_bandlim(int); #define BANDLIM_UNLIMITED -1 #define BANDLIM_ICMP_UNREACH 0 Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/in_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -84,9 +84,13 @@ extern u_char inetctlerrmap[]; /* * Hash table for IP addresses. */ -extern LIST_HEAD(in_ifaddrhashhead, in_ifaddr) *in_ifaddrhashtbl; -extern TAILQ_HEAD(in_ifaddrhead, in_ifaddr) in_ifaddrhead; +TAILQ_HEAD(in_ifaddrhead, in_ifaddr); +LIST_HEAD(in_ifaddrhashhead, in_ifaddr); +#ifdef VIMAGE_GLOBALS +extern struct in_ifaddrhashhead *in_ifaddrhashtbl; +extern struct in_ifaddrhead in_ifaddrhead; extern u_long in_ifaddrhmask; /* mask for hash table */ +#endif #define INADDR_NHASH_LOG2 9 #define INADDR_NHASH (1 << INADDR_NHASH_LOG2) @@ -227,7 +231,10 @@ SYSCTL_DECL(_net_inet_ip); SYSCTL_DECL(_net_inet_raw); #endif -extern LIST_HEAD(in_multihead, in_multi) in_multihead; +LIST_HEAD(in_multihead, in_multi); +#ifdef VIMAGE_GLOBALS +extern struct in_multihead in_multihead; +#endif /* * Lock macros for IPv4 layer multicast address lists. IPv4 lock goes Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/ip_fw.h Sat Dec 13 19:13:03 2008 (r186048) @@ -637,7 +637,7 @@ void ipfw_nat_destroy(void); typedef int ip_fw_ctl_t(struct sockopt *); extern ip_fw_ctl_t *ip_fw_ctl_ptr; -#ifndef VIMAGE +#ifdef VIMAGE_GLOBALS extern int fw_one_pass; extern int fw_enable; #ifdef INET6 Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/ip_fw2.c Sat Dec 13 19:13:03 2008 (r186048) @@ -128,8 +128,8 @@ struct vnet_ipfw vnet_ipfw_0; static u_int32_t set_disable; static int fw_verbose; static struct callout ipfw_timeout; -#endif static int verbose_limit; +#endif static uma_zone_t ipfw_dyn_rule_zone; @@ -190,8 +190,9 @@ SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, verbose, CTLFLAG_RW | CTLFLAG_SECURE3, fw_verbose, 0, "Log matches to ipfw rules"); -SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, verbose_limit, CTLFLAG_RW, - &verbose_limit, 0, "Set upper limit of matches of ipfw rules logged"); +SYSCTL_V_INT(V_NET, vnet_ipfw, _net_inet_ip_fw, OID_AUTO, verbose_limit, + CTLFLAG_RW, verbose_limit, 0, + "Set upper limit of matches of ipfw rules logged"); SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, default_rule, CTLFLAG_RD, NULL, IPFW_DEFAULT_RULE, "The default/max possible rule number."); SYSCTL_UINT(_net_inet_ip_fw, OID_AUTO, tables_max, CTLFLAG_RD, Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet/tcp_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -38,7 +38,9 @@ /* * Kernel variables for tcp. */ +#ifdef VIMAGE_GLOBALS extern int tcp_do_rfc1323; +#endif /* TCP segment queue entry */ struct tseg_qent { @@ -48,7 +50,9 @@ struct tseg_qent { struct mbuf *tqe_m; /* mbuf contains packet */ }; LIST_HEAD(tsegqe_head, tseg_qent); +#ifdef VIMAGE_GLOBALS extern int tcp_reass_qsize; +#endif extern struct uma_zone *tcp_reass_zone; struct sackblk { Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet6/in6_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -474,6 +474,8 @@ struct in6_rrenumreq { extern struct in6_ifaddr *in6_ifaddr; extern struct icmp6stat icmp6stat; + +extern unsigned long in6_maxmtu; #endif /* VIMAGE_GLOBALS */ #define in6_ifstat_inc(ifp, tag) \ do { \ @@ -483,7 +485,6 @@ do { \ extern struct in6_addr zeroin6_addr; extern u_char inet6ctlerrmap[]; -extern unsigned long in6_maxmtu; #ifdef MALLOC_DECLARE MALLOC_DECLARE(M_IP6MADDR); #endif /* MALLOC_DECLARE */ Modified: head/sys/netinet6/ip6_input.c ============================================================================== --- head/sys/netinet6/ip6_input.c Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet6/ip6_input.c Sat Dec 13 19:13:03 2008 (r186048) @@ -130,7 +130,6 @@ struct vnet_inet6 vnet_inet6_0; static int ip6qmaxlen; struct in6_ifaddr *in6_ifaddr; struct ip6stat ip6stat; -#endif extern struct callout in6_tmpaddrtimer_ch; @@ -144,7 +143,8 @@ extern int icmp6_nodeinfo; extern int udp6_sendspace; extern int udp6_recvspace; -#ifdef VIMAGE_GLOBALS +extern struct route_in6 ip6_forward_rt; + int ip6_forward_srcrt; /* XXX */ int ip6_sourcecheck; /* XXX */ int ip6_sourcecheck_interval; /* XXX */ @@ -301,8 +301,6 @@ ip6_init2(void *dummy) /* This must be after route_init(), which is now SI_ORDER_THIRD */ SYSINIT(netinet6init2, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ip6_init2, NULL); -extern struct route_in6 ip6_forward_rt; - void ip6_input(struct mbuf *m) { Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet6/ip6_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -313,15 +313,16 @@ extern int ip6_auto_linklocal; extern int ip6_use_tempaddr; /* whether to use temporary addresses. */ extern int ip6_prefer_tempaddr; /* whether to prefer temporary addresses in the source address selection */ -#endif /* VIMAGE_GLOBALS */ + +#ifdef IPSTEALTH +extern int ip6stealth; +#endif extern int ip6_use_defzone; /* whether to use the default scope zone when unspecified */ +#endif /* VIMAGE_GLOBALS */ extern struct pfil_head inet6_pfil_hook; /* packet filter hooks */ -#ifdef IPSTEALTH -extern int ip6stealth; -#endif extern struct pr_usrreqs rip6_usrreqs; struct sockopt; Modified: head/sys/netinet6/raw_ip6.h ============================================================================== --- head/sys/netinet6/raw_ip6.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netinet6/raw_ip6.h Sat Dec 13 19:13:03 2008 (r186048) @@ -48,7 +48,9 @@ struct rip6stat { }; #ifdef _KERNEL +#ifdef VIMAGE_GLOBALS extern struct rip6stat rip6stat; #endif +#endif #endif Modified: head/sys/netipsec/ipip_var.h ============================================================================== --- head/sys/netipsec/ipip_var.h Sat Dec 13 19:11:46 2008 (r186047) +++ head/sys/netipsec/ipip_var.h Sat Dec 13 19:13:03 2008 (r186048) @@ -60,6 +60,8 @@ struct ipipstat #ifdef _KERNEL extern int ipip_allow; +#ifdef VIMAGE_GLOBALS extern struct ipipstat ipipstat; +#endif #endif /* _KERNEL */ #endif /* _NETINET_IPIP_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 19:35:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19A17106564A; Sat, 13 Dec 2008 19:35:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 95BC58FC1F; Sat, 13 Dec 2008 19:35:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id CBAC441C64A; Sat, 13 Dec 2008 20:35:05 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id LuSxzKuBSDNS; Sat, 13 Dec 2008 20:35:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 6AADA41C615; Sat, 13 Dec 2008 20:35:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 555864448D5; Sat, 13 Dec 2008 19:33:54 +0000 (UTC) Date: Sat, 13 Dec 2008 19:33:53 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, FreeBSD virtualization mailing list In-Reply-To: <200812131913.mBDJD38C037353@svn.freebsd.org> Message-ID: <20081213191345.M97918@maildrop.int.zabbadoz.net> References: <200812131913.mBDJD38C037353@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-net@freebsd.org, FreeBSD current mailing list Subject: HEADS UP: vimage - virtualized global variables in the network stack X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: FreeBSD virtualization mailing list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 19:35:08 -0000 On Sat, 13 Dec 2008, Bjoern A. Zeeb wrote: Hi, > Author: bz > Date: Sat Dec 13 19:13:03 2008 > New Revision: 186048 > URL: http://svn.freebsd.org/changeset/base/186048 > > Log: > Second round of putting global variables, which were virtualized > but formerly missed under VIMAGE_GLOBAL. > > Put the extern declarations of the virtualized globals > under VIMAGE_GLOBAL as the globals themsevles are already. > This will help by the time when we are going to remove the globals > entirely. As some of you might have noticed that Marko's last commit for the first time in the series of vimage commits was an actual functional change. By default HEAD is no longer using the globals. With my commit the current set of virtualized variables is assumed to be "clean". This basically means three things: 1) The former globals and their externs are all under #ifdef VIMAGE_GLOBALS 2) The same variables are present in a 'container struct' 3) The initialization of those is done from 'constructor ("init") functions' This state of having the variables in parallel, global and in the container struct, will be maintained for another (short) time until the entire virtualization framework is in. This is needed, so that all three possible states can be benchmarked from exactly the same code changeset. For developers comitting new code or changing code it is important to properly add virtualized variables in the way that: 1) the globals and externs (if needed) are added/kept in sync as both a) globals under #ifdef VIMAGE_GLOBALS and b) to the appropriate container struct + the V_ macro. When used somewhere in code one has to use the V_foobarbaz version. 2) Any new virtualized globals must not be directly initialized. They have to be initialized from a contructor function (which is usually there already). If you are confused about some of the terms etc. follow the links in the "Some documentation" section on the wiki: http://wiki.freebsd.org/Image The "Vimage Coding - beginners guide / FAQ" tries to answer the 101 questions. For the beaf you'll find the link to a document in perforce with the last question (that you may already know). We'll try to enhance this as we get questions or the integration goes on. In case of questions or suggestions ideally follow-up on freebsd-virtualization@ . /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 19:45:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22B63106564A for ; Sat, 13 Dec 2008 19:45:19 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.8]) by mx1.freebsd.org (Postfix) with ESMTP id A4EA58FC14 for ; Sat, 13 Dec 2008 19:45:18 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-024-089.pools.arcor-ip.net [88.66.24.89]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1LBaQP2krx-0001vy; Sat, 13 Dec 2008 20:45:17 +0100 Received: (qmail 31355 invoked from network); 13 Dec 2008 19:45:17 -0000 Received: from fbsd8.laiers.local (192.168.4.151) by ns1.laiers.local with SMTP; 13 Dec 2008 19:45:17 -0000 From: Max Laier Organization: FreeBSD To: FreeBSD virtualization mailing list Date: Sat, 13 Dec 2008 20:45:16 +0100 User-Agent: KMail/1.10.1 (FreeBSD/8.0-CURRENT; KDE/4.1.1; i386; ; ) References: <200812131913.mBDJD38C037353@svn.freebsd.org> <20081213191345.M97918@maildrop.int.zabbadoz.net> In-Reply-To: <20081213191345.M97918@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812132045.17207.max@love2party.net> X-Provags-ID: V01U2FsdGVkX183I2+p1eXAYb+GNHfAwopPsL3N14YJuON1W68 gvro3RofD2O6uGAy7I9Y65oCp5MtJ/BwMCAEAq9/+XmVhxvHfv WBBgTsz6WeeRGza8YzOHg== Cc: svn-src-head@freebsd.org, freebsd-net@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, FreeBSD current mailing list Subject: Re: HEADS UP: vimage - virtualized global variables in the network stack X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 19:45:19 -0000 On Saturday 13 December 2008 20:33:53 Bjoern A. Zeeb wrote: ... > This state of having the variables in parallel, global and in the > container struct, will be maintained for another (short) time until > the entire virtualization framework is in. This is needed, so that > all three possible states can be benchmarked from exactly the same > code changeset. > > > For developers comitting new code or changing code it is important to > properly add virtualized variables in the way that: > 1) the globals and externs (if needed) are added/kept in sync as both > a) globals under #ifdef VIMAGE_GLOBALS and b) to the appropriate > container struct + the V_ macro. > When used somewhere in code one has to use the V_foobarbaz version. Is there (an easy) way to have the tinderbox build every other run without VIMAGE_GLOBALS so that the most obvious error (global available, but not in the container struct - or the other way around) can be warned about? -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:10:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7744410656A3; Sat, 13 Dec 2008 20:10:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id F28588FC17; Sat, 13 Dec 2008 20:10:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 2048F41C6A3; Sat, 13 Dec 2008 21:10:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id AL8qj7J-9cEK; Sat, 13 Dec 2008 21:10:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id BC8A041C6A1; Sat, 13 Dec 2008 21:10:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 1A8434448D5; Sat, 13 Dec 2008 20:07:38 +0000 (UTC) Date: Sat, 13 Dec 2008 20:07:38 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Max Laier In-Reply-To: <200812132045.17207.max@love2party.net> Message-ID: <20081213195343.V97918@maildrop.int.zabbadoz.net> References: <200812131913.mBDJD38C037353@svn.freebsd.org> <20081213191345.M97918@maildrop.int.zabbadoz.net> <200812132045.17207.max@love2party.net> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: src-committers@freebsd.org, FreeBSD current mailing list , FreeBSD virtualization mailing list , freebsd-net@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: HEADS UP: vimage - virtualized global variables in the network stack X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:10:07 -0000 On Sat, 13 Dec 2008, Max Laier wrote: > On Saturday 13 December 2008 20:33:53 Bjoern A. Zeeb wrote: > ... >> This state of having the variables in parallel, global and in the >> container struct, will be maintained for another (short) time until >> the entire virtualization framework is in. This is needed, so that >> all three possible states can be benchmarked from exactly the same >> code changeset. >> >> >> For developers comitting new code or changing code it is important to >> properly add virtualized variables in the way that: >> 1) the globals and externs (if needed) are added/kept in sync as both >> a) globals under #ifdef VIMAGE_GLOBALS and b) to the appropriate >> container struct + the V_ macro. >> When used somewhere in code one has to use the V_foobarbaz version. > > Is there (an easy) way to have the tinderbox build every other run without > VIMAGE_GLOBALS so that the most obvious error (global available, but not in > the container struct - or the other way around) can be warned about? Without VIMAGE_GLOBALS is the default; we have been building this for a few days already. The flip had been so smoothly that almost noone had really noticed. Marko has done a really great job! Thus my HEADS UP now after I am confident enough that (almost) all places were caught and clean. In case you want to check yourself you can simply put a file into one or multiple archs conf dir that looks like: ------------------------------------------------------------------------ > cat sys/amd64/conf/LINT-VIMAGE_GLOBALS include LINT ident LINT-VIMAGE_GLOBALS options VIMAGE_GLOBALS ------------------------------------------------------------------------ I am doing that build every other day from now to catch the possible error of a virtualized variable in the container struct w/o the global. But as this is the least problematic case I do not want to commit the kernel configuration as it'll make builds longer for everyone, etc. The more problematic cases that builds cannot catch are: - static initialization of a virtualized 'global'. - a newly added virtualized 'global' that is not under #ifdef VIMAGE_GLOBALS I have scripts to identify the latter already. The former will only be caught be either code inspection or "unexpected results" when running. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:13:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585501065673; Sat, 13 Dec 2008 20:13:23 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460478FC12; Sat, 13 Dec 2008 20:13:23 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKDNhI038550; Sat, 13 Dec 2008 20:13:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKDNop038548; Sat, 13 Dec 2008 20:13:23 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812132013.mBDKDNop038548@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 13 Dec 2008 20:13:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186050 - head/sys/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:13:23 -0000 Author: nwhitehorn Date: Sat Dec 13 20:13:22 2008 New Revision: 186050 URL: http://svn.freebsd.org/changeset/base/186050 Log: Add support for a console mouse pointer on Open Firmware syscons. MFC after: 7.1-RELEASE Modified: head/sys/powerpc/ofw/ofw_syscons.c head/sys/powerpc/ofw/ofw_syscons.h Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Sat Dec 13 19:14:26 2008 (r186049) +++ head/sys/powerpc/ofw/ofw_syscons.c Sat Dec 13 20:13:22 2008 (r186050) @@ -137,10 +137,12 @@ static video_switch_t ofwfbvidsw = { */ static vi_blank_display_t ofwfb_blank_display8; static vi_putc_t ofwfb_putc8; +static vi_putm_t ofwfb_putm8; static vi_set_border_t ofwfb_set_border8; static vi_blank_display_t ofwfb_blank_display32; static vi_putc_t ofwfb_putc32; +static vi_putm_t ofwfb_putm32; static vi_set_border_t ofwfb_set_border32; VIDEO_DRIVER(ofwfb, ofwfbvidsw, ofwfb_configure); @@ -250,10 +252,12 @@ ofwfb_configure(int flags) if (depth == 8) { sc->sc_blank = ofwfb_blank_display8; sc->sc_putc = ofwfb_putc8; + sc->sc_putm = ofwfb_putm8; sc->sc_set_border = ofwfb_set_border8; } else if (depth == 32) { sc->sc_blank = ofwfb_blank_display32; sc->sc_putc = ofwfb_putc32; + sc->sc_putm = ofwfb_putm32; sc->sc_set_border = ofwfb_set_border32; } else return (0); @@ -823,7 +827,86 @@ ofwfb_putm(video_adapter_t *adp, int x, sc = (struct ofwfb_softc *)adp; - /* put mouse */ + return ((*sc->sc_putm)(adp, x, y, pixel_image, pixel_mask, size, + width)); +} + +static int +ofwfb_putm8(video_adapter_t *adp, int x, int y, uint8_t *pixel_image, + uint32_t pixel_mask, int size, int width) +{ + struct ofwfb_softc *sc; + int i, j, k; + uint32_t *addr; + u_char fg, bg; + union { + uint32_t l[2]; + uint8_t c[8]; + } ch; + + + sc = (struct ofwfb_softc *)adp; + addr = (u_int32_t *)((int)sc->sc_addr + + (y + sc->sc_ymargin)*sc->sc_stride + + x + sc->sc_xmargin); + + fg = ofwfb_foreground(SC_NORM_ATTR); + bg = ofwfb_background(SC_NORM_ATTR); + + for (i = 0; i < size && i+y < sc->sc_height - 2*sc->sc_ymargin; i++) { + /* + * Use the current values for the line + */ + ch.l[0] = addr[0]; + ch.l[1] = addr[1]; + + /* + * Calculate 2 x 4-chars at a time, and then + * write these out. + */ + for (j = 0, k = width; j < 8; j++, k--) { + if (x + j >= sc->sc_width - 2*sc->sc_xmargin) + continue; + + if (pixel_image[i] & (1 << k)) + ch.c[j] = (ch.c[j] == fg) ? bg : fg; + } + + addr[0] = ch.l[0]; + addr[1] = ch.l[1]; + addr += (sc->sc_stride / sizeof(u_int32_t)); + } + + return (0); +} + +static int +ofwfb_putm32(video_adapter_t *adp, int x, int y, uint8_t *pixel_image, + uint32_t pixel_mask, int size, int width) +{ + struct ofwfb_softc *sc; + int i, j, k; + uint32_t fg, bg; + uint32_t *addr; + + sc = (struct ofwfb_softc *)adp; + addr = (uint32_t *)sc->sc_addr + + (y + sc->sc_ymargin)*(sc->sc_stride/4) + + x + sc->sc_xmargin; + + fg = ofwfb_pix32(ofwfb_foreground(SC_NORM_ATTR)); + bg = ofwfb_pix32(ofwfb_background(SC_NORM_ATTR)); + + for (i = 0; i < size && i+y < sc->sc_height - 2*sc->sc_ymargin; i++) { + for (j = 0, k = width; j < 8; j++, k--) { + if (x + j >= sc->sc_width - 2*sc->sc_xmargin) + continue; + + if (pixel_image[i] & (1 << k)) + *(addr + j) = (*(addr + j) == fg) ? bg : fg; + } + addr += (sc->sc_stride/4); + } return (0); } Modified: head/sys/powerpc/ofw/ofw_syscons.h ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.h Sat Dec 13 19:14:26 2008 (r186049) +++ head/sys/powerpc/ofw/ofw_syscons.h Sat Dec 13 20:13:22 2008 (r186050) @@ -51,6 +51,7 @@ struct ofwfb_softc { vi_blank_display_t *sc_blank; vi_putc_t *sc_putc; + vi_putm_t *sc_putm; vi_set_border_t *sc_set_border; #define OFWSC_MAXADDR 8 From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:15:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53F70106567B; Sat, 13 Dec 2008 20:15:43 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42B1D8FC31; Sat, 13 Dec 2008 20:15:43 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKFhh7038629; Sat, 13 Dec 2008 20:15:43 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKFhQo038628; Sat, 13 Dec 2008 20:15:43 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812132015.mBDKFhQo038628@svn.freebsd.org> From: Kip Macy Date: Sat, 13 Dec 2008 20:15:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186051 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:15:43 -0000 Author: kmacy Date: Sat Dec 13 20:15:42 2008 New Revision: 186051 URL: http://svn.freebsd.org/changeset/base/186051 Log: in6_addroute is called through rnh_addadr which is always called with the radix node head lock held exclusively. Pass RTF_RNH_LOCKED to rtalloc so that rtalloc1_fib will not try to re-acquire the lock. Modified: head/sys/netinet6/in6_rmx.c Modified: head/sys/netinet6/in6_rmx.c ============================================================================== --- head/sys/netinet6/in6_rmx.c Sat Dec 13 20:13:22 2008 (r186050) +++ head/sys/netinet6/in6_rmx.c Sat Dec 13 20:15:42 2008 (r186051) @@ -160,7 +160,7 @@ in6_addroute(void *v_arg, void *n_arg, s * Find out if it is because of an * ARP entry and delete it if so. */ - rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING); + rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_RNH_LOCKED|RTF_CLONING); if (rt2) { if (rt2->rt_flags & RTF_LLINFO && rt2->rt_flags & RTF_HOST && @@ -187,7 +187,7 @@ in6_addroute(void *v_arg, void *n_arg, s * net route entry, 3ffe:0501:: -> if0. * This case should not raise an error. */ - rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_CLONING); + rt2 = rtalloc1((struct sockaddr *)sin6, 0, RTF_RNH_LOCKED|RTF_CLONING); if (rt2) { if ((rt2->rt_flags & (RTF_CLONING|RTF_HOST|RTF_GATEWAY)) == RTF_CLONING From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:16:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F38F10656B1; Sat, 13 Dec 2008 20:16:03 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E3488FC0C; Sat, 13 Dec 2008 20:16:03 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKG33S038672; Sat, 13 Dec 2008 20:16:03 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKG3G7038671; Sat, 13 Dec 2008 20:16:03 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812132016.mBDKG3G7038671@svn.freebsd.org> From: Kip Macy Date: Sat, 13 Dec 2008 20:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186052 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:16:03 -0000 Author: kmacy Date: Sat Dec 13 20:16:03 2008 New Revision: 186052 URL: http://svn.freebsd.org/changeset/base/186052 Log: don't acquire lock recursively Modified: head/sys/netinet/in_rmx.c Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Sat Dec 13 20:15:42 2008 (r186051) +++ head/sys/netinet/in_rmx.c Sat Dec 13 20:16:03 2008 (r186052) @@ -115,7 +115,7 @@ in_addroute(void *v_arg, void *n_arg, st * ARP entry and delete it if so. */ rt2 = in_rtalloc1((struct sockaddr *)sin, 0, - RTF_CLONING, rt->rt_fibnum); + RTF_CLONING|RTF_RNH_LOCKED, rt->rt_fibnum); if (rt2) { if (rt2->rt_flags & RTF_LLINFO && rt2->rt_flags & RTF_HOST && From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:18:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D04BD1065688; Sat, 13 Dec 2008 20:18:05 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF2F58FC28; Sat, 13 Dec 2008 20:18:05 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKI5lT038758; Sat, 13 Dec 2008 20:18:05 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKI5pJ038757; Sat, 13 Dec 2008 20:18:05 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812132018.mBDKI5pJ038757@svn.freebsd.org> From: Kip Macy Date: Sat, 13 Dec 2008 20:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186053 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:18:05 -0000 Author: kmacy Date: Sat Dec 13 20:18:05 2008 New Revision: 186053 URL: http://svn.freebsd.org/changeset/base/186053 Log: radix node head lock needs to be held when calling rnh_addaddr Modified: head/sys/netinet/ip_fw2.c Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Sat Dec 13 20:16:03 2008 (r186052) +++ head/sys/netinet/ip_fw2.c Sat Dec 13 20:18:05 2008 (r186053) @@ -1826,7 +1826,9 @@ add_table_entry(struct ip_fw_chain *ch, ent->mask.sin_addr.s_addr = htonl(mlen ? ~((1 << (32 - mlen)) - 1) : 0); ent->addr.sin_addr.s_addr = addr & ent->mask.sin_addr.s_addr; IPFW_WLOCK(ch); + RADIX_NODE_HEAD_LOCK(rnh); if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent) == + RADIX_NODE_HEAD_UNLOCK(rnh); NULL) { IPFW_WUNLOCK(ch); free(ent, M_IPFW_TBL); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:27:17 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C195106570C; Sat, 13 Dec 2008 20:27:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 259428FC13; Sat, 13 Dec 2008 20:27:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mBDKOPGs092903; Sat, 13 Dec 2008 13:24:25 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 13 Dec 2008 13:24:25 -0700 (MST) Message-Id: <20081213.132425.41724046.imp@bsdimp.com> To: max@love2party.net From: Warner Losh In-Reply-To: <200812132045.17207.max@love2party.net> References: <200812131913.mBDJD38C037353@svn.freebsd.org> <20081213191345.M97918@maildrop.int.zabbadoz.net> <200812132045.17207.max@love2party.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: src-committers@FreeBSD.org, current@FreeBSD.org, freebsd-virtualization@FreeBSD.org, freebsd-net@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: HEADS UP: vimage - virtualized global variables in the network stack X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:27:17 -0000 From: Max Laier Subject: Re: HEADS UP: vimage - virtualized global variables in the network stack Date: Sat, 13 Dec 2008 20:45:16 +0100 > On Saturday 13 December 2008 20:33:53 Bjoern A. Zeeb wrote: > ... > > This state of having the variables in parallel, global and in the > > container struct, will be maintained for another (short) time until > > the entire virtualization framework is in. This is needed, so that > > all three possible states can be benchmarked from exactly the same > > code changeset. > > > > > > For developers comitting new code or changing code it is important to > > properly add virtualized variables in the way that: > > 1) the globals and externs (if needed) are added/kept in sync as both > > a) globals under #ifdef VIMAGE_GLOBALS and b) to the appropriate > > container struct + the V_ macro. > > When used somewhere in code one has to use the V_foobarbaz version. > > Is there (an easy) way to have the tinderbox build every other run without > VIMAGE_GLOBALS so that the most obvious error (global available, but not in > the container struct - or the other way around) can be warned about? This actually points out why the 'tinderbox' name is bogus for the universe plus failure: universe builds all the kernels. Tinderbox builds LINT only. Warner From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:34:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37A36106564A; Sat, 13 Dec 2008 20:34:42 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 262888FC19; Sat, 13 Dec 2008 20:34:42 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKYfxW039093; Sat, 13 Dec 2008 20:34:41 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKYfmb039092; Sat, 13 Dec 2008 20:34:41 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200812132034.mBDKYfmb039092@svn.freebsd.org> From: Kip Macy Date: Sat, 13 Dec 2008 20:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186054 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:34:42 -0000 Author: kmacy Date: Sat Dec 13 20:34:41 2008 New Revision: 186054 URL: http://svn.freebsd.org/changeset/base/186054 Log: version that will compile Modified: head/sys/netinet/ip_fw2.c Modified: head/sys/netinet/ip_fw2.c ============================================================================== --- head/sys/netinet/ip_fw2.c Sat Dec 13 20:18:05 2008 (r186053) +++ head/sys/netinet/ip_fw2.c Sat Dec 13 20:34:41 2008 (r186054) @@ -1814,6 +1814,7 @@ add_table_entry(struct ip_fw_chain *ch, INIT_VNET_IPFW(curvnet); struct radix_node_head *rnh; struct table_entry *ent; + struct radix_node *rn; if (tbl >= IPFW_TABLES_MAX) return (EINVAL); @@ -1827,9 +1828,9 @@ add_table_entry(struct ip_fw_chain *ch, ent->addr.sin_addr.s_addr = addr & ent->mask.sin_addr.s_addr; IPFW_WLOCK(ch); RADIX_NODE_HEAD_LOCK(rnh); - if (rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent) == + rn = rnh->rnh_addaddr(&ent->addr, &ent->mask, rnh, (void *)ent); RADIX_NODE_HEAD_UNLOCK(rnh); - NULL) { + if (rn == NULL) { IPFW_WUNLOCK(ch); free(ent, M_IPFW_TBL); return (EEXIST); From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:40:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DAE6106567E; Sat, 13 Dec 2008 20:40:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id C79DC8FC1C; Sat, 13 Dec 2008 20:40:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 9A15C41C64A; Sat, 13 Dec 2008 21:40:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id IOV4j6p0AzfW; Sat, 13 Dec 2008 21:40:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 0E65E41C615; Sat, 13 Dec 2008 21:40:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 52FF44448D5; Sat, 13 Dec 2008 20:36:23 +0000 (UTC) Date: Sat, 13 Dec 2008 20:36:23 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Warner Losh In-Reply-To: <20081213.132425.41724046.imp@bsdimp.com> Message-ID: <20081213203502.C97918@maildrop.int.zabbadoz.net> References: <200812131913.mBDJD38C037353@svn.freebsd.org> <20081213191345.M97918@maildrop.int.zabbadoz.net> <200812132045.17207.max@love2party.net> <20081213.132425.41724046.imp@bsdimp.com> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: HEADS UP: vimage - virtualized global variables in the network stack X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:40:09 -0000 On Sat, 13 Dec 2008, Warner Losh wrote: Hi, >> Is there (an easy) way to have the tinderbox build every other run without >> VIMAGE_GLOBALS so that the most obvious error (global available, but not in >> the container struct - or the other way around) can be warned about? > > This actually points out why the 'tinderbox' name is bogus for the > universe plus failure: universe builds all the kernels. Tinderbox > builds LINT only. And GENERIC and you are right, but that's the wrong thread. Please talk to Alfred about this. I really feel that he should back out what he has done. -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 20:53:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 549041065688; Sat, 13 Dec 2008 20:53:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 425A28FC13; Sat, 13 Dec 2008 20:53:58 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDKrwNn039465; Sat, 13 Dec 2008 20:53:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDKrw70039464; Sat, 13 Dec 2008 20:53:58 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200812132053.mBDKrw70039464@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 13 Dec 2008 20:53:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186055 - head/sys/powerpc/ofw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 20:53:58 -0000 Author: nwhitehorn Date: Sat Dec 13 20:53:57 2008 New Revision: 186055 URL: http://svn.freebsd.org/changeset/base/186055 Log: Allow OFW syscons to restore itself when the X server exits or there is a VT switch by redoing the Open Firmware card initialization calls in ofwfb_set_mode(). This uses the same trick (setting V_ADP_MODECHANGE) to arrange this as machfb(4) and creatorfb(4). Modified: head/sys/powerpc/ofw/ofw_syscons.c Modified: head/sys/powerpc/ofw/ofw_syscons.c ============================================================================== --- head/sys/powerpc/ofw/ofw_syscons.c Sat Dec 13 20:34:41 2008 (r186054) +++ head/sys/powerpc/ofw/ofw_syscons.c Sat Dec 13 20:53:57 2008 (r186055) @@ -308,36 +308,14 @@ ofwfb_init(int unit, video_adapter_t *ad { struct ofwfb_softc *sc; video_info_t *vi; - char name[64]; - ihandle_t ih; - int i; int cborder; int font_height; - int retval; sc = (struct ofwfb_softc *)adp; vi = &adp->va_info; vid_init_struct(adp, "ofwfb", -1, unit); - if (sc->sc_depth == 8) { - /* - * Install the ISO6429 colormap - older OFW systems - * don't do this by default - */ - memset(name, 0, sizeof(name)); - OF_package_to_path(sc->sc_node, name, sizeof(name)); - ih = OF_open(name); - for (i = 0; i < 16; i++) { - OF_call_method("color!", ih, 4, 1, - ofwfb_cmap[i].red, - ofwfb_cmap[i].green, - ofwfb_cmap[i].blue, - i, - &retval); - } - } - /* The default font size can be overridden by loader */ font_height = 16; TUNABLE_INT_FETCH("hw.syscons.fsize", &font_height); @@ -379,10 +357,13 @@ ofwfb_init(int unit, video_adapter_t *ad */ adp->va_window = (vm_offset_t) ofwfb_static_window; - /* Enable future font-loading and flag color support */ - adp->va_flags |= V_ADP_FONT | V_ADP_COLOR; - - ofwfb_blank_display(&sc->sc_va, V_DISPLAY_ON); + /* + * Enable future font-loading and flag color support, as well as + * adding V_ADP_MODECHANGE so that we ofwfb_set_mode() gets called + * when the X server shuts down. This enables us to get the console + * back when X disappears. + */ + adp->va_flags |= V_ADP_FONT | V_ADP_COLOR | V_ADP_MODECHANGE; ofwfb_set_mode(&sc->sc_va, 0); @@ -408,6 +389,37 @@ ofwfb_query_mode(video_adapter_t *adp, v static int ofwfb_set_mode(video_adapter_t *adp, int mode) { + struct ofwfb_softc *sc; + char name[64]; + ihandle_t ih; + int i, retval; + + sc = (struct ofwfb_softc *)adp; + + /* + * Open the display device, which will initialize it. + */ + + memset(name, 0, sizeof(name)); + OF_package_to_path(sc->sc_node, name, sizeof(name)); + ih = OF_open(name); + + if (sc->sc_depth == 8) { + /* + * Install the ISO6429 colormap - older OFW systems + * don't do this by default + */ + for (i = 0; i < 16; i++) { + OF_call_method("color!", ih, 4, 1, + ofwfb_cmap[i].red, + ofwfb_cmap[i].green, + ofwfb_cmap[i].blue, + i, + &retval); + } + } + + ofwfb_blank_display(&sc->sc_va, V_DISPLAY_ON); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 21:17:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 804C61065673; Sat, 13 Dec 2008 21:17:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E41F8FC1A; Sat, 13 Dec 2008 21:17:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDLHlCR040019; Sat, 13 Dec 2008 21:17:47 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDLHlqw040014; Sat, 13 Dec 2008 21:17:47 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812132117.mBDLHlqw040014@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Dec 2008 21:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186056 - in head/sys: dev/snp kern netgraph sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 21:17:47 -0000 Author: mav Date: Sat Dec 13 21:17:46 2008 New Revision: 186056 URL: http://svn.freebsd.org/changeset/base/186056 Log: Change ttyhook_register() second argument from thread to process pointer. Thread was not really needed there, while previous ng_tty implementation that used thread pointer had locking issues (using sx while holding mutex). Modified: head/sys/dev/snp/snp.c head/sys/kern/tty.c head/sys/netgraph/ng_tty.c head/sys/sys/ttyhook.h Modified: head/sys/dev/snp/snp.c ============================================================================== --- head/sys/dev/snp/snp.c Sat Dec 13 20:53:57 2008 (r186055) +++ head/sys/dev/snp/snp.c Sat Dec 13 21:17:46 2008 (r186056) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -246,7 +247,7 @@ snp_ioctl(struct cdev *dev, u_long cmd, sx_xunlock(&snp_register_lock); return (EBUSY); } - error = ttyhook_register(&ss->snp_tty, td, *(int *)data, + error = ttyhook_register(&ss->snp_tty, td->td_proc, *(int *)data, &snp_hook, ss); sx_xunlock(&snp_register_lock); if (error != 0) Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Sat Dec 13 20:53:57 2008 (r186055) +++ head/sys/kern/tty.c Sat Dec 13 21:17:46 2008 (r186056) @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef COMPAT_43TTY #include @@ -1673,18 +1674,24 @@ ttyhook_defrint(struct tty *tp, char c, } int -ttyhook_register(struct tty **rtp, struct thread *td, int fd, +ttyhook_register(struct tty **rtp, struct proc *p, int fd, struct ttyhook *th, void *softc) { struct tty *tp; struct file *fp; struct cdev *dev; struct cdevsw *cdp; + struct filedesc *fdp; int error; /* Validate the file descriptor. */ - if (fget(td, fd, &fp) != 0) - return (EINVAL); + if ((fdp = p->p_fd) == NULL) + return (EBADF); + FILEDESC_SLOCK(fdp); + if ((fp = fget_locked(fdp, fd)) == NULL || fp->f_ops == &badfileops) { + FILEDESC_SUNLOCK(fdp); + return (EBADF); + } /* Make sure the vnode is bound to a character device. */ error = EINVAL; @@ -1723,7 +1730,7 @@ ttyhook_register(struct tty **rtp, struc done3: tty_unlock(tp); done2: dev_relthread(dev); -done1: fdrop(fp, td); +done1: FILEDESC_SUNLOCK(fdp); return (error); } Modified: head/sys/netgraph/ng_tty.c ============================================================================== --- head/sys/netgraph/ng_tty.c Sat Dec 13 20:53:57 2008 (r186055) +++ head/sys/netgraph/ng_tty.c Sat Dec 13 21:17:46 2008 (r186056) @@ -252,7 +252,6 @@ static int ngt_rcvmsg(node_p node, item_p item, hook_p lasthook) { struct proc *p; - struct thread *td; const sc_p sc = NG_NODE_PRIVATE(node); struct ng_mesg *msg, *resp = NULL; int error = 0; @@ -266,12 +265,13 @@ ngt_rcvmsg(node_p node, item_p item, hoo return (EBUSY); p = pfind(((int *)msg->data)[0]); - if (p == NULL) + if (p == NULL || (p->p_flag & P_WEXIT)) return (ESRCH); - td = FIRST_THREAD_IN_PROC(p); - error = ttyhook_register(&sc->tp, td, ((int *)msg->data)[1], - &ngt_hook, sc); + _PHOLD(p); PROC_UNLOCK(p); + error = ttyhook_register(&sc->tp, p, ((int *)msg->data)[1], + &ngt_hook, sc); + PRELE(p); if (error != 0) return (error); break; Modified: head/sys/sys/ttyhook.h ============================================================================== --- head/sys/sys/ttyhook.h Sat Dec 13 20:53:57 2008 (r186055) +++ head/sys/sys/ttyhook.h Sat Dec 13 21:17:46 2008 (r186056) @@ -66,7 +66,7 @@ struct ttyhook { th_close_t *th_close; }; -int ttyhook_register(struct tty **, struct thread *, int, +int ttyhook_register(struct tty **, struct proc *, int, struct ttyhook *, void *); void ttyhook_unregister(struct tty *); #define ttyhook_softc(tp) ((tp)->t_hooksoftc) From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 21:59:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B79F210656D4; Sat, 13 Dec 2008 21:59:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A62A28FC17; Sat, 13 Dec 2008 21:59:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDLxIVm040801; Sat, 13 Dec 2008 21:59:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDLxIQv040799; Sat, 13 Dec 2008 21:59:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812132159.mBDLxIQv040799@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 13 Dec 2008 21:59:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186057 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 21:59:18 -0000 Author: bz Date: Sat Dec 13 21:59:18 2008 New Revision: 186057 URL: http://svn.freebsd.org/changeset/base/186057 Log: De-virtualize the MD5 context for TCP initial seq number generation and make it a function local variable like we do almost everywhere inside the kernel. Discussed with: rwatson, silby MFC after: 4 weeks Modified: head/sys/netinet/tcp_subr.c head/sys/netinet/vinet.h Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Sat Dec 13 21:17:46 2008 (r186056) +++ head/sys/netinet/tcp_subr.c Sat Dec 13 21:59:18 2008 (r186057) @@ -1486,13 +1486,13 @@ tcp6_ctlinput(int cmd, struct sockaddr * static u_char isn_secret[32]; static int isn_last_reseed; static u_int32_t isn_offset, isn_offset_old; -static MD5_CTX isn_ctx; #endif tcp_seq tcp_new_isn(struct tcpcb *tp) { INIT_VNET_INET(tp->t_vnet); + MD5_CTX isn_ctx; u_int32_t md5_buffer[4]; tcp_seq new_isn; @@ -1508,25 +1508,25 @@ tcp_new_isn(struct tcpcb *tp) } /* Compute the md5 hash and return the ISN. */ - MD5Init(&V_isn_ctx); - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->inp_fport, sizeof(u_short)); - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->inp_lport, sizeof(u_short)); + MD5Init(&isn_ctx); + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_fport, sizeof(u_short)); + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_lport, sizeof(u_short)); #ifdef INET6 if ((tp->t_inpcb->inp_vflag & INP_IPV6) != 0) { - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->in6p_faddr, + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->in6p_faddr, sizeof(struct in6_addr)); - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->in6p_laddr, + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->in6p_laddr, sizeof(struct in6_addr)); } else #endif { - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->inp_faddr, + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_faddr, sizeof(struct in_addr)); - MD5Update(&V_isn_ctx, (u_char *) &tp->t_inpcb->inp_laddr, + MD5Update(&isn_ctx, (u_char *) &tp->t_inpcb->inp_laddr, sizeof(struct in_addr)); } - MD5Update(&V_isn_ctx, (u_char *) &V_isn_secret, sizeof(V_isn_secret)); - MD5Final((u_char *) &md5_buffer, &V_isn_ctx); + MD5Update(&isn_ctx, (u_char *) &V_isn_secret, sizeof(V_isn_secret)); + MD5Final((u_char *) &md5_buffer, &isn_ctx); new_isn = (tcp_seq) md5_buffer[0]; V_isn_offset += ISN_STATIC_INCREMENT + (arc4random() & ISN_RANDOM_INCREMENT); Modified: head/sys/netinet/vinet.h ============================================================================== --- head/sys/netinet/vinet.h Sat Dec 13 21:17:46 2008 (r186056) +++ head/sys/netinet/vinet.h Sat Dec 13 21:59:18 2008 (r186057) @@ -142,7 +142,6 @@ struct vnet_inet { int _isn_last_reseed; u_int32_t _isn_offset; u_int32_t _isn_offset_old; - MD5_CTX _isn_ctx; struct inpcbhead _udb; struct inpcbinfo _udbinfo; @@ -265,7 +264,6 @@ extern struct vnet_inet vnet_inet_0; #define V_ipsendredirects VNET_INET(ipsendredirects) #define V_ipstat VNET_INET(ipstat) #define V_ipstealth VNET_INET(ipstealth) -#define V_isn_ctx VNET_INET(isn_ctx) #define V_isn_last_reseed VNET_INET(isn_last_reseed) #define V_isn_offset VNET_INET(isn_offset) #define V_isn_offset_old VNET_INET(isn_offset_old) From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:04:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B2151065673; Sat, 13 Dec 2008 22:04:53 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EE3E98FC14; Sat, 13 Dec 2008 22:04:52 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDM4qg5040951; Sat, 13 Dec 2008 22:04:52 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDM4qef040950; Sat, 13 Dec 2008 22:04:52 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200812132204.mBDM4qef040950@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 13 Dec 2008 22:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186058 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:04:53 -0000 Author: bz Date: Sat Dec 13 22:04:52 2008 New Revision: 186058 URL: http://svn.freebsd.org/changeset/base/186058 Log: Like for tcp_subr.c in r186057 make the MD5 context a function local variable in this copy of the code[1]. While here prefix the variables with 'pf_' to avoid file static global variables with colliding names that are or will be virtualized. Discussed with: rwatson, silby [1] Modified: head/sys/contrib/pf/net/pf_subr.c Modified: head/sys/contrib/pf/net/pf_subr.c ============================================================================== --- head/sys/contrib/pf/net/pf_subr.c Sat Dec 13 21:59:18 2008 (r186057) +++ head/sys/contrib/pf/net/pf_subr.c Sat Dec 13 22:04:52 2008 (r186058) @@ -116,22 +116,22 @@ __FBSDID("$FreeBSD$"); #define ISN_STATIC_INCREMENT 4096 #define ISN_RANDOM_INCREMENT (4096 - 1) -static u_char isn_secret[32]; -static int isn_last_reseed; -static u_int32_t isn_offset; -static MD5_CTX isn_ctx; +static u_char pf_isn_secret[32]; +static int pf_isn_last_reseed; +static u_int32_t pf_isn_offset; u_int32_t pf_new_isn(struct pf_state *s) { + MD5_CTX isn_ctx; u_int32_t md5_buffer[4]; u_int32_t new_isn; struct pf_state_host *src, *dst; /* Seed if this is the first use, reseed if requested. */ - if (isn_last_reseed == 0) { - read_random(&isn_secret, sizeof(isn_secret)); - isn_last_reseed = ticks; + if (pf_isn_last_reseed == 0) { + read_random(&pf_isn_secret, sizeof(pf_isn_secret)); + pf_isn_last_reseed = ticks; } if (s->direction == PF_IN) { @@ -160,11 +160,11 @@ pf_new_isn(struct pf_state *s) MD5Update(&isn_ctx, (u_char *) &src->addr, sizeof(struct in_addr)); } - MD5Update(&isn_ctx, (u_char *) &isn_secret, sizeof(isn_secret)); + MD5Update(&isn_ctx, (u_char *) &pf_isn_secret, sizeof(pf_isn_secret)); MD5Final((u_char *) &md5_buffer, &isn_ctx); new_isn = (tcp_seq) md5_buffer[0]; - isn_offset += ISN_STATIC_INCREMENT + + pf_isn_offset += ISN_STATIC_INCREMENT + (arc4random() & ISN_RANDOM_INCREMENT); - new_isn += isn_offset; + new_isn += pf_isn_offset; return (new_isn); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:05:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B7931065679; Sat, 13 Dec 2008 22:05:47 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF6868FC23; Sat, 13 Dec 2008 22:05:46 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDM5ksp041008; Sat, 13 Dec 2008 22:05:46 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDM5kPZ041007; Sat, 13 Dec 2008 22:05:46 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812132205.mBDM5kPZ041007@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Dec 2008 22:05:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186059 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:05:47 -0000 Author: mav Date: Sat Dec 13 22:05:46 2008 New Revision: 186059 URL: http://svn.freebsd.org/changeset/base/186059 Log: Remove node shutdown on tty close. This could be easily done by user-level while it's present implementation with ng_rmnode_flags() is at least incorrect. Modified: head/sys/netgraph/ng_tty.c Modified: head/sys/netgraph/ng_tty.c ============================================================================== --- head/sys/netgraph/ng_tty.c Sat Dec 13 22:04:52 2008 (r186058) +++ head/sys/netgraph/ng_tty.c Sat Dec 13 22:05:46 2008 (r186059) @@ -114,7 +114,6 @@ static th_getc_poll_t ngt_getc_poll; static th_rint_t ngt_rint; static th_rint_bypass_t ngt_rint_bypass; static th_rint_poll_t ngt_rint_poll; -static th_close_t ngt_close; static struct ttyhook ngt_hook = { .th_getc_inject = ngt_getc_inject, @@ -122,7 +121,6 @@ static struct ttyhook ngt_hook = { .th_rint = ngt_rint, .th_rint_bypass = ngt_rint_bypass, .th_rint_poll = ngt_rint_poll, - .th_close = ngt_close, }; /* Netgraph node type descriptor */ @@ -515,12 +513,3 @@ ngt_rint_poll(struct tty *tp) return (1); } -static void -ngt_close(struct tty *tp) -{ - sc_p sc = ttyhook_softc(tp); - - /* Must be queued to drop the tty lock */ - ng_rmnode_flags(sc->node, NG_QUEUE); -} - From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:26:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E117F106564A; Sat, 13 Dec 2008 22:26:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D06A38FC14; Sat, 13 Dec 2008 22:26:24 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDMQOp9041411; Sat, 13 Dec 2008 22:26:24 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDMQOGR041409; Sat, 13 Dec 2008 22:26:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200812132226.mBDMQOGR041409@svn.freebsd.org> From: Alexander Motin Date: Sat, 13 Dec 2008 22:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186060 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:26:25 -0000 Author: mav Date: Sat Dec 13 22:26:24 2008 New Revision: 186060 URL: http://svn.freebsd.org/changeset/base/186060 Log: Revert rev. 183277: Remove ng_rmnode_flags() function. ng_rmnode_self() was made to be called only while having node locked. When node is properly locked, any function call sent to it will always be queued. So turning ng_rmnode_self() into the ng_rmnode_flags() is not just meaningless, but incorrent, as it violates node locking when called outside. No objections: julian, thompsa Modified: head/sys/netgraph/netgraph.h head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/netgraph.h ============================================================================== --- head/sys/netgraph/netgraph.h Sat Dec 13 22:05:46 2008 (r186059) +++ head/sys/netgraph/netgraph.h Sat Dec 13 22:26:24 2008 (r186060) @@ -1130,7 +1130,6 @@ item_p ng_package_msg(struct ng_mesg *ms item_p ng_package_msg_self(node_p here, hook_p hook, struct ng_mesg *msg); void ng_replace_retaddr(node_p here, item_p item, ng_ID_t retaddr); int ng_rmhook_self(hook_p hook); /* if a node wants to kill a hook */ -int ng_rmnode_flags(node_p here, int flags); int ng_rmnode_self(node_p here); /* if a node wants to suicide */ int ng_rmtype(struct ng_type *tp); int ng_snd_item(item_p item, int queue); Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Sat Dec 13 22:05:46 2008 (r186059) +++ head/sys/netgraph/ng_base.c Sat Dec 13 22:26:24 2008 (r186060) @@ -1521,7 +1521,7 @@ ng_mkpeer(node_p node, const char *name, /* Shut this node down as soon as everyone is clear of it */ /* Should add arg "immediately" to jump the queue */ int -ng_rmnode_flags(node_p node, int flags) +ng_rmnode_self(node_p node) { int error; @@ -1531,16 +1531,10 @@ ng_rmnode_flags(node_p node, int flags) if (node->nd_flags & NGF_CLOSING) return (0); - error = ng_send_fn1(node, NULL, &ng_rmnode, NULL, 0, flags); + error = ng_send_fn(node, NULL, &ng_rmnode, NULL, 0); return (error); } -int -ng_rmnode_self(node_p node) -{ - return (ng_rmnode_flags(node, NG_NOFLAGS)); -} - static void ng_rmhook_part2(node_p node, hook_p hook, void *arg1, int arg2) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:41:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0432F106567B; Sat, 13 Dec 2008 22:41:37 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7B218FC1C; Sat, 13 Dec 2008 22:41:36 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDMfaa8041793; Sat, 13 Dec 2008 22:41:36 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDMfafi041792; Sat, 13 Dec 2008 22:41:36 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200812132241.mBDMfafi041792@svn.freebsd.org> From: Andrew Thompson Date: Sat, 13 Dec 2008 22:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186061 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:41:37 -0000 Author: thompsa Date: Sat Dec 13 22:41:36 2008 New Revision: 186061 URL: http://svn.freebsd.org/changeset/base/186061 Log: Dont leak the rnh lock on error. Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sat Dec 13 22:26:24 2008 (r186060) +++ head/sys/net/rtsock.c Sat Dec 13 22:41:36 2008 (r186061) @@ -673,10 +673,10 @@ route_output(struct mbuf *m, struct sock rt->rt_ifa->ifa_addr))) { RT_UNLOCK(rt); RADIX_NODE_HEAD_LOCK(rnh); - if ((error = rt_getifa_fib(&info, - rt->rt_fibnum)) != 0) - senderr(error); + error = rt_getifa_fib(&info, rt->rt_fibnum); RADIX_NODE_HEAD_UNLOCK(rnh); + if (error != 0) + senderr(error); RT_LOCK(rt); } if (info.rti_ifa != NULL && From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:43:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86E3A1065673; Sat, 13 Dec 2008 22:43:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3C98FC14; Sat, 13 Dec 2008 22:43:01 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDMh1MV041921; Sat, 13 Dec 2008 22:43:01 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDMh1b0041920; Sat, 13 Dec 2008 22:43:01 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200812132243.mBDMh1b0041920@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 13 Dec 2008 22:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186062 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:43:01 -0000 Author: des Date: Sat Dec 13 22:43:00 2008 New Revision: 186062 URL: http://svn.freebsd.org/changeset/base/186062 Log: Open vendor/openpam Modified: svnadmin/conf/paths Modified: svnadmin/conf/paths ============================================================================== --- svnadmin/conf/paths Sat Dec 13 22:41:36 2008 (r186061) +++ svnadmin/conf/paths Sat Dec 13 22:43:00 2008 (r186062) @@ -51,6 +51,7 @@ ^vendor/netcat ^vendor/ntp ^vendor/openbsm +^vendor/openpam ^vendor/pf ^vendor/sendmail ^vendor/tcsh From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 22:45:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ED431065672; Sat, 13 Dec 2008 22:45:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 575F58FC1F; Sat, 13 Dec 2008 22:45:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDMjQ1M042052; Sat, 13 Dec 2008 22:45:26 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDMjOsU042019; Sat, 13 Dec 2008 22:45:24 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200812132245.mBDMjOsU042019@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 13 Dec 2008 22:45:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186063 - in vendor/openpam: CALAMITE CALAMITE/bin CALAMITE/bin/su CALAMITE/contrib CALAMITE/doc CALAMITE/doc/man CALAMITE/include CALAMITE/include/security CALAMITE/lib CALAMITE/module... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 22:45:26 -0000 Author: des Date: Sat Dec 13 22:45:22 2008 New Revision: 186063 URL: http://svn.freebsd.org/changeset/base/186063 Log: Flatten and clean up. Added: vendor/openpam/CALAMITE/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/HISTORY vendor/openpam/CALAMITE/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/INSTALL vendor/openpam/CALAMITE/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/LICENSE vendor/openpam/CALAMITE/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/MANIFEST vendor/openpam/CALAMITE/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/Makefile vendor/openpam/CALAMITE/README (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/README vendor/openpam/CALAMITE/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CALAMITE/contrib/openpam/RELNOTES vendor/openpam/CALAMITE/bin/ - copied from r186060, vendor/openpam/CALAMITE/contrib/openpam/bin/ vendor/openpam/CALAMITE/doc/ - copied from r186060, vendor/openpam/CALAMITE/contrib/openpam/doc/ vendor/openpam/CALAMITE/include/ - copied from r186060, vendor/openpam/CALAMITE/contrib/openpam/include/ vendor/openpam/CALAMITE/lib/ - copied from r186060, vendor/openpam/CALAMITE/contrib/openpam/lib/ vendor/openpam/CALAMITE/modules/ - copied from r186060, vendor/openpam/CALAMITE/contrib/openpam/modules/ vendor/openpam/CALIOPSIS/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/HISTORY vendor/openpam/CALIOPSIS/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/INSTALL vendor/openpam/CALIOPSIS/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/LICENSE vendor/openpam/CALIOPSIS/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/MANIFEST vendor/openpam/CALIOPSIS/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/Makefile vendor/openpam/CALIOPSIS/README (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/README vendor/openpam/CALIOPSIS/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/RELNOTES vendor/openpam/CALIOPSIS/bin/ - copied from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/bin/ vendor/openpam/CALIOPSIS/doc/ - copied from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/doc/ vendor/openpam/CALIOPSIS/include/ - copied from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/include/ vendor/openpam/CALIOPSIS/lib/ - copied from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/lib/ vendor/openpam/CALIOPSIS/modules/ - copied from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/modules/ vendor/openpam/CANTALOUPE/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/HISTORY vendor/openpam/CANTALOUPE/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/INSTALL vendor/openpam/CANTALOUPE/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/LICENSE vendor/openpam/CANTALOUPE/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/MANIFEST vendor/openpam/CANTALOUPE/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/Makefile vendor/openpam/CANTALOUPE/README (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/README vendor/openpam/CANTALOUPE/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/RELNOTES vendor/openpam/CANTALOUPE/bin/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/bin/ vendor/openpam/CANTALOUPE/doc/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/doc/ vendor/openpam/CANTALOUPE/include/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/include/ vendor/openpam/CANTALOUPE/lib/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/lib/ vendor/openpam/CANTALOUPE/misc/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/misc/ vendor/openpam/CANTALOUPE/modules/ - copied from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/modules/ vendor/openpam/CELANDINE/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/HISTORY vendor/openpam/CELANDINE/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/INSTALL vendor/openpam/CELANDINE/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/LICENSE vendor/openpam/CELANDINE/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/MANIFEST vendor/openpam/CELANDINE/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/Makefile vendor/openpam/CELANDINE/README (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/README vendor/openpam/CELANDINE/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CELANDINE/contrib/openpam/RELNOTES vendor/openpam/CELANDINE/bin/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/bin/ vendor/openpam/CELANDINE/doc/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/doc/ vendor/openpam/CELANDINE/include/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/include/ vendor/openpam/CELANDINE/lib/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/lib/ vendor/openpam/CELANDINE/misc/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/misc/ vendor/openpam/CELANDINE/modules/ - copied from r186060, vendor/openpam/CELANDINE/contrib/openpam/modules/ vendor/openpam/CENTAURY/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/HISTORY vendor/openpam/CENTAURY/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/INSTALL vendor/openpam/CENTAURY/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/LICENSE vendor/openpam/CENTAURY/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/MANIFEST vendor/openpam/CENTAURY/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/Makefile vendor/openpam/CENTAURY/README (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/README vendor/openpam/CENTAURY/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CENTAURY/contrib/openpam/RELNOTES vendor/openpam/CENTAURY/bin/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/bin/ vendor/openpam/CENTAURY/doc/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/doc/ vendor/openpam/CENTAURY/include/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/include/ vendor/openpam/CENTAURY/lib/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/lib/ vendor/openpam/CENTAURY/misc/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/misc/ vendor/openpam/CENTAURY/modules/ - copied from r186060, vendor/openpam/CENTAURY/contrib/openpam/modules/ vendor/openpam/CINCHONA/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/CREDITS vendor/openpam/CINCHONA/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/HISTORY vendor/openpam/CINCHONA/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/INSTALL vendor/openpam/CINCHONA/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/LICENSE vendor/openpam/CINCHONA/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/MANIFEST vendor/openpam/CINCHONA/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/Makefile vendor/openpam/CINCHONA/README (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/README vendor/openpam/CINCHONA/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CINCHONA/contrib/openpam/RELNOTES vendor/openpam/CINCHONA/bin/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/bin/ vendor/openpam/CINCHONA/doc/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/doc/ vendor/openpam/CINCHONA/include/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/include/ vendor/openpam/CINCHONA/lib/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/lib/ vendor/openpam/CINCHONA/misc/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/misc/ vendor/openpam/CINCHONA/modules/ - copied from r186060, vendor/openpam/CINCHONA/contrib/openpam/modules/ vendor/openpam/CINERARIA/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/CREDITS vendor/openpam/CINERARIA/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/HISTORY vendor/openpam/CINERARIA/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/INSTALL vendor/openpam/CINERARIA/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/LICENSE vendor/openpam/CINERARIA/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/MANIFEST vendor/openpam/CINERARIA/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/Makefile vendor/openpam/CINERARIA/README (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/README vendor/openpam/CINERARIA/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CINERARIA/contrib/openpam/RELNOTES vendor/openpam/CINERARIA/bin/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/bin/ vendor/openpam/CINERARIA/doc/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/doc/ vendor/openpam/CINERARIA/include/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/include/ vendor/openpam/CINERARIA/lib/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/lib/ vendor/openpam/CINERARIA/misc/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/misc/ vendor/openpam/CINERARIA/modules/ - copied from r186060, vendor/openpam/CINERARIA/contrib/openpam/modules/ vendor/openpam/CINNAMON/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/CREDITS vendor/openpam/CINNAMON/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/HISTORY vendor/openpam/CINNAMON/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/INSTALL vendor/openpam/CINNAMON/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/LICENSE vendor/openpam/CINNAMON/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/MANIFEST vendor/openpam/CINNAMON/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/Makefile vendor/openpam/CINNAMON/README (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/README vendor/openpam/CINNAMON/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CINNAMON/contrib/openpam/RELNOTES vendor/openpam/CINNAMON/bin/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/bin/ vendor/openpam/CINNAMON/doc/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/doc/ vendor/openpam/CINNAMON/include/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/include/ vendor/openpam/CINNAMON/lib/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/lib/ vendor/openpam/CINNAMON/misc/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/misc/ vendor/openpam/CINNAMON/modules/ - copied from r186060, vendor/openpam/CINNAMON/contrib/openpam/modules/ vendor/openpam/CINQUEFOIL/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/CREDITS vendor/openpam/CINQUEFOIL/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/HISTORY vendor/openpam/CINQUEFOIL/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/INSTALL vendor/openpam/CINQUEFOIL/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/LICENSE vendor/openpam/CINQUEFOIL/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/MANIFEST vendor/openpam/CINQUEFOIL/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/Makefile vendor/openpam/CINQUEFOIL/README (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/README vendor/openpam/CINQUEFOIL/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/RELNOTES vendor/openpam/CINQUEFOIL/bin/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/bin/ vendor/openpam/CINQUEFOIL/doc/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/doc/ vendor/openpam/CINQUEFOIL/include/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/include/ vendor/openpam/CINQUEFOIL/lib/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/lib/ vendor/openpam/CINQUEFOIL/misc/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/misc/ vendor/openpam/CINQUEFOIL/modules/ - copied from r186060, vendor/openpam/CINQUEFOIL/contrib/openpam/modules/ vendor/openpam/CITRONELLA/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/CREDITS vendor/openpam/CITRONELLA/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/HISTORY vendor/openpam/CITRONELLA/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/INSTALL vendor/openpam/CITRONELLA/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/LICENSE vendor/openpam/CITRONELLA/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/MANIFEST vendor/openpam/CITRONELLA/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/Makefile vendor/openpam/CITRONELLA/README (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/README vendor/openpam/CITRONELLA/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CITRONELLA/contrib/openpam/RELNOTES vendor/openpam/CITRONELLA/bin/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/bin/ vendor/openpam/CITRONELLA/doc/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/doc/ vendor/openpam/CITRONELLA/include/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/include/ vendor/openpam/CITRONELLA/lib/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/lib/ vendor/openpam/CITRONELLA/misc/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/misc/ vendor/openpam/CITRONELLA/modules/ - copied from r186060, vendor/openpam/CITRONELLA/contrib/openpam/modules/ vendor/openpam/CYCLAMEN/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/CREDITS vendor/openpam/CYCLAMEN/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/HISTORY vendor/openpam/CYCLAMEN/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/INSTALL vendor/openpam/CYCLAMEN/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/LICENSE vendor/openpam/CYCLAMEN/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/MANIFEST vendor/openpam/CYCLAMEN/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/Makefile vendor/openpam/CYCLAMEN/README (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/README vendor/openpam/CYCLAMEN/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/RELNOTES vendor/openpam/CYCLAMEN/bin/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/bin/ vendor/openpam/CYCLAMEN/doc/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/doc/ vendor/openpam/CYCLAMEN/include/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/include/ vendor/openpam/CYCLAMEN/lib/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/lib/ vendor/openpam/CYCLAMEN/misc/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/misc/ vendor/openpam/CYCLAMEN/modules/ - copied from r186060, vendor/openpam/CYCLAMEN/contrib/openpam/modules/ vendor/openpam/DAFFODIL/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/CREDITS vendor/openpam/DAFFODIL/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/HISTORY vendor/openpam/DAFFODIL/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/INSTALL vendor/openpam/DAFFODIL/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/LICENSE vendor/openpam/DAFFODIL/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/MANIFEST vendor/openpam/DAFFODIL/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/Makefile vendor/openpam/DAFFODIL/README (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/README vendor/openpam/DAFFODIL/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/DAFFODIL/contrib/openpam/RELNOTES vendor/openpam/DAFFODIL/bin/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/bin/ vendor/openpam/DAFFODIL/doc/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/doc/ vendor/openpam/DAFFODIL/include/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/include/ vendor/openpam/DAFFODIL/lib/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/lib/ vendor/openpam/DAFFODIL/misc/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/misc/ vendor/openpam/DAFFODIL/modules/ - copied from r186060, vendor/openpam/DAFFODIL/contrib/openpam/modules/ vendor/openpam/DIANTHUS/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/CREDITS vendor/openpam/DIANTHUS/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/HISTORY vendor/openpam/DIANTHUS/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/INSTALL vendor/openpam/DIANTHUS/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/LICENSE vendor/openpam/DIANTHUS/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/MANIFEST vendor/openpam/DIANTHUS/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/Makefile vendor/openpam/DIANTHUS/README (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/README vendor/openpam/DIANTHUS/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/DIANTHUS/contrib/openpam/RELNOTES vendor/openpam/DIANTHUS/bin/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/bin/ vendor/openpam/DIANTHUS/doc/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/doc/ vendor/openpam/DIANTHUS/include/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/include/ vendor/openpam/DIANTHUS/lib/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/lib/ vendor/openpam/DIANTHUS/misc/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/misc/ vendor/openpam/DIANTHUS/modules/ - copied from r186060, vendor/openpam/DIANTHUS/contrib/openpam/modules/ vendor/openpam/DIGITALIS/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/CREDITS vendor/openpam/DIGITALIS/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/HISTORY vendor/openpam/DIGITALIS/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/INSTALL vendor/openpam/DIGITALIS/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/LICENSE vendor/openpam/DIGITALIS/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/MANIFEST vendor/openpam/DIGITALIS/Makefile (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/Makefile vendor/openpam/DIGITALIS/Makefile.inc (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/Makefile.inc vendor/openpam/DIGITALIS/README (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/README vendor/openpam/DIGITALIS/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/DIGITALIS/contrib/openpam/RELNOTES vendor/openpam/DIGITALIS/bin/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/bin/ vendor/openpam/DIGITALIS/doc/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/doc/ vendor/openpam/DIGITALIS/include/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/include/ vendor/openpam/DIGITALIS/lib/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/lib/ vendor/openpam/DIGITALIS/misc/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/misc/ vendor/openpam/DIGITALIS/modules/ - copied from r186060, vendor/openpam/DIGITALIS/contrib/openpam/modules/ vendor/openpam/DOGWOOD/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/CREDITS vendor/openpam/DOGWOOD/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/HISTORY vendor/openpam/DOGWOOD/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/INSTALL vendor/openpam/DOGWOOD/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/LICENSE vendor/openpam/DOGWOOD/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/MANIFEST vendor/openpam/DOGWOOD/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/Makefile.am vendor/openpam/DOGWOOD/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/Makefile.in vendor/openpam/DOGWOOD/README (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/README vendor/openpam/DOGWOOD/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/RELNOTES vendor/openpam/DOGWOOD/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/aclocal.m4 vendor/openpam/DOGWOOD/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/autogen.sh vendor/openpam/DOGWOOD/bin/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/bin/ vendor/openpam/DOGWOOD/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/config.guess vendor/openpam/DOGWOOD/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/config.h.in vendor/openpam/DOGWOOD/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/config.sub vendor/openpam/DOGWOOD/configure (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/configure vendor/openpam/DOGWOOD/configure.in (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/configure.in vendor/openpam/DOGWOOD/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/depcomp vendor/openpam/DOGWOOD/doc/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/doc/ vendor/openpam/DOGWOOD/include/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/include/ vendor/openpam/DOGWOOD/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/install-sh vendor/openpam/DOGWOOD/lib/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/lib/ vendor/openpam/DOGWOOD/ltconfig (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/ltconfig vendor/openpam/DOGWOOD/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/ltmain.sh vendor/openpam/DOGWOOD/misc/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/misc/ vendor/openpam/DOGWOOD/missing (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/missing vendor/openpam/DOGWOOD/mkinstalldirs (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/mkinstalldirs vendor/openpam/DOGWOOD/modules/ - copied from r186060, vendor/openpam/DOGWOOD/contrib/openpam/modules/ vendor/openpam/DOGWOOD/stamp-h.in (props changed) - copied unchanged from r186060, vendor/openpam/DOGWOOD/contrib/openpam/stamp-h.in vendor/openpam/EELGRASS/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/CREDITS vendor/openpam/EELGRASS/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/HISTORY vendor/openpam/EELGRASS/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/INSTALL vendor/openpam/EELGRASS/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/LICENSE vendor/openpam/EELGRASS/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/MANIFEST vendor/openpam/EELGRASS/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/Makefile.am vendor/openpam/EELGRASS/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/Makefile.in vendor/openpam/EELGRASS/README (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/README vendor/openpam/EELGRASS/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/RELNOTES vendor/openpam/EELGRASS/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/aclocal.m4 vendor/openpam/EELGRASS/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/autogen.sh vendor/openpam/EELGRASS/bin/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/bin/ vendor/openpam/EELGRASS/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/config.guess vendor/openpam/EELGRASS/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/config.h.in vendor/openpam/EELGRASS/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/config.sub vendor/openpam/EELGRASS/configure (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/configure vendor/openpam/EELGRASS/configure.in (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/configure.in vendor/openpam/EELGRASS/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/depcomp vendor/openpam/EELGRASS/doc/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/doc/ vendor/openpam/EELGRASS/include/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/include/ vendor/openpam/EELGRASS/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/install-sh vendor/openpam/EELGRASS/lib/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/lib/ vendor/openpam/EELGRASS/ltconfig (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/ltconfig vendor/openpam/EELGRASS/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/ltmain.sh vendor/openpam/EELGRASS/misc/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/misc/ vendor/openpam/EELGRASS/missing (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/missing vendor/openpam/EELGRASS/mkinstalldirs (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/mkinstalldirs vendor/openpam/EELGRASS/modules/ - copied from r186060, vendor/openpam/EELGRASS/contrib/openpam/modules/ vendor/openpam/EELGRASS/stamp-h.in (props changed) - copied unchanged from r186060, vendor/openpam/EELGRASS/contrib/openpam/stamp-h.in vendor/openpam/FETERITA/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/CREDITS vendor/openpam/FETERITA/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/HISTORY vendor/openpam/FETERITA/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/INSTALL vendor/openpam/FETERITA/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/LICENSE vendor/openpam/FETERITA/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/MANIFEST vendor/openpam/FETERITA/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/Makefile.am vendor/openpam/FETERITA/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/Makefile.in vendor/openpam/FETERITA/README (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/README vendor/openpam/FETERITA/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/RELNOTES vendor/openpam/FETERITA/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/aclocal.m4 vendor/openpam/FETERITA/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/autogen.sh vendor/openpam/FETERITA/bin/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/bin/ vendor/openpam/FETERITA/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/config.guess vendor/openpam/FETERITA/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/config.h.in vendor/openpam/FETERITA/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/config.sub vendor/openpam/FETERITA/configure (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/configure vendor/openpam/FETERITA/configure.ac (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/configure.ac vendor/openpam/FETERITA/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/depcomp vendor/openpam/FETERITA/doc/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/doc/ vendor/openpam/FETERITA/include/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/include/ vendor/openpam/FETERITA/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/install-sh vendor/openpam/FETERITA/lib/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/lib/ vendor/openpam/FETERITA/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/ltmain.sh vendor/openpam/FETERITA/misc/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/misc/ vendor/openpam/FETERITA/missing (props changed) - copied unchanged from r186060, vendor/openpam/FETERITA/contrib/openpam/missing vendor/openpam/FETERITA/modules/ - copied from r186060, vendor/openpam/FETERITA/contrib/openpam/modules/ vendor/openpam/FIGWORT/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/CREDITS vendor/openpam/FIGWORT/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/HISTORY vendor/openpam/FIGWORT/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/INSTALL vendor/openpam/FIGWORT/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/LICENSE vendor/openpam/FIGWORT/MANIFEST (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/MANIFEST vendor/openpam/FIGWORT/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/Makefile.am vendor/openpam/FIGWORT/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/Makefile.in vendor/openpam/FIGWORT/README (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/README vendor/openpam/FIGWORT/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/RELNOTES vendor/openpam/FIGWORT/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/aclocal.m4 vendor/openpam/FIGWORT/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/autogen.sh vendor/openpam/FIGWORT/bin/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/bin/ vendor/openpam/FIGWORT/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/config.guess vendor/openpam/FIGWORT/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/config.h.in vendor/openpam/FIGWORT/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/config.sub vendor/openpam/FIGWORT/configure (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/configure vendor/openpam/FIGWORT/configure.ac (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/configure.ac vendor/openpam/FIGWORT/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/depcomp vendor/openpam/FIGWORT/doc/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/doc/ vendor/openpam/FIGWORT/include/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/include/ vendor/openpam/FIGWORT/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/install-sh vendor/openpam/FIGWORT/lib/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/lib/ vendor/openpam/FIGWORT/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/ltmain.sh vendor/openpam/FIGWORT/misc/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/misc/ vendor/openpam/FIGWORT/missing (props changed) - copied unchanged from r186060, vendor/openpam/FIGWORT/contrib/openpam/missing vendor/openpam/FIGWORT/modules/ - copied from r186060, vendor/openpam/FIGWORT/contrib/openpam/modules/ vendor/openpam/HYDRANGEA/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/CREDITS vendor/openpam/HYDRANGEA/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/HISTORY vendor/openpam/HYDRANGEA/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/INSTALL vendor/openpam/HYDRANGEA/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/LICENSE vendor/openpam/HYDRANGEA/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/Makefile.am vendor/openpam/HYDRANGEA/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/Makefile.in vendor/openpam/HYDRANGEA/README (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/README vendor/openpam/HYDRANGEA/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/RELNOTES vendor/openpam/HYDRANGEA/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/aclocal.m4 vendor/openpam/HYDRANGEA/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/autogen.sh vendor/openpam/HYDRANGEA/bin/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/bin/ vendor/openpam/HYDRANGEA/compile (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/compile vendor/openpam/HYDRANGEA/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/config.guess vendor/openpam/HYDRANGEA/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/config.h.in vendor/openpam/HYDRANGEA/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/config.sub vendor/openpam/HYDRANGEA/configure (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/configure vendor/openpam/HYDRANGEA/configure.ac (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/configure.ac vendor/openpam/HYDRANGEA/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/depcomp vendor/openpam/HYDRANGEA/doc/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/doc/ vendor/openpam/HYDRANGEA/include/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/include/ vendor/openpam/HYDRANGEA/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/install-sh vendor/openpam/HYDRANGEA/lib/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/lib/ vendor/openpam/HYDRANGEA/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/ltmain.sh vendor/openpam/HYDRANGEA/misc/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/misc/ vendor/openpam/HYDRANGEA/missing (props changed) - copied unchanged from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/missing vendor/openpam/HYDRANGEA/modules/ - copied from r186060, vendor/openpam/HYDRANGEA/contrib/openpam/modules/ vendor/openpam/dist/CREDITS (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/CREDITS vendor/openpam/dist/HISTORY (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/HISTORY vendor/openpam/dist/INSTALL (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/INSTALL vendor/openpam/dist/LICENSE (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/LICENSE vendor/openpam/dist/Makefile.am (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/Makefile.am vendor/openpam/dist/Makefile.in (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/Makefile.in vendor/openpam/dist/README (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/README vendor/openpam/dist/RELNOTES (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/RELNOTES vendor/openpam/dist/aclocal.m4 (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/aclocal.m4 vendor/openpam/dist/autogen.sh (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/autogen.sh vendor/openpam/dist/bin/ - copied from r186060, vendor/openpam/dist/contrib/openpam/bin/ vendor/openpam/dist/compile (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/compile vendor/openpam/dist/config.guess (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/config.guess vendor/openpam/dist/config.h.in (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/config.h.in vendor/openpam/dist/config.sub (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/config.sub vendor/openpam/dist/configure (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/configure vendor/openpam/dist/configure.ac (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/configure.ac vendor/openpam/dist/depcomp (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/depcomp vendor/openpam/dist/doc/ - copied from r186060, vendor/openpam/dist/contrib/openpam/doc/ vendor/openpam/dist/include/ - copied from r186060, vendor/openpam/dist/contrib/openpam/include/ vendor/openpam/dist/install-sh (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/install-sh vendor/openpam/dist/lib/ - copied from r186060, vendor/openpam/dist/contrib/openpam/lib/ vendor/openpam/dist/ltmain.sh (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/ltmain.sh vendor/openpam/dist/misc/ - copied from r186060, vendor/openpam/dist/contrib/openpam/misc/ vendor/openpam/dist/missing (props changed) - copied unchanged from r186060, vendor/openpam/dist/contrib/openpam/missing vendor/openpam/dist/modules/ - copied from r186060, vendor/openpam/dist/contrib/openpam/modules/ Deleted: vendor/openpam/CALAMITE/contrib/ vendor/openpam/CALIOPSIS/contrib/ vendor/openpam/CANTALOUPE/contrib/ vendor/openpam/CELANDINE/contrib/ vendor/openpam/CENTAURY/contrib/ vendor/openpam/CINCHONA/contrib/ vendor/openpam/CINERARIA/contrib/ vendor/openpam/CINNAMON/contrib/ vendor/openpam/CINQUEFOIL/contrib/ vendor/openpam/CITRONELLA/contrib/ vendor/openpam/CYCLAMEN/contrib/ vendor/openpam/DAFFODIL/contrib/ vendor/openpam/DIANTHUS/contrib/ vendor/openpam/DIGITALIS/contrib/ vendor/openpam/DOGWOOD/contrib/ vendor/openpam/EELGRASS/contrib/ vendor/openpam/FETERITA/contrib/ vendor/openpam/FIGWORT/contrib/ vendor/openpam/HYDRANGEA/contrib/ vendor/openpam/dist/contrib/ Modified: vendor/openpam/CALAMITE/bin/Makefile (props changed) vendor/openpam/CALAMITE/bin/su/Makefile (props changed) vendor/openpam/CALAMITE/bin/su/su.c (props changed) vendor/openpam/CALAMITE/doc/Makefile (props changed) vendor/openpam/CALAMITE/doc/man/Makefile (props changed) vendor/openpam/CALAMITE/doc/man/pam.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_close_session.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_end.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_error.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_get_data.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_get_item.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_get_user.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_getenv.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_info.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_open_session.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_prompt.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_putenv.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_set_data.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_set_item.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_setcred.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_setenv.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_start.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_strerror.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_verror.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CALAMITE/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CALAMITE/include/security/openpam.h (props changed) vendor/openpam/CALAMITE/include/security/pam_appl.h (props changed) vendor/openpam/CALAMITE/include/security/pam_constants.h (props changed) vendor/openpam/CALAMITE/include/security/pam_modules.h (props changed) vendor/openpam/CALAMITE/include/security/pam_types.h (props changed) vendor/openpam/CALAMITE/lib/Makefile (props changed) vendor/openpam/CALAMITE/lib/openpam_dispatch.c (props changed) vendor/openpam/CALAMITE/lib/openpam_findenv.c (props changed) vendor/openpam/CALAMITE/lib/openpam_impl.h (props changed) vendor/openpam/CALAMITE/lib/openpam_load.c (props changed) vendor/openpam/CALAMITE/lib/openpam_log.c (props changed) vendor/openpam/CALAMITE/lib/openpam_ttyconv.c (props changed) vendor/openpam/CALAMITE/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CALAMITE/lib/pam_authenticate.c (props changed) vendor/openpam/CALAMITE/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CALAMITE/lib/pam_chauthtok.c (props changed) vendor/openpam/CALAMITE/lib/pam_close_session.c (props changed) vendor/openpam/CALAMITE/lib/pam_end.c (props changed) vendor/openpam/CALAMITE/lib/pam_error.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_authtok.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_data.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_item.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CALAMITE/lib/pam_get_user.c (props changed) vendor/openpam/CALAMITE/lib/pam_getenv.c (props changed) vendor/openpam/CALAMITE/lib/pam_getenvlist.c (props changed) vendor/openpam/CALAMITE/lib/pam_info.c (props changed) vendor/openpam/CALAMITE/lib/pam_open_session.c (props changed) vendor/openpam/CALAMITE/lib/pam_prompt.c (props changed) vendor/openpam/CALAMITE/lib/pam_putenv.c (props changed) vendor/openpam/CALAMITE/lib/pam_set_data.c (props changed) vendor/openpam/CALAMITE/lib/pam_set_item.c (props changed) vendor/openpam/CALAMITE/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CALAMITE/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CALAMITE/lib/pam_setcred.c (props changed) vendor/openpam/CALAMITE/lib/pam_setenv.c (props changed) vendor/openpam/CALAMITE/lib/pam_start.c (props changed) vendor/openpam/CALAMITE/lib/pam_strerror.c (props changed) vendor/openpam/CALAMITE/lib/pam_verror.c (props changed) vendor/openpam/CALAMITE/lib/pam_vinfo.c (props changed) vendor/openpam/CALAMITE/lib/pam_vprompt.c (props changed) vendor/openpam/CALAMITE/modules/Makefile (props changed) vendor/openpam/CALAMITE/modules/pam_deny/Makefile (props changed) vendor/openpam/CALAMITE/modules/pam_deny/pam_deny.c (contents, props changed) vendor/openpam/CALAMITE/modules/pam_dummy/Makefile (props changed) vendor/openpam/CALAMITE/modules/pam_dummy/pam_dummy.c (contents, props changed) vendor/openpam/CALAMITE/modules/pam_permit/Makefile (props changed) vendor/openpam/CALAMITE/modules/pam_permit/pam_permit.c (contents, props changed) vendor/openpam/CALIOPSIS/bin/Makefile (props changed) vendor/openpam/CALIOPSIS/bin/su/Makefile (props changed) vendor/openpam/CALIOPSIS/bin/su/su.c (props changed) vendor/openpam/CALIOPSIS/doc/Makefile (props changed) vendor/openpam/CALIOPSIS/doc/man/Makefile (props changed) vendor/openpam/CALIOPSIS/doc/man/pam.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_close_session.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_end.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_error.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_get_data.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_get_item.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_get_user.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_getenv.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_info.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_open_session.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_prompt.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_putenv.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_set_data.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_set_item.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_setcred.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_setenv.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_start.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_strerror.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_verror.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CALIOPSIS/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CALIOPSIS/include/security/openpam.h (props changed) vendor/openpam/CALIOPSIS/include/security/pam_appl.h (props changed) vendor/openpam/CALIOPSIS/include/security/pam_constants.h (props changed) vendor/openpam/CALIOPSIS/include/security/pam_modules.h (props changed) vendor/openpam/CALIOPSIS/include/security/pam_types.h (props changed) vendor/openpam/CALIOPSIS/lib/Makefile (props changed) vendor/openpam/CALIOPSIS/lib/openpam_dispatch.c (props changed) vendor/openpam/CALIOPSIS/lib/openpam_findenv.c (props changed) vendor/openpam/CALIOPSIS/lib/openpam_impl.h (props changed) vendor/openpam/CALIOPSIS/lib/openpam_load.c (props changed) vendor/openpam/CALIOPSIS/lib/openpam_log.c (props changed) vendor/openpam/CALIOPSIS/lib/openpam_ttyconv.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_authenticate.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_chauthtok.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_close_session.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_end.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_error.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_authtok.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_data.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_item.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_get_user.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_getenv.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_getenvlist.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_info.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_open_session.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_prompt.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_putenv.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_set_data.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_set_item.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_setcred.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_setenv.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_start.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_strerror.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_verror.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_vinfo.c (props changed) vendor/openpam/CALIOPSIS/lib/pam_vprompt.c (props changed) vendor/openpam/CALIOPSIS/modules/Makefile (props changed) vendor/openpam/CALIOPSIS/modules/pam_deny/Makefile (props changed) vendor/openpam/CALIOPSIS/modules/pam_deny/pam_deny.c (contents, props changed) vendor/openpam/CALIOPSIS/modules/pam_dummy/Makefile (props changed) vendor/openpam/CALIOPSIS/modules/pam_dummy/pam_dummy.c (contents, props changed) vendor/openpam/CALIOPSIS/modules/pam_permit/Makefile (props changed) vendor/openpam/CALIOPSIS/modules/pam_permit/pam_permit.c (contents, props changed) vendor/openpam/CANTALOUPE/bin/Makefile (props changed) vendor/openpam/CANTALOUPE/bin/su/Makefile (props changed) vendor/openpam/CANTALOUPE/bin/su/su.c (props changed) vendor/openpam/CANTALOUPE/doc/Makefile (props changed) vendor/openpam/CANTALOUPE/doc/man/Makefile (props changed) vendor/openpam/CANTALOUPE/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/openpam_log.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_close_session.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_end.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_error.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_get_data.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_get_item.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_get_user.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_getenv.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_info.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_open_session.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_prompt.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_putenv.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_set_data.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_set_item.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_setcred.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_setenv.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_start.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_strerror.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_verror.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CANTALOUPE/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CANTALOUPE/include/security/openpam.h (props changed) vendor/openpam/CANTALOUPE/include/security/pam_appl.h (props changed) vendor/openpam/CANTALOUPE/include/security/pam_constants.h (props changed) vendor/openpam/CANTALOUPE/include/security/pam_modules.h (props changed) vendor/openpam/CANTALOUPE/include/security/pam_types.h (props changed) vendor/openpam/CANTALOUPE/lib/Makefile (props changed) vendor/openpam/CANTALOUPE/lib/openpam_dispatch.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_findenv.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_get_option.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_impl.h (props changed) vendor/openpam/CANTALOUPE/lib/openpam_load.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_log.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_set_option.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_static.c (props changed) vendor/openpam/CANTALOUPE/lib/openpam_ttyconv.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_authenticate.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_chauthtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_close_session.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_end.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_error.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_authtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_data.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_item.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_get_user.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_getenv.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_getenvlist.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_info.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_open_session.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_prompt.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_putenv.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_set_data.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_set_item.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_setcred.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_setenv.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_close_session.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_open_session.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_sm_setcred.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_start.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_strerror.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_verror.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_vinfo.c (props changed) vendor/openpam/CANTALOUPE/lib/pam_vprompt.c (props changed) vendor/openpam/CANTALOUPE/misc/gendoc.pl (props changed) vendor/openpam/CANTALOUPE/modules/Makefile (props changed) vendor/openpam/CANTALOUPE/modules/pam_deny/Makefile (props changed) vendor/openpam/CANTALOUPE/modules/pam_deny/pam_deny.c (contents, props changed) vendor/openpam/CANTALOUPE/modules/pam_dummy/Makefile (props changed) vendor/openpam/CANTALOUPE/modules/pam_dummy/pam_dummy.c (contents, props changed) vendor/openpam/CANTALOUPE/modules/pam_permit/Makefile (props changed) vendor/openpam/CANTALOUPE/modules/pam_permit/pam_permit.c (contents, props changed) vendor/openpam/CELANDINE/bin/Makefile (props changed) vendor/openpam/CELANDINE/bin/su/Makefile (props changed) vendor/openpam/CELANDINE/bin/su/su.c (props changed) vendor/openpam/CELANDINE/doc/Makefile (props changed) vendor/openpam/CELANDINE/doc/man/Makefile (props changed) vendor/openpam/CELANDINE/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CELANDINE/doc/man/openpam_log.3 (props changed) vendor/openpam/CELANDINE/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CELANDINE/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_close_session.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_end.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_error.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_get_data.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_get_item.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_get_user.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_getenv.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_info.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_open_session.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_prompt.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_putenv.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_set_data.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_set_item.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_setcred.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_setenv.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_start.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_strerror.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_verror.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CELANDINE/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CELANDINE/include/security/openpam.h (props changed) vendor/openpam/CELANDINE/include/security/pam_appl.h (props changed) vendor/openpam/CELANDINE/include/security/pam_constants.h (props changed) vendor/openpam/CELANDINE/include/security/pam_modules.h (props changed) vendor/openpam/CELANDINE/include/security/pam_types.h (props changed) vendor/openpam/CELANDINE/lib/Makefile (props changed) vendor/openpam/CELANDINE/lib/openpam_dispatch.c (props changed) vendor/openpam/CELANDINE/lib/openpam_dynamic.c (props changed) vendor/openpam/CELANDINE/lib/openpam_findenv.c (props changed) vendor/openpam/CELANDINE/lib/openpam_get_option.c (props changed) vendor/openpam/CELANDINE/lib/openpam_impl.h (props changed) vendor/openpam/CELANDINE/lib/openpam_load.c (props changed) vendor/openpam/CELANDINE/lib/openpam_log.c (props changed) vendor/openpam/CELANDINE/lib/openpam_set_option.c (props changed) vendor/openpam/CELANDINE/lib/openpam_static.c (props changed) vendor/openpam/CELANDINE/lib/openpam_ttyconv.c (props changed) vendor/openpam/CELANDINE/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CELANDINE/lib/pam_authenticate.c (props changed) vendor/openpam/CELANDINE/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CELANDINE/lib/pam_chauthtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_close_session.c (props changed) vendor/openpam/CELANDINE/lib/pam_end.c (props changed) vendor/openpam/CELANDINE/lib/pam_error.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_authtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_data.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_item.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CELANDINE/lib/pam_get_user.c (props changed) vendor/openpam/CELANDINE/lib/pam_getenv.c (props changed) vendor/openpam/CELANDINE/lib/pam_getenvlist.c (props changed) vendor/openpam/CELANDINE/lib/pam_info.c (props changed) vendor/openpam/CELANDINE/lib/pam_open_session.c (props changed) vendor/openpam/CELANDINE/lib/pam_prompt.c (props changed) vendor/openpam/CELANDINE/lib/pam_putenv.c (props changed) vendor/openpam/CELANDINE/lib/pam_set_data.c (props changed) vendor/openpam/CELANDINE/lib/pam_set_item.c (props changed) vendor/openpam/CELANDINE/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CELANDINE/lib/pam_setcred.c (props changed) vendor/openpam/CELANDINE/lib/pam_setenv.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_close_session.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_open_session.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CELANDINE/lib/pam_sm_setcred.c (props changed) vendor/openpam/CELANDINE/lib/pam_start.c (props changed) vendor/openpam/CELANDINE/lib/pam_strerror.c (props changed) vendor/openpam/CELANDINE/lib/pam_verror.c (props changed) vendor/openpam/CELANDINE/lib/pam_vinfo.c (props changed) vendor/openpam/CELANDINE/lib/pam_vprompt.c (props changed) vendor/openpam/CELANDINE/misc/gendoc.pl (props changed) vendor/openpam/CELANDINE/modules/Makefile (props changed) vendor/openpam/CELANDINE/modules/pam_deny/Makefile (props changed) vendor/openpam/CELANDINE/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CELANDINE/modules/pam_dummy/Makefile (props changed) vendor/openpam/CELANDINE/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CELANDINE/modules/pam_permit/Makefile (props changed) vendor/openpam/CELANDINE/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CENTAURY/bin/Makefile (props changed) vendor/openpam/CENTAURY/bin/su/Makefile (props changed) vendor/openpam/CENTAURY/bin/su/su.c (props changed) vendor/openpam/CENTAURY/doc/Makefile (props changed) vendor/openpam/CENTAURY/doc/man/Makefile (props changed) vendor/openpam/CENTAURY/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CENTAURY/doc/man/openpam_log.3 (props changed) vendor/openpam/CENTAURY/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CENTAURY/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_close_session.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_end.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_error.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_get_data.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_get_item.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_get_user.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_getenv.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_info.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_open_session.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_prompt.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_putenv.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_set_data.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_set_item.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_setcred.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_setenv.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_start.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_strerror.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_verror.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CENTAURY/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CENTAURY/include/security/openpam.h (props changed) vendor/openpam/CENTAURY/include/security/pam_appl.h (props changed) vendor/openpam/CENTAURY/include/security/pam_constants.h (props changed) vendor/openpam/CENTAURY/include/security/pam_modules.h (props changed) vendor/openpam/CENTAURY/include/security/pam_types.h (props changed) vendor/openpam/CENTAURY/lib/Makefile (props changed) vendor/openpam/CENTAURY/lib/openpam_dispatch.c (props changed) vendor/openpam/CENTAURY/lib/openpam_dynamic.c (props changed) vendor/openpam/CENTAURY/lib/openpam_findenv.c (props changed) vendor/openpam/CENTAURY/lib/openpam_get_option.c (props changed) vendor/openpam/CENTAURY/lib/openpam_impl.h (props changed) vendor/openpam/CENTAURY/lib/openpam_load.c (props changed) vendor/openpam/CENTAURY/lib/openpam_log.c (props changed) vendor/openpam/CENTAURY/lib/openpam_set_option.c (props changed) vendor/openpam/CENTAURY/lib/openpam_static.c (props changed) vendor/openpam/CENTAURY/lib/openpam_ttyconv.c (props changed) vendor/openpam/CENTAURY/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CENTAURY/lib/pam_authenticate.c (props changed) vendor/openpam/CENTAURY/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CENTAURY/lib/pam_chauthtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_close_session.c (props changed) vendor/openpam/CENTAURY/lib/pam_end.c (props changed) vendor/openpam/CENTAURY/lib/pam_error.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_authtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_data.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_item.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CENTAURY/lib/pam_get_user.c (props changed) vendor/openpam/CENTAURY/lib/pam_getenv.c (props changed) vendor/openpam/CENTAURY/lib/pam_getenvlist.c (props changed) vendor/openpam/CENTAURY/lib/pam_info.c (props changed) vendor/openpam/CENTAURY/lib/pam_open_session.c (props changed) vendor/openpam/CENTAURY/lib/pam_prompt.c (props changed) vendor/openpam/CENTAURY/lib/pam_putenv.c (props changed) vendor/openpam/CENTAURY/lib/pam_set_data.c (props changed) vendor/openpam/CENTAURY/lib/pam_set_item.c (props changed) vendor/openpam/CENTAURY/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CENTAURY/lib/pam_setcred.c (props changed) vendor/openpam/CENTAURY/lib/pam_setenv.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_close_session.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_open_session.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CENTAURY/lib/pam_sm_setcred.c (props changed) vendor/openpam/CENTAURY/lib/pam_start.c (props changed) vendor/openpam/CENTAURY/lib/pam_strerror.c (props changed) vendor/openpam/CENTAURY/lib/pam_verror.c (props changed) vendor/openpam/CENTAURY/lib/pam_vinfo.c (props changed) vendor/openpam/CENTAURY/lib/pam_vprompt.c (props changed) vendor/openpam/CENTAURY/misc/gendoc.pl (props changed) vendor/openpam/CENTAURY/modules/Makefile (props changed) vendor/openpam/CENTAURY/modules/pam_deny/Makefile (props changed) vendor/openpam/CENTAURY/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CENTAURY/modules/pam_dummy/Makefile (props changed) vendor/openpam/CENTAURY/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CENTAURY/modules/pam_permit/Makefile (props changed) vendor/openpam/CENTAURY/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CINCHONA/bin/Makefile (props changed) vendor/openpam/CINCHONA/bin/su/Makefile (props changed) vendor/openpam/CINCHONA/bin/su/su.c (props changed) vendor/openpam/CINCHONA/doc/Makefile (props changed) vendor/openpam/CINCHONA/doc/man/Makefile (props changed) vendor/openpam/CINCHONA/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_log.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CINCHONA/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_close_session.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_end.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_error.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_get_data.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_get_item.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_get_user.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_getenv.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_info.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_open_session.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_prompt.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_putenv.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_set_data.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_set_item.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_setcred.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_setenv.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_start.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_strerror.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_verror.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CINCHONA/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CINCHONA/include/security/openpam.h (props changed) vendor/openpam/CINCHONA/include/security/pam_appl.h (props changed) vendor/openpam/CINCHONA/include/security/pam_constants.h (props changed) vendor/openpam/CINCHONA/include/security/pam_modules.h (props changed) vendor/openpam/CINCHONA/include/security/pam_types.h (props changed) vendor/openpam/CINCHONA/lib/Makefile (props changed) vendor/openpam/CINCHONA/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CINCHONA/lib/openpam_dispatch.c (props changed) vendor/openpam/CINCHONA/lib/openpam_dynamic.c (props changed) vendor/openpam/CINCHONA/lib/openpam_findenv.c (props changed) vendor/openpam/CINCHONA/lib/openpam_free_data.c (props changed) vendor/openpam/CINCHONA/lib/openpam_get_option.c (props changed) vendor/openpam/CINCHONA/lib/openpam_impl.h (props changed) vendor/openpam/CINCHONA/lib/openpam_load.c (props changed) vendor/openpam/CINCHONA/lib/openpam_log.c (props changed) vendor/openpam/CINCHONA/lib/openpam_restore_cred.c (props changed) vendor/openpam/CINCHONA/lib/openpam_set_option.c (props changed) vendor/openpam/CINCHONA/lib/openpam_static.c (props changed) vendor/openpam/CINCHONA/lib/openpam_ttyconv.c (props changed) vendor/openpam/CINCHONA/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CINCHONA/lib/pam_authenticate.c (props changed) vendor/openpam/CINCHONA/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CINCHONA/lib/pam_chauthtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_close_session.c (props changed) vendor/openpam/CINCHONA/lib/pam_end.c (props changed) vendor/openpam/CINCHONA/lib/pam_error.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_authtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_data.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_item.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CINCHONA/lib/pam_get_user.c (props changed) vendor/openpam/CINCHONA/lib/pam_getenv.c (props changed) vendor/openpam/CINCHONA/lib/pam_getenvlist.c (props changed) vendor/openpam/CINCHONA/lib/pam_info.c (props changed) vendor/openpam/CINCHONA/lib/pam_open_session.c (props changed) vendor/openpam/CINCHONA/lib/pam_prompt.c (props changed) vendor/openpam/CINCHONA/lib/pam_putenv.c (props changed) vendor/openpam/CINCHONA/lib/pam_set_data.c (props changed) vendor/openpam/CINCHONA/lib/pam_set_item.c (props changed) vendor/openpam/CINCHONA/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CINCHONA/lib/pam_setcred.c (props changed) vendor/openpam/CINCHONA/lib/pam_setenv.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_close_session.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_open_session.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CINCHONA/lib/pam_sm_setcred.c (props changed) vendor/openpam/CINCHONA/lib/pam_start.c (props changed) vendor/openpam/CINCHONA/lib/pam_strerror.c (props changed) vendor/openpam/CINCHONA/lib/pam_verror.c (props changed) vendor/openpam/CINCHONA/lib/pam_vinfo.c (props changed) vendor/openpam/CINCHONA/lib/pam_vprompt.c (props changed) vendor/openpam/CINCHONA/misc/gendoc.pl (props changed) vendor/openpam/CINCHONA/modules/Makefile (props changed) vendor/openpam/CINCHONA/modules/pam_deny/Makefile (props changed) vendor/openpam/CINCHONA/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CINCHONA/modules/pam_dummy/Makefile (props changed) vendor/openpam/CINCHONA/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CINCHONA/modules/pam_permit/Makefile (props changed) vendor/openpam/CINCHONA/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CINERARIA/bin/Makefile (props changed) vendor/openpam/CINERARIA/bin/su/Makefile (props changed) vendor/openpam/CINERARIA/bin/su/su.c (props changed) vendor/openpam/CINERARIA/doc/Makefile (props changed) vendor/openpam/CINERARIA/doc/man/Makefile (props changed) vendor/openpam/CINERARIA/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_log.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CINERARIA/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_close_session.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_end.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_error.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_get_data.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_get_item.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_get_user.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_getenv.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_info.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_open_session.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_prompt.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_putenv.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_set_data.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_set_item.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_setcred.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_setenv.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_start.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_strerror.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_verror.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CINERARIA/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CINERARIA/include/security/openpam.h (props changed) vendor/openpam/CINERARIA/include/security/openpam_version.h (props changed) vendor/openpam/CINERARIA/include/security/pam_appl.h (props changed) vendor/openpam/CINERARIA/include/security/pam_constants.h (props changed) vendor/openpam/CINERARIA/include/security/pam_modules.h (props changed) vendor/openpam/CINERARIA/include/security/pam_types.h (props changed) vendor/openpam/CINERARIA/lib/Makefile (props changed) vendor/openpam/CINERARIA/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CINERARIA/lib/openpam_configure.c (props changed) vendor/openpam/CINERARIA/lib/openpam_dispatch.c (props changed) vendor/openpam/CINERARIA/lib/openpam_dynamic.c (props changed) vendor/openpam/CINERARIA/lib/openpam_findenv.c (props changed) vendor/openpam/CINERARIA/lib/openpam_free_data.c (props changed) vendor/openpam/CINERARIA/lib/openpam_get_option.c (props changed) vendor/openpam/CINERARIA/lib/openpam_impl.h (props changed) vendor/openpam/CINERARIA/lib/openpam_load.c (props changed) vendor/openpam/CINERARIA/lib/openpam_log.c (props changed) vendor/openpam/CINERARIA/lib/openpam_restore_cred.c (props changed) vendor/openpam/CINERARIA/lib/openpam_set_option.c (props changed) vendor/openpam/CINERARIA/lib/openpam_static.c (props changed) vendor/openpam/CINERARIA/lib/openpam_ttyconv.c (props changed) vendor/openpam/CINERARIA/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CINERARIA/lib/pam_authenticate.c (props changed) vendor/openpam/CINERARIA/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CINERARIA/lib/pam_chauthtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_close_session.c (props changed) vendor/openpam/CINERARIA/lib/pam_end.c (props changed) vendor/openpam/CINERARIA/lib/pam_error.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_authtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_data.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_item.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CINERARIA/lib/pam_get_user.c (props changed) vendor/openpam/CINERARIA/lib/pam_getenv.c (props changed) vendor/openpam/CINERARIA/lib/pam_getenvlist.c (props changed) vendor/openpam/CINERARIA/lib/pam_info.c (props changed) vendor/openpam/CINERARIA/lib/pam_open_session.c (props changed) vendor/openpam/CINERARIA/lib/pam_prompt.c (props changed) vendor/openpam/CINERARIA/lib/pam_putenv.c (props changed) vendor/openpam/CINERARIA/lib/pam_set_data.c (props changed) vendor/openpam/CINERARIA/lib/pam_set_item.c (props changed) vendor/openpam/CINERARIA/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CINERARIA/lib/pam_setcred.c (props changed) vendor/openpam/CINERARIA/lib/pam_setenv.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_close_session.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_open_session.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CINERARIA/lib/pam_sm_setcred.c (props changed) vendor/openpam/CINERARIA/lib/pam_start.c (props changed) vendor/openpam/CINERARIA/lib/pam_strerror.c (props changed) vendor/openpam/CINERARIA/lib/pam_verror.c (props changed) vendor/openpam/CINERARIA/lib/pam_vinfo.c (props changed) vendor/openpam/CINERARIA/lib/pam_vprompt.c (props changed) vendor/openpam/CINERARIA/misc/gendoc.pl (props changed) vendor/openpam/CINERARIA/modules/Makefile (props changed) vendor/openpam/CINERARIA/modules/pam_deny/Makefile (props changed) vendor/openpam/CINERARIA/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CINERARIA/modules/pam_dummy/Makefile (props changed) vendor/openpam/CINERARIA/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CINERARIA/modules/pam_permit/Makefile (props changed) vendor/openpam/CINERARIA/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CINNAMON/bin/Makefile (props changed) vendor/openpam/CINNAMON/bin/su/Makefile (props changed) vendor/openpam/CINNAMON/bin/su/su.c (props changed) vendor/openpam/CINNAMON/doc/Makefile (props changed) vendor/openpam/CINNAMON/doc/man/Makefile (props changed) vendor/openpam/CINNAMON/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_log.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CINNAMON/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_close_session.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_end.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_error.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_get_data.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_get_item.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_get_user.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_getenv.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_info.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_open_session.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_prompt.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_putenv.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_set_data.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_set_item.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_setcred.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_setenv.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_start.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_strerror.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_verror.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CINNAMON/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CINNAMON/include/security/openpam.h (props changed) vendor/openpam/CINNAMON/include/security/openpam_version.h (props changed) vendor/openpam/CINNAMON/include/security/pam_appl.h (props changed) vendor/openpam/CINNAMON/include/security/pam_constants.h (props changed) vendor/openpam/CINNAMON/include/security/pam_modules.h (props changed) vendor/openpam/CINNAMON/include/security/pam_types.h (props changed) vendor/openpam/CINNAMON/lib/Makefile (props changed) vendor/openpam/CINNAMON/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CINNAMON/lib/openpam_configure.c (props changed) vendor/openpam/CINNAMON/lib/openpam_dispatch.c (props changed) vendor/openpam/CINNAMON/lib/openpam_dynamic.c (props changed) vendor/openpam/CINNAMON/lib/openpam_findenv.c (props changed) vendor/openpam/CINNAMON/lib/openpam_free_data.c (props changed) vendor/openpam/CINNAMON/lib/openpam_get_option.c (props changed) vendor/openpam/CINNAMON/lib/openpam_impl.h (props changed) vendor/openpam/CINNAMON/lib/openpam_load.c (props changed) vendor/openpam/CINNAMON/lib/openpam_log.c (props changed) vendor/openpam/CINNAMON/lib/openpam_nullconv.c (props changed) vendor/openpam/CINNAMON/lib/openpam_restore_cred.c (props changed) vendor/openpam/CINNAMON/lib/openpam_set_option.c (props changed) vendor/openpam/CINNAMON/lib/openpam_static.c (props changed) vendor/openpam/CINNAMON/lib/openpam_ttyconv.c (props changed) vendor/openpam/CINNAMON/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CINNAMON/lib/pam_authenticate.c (props changed) vendor/openpam/CINNAMON/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CINNAMON/lib/pam_chauthtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_close_session.c (props changed) vendor/openpam/CINNAMON/lib/pam_end.c (props changed) vendor/openpam/CINNAMON/lib/pam_error.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_authtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_data.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_item.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CINNAMON/lib/pam_get_user.c (props changed) vendor/openpam/CINNAMON/lib/pam_getenv.c (props changed) vendor/openpam/CINNAMON/lib/pam_getenvlist.c (props changed) vendor/openpam/CINNAMON/lib/pam_info.c (props changed) vendor/openpam/CINNAMON/lib/pam_open_session.c (props changed) vendor/openpam/CINNAMON/lib/pam_prompt.c (props changed) vendor/openpam/CINNAMON/lib/pam_putenv.c (props changed) vendor/openpam/CINNAMON/lib/pam_set_data.c (props changed) vendor/openpam/CINNAMON/lib/pam_set_item.c (props changed) vendor/openpam/CINNAMON/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CINNAMON/lib/pam_setcred.c (props changed) vendor/openpam/CINNAMON/lib/pam_setenv.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_close_session.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_open_session.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CINNAMON/lib/pam_sm_setcred.c (props changed) vendor/openpam/CINNAMON/lib/pam_start.c (props changed) vendor/openpam/CINNAMON/lib/pam_strerror.c (props changed) vendor/openpam/CINNAMON/lib/pam_verror.c (props changed) vendor/openpam/CINNAMON/lib/pam_vinfo.c (props changed) vendor/openpam/CINNAMON/lib/pam_vprompt.c (props changed) vendor/openpam/CINNAMON/misc/gendoc.pl (props changed) vendor/openpam/CINNAMON/modules/Makefile (props changed) vendor/openpam/CINNAMON/modules/pam_deny/Makefile (props changed) vendor/openpam/CINNAMON/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CINNAMON/modules/pam_dummy/Makefile (props changed) vendor/openpam/CINNAMON/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CINNAMON/modules/pam_permit/Makefile (props changed) vendor/openpam/CINNAMON/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CINQUEFOIL/bin/Makefile (props changed) vendor/openpam/CINQUEFOIL/bin/su/Makefile (props changed) vendor/openpam/CINQUEFOIL/bin/su/su.c (props changed) vendor/openpam/CINQUEFOIL/doc/Makefile (props changed) vendor/openpam/CINQUEFOIL/doc/man/Makefile (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_log.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_close_session.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_end.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_error.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_get_data.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_get_item.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_get_user.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_getenv.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_info.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_open_session.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_prompt.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_putenv.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_set_data.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_set_item.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_setcred.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_setenv.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_start.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_strerror.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_verror.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CINQUEFOIL/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CINQUEFOIL/include/security/openpam.h (props changed) vendor/openpam/CINQUEFOIL/include/security/openpam_version.h (props changed) vendor/openpam/CINQUEFOIL/include/security/pam_appl.h (props changed) vendor/openpam/CINQUEFOIL/include/security/pam_constants.h (props changed) vendor/openpam/CINQUEFOIL/include/security/pam_modules.h (props changed) vendor/openpam/CINQUEFOIL/include/security/pam_types.h (props changed) vendor/openpam/CINQUEFOIL/lib/Makefile (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_configure.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_dispatch.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_dynamic.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_findenv.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_free_data.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_get_option.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_impl.h (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_load.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_log.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_nullconv.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_restore_cred.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_set_option.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_static.c (props changed) vendor/openpam/CINQUEFOIL/lib/openpam_ttyconv.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_authenticate.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_chauthtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_close_session.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_end.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_error.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_authtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_data.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_item.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_get_user.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_getenv.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_getenvlist.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_info.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_open_session.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_prompt.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_putenv.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_set_data.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_set_item.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_setcred.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_setenv.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_close_session.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_open_session.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_sm_setcred.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_start.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_strerror.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_verror.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_vinfo.c (props changed) vendor/openpam/CINQUEFOIL/lib/pam_vprompt.c (props changed) vendor/openpam/CINQUEFOIL/misc/gendoc.pl (props changed) vendor/openpam/CINQUEFOIL/modules/Makefile (props changed) vendor/openpam/CINQUEFOIL/modules/pam_deny/Makefile (props changed) vendor/openpam/CINQUEFOIL/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CINQUEFOIL/modules/pam_dummy/Makefile (props changed) vendor/openpam/CINQUEFOIL/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CINQUEFOIL/modules/pam_permit/Makefile (props changed) vendor/openpam/CINQUEFOIL/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CITRONELLA/bin/Makefile (props changed) vendor/openpam/CITRONELLA/bin/su/Makefile (props changed) vendor/openpam/CITRONELLA/bin/su/su.c (props changed) vendor/openpam/CITRONELLA/doc/Makefile (props changed) vendor/openpam/CITRONELLA/doc/man/Makefile (props changed) vendor/openpam/CITRONELLA/doc/man/openpam.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam.man (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_log.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CITRONELLA/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam.man (props changed) vendor/openpam/CITRONELLA/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_close_session.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_conv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_end.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_error.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_get_data.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_get_item.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_get_user.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_getenv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_info.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_open_session.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_prompt.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_putenv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_set_data.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_set_item.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_setcred.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_setenv.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_start.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_strerror.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_verror.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CITRONELLA/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CITRONELLA/include/security/openpam.h (props changed) vendor/openpam/CITRONELLA/include/security/openpam_version.h (props changed) vendor/openpam/CITRONELLA/include/security/pam_appl.h (props changed) vendor/openpam/CITRONELLA/include/security/pam_constants.h (props changed) vendor/openpam/CITRONELLA/include/security/pam_modules.h (props changed) vendor/openpam/CITRONELLA/include/security/pam_types.h (props changed) vendor/openpam/CITRONELLA/lib/Makefile (props changed) vendor/openpam/CITRONELLA/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_configure.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_dispatch.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_dynamic.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_findenv.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_free_data.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_get_option.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_impl.h (props changed) vendor/openpam/CITRONELLA/lib/openpam_load.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_log.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_nullconv.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_restore_cred.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_set_option.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_static.c (props changed) vendor/openpam/CITRONELLA/lib/openpam_ttyconv.c (props changed) vendor/openpam/CITRONELLA/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CITRONELLA/lib/pam_authenticate.c (props changed) vendor/openpam/CITRONELLA/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CITRONELLA/lib/pam_chauthtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_close_session.c (props changed) vendor/openpam/CITRONELLA/lib/pam_end.c (props changed) vendor/openpam/CITRONELLA/lib/pam_error.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_authtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_data.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_item.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CITRONELLA/lib/pam_get_user.c (props changed) vendor/openpam/CITRONELLA/lib/pam_getenv.c (props changed) vendor/openpam/CITRONELLA/lib/pam_getenvlist.c (props changed) vendor/openpam/CITRONELLA/lib/pam_info.c (props changed) vendor/openpam/CITRONELLA/lib/pam_open_session.c (props changed) vendor/openpam/CITRONELLA/lib/pam_prompt.c (props changed) vendor/openpam/CITRONELLA/lib/pam_putenv.c (props changed) vendor/openpam/CITRONELLA/lib/pam_set_data.c (props changed) vendor/openpam/CITRONELLA/lib/pam_set_item.c (props changed) vendor/openpam/CITRONELLA/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CITRONELLA/lib/pam_setcred.c (props changed) vendor/openpam/CITRONELLA/lib/pam_setenv.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_close_session.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_open_session.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CITRONELLA/lib/pam_sm_setcred.c (props changed) vendor/openpam/CITRONELLA/lib/pam_start.c (props changed) vendor/openpam/CITRONELLA/lib/pam_strerror.c (props changed) vendor/openpam/CITRONELLA/lib/pam_verror.c (props changed) vendor/openpam/CITRONELLA/lib/pam_vinfo.c (props changed) vendor/openpam/CITRONELLA/lib/pam_vprompt.c (props changed) vendor/openpam/CITRONELLA/misc/gendoc.pl (props changed) vendor/openpam/CITRONELLA/modules/Makefile (props changed) vendor/openpam/CITRONELLA/modules/pam_deny/Makefile (props changed) vendor/openpam/CITRONELLA/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CITRONELLA/modules/pam_dummy/Makefile (props changed) vendor/openpam/CITRONELLA/modules/pam_dummy/pam_dummy.c (props changed) vendor/openpam/CITRONELLA/modules/pam_permit/Makefile (props changed) vendor/openpam/CITRONELLA/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CITRONELLA/modules/pam_unix/Makefile (props changed) vendor/openpam/CITRONELLA/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/CYCLAMEN/bin/Makefile (props changed) vendor/openpam/CYCLAMEN/bin/su/Makefile (props changed) vendor/openpam/CYCLAMEN/bin/su/su.c (props changed) vendor/openpam/CYCLAMEN/doc/Makefile (props changed) vendor/openpam/CYCLAMEN/doc/man/Makefile (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam.man (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_free_data.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_get_option.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_log.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_set_option.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam.man (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_authenticate.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_close_session.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_conv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_end.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_error.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_get_data.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_get_item.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_get_user.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_getenv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_info.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_open_session.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_prompt.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_putenv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_set_data.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_set_item.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_setcred.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_setenv.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_start.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_strerror.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_verror.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_vinfo.3 (props changed) vendor/openpam/CYCLAMEN/doc/man/pam_vprompt.3 (props changed) vendor/openpam/CYCLAMEN/include/security/openpam.h (props changed) vendor/openpam/CYCLAMEN/include/security/openpam_version.h (props changed) vendor/openpam/CYCLAMEN/include/security/pam_appl.h (props changed) vendor/openpam/CYCLAMEN/include/security/pam_constants.h (props changed) vendor/openpam/CYCLAMEN/include/security/pam_modules.h (props changed) vendor/openpam/CYCLAMEN/include/security/pam_types.h (props changed) vendor/openpam/CYCLAMEN/lib/Makefile (props changed) vendor/openpam/CYCLAMEN/lib/openpam_borrow_cred.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_configure.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_dispatch.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_dynamic.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_findenv.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_free_data.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_get_option.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_impl.h (props changed) vendor/openpam/CYCLAMEN/lib/openpam_load.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_log.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_nullconv.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_restore_cred.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_set_option.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_static.c (props changed) vendor/openpam/CYCLAMEN/lib/openpam_ttyconv.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_acct_mgmt.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_authenticate.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_chauthtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_close_session.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_end.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_error.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_authtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_data.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_item.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_mapped_username.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_get_user.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_getenv.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_getenvlist.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_info.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_open_session.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_prompt.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_putenv.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_set_data.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_set_item.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_set_mapped_username.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_setcred.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_setenv.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_authenticate.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_close_session.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_open_session.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_sm_setcred.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_start.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_strerror.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_verror.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_vinfo.c (props changed) vendor/openpam/CYCLAMEN/lib/pam_vprompt.c (props changed) vendor/openpam/CYCLAMEN/misc/gendoc.pl (props changed) vendor/openpam/CYCLAMEN/modules/Makefile (props changed) vendor/openpam/CYCLAMEN/modules/pam_deny/Makefile (props changed) vendor/openpam/CYCLAMEN/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/CYCLAMEN/modules/pam_permit/Makefile (props changed) vendor/openpam/CYCLAMEN/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/CYCLAMEN/modules/pam_unix/Makefile (props changed) vendor/openpam/CYCLAMEN/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/DAFFODIL/bin/Makefile (props changed) vendor/openpam/DAFFODIL/bin/su/Makefile (props changed) vendor/openpam/DAFFODIL/bin/su/su.c (props changed) vendor/openpam/DAFFODIL/doc/Makefile (props changed) vendor/openpam/DAFFODIL/doc/man/Makefile (props changed) vendor/openpam/DAFFODIL/doc/man/openpam.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam.man (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_free_data.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_get_option.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_log.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_set_option.3 (props changed) vendor/openpam/DAFFODIL/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam.man (props changed) vendor/openpam/DAFFODIL/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_authenticate.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_close_session.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_conv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_end.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_error.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_get_data.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_get_item.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_get_user.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_getenv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_info.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_open_session.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_prompt.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_putenv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_set_data.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_set_item.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_setcred.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_setenv.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_start.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_strerror.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_verror.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_vinfo.3 (props changed) vendor/openpam/DAFFODIL/doc/man/pam_vprompt.3 (props changed) vendor/openpam/DAFFODIL/include/security/openpam.h (props changed) vendor/openpam/DAFFODIL/include/security/openpam_version.h (props changed) vendor/openpam/DAFFODIL/include/security/pam_appl.h (props changed) vendor/openpam/DAFFODIL/include/security/pam_constants.h (props changed) vendor/openpam/DAFFODIL/include/security/pam_modules.h (props changed) vendor/openpam/DAFFODIL/include/security/pam_types.h (props changed) vendor/openpam/DAFFODIL/lib/Makefile (props changed) vendor/openpam/DAFFODIL/lib/openpam_borrow_cred.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_configure.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_dispatch.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_dynamic.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_findenv.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_free_data.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_get_option.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_impl.h (props changed) vendor/openpam/DAFFODIL/lib/openpam_load.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_log.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_nullconv.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_restore_cred.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_set_option.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_static.c (props changed) vendor/openpam/DAFFODIL/lib/openpam_ttyconv.c (props changed) vendor/openpam/DAFFODIL/lib/pam_acct_mgmt.c (props changed) vendor/openpam/DAFFODIL/lib/pam_authenticate.c (props changed) vendor/openpam/DAFFODIL/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/DAFFODIL/lib/pam_chauthtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_close_session.c (props changed) vendor/openpam/DAFFODIL/lib/pam_end.c (props changed) vendor/openpam/DAFFODIL/lib/pam_error.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_authtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_data.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_item.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_mapped_username.c (props changed) vendor/openpam/DAFFODIL/lib/pam_get_user.c (props changed) vendor/openpam/DAFFODIL/lib/pam_getenv.c (props changed) vendor/openpam/DAFFODIL/lib/pam_getenvlist.c (props changed) vendor/openpam/DAFFODIL/lib/pam_info.c (props changed) vendor/openpam/DAFFODIL/lib/pam_open_session.c (props changed) vendor/openpam/DAFFODIL/lib/pam_prompt.c (props changed) vendor/openpam/DAFFODIL/lib/pam_putenv.c (props changed) vendor/openpam/DAFFODIL/lib/pam_set_data.c (props changed) vendor/openpam/DAFFODIL/lib/pam_set_item.c (props changed) vendor/openpam/DAFFODIL/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_set_mapped_username.c (props changed) vendor/openpam/DAFFODIL/lib/pam_setcred.c (props changed) vendor/openpam/DAFFODIL/lib/pam_setenv.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_authenticate.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_close_session.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_open_session.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/DAFFODIL/lib/pam_sm_setcred.c (props changed) vendor/openpam/DAFFODIL/lib/pam_start.c (props changed) vendor/openpam/DAFFODIL/lib/pam_strerror.c (props changed) vendor/openpam/DAFFODIL/lib/pam_verror.c (props changed) vendor/openpam/DAFFODIL/lib/pam_vinfo.c (props changed) vendor/openpam/DAFFODIL/lib/pam_vprompt.c (props changed) vendor/openpam/DAFFODIL/misc/gendoc.pl (props changed) vendor/openpam/DAFFODIL/modules/Makefile (props changed) vendor/openpam/DAFFODIL/modules/pam_deny/Makefile (props changed) vendor/openpam/DAFFODIL/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/DAFFODIL/modules/pam_permit/Makefile (props changed) vendor/openpam/DAFFODIL/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/DAFFODIL/modules/pam_unix/Makefile (props changed) vendor/openpam/DAFFODIL/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/DIANTHUS/bin/Makefile (props changed) vendor/openpam/DIANTHUS/bin/su/Makefile (props changed) vendor/openpam/DIANTHUS/bin/su/su.c (props changed) vendor/openpam/DIANTHUS/doc/Makefile (props changed) vendor/openpam/DIANTHUS/doc/man/Makefile (props changed) vendor/openpam/DIANTHUS/doc/man/openpam.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam.man (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_free_data.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_get_option.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_log.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_set_option.3 (props changed) vendor/openpam/DIANTHUS/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam.man (props changed) vendor/openpam/DIANTHUS/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_authenticate.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_close_session.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_conv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_end.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_error.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_get_data.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_get_item.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_get_user.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_getenv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_info.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_open_session.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_prompt.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_putenv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_set_data.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_set_item.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_setcred.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_setenv.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_start.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_strerror.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_verror.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_vinfo.3 (props changed) vendor/openpam/DIANTHUS/doc/man/pam_vprompt.3 (props changed) vendor/openpam/DIANTHUS/include/security/openpam.h (props changed) vendor/openpam/DIANTHUS/include/security/openpam_version.h (props changed) vendor/openpam/DIANTHUS/include/security/pam_appl.h (props changed) vendor/openpam/DIANTHUS/include/security/pam_constants.h (props changed) vendor/openpam/DIANTHUS/include/security/pam_modules.h (props changed) vendor/openpam/DIANTHUS/include/security/pam_types.h (props changed) vendor/openpam/DIANTHUS/lib/Makefile (props changed) vendor/openpam/DIANTHUS/lib/openpam_borrow_cred.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_configure.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_dispatch.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_dynamic.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_findenv.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_free_data.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_get_option.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_impl.h (props changed) vendor/openpam/DIANTHUS/lib/openpam_load.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_log.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_nullconv.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_restore_cred.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_set_option.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_static.c (props changed) vendor/openpam/DIANTHUS/lib/openpam_ttyconv.c (props changed) vendor/openpam/DIANTHUS/lib/pam_acct_mgmt.c (props changed) vendor/openpam/DIANTHUS/lib/pam_authenticate.c (props changed) vendor/openpam/DIANTHUS/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/DIANTHUS/lib/pam_chauthtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_close_session.c (props changed) vendor/openpam/DIANTHUS/lib/pam_end.c (props changed) vendor/openpam/DIANTHUS/lib/pam_error.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_authtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_data.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_item.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_mapped_username.c (props changed) vendor/openpam/DIANTHUS/lib/pam_get_user.c (props changed) vendor/openpam/DIANTHUS/lib/pam_getenv.c (props changed) vendor/openpam/DIANTHUS/lib/pam_getenvlist.c (props changed) vendor/openpam/DIANTHUS/lib/pam_info.c (props changed) vendor/openpam/DIANTHUS/lib/pam_open_session.c (props changed) vendor/openpam/DIANTHUS/lib/pam_prompt.c (props changed) vendor/openpam/DIANTHUS/lib/pam_putenv.c (props changed) vendor/openpam/DIANTHUS/lib/pam_set_data.c (props changed) vendor/openpam/DIANTHUS/lib/pam_set_item.c (props changed) vendor/openpam/DIANTHUS/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_set_mapped_username.c (props changed) vendor/openpam/DIANTHUS/lib/pam_setcred.c (props changed) vendor/openpam/DIANTHUS/lib/pam_setenv.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_authenticate.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_close_session.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_open_session.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/DIANTHUS/lib/pam_sm_setcred.c (props changed) vendor/openpam/DIANTHUS/lib/pam_start.c (props changed) vendor/openpam/DIANTHUS/lib/pam_strerror.c (props changed) vendor/openpam/DIANTHUS/lib/pam_verror.c (props changed) vendor/openpam/DIANTHUS/lib/pam_vinfo.c (props changed) vendor/openpam/DIANTHUS/lib/pam_vprompt.c (props changed) vendor/openpam/DIANTHUS/misc/gendoc.pl (props changed) vendor/openpam/DIANTHUS/modules/Makefile (props changed) vendor/openpam/DIANTHUS/modules/pam_deny/Makefile (props changed) vendor/openpam/DIANTHUS/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/DIANTHUS/modules/pam_permit/Makefile (props changed) vendor/openpam/DIANTHUS/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/DIANTHUS/modules/pam_unix/Makefile (props changed) vendor/openpam/DIANTHUS/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/DIGITALIS/bin/Makefile (props changed) vendor/openpam/DIGITALIS/bin/Makefile.inc (props changed) vendor/openpam/DIGITALIS/bin/su/Makefile (props changed) vendor/openpam/DIGITALIS/bin/su/su.c (props changed) vendor/openpam/DIGITALIS/doc/Makefile (props changed) vendor/openpam/DIGITALIS/doc/man/Makefile (props changed) vendor/openpam/DIGITALIS/doc/man/openpam.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam.man (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_free_data.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_get_option.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_log.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_readline.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_set_option.3 (props changed) vendor/openpam/DIGITALIS/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam.man (props changed) vendor/openpam/DIGITALIS/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_authenticate.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_close_session.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_conv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_end.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_error.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_get_data.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_get_item.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_get_user.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_getenv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_info.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_open_session.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_prompt.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_putenv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_set_data.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_set_item.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_setcred.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_setenv.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_start.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_strerror.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_verror.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_vinfo.3 (props changed) vendor/openpam/DIGITALIS/doc/man/pam_vprompt.3 (props changed) vendor/openpam/DIGITALIS/include/security/openpam.h (props changed) vendor/openpam/DIGITALIS/include/security/openpam_version.h (props changed) vendor/openpam/DIGITALIS/include/security/pam_appl.h (props changed) vendor/openpam/DIGITALIS/include/security/pam_constants.h (props changed) vendor/openpam/DIGITALIS/include/security/pam_modules.h (props changed) vendor/openpam/DIGITALIS/include/security/pam_types.h (props changed) vendor/openpam/DIGITALIS/lib/Makefile (props changed) vendor/openpam/DIGITALIS/lib/openpam_borrow_cred.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_configure.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_dispatch.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_dynamic.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_findenv.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_free_data.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_get_option.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_impl.h (props changed) vendor/openpam/DIGITALIS/lib/openpam_load.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_log.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_nullconv.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_readline.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_restore_cred.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_set_option.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_static.c (props changed) vendor/openpam/DIGITALIS/lib/openpam_ttyconv.c (props changed) vendor/openpam/DIGITALIS/lib/pam_acct_mgmt.c (props changed) vendor/openpam/DIGITALIS/lib/pam_authenticate.c (props changed) vendor/openpam/DIGITALIS/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/DIGITALIS/lib/pam_chauthtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_close_session.c (props changed) vendor/openpam/DIGITALIS/lib/pam_end.c (props changed) vendor/openpam/DIGITALIS/lib/pam_error.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_authtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_data.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_item.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_mapped_username.c (props changed) vendor/openpam/DIGITALIS/lib/pam_get_user.c (props changed) vendor/openpam/DIGITALIS/lib/pam_getenv.c (props changed) vendor/openpam/DIGITALIS/lib/pam_getenvlist.c (props changed) vendor/openpam/DIGITALIS/lib/pam_info.c (props changed) vendor/openpam/DIGITALIS/lib/pam_open_session.c (props changed) vendor/openpam/DIGITALIS/lib/pam_prompt.c (props changed) vendor/openpam/DIGITALIS/lib/pam_putenv.c (props changed) vendor/openpam/DIGITALIS/lib/pam_set_data.c (props changed) vendor/openpam/DIGITALIS/lib/pam_set_item.c (props changed) vendor/openpam/DIGITALIS/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_set_mapped_username.c (props changed) vendor/openpam/DIGITALIS/lib/pam_setcred.c (props changed) vendor/openpam/DIGITALIS/lib/pam_setenv.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_authenticate.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_close_session.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_open_session.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/DIGITALIS/lib/pam_sm_setcred.c (props changed) vendor/openpam/DIGITALIS/lib/pam_start.c (props changed) vendor/openpam/DIGITALIS/lib/pam_strerror.c (props changed) vendor/openpam/DIGITALIS/lib/pam_verror.c (props changed) vendor/openpam/DIGITALIS/lib/pam_vinfo.c (props changed) vendor/openpam/DIGITALIS/lib/pam_vprompt.c (props changed) vendor/openpam/DIGITALIS/misc/gendoc.pl (props changed) vendor/openpam/DIGITALIS/modules/Makefile (props changed) vendor/openpam/DIGITALIS/modules/pam_deny/Makefile (props changed) vendor/openpam/DIGITALIS/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/DIGITALIS/modules/pam_permit/Makefile (props changed) vendor/openpam/DIGITALIS/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/DIGITALIS/modules/pam_unix/Makefile (props changed) vendor/openpam/DIGITALIS/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/DOGWOOD/bin/Makefile.am (props changed) vendor/openpam/DOGWOOD/bin/Makefile.in (props changed) vendor/openpam/DOGWOOD/bin/su/Makefile.am (props changed) vendor/openpam/DOGWOOD/bin/su/Makefile.in (props changed) vendor/openpam/DOGWOOD/bin/su/su.c (props changed) vendor/openpam/DOGWOOD/doc/Makefile.am (props changed) vendor/openpam/DOGWOOD/doc/Makefile.in (props changed) vendor/openpam/DOGWOOD/doc/man/Makefile.am (props changed) vendor/openpam/DOGWOOD/doc/man/Makefile.in (props changed) vendor/openpam/DOGWOOD/doc/man/openpam.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam.man (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_free_data.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_get_option.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_log.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_readline.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_set_option.3 (props changed) vendor/openpam/DOGWOOD/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam.man (props changed) vendor/openpam/DOGWOOD/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_authenticate.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_close_session.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_conv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_end.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_error.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_get_data.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_get_item.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_get_user.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_getenv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_info.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_open_session.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_prompt.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_putenv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_set_data.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_set_item.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_setcred.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_setenv.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_start.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_strerror.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_verror.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_vinfo.3 (props changed) vendor/openpam/DOGWOOD/doc/man/pam_vprompt.3 (props changed) vendor/openpam/DOGWOOD/include/Makefile.am (props changed) vendor/openpam/DOGWOOD/include/Makefile.in (props changed) vendor/openpam/DOGWOOD/include/security/Makefile.am (props changed) vendor/openpam/DOGWOOD/include/security/Makefile.in (props changed) vendor/openpam/DOGWOOD/include/security/openpam.h (props changed) vendor/openpam/DOGWOOD/include/security/openpam_version.h (props changed) vendor/openpam/DOGWOOD/include/security/pam_appl.h (props changed) vendor/openpam/DOGWOOD/include/security/pam_constants.h (props changed) vendor/openpam/DOGWOOD/include/security/pam_modules.h (props changed) vendor/openpam/DOGWOOD/include/security/pam_types.h (props changed) vendor/openpam/DOGWOOD/lib/Makefile.am (props changed) vendor/openpam/DOGWOOD/lib/Makefile.in (props changed) vendor/openpam/DOGWOOD/lib/openpam_borrow_cred.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_configure.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_dispatch.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_dynamic.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_findenv.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_free_data.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_get_option.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_impl.h (props changed) vendor/openpam/DOGWOOD/lib/openpam_load.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_log.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_nullconv.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_readline.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_restore_cred.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_set_option.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_static.c (props changed) vendor/openpam/DOGWOOD/lib/openpam_ttyconv.c (props changed) vendor/openpam/DOGWOOD/lib/pam_acct_mgmt.c (props changed) vendor/openpam/DOGWOOD/lib/pam_authenticate.c (props changed) vendor/openpam/DOGWOOD/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/DOGWOOD/lib/pam_chauthtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_close_session.c (props changed) vendor/openpam/DOGWOOD/lib/pam_end.c (props changed) vendor/openpam/DOGWOOD/lib/pam_error.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_authtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_data.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_item.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_mapped_username.c (props changed) vendor/openpam/DOGWOOD/lib/pam_get_user.c (props changed) vendor/openpam/DOGWOOD/lib/pam_getenv.c (props changed) vendor/openpam/DOGWOOD/lib/pam_getenvlist.c (props changed) vendor/openpam/DOGWOOD/lib/pam_info.c (props changed) vendor/openpam/DOGWOOD/lib/pam_open_session.c (props changed) vendor/openpam/DOGWOOD/lib/pam_prompt.c (props changed) vendor/openpam/DOGWOOD/lib/pam_putenv.c (props changed) vendor/openpam/DOGWOOD/lib/pam_set_data.c (props changed) vendor/openpam/DOGWOOD/lib/pam_set_item.c (props changed) vendor/openpam/DOGWOOD/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_set_mapped_username.c (props changed) vendor/openpam/DOGWOOD/lib/pam_setcred.c (props changed) vendor/openpam/DOGWOOD/lib/pam_setenv.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_authenticate.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_close_session.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_open_session.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/DOGWOOD/lib/pam_sm_setcred.c (props changed) vendor/openpam/DOGWOOD/lib/pam_start.c (props changed) vendor/openpam/DOGWOOD/lib/pam_strerror.c (props changed) vendor/openpam/DOGWOOD/lib/pam_verror.c (props changed) vendor/openpam/DOGWOOD/lib/pam_vinfo.c (props changed) vendor/openpam/DOGWOOD/lib/pam_vprompt.c (props changed) vendor/openpam/DOGWOOD/misc/gendoc.pl (props changed) vendor/openpam/DOGWOOD/modules/Makefile.am (props changed) vendor/openpam/DOGWOOD/modules/Makefile.in (props changed) vendor/openpam/DOGWOOD/modules/pam_deny/Makefile.am (props changed) vendor/openpam/DOGWOOD/modules/pam_deny/Makefile.in (props changed) vendor/openpam/DOGWOOD/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/DOGWOOD/modules/pam_permit/Makefile.am (props changed) vendor/openpam/DOGWOOD/modules/pam_permit/Makefile.in (props changed) vendor/openpam/DOGWOOD/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/DOGWOOD/modules/pam_unix/Makefile.am (props changed) vendor/openpam/DOGWOOD/modules/pam_unix/Makefile.in (props changed) vendor/openpam/DOGWOOD/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/EELGRASS/bin/Makefile.am (props changed) vendor/openpam/EELGRASS/bin/Makefile.in (props changed) vendor/openpam/EELGRASS/bin/su/Makefile.am (props changed) vendor/openpam/EELGRASS/bin/su/Makefile.in (props changed) vendor/openpam/EELGRASS/bin/su/su.c (props changed) vendor/openpam/EELGRASS/doc/Makefile.am (props changed) vendor/openpam/EELGRASS/doc/Makefile.in (props changed) vendor/openpam/EELGRASS/doc/man/Makefile.am (props changed) vendor/openpam/EELGRASS/doc/man/Makefile.in (props changed) vendor/openpam/EELGRASS/doc/man/openpam.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam.man (props changed) vendor/openpam/EELGRASS/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_free_data.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_get_option.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_log.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_readline.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_set_option.3 (props changed) vendor/openpam/EELGRASS/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam.man (props changed) vendor/openpam/EELGRASS/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_authenticate.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_close_session.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_conv.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_end.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_error.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_get_data.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_get_item.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_get_user.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_getenv.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_info.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_open_session.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_prompt.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_putenv.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_set_data.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_set_item.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_setcred.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_setenv.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_start.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_strerror.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_verror.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_vinfo.3 (props changed) vendor/openpam/EELGRASS/doc/man/pam_vprompt.3 (props changed) vendor/openpam/EELGRASS/include/Makefile.am (props changed) vendor/openpam/EELGRASS/include/Makefile.in (props changed) vendor/openpam/EELGRASS/include/security/Makefile.am (props changed) vendor/openpam/EELGRASS/include/security/Makefile.in (props changed) vendor/openpam/EELGRASS/include/security/openpam.h (props changed) vendor/openpam/EELGRASS/include/security/openpam_version.h (props changed) vendor/openpam/EELGRASS/include/security/pam_appl.h (props changed) vendor/openpam/EELGRASS/include/security/pam_constants.h (props changed) vendor/openpam/EELGRASS/include/security/pam_modules.h (props changed) vendor/openpam/EELGRASS/include/security/pam_types.h (props changed) vendor/openpam/EELGRASS/lib/Makefile.am (props changed) vendor/openpam/EELGRASS/lib/Makefile.in (props changed) vendor/openpam/EELGRASS/lib/openpam_borrow_cred.c (props changed) vendor/openpam/EELGRASS/lib/openpam_configure.c (props changed) vendor/openpam/EELGRASS/lib/openpam_dispatch.c (props changed) vendor/openpam/EELGRASS/lib/openpam_dynamic.c (props changed) vendor/openpam/EELGRASS/lib/openpam_findenv.c (props changed) vendor/openpam/EELGRASS/lib/openpam_free_data.c (props changed) vendor/openpam/EELGRASS/lib/openpam_get_option.c (props changed) vendor/openpam/EELGRASS/lib/openpam_impl.h (props changed) vendor/openpam/EELGRASS/lib/openpam_load.c (props changed) vendor/openpam/EELGRASS/lib/openpam_log.c (props changed) vendor/openpam/EELGRASS/lib/openpam_nullconv.c (props changed) vendor/openpam/EELGRASS/lib/openpam_readline.c (props changed) vendor/openpam/EELGRASS/lib/openpam_restore_cred.c (props changed) vendor/openpam/EELGRASS/lib/openpam_set_option.c (props changed) vendor/openpam/EELGRASS/lib/openpam_static.c (props changed) vendor/openpam/EELGRASS/lib/openpam_ttyconv.c (props changed) vendor/openpam/EELGRASS/lib/pam_acct_mgmt.c (props changed) vendor/openpam/EELGRASS/lib/pam_authenticate.c (props changed) vendor/openpam/EELGRASS/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/EELGRASS/lib/pam_chauthtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_close_session.c (props changed) vendor/openpam/EELGRASS/lib/pam_end.c (props changed) vendor/openpam/EELGRASS/lib/pam_error.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_authtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_data.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_item.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_mapped_username.c (props changed) vendor/openpam/EELGRASS/lib/pam_get_user.c (props changed) vendor/openpam/EELGRASS/lib/pam_getenv.c (props changed) vendor/openpam/EELGRASS/lib/pam_getenvlist.c (props changed) vendor/openpam/EELGRASS/lib/pam_info.c (props changed) vendor/openpam/EELGRASS/lib/pam_open_session.c (props changed) vendor/openpam/EELGRASS/lib/pam_prompt.c (props changed) vendor/openpam/EELGRASS/lib/pam_putenv.c (props changed) vendor/openpam/EELGRASS/lib/pam_set_data.c (props changed) vendor/openpam/EELGRASS/lib/pam_set_item.c (props changed) vendor/openpam/EELGRASS/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_set_mapped_username.c (props changed) vendor/openpam/EELGRASS/lib/pam_setcred.c (props changed) vendor/openpam/EELGRASS/lib/pam_setenv.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_authenticate.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_close_session.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_open_session.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/EELGRASS/lib/pam_sm_setcred.c (props changed) vendor/openpam/EELGRASS/lib/pam_start.c (props changed) vendor/openpam/EELGRASS/lib/pam_strerror.c (props changed) vendor/openpam/EELGRASS/lib/pam_verror.c (props changed) vendor/openpam/EELGRASS/lib/pam_vinfo.c (props changed) vendor/openpam/EELGRASS/lib/pam_vprompt.c (props changed) vendor/openpam/EELGRASS/misc/gendoc.pl (props changed) vendor/openpam/EELGRASS/modules/Makefile.am (props changed) vendor/openpam/EELGRASS/modules/Makefile.in (props changed) vendor/openpam/EELGRASS/modules/pam_deny/Makefile.am (props changed) vendor/openpam/EELGRASS/modules/pam_deny/Makefile.in (props changed) vendor/openpam/EELGRASS/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/EELGRASS/modules/pam_permit/Makefile.am (props changed) vendor/openpam/EELGRASS/modules/pam_permit/Makefile.in (props changed) vendor/openpam/EELGRASS/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/EELGRASS/modules/pam_unix/Makefile.am (props changed) vendor/openpam/EELGRASS/modules/pam_unix/Makefile.in (props changed) vendor/openpam/EELGRASS/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/FETERITA/bin/Makefile.am (props changed) vendor/openpam/FETERITA/bin/Makefile.in (props changed) vendor/openpam/FETERITA/bin/su/Makefile.am (props changed) vendor/openpam/FETERITA/bin/su/Makefile.in (props changed) vendor/openpam/FETERITA/bin/su/su.c (props changed) vendor/openpam/FETERITA/doc/Makefile.am (props changed) vendor/openpam/FETERITA/doc/Makefile.in (props changed) vendor/openpam/FETERITA/doc/man/Makefile.am (props changed) vendor/openpam/FETERITA/doc/man/Makefile.in (props changed) vendor/openpam/FETERITA/doc/man/openpam.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam.man (props changed) vendor/openpam/FETERITA/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_free_data.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_free_envlist.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_get_option.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_log.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_readline.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_set_option.3 (props changed) vendor/openpam/FETERITA/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/FETERITA/doc/man/pam.3 (props changed) vendor/openpam/FETERITA/doc/man/pam.man (props changed) vendor/openpam/FETERITA/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_authenticate.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_close_session.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_conv.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_end.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_error.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_get_data.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_get_item.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_get_user.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_getenv.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_info.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_open_session.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_prompt.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_putenv.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_set_data.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_set_item.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_setcred.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_setenv.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_start.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_strerror.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_verror.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_vinfo.3 (props changed) vendor/openpam/FETERITA/doc/man/pam_vprompt.3 (props changed) vendor/openpam/FETERITA/include/Makefile.am (props changed) vendor/openpam/FETERITA/include/Makefile.in (props changed) vendor/openpam/FETERITA/include/security/Makefile.am (props changed) vendor/openpam/FETERITA/include/security/Makefile.in (props changed) vendor/openpam/FETERITA/include/security/openpam.h (props changed) vendor/openpam/FETERITA/include/security/openpam_version.h (props changed) vendor/openpam/FETERITA/include/security/pam_appl.h (props changed) vendor/openpam/FETERITA/include/security/pam_constants.h (props changed) vendor/openpam/FETERITA/include/security/pam_modules.h (props changed) vendor/openpam/FETERITA/include/security/pam_types.h (props changed) vendor/openpam/FETERITA/lib/Makefile.am (props changed) vendor/openpam/FETERITA/lib/Makefile.in (props changed) vendor/openpam/FETERITA/lib/openpam_borrow_cred.c (props changed) vendor/openpam/FETERITA/lib/openpam_configure.c (props changed) vendor/openpam/FETERITA/lib/openpam_dispatch.c (props changed) vendor/openpam/FETERITA/lib/openpam_dynamic.c (props changed) vendor/openpam/FETERITA/lib/openpam_findenv.c (props changed) vendor/openpam/FETERITA/lib/openpam_free_data.c (props changed) vendor/openpam/FETERITA/lib/openpam_free_envlist.c (props changed) vendor/openpam/FETERITA/lib/openpam_get_option.c (props changed) vendor/openpam/FETERITA/lib/openpam_impl.h (props changed) vendor/openpam/FETERITA/lib/openpam_load.c (props changed) vendor/openpam/FETERITA/lib/openpam_log.c (props changed) vendor/openpam/FETERITA/lib/openpam_nullconv.c (props changed) vendor/openpam/FETERITA/lib/openpam_readline.c (props changed) vendor/openpam/FETERITA/lib/openpam_restore_cred.c (props changed) vendor/openpam/FETERITA/lib/openpam_set_option.c (props changed) vendor/openpam/FETERITA/lib/openpam_static.c (props changed) vendor/openpam/FETERITA/lib/openpam_ttyconv.c (props changed) vendor/openpam/FETERITA/lib/pam_acct_mgmt.c (props changed) vendor/openpam/FETERITA/lib/pam_authenticate.c (props changed) vendor/openpam/FETERITA/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/FETERITA/lib/pam_chauthtok.c (props changed) vendor/openpam/FETERITA/lib/pam_close_session.c (props changed) vendor/openpam/FETERITA/lib/pam_end.c (props changed) vendor/openpam/FETERITA/lib/pam_error.c (props changed) vendor/openpam/FETERITA/lib/pam_get_authtok.c (props changed) vendor/openpam/FETERITA/lib/pam_get_data.c (props changed) vendor/openpam/FETERITA/lib/pam_get_item.c (props changed) vendor/openpam/FETERITA/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/FETERITA/lib/pam_get_mapped_username.c (props changed) vendor/openpam/FETERITA/lib/pam_get_user.c (props changed) vendor/openpam/FETERITA/lib/pam_getenv.c (props changed) vendor/openpam/FETERITA/lib/pam_getenvlist.c (props changed) vendor/openpam/FETERITA/lib/pam_info.c (props changed) vendor/openpam/FETERITA/lib/pam_open_session.c (props changed) vendor/openpam/FETERITA/lib/pam_prompt.c (props changed) vendor/openpam/FETERITA/lib/pam_putenv.c (props changed) vendor/openpam/FETERITA/lib/pam_set_data.c (props changed) vendor/openpam/FETERITA/lib/pam_set_item.c (props changed) vendor/openpam/FETERITA/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/FETERITA/lib/pam_set_mapped_username.c (props changed) vendor/openpam/FETERITA/lib/pam_setcred.c (props changed) vendor/openpam/FETERITA/lib/pam_setenv.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_authenticate.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_close_session.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_open_session.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/FETERITA/lib/pam_sm_setcred.c (props changed) vendor/openpam/FETERITA/lib/pam_start.c (props changed) vendor/openpam/FETERITA/lib/pam_strerror.c (props changed) vendor/openpam/FETERITA/lib/pam_verror.c (props changed) vendor/openpam/FETERITA/lib/pam_vinfo.c (props changed) vendor/openpam/FETERITA/lib/pam_vprompt.c (props changed) vendor/openpam/FETERITA/misc/gendoc.pl (props changed) vendor/openpam/FETERITA/modules/Makefile.am (props changed) vendor/openpam/FETERITA/modules/Makefile.in (props changed) vendor/openpam/FETERITA/modules/pam_deny/Makefile.am (props changed) vendor/openpam/FETERITA/modules/pam_deny/Makefile.in (props changed) vendor/openpam/FETERITA/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/FETERITA/modules/pam_permit/Makefile.am (props changed) vendor/openpam/FETERITA/modules/pam_permit/Makefile.in (props changed) vendor/openpam/FETERITA/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/FETERITA/modules/pam_unix/Makefile.am (props changed) vendor/openpam/FETERITA/modules/pam_unix/Makefile.in (props changed) vendor/openpam/FETERITA/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/FIGWORT/bin/Makefile.am (props changed) vendor/openpam/FIGWORT/bin/Makefile.in (props changed) vendor/openpam/FIGWORT/bin/su/Makefile.am (props changed) vendor/openpam/FIGWORT/bin/su/Makefile.in (props changed) vendor/openpam/FIGWORT/bin/su/su.c (props changed) vendor/openpam/FIGWORT/doc/Makefile.am (props changed) vendor/openpam/FIGWORT/doc/Makefile.in (props changed) vendor/openpam/FIGWORT/doc/man/Makefile.am (props changed) vendor/openpam/FIGWORT/doc/man/Makefile.in (props changed) vendor/openpam/FIGWORT/doc/man/openpam.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam.man (props changed) vendor/openpam/FIGWORT/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_free_data.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_free_envlist.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_get_option.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_log.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_readline.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_set_option.3 (props changed) vendor/openpam/FIGWORT/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam.conf.5 (props changed) vendor/openpam/FIGWORT/doc/man/pam.man (props changed) vendor/openpam/FIGWORT/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_authenticate.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_close_session.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_conv.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_end.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_error.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_get_data.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_get_item.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_get_user.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_getenv.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_info.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_open_session.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_prompt.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_putenv.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_set_data.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_set_item.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_setcred.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_setenv.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_start.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_strerror.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_verror.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_vinfo.3 (props changed) vendor/openpam/FIGWORT/doc/man/pam_vprompt.3 (props changed) vendor/openpam/FIGWORT/include/Makefile.am (props changed) vendor/openpam/FIGWORT/include/Makefile.in (props changed) vendor/openpam/FIGWORT/include/security/Makefile.am (props changed) vendor/openpam/FIGWORT/include/security/Makefile.in (props changed) vendor/openpam/FIGWORT/include/security/openpam.h (props changed) vendor/openpam/FIGWORT/include/security/openpam_version.h (props changed) vendor/openpam/FIGWORT/include/security/pam_appl.h (props changed) vendor/openpam/FIGWORT/include/security/pam_constants.h (props changed) vendor/openpam/FIGWORT/include/security/pam_modules.h (props changed) vendor/openpam/FIGWORT/include/security/pam_types.h (props changed) vendor/openpam/FIGWORT/lib/Makefile.am (props changed) vendor/openpam/FIGWORT/lib/Makefile.in (props changed) vendor/openpam/FIGWORT/lib/openpam_borrow_cred.c (props changed) vendor/openpam/FIGWORT/lib/openpam_configure.c (props changed) vendor/openpam/FIGWORT/lib/openpam_dispatch.c (props changed) vendor/openpam/FIGWORT/lib/openpam_dynamic.c (props changed) vendor/openpam/FIGWORT/lib/openpam_findenv.c (props changed) vendor/openpam/FIGWORT/lib/openpam_free_data.c (props changed) vendor/openpam/FIGWORT/lib/openpam_free_envlist.c (props changed) vendor/openpam/FIGWORT/lib/openpam_get_option.c (props changed) vendor/openpam/FIGWORT/lib/openpam_impl.h (props changed) vendor/openpam/FIGWORT/lib/openpam_load.c (props changed) vendor/openpam/FIGWORT/lib/openpam_log.c (props changed) vendor/openpam/FIGWORT/lib/openpam_nullconv.c (props changed) vendor/openpam/FIGWORT/lib/openpam_readline.c (props changed) vendor/openpam/FIGWORT/lib/openpam_restore_cred.c (props changed) vendor/openpam/FIGWORT/lib/openpam_set_option.c (props changed) vendor/openpam/FIGWORT/lib/openpam_static.c (props changed) vendor/openpam/FIGWORT/lib/openpam_ttyconv.c (props changed) vendor/openpam/FIGWORT/lib/pam_acct_mgmt.c (props changed) vendor/openpam/FIGWORT/lib/pam_authenticate.c (props changed) vendor/openpam/FIGWORT/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/FIGWORT/lib/pam_chauthtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_close_session.c (props changed) vendor/openpam/FIGWORT/lib/pam_end.c (props changed) vendor/openpam/FIGWORT/lib/pam_error.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_authtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_data.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_item.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_mapped_username.c (props changed) vendor/openpam/FIGWORT/lib/pam_get_user.c (props changed) vendor/openpam/FIGWORT/lib/pam_getenv.c (props changed) vendor/openpam/FIGWORT/lib/pam_getenvlist.c (props changed) vendor/openpam/FIGWORT/lib/pam_info.c (props changed) vendor/openpam/FIGWORT/lib/pam_open_session.c (props changed) vendor/openpam/FIGWORT/lib/pam_prompt.c (props changed) vendor/openpam/FIGWORT/lib/pam_putenv.c (props changed) vendor/openpam/FIGWORT/lib/pam_set_data.c (props changed) vendor/openpam/FIGWORT/lib/pam_set_item.c (props changed) vendor/openpam/FIGWORT/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_set_mapped_username.c (props changed) vendor/openpam/FIGWORT/lib/pam_setcred.c (props changed) vendor/openpam/FIGWORT/lib/pam_setenv.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_authenticate.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_close_session.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_open_session.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/FIGWORT/lib/pam_sm_setcred.c (props changed) vendor/openpam/FIGWORT/lib/pam_start.c (props changed) vendor/openpam/FIGWORT/lib/pam_strerror.c (props changed) vendor/openpam/FIGWORT/lib/pam_verror.c (props changed) vendor/openpam/FIGWORT/lib/pam_vinfo.c (props changed) vendor/openpam/FIGWORT/lib/pam_vprompt.c (props changed) vendor/openpam/FIGWORT/misc/gendoc.pl (props changed) vendor/openpam/FIGWORT/modules/Makefile.am (props changed) vendor/openpam/FIGWORT/modules/Makefile.in (props changed) vendor/openpam/FIGWORT/modules/pam_deny/Makefile.am (props changed) vendor/openpam/FIGWORT/modules/pam_deny/Makefile.in (props changed) vendor/openpam/FIGWORT/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/FIGWORT/modules/pam_permit/Makefile.am (props changed) vendor/openpam/FIGWORT/modules/pam_permit/Makefile.in (props changed) vendor/openpam/FIGWORT/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/FIGWORT/modules/pam_unix/Makefile.am (props changed) vendor/openpam/FIGWORT/modules/pam_unix/Makefile.in (props changed) vendor/openpam/FIGWORT/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/HYDRANGEA/bin/Makefile.am (props changed) vendor/openpam/HYDRANGEA/bin/Makefile.in (props changed) vendor/openpam/HYDRANGEA/bin/su/Makefile.am (props changed) vendor/openpam/HYDRANGEA/bin/su/Makefile.in (props changed) vendor/openpam/HYDRANGEA/bin/su/su.c (props changed) vendor/openpam/HYDRANGEA/doc/Makefile.am (props changed) vendor/openpam/HYDRANGEA/doc/Makefile.in (props changed) vendor/openpam/HYDRANGEA/doc/man/Makefile.am (props changed) vendor/openpam/HYDRANGEA/doc/man/Makefile.in (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam.man (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_free_data.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_free_envlist.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_get_option.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_log.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_readline.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_set_option.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam.conf.5 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam.man (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_authenticate.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_close_session.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_conv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_end.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_error.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_get_data.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_get_item.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_get_user.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_getenv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_info.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_open_session.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_prompt.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_putenv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_set_data.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_set_item.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_setcred.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_setenv.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_start.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_strerror.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_verror.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_vinfo.3 (props changed) vendor/openpam/HYDRANGEA/doc/man/pam_vprompt.3 (props changed) vendor/openpam/HYDRANGEA/include/Makefile.am (props changed) vendor/openpam/HYDRANGEA/include/Makefile.in (props changed) vendor/openpam/HYDRANGEA/include/security/Makefile.am (props changed) vendor/openpam/HYDRANGEA/include/security/Makefile.in (props changed) vendor/openpam/HYDRANGEA/include/security/openpam.h (props changed) vendor/openpam/HYDRANGEA/include/security/openpam_attr.h (props changed) vendor/openpam/HYDRANGEA/include/security/openpam_version.h (props changed) vendor/openpam/HYDRANGEA/include/security/pam_appl.h (props changed) vendor/openpam/HYDRANGEA/include/security/pam_constants.h (props changed) vendor/openpam/HYDRANGEA/include/security/pam_modules.h (props changed) vendor/openpam/HYDRANGEA/include/security/pam_types.h (props changed) vendor/openpam/HYDRANGEA/lib/Makefile.am (props changed) vendor/openpam/HYDRANGEA/lib/Makefile.in (props changed) vendor/openpam/HYDRANGEA/lib/openpam_borrow_cred.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_configure.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_dispatch.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_dynamic.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_findenv.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_free_data.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_free_envlist.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_get_option.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_impl.h (props changed) vendor/openpam/HYDRANGEA/lib/openpam_load.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_log.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_nullconv.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_readline.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_restore_cred.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_set_option.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_static.c (props changed) vendor/openpam/HYDRANGEA/lib/openpam_ttyconv.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_acct_mgmt.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_authenticate.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_chauthtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_close_session.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_end.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_error.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_authtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_data.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_item.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_mapped_username.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_get_user.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_getenv.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_getenvlist.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_info.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_open_session.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_prompt.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_putenv.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_set_data.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_set_item.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_set_mapped_username.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_setcred.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_setenv.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_authenticate.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_close_session.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_open_session.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_sm_setcred.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_start.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_strerror.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_verror.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_vinfo.c (props changed) vendor/openpam/HYDRANGEA/lib/pam_vprompt.c (props changed) vendor/openpam/HYDRANGEA/misc/gendoc.pl (props changed) vendor/openpam/HYDRANGEA/modules/Makefile.am (props changed) vendor/openpam/HYDRANGEA/modules/Makefile.in (props changed) vendor/openpam/HYDRANGEA/modules/pam_deny/Makefile.am (props changed) vendor/openpam/HYDRANGEA/modules/pam_deny/Makefile.in (props changed) vendor/openpam/HYDRANGEA/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/HYDRANGEA/modules/pam_permit/Makefile.am (props changed) vendor/openpam/HYDRANGEA/modules/pam_permit/Makefile.in (props changed) vendor/openpam/HYDRANGEA/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/HYDRANGEA/modules/pam_unix/Makefile.am (props changed) vendor/openpam/HYDRANGEA/modules/pam_unix/Makefile.in (props changed) vendor/openpam/HYDRANGEA/modules/pam_unix/pam_unix.c (props changed) vendor/openpam/dist/bin/Makefile.am (props changed) vendor/openpam/dist/bin/Makefile.in (props changed) vendor/openpam/dist/bin/su/Makefile.am (props changed) vendor/openpam/dist/bin/su/Makefile.in (props changed) vendor/openpam/dist/bin/su/su.c (props changed) vendor/openpam/dist/doc/Makefile.am (props changed) vendor/openpam/dist/doc/Makefile.in (props changed) vendor/openpam/dist/doc/man/Makefile.am (props changed) vendor/openpam/dist/doc/man/Makefile.in (props changed) vendor/openpam/dist/doc/man/openpam.3 (props changed) vendor/openpam/dist/doc/man/openpam.man (props changed) vendor/openpam/dist/doc/man/openpam_borrow_cred.3 (props changed) vendor/openpam/dist/doc/man/openpam_free_data.3 (props changed) vendor/openpam/dist/doc/man/openpam_free_envlist.3 (props changed) vendor/openpam/dist/doc/man/openpam_get_option.3 (props changed) vendor/openpam/dist/doc/man/openpam_log.3 (props changed) vendor/openpam/dist/doc/man/openpam_nullconv.3 (props changed) vendor/openpam/dist/doc/man/openpam_readline.3 (props changed) vendor/openpam/dist/doc/man/openpam_restore_cred.3 (props changed) vendor/openpam/dist/doc/man/openpam_set_option.3 (props changed) vendor/openpam/dist/doc/man/openpam_ttyconv.3 (props changed) vendor/openpam/dist/doc/man/pam.3 (props changed) vendor/openpam/dist/doc/man/pam.conf.5 (props changed) vendor/openpam/dist/doc/man/pam.man (props changed) vendor/openpam/dist/doc/man/pam_acct_mgmt.3 (props changed) vendor/openpam/dist/doc/man/pam_authenticate.3 (props changed) vendor/openpam/dist/doc/man/pam_chauthtok.3 (props changed) vendor/openpam/dist/doc/man/pam_close_session.3 (props changed) vendor/openpam/dist/doc/man/pam_conv.3 (props changed) vendor/openpam/dist/doc/man/pam_end.3 (props changed) vendor/openpam/dist/doc/man/pam_error.3 (props changed) vendor/openpam/dist/doc/man/pam_get_authtok.3 (props changed) vendor/openpam/dist/doc/man/pam_get_data.3 (props changed) vendor/openpam/dist/doc/man/pam_get_item.3 (props changed) vendor/openpam/dist/doc/man/pam_get_user.3 (props changed) vendor/openpam/dist/doc/man/pam_getenv.3 (props changed) vendor/openpam/dist/doc/man/pam_getenvlist.3 (props changed) vendor/openpam/dist/doc/man/pam_info.3 (props changed) vendor/openpam/dist/doc/man/pam_open_session.3 (props changed) vendor/openpam/dist/doc/man/pam_prompt.3 (props changed) vendor/openpam/dist/doc/man/pam_putenv.3 (props changed) vendor/openpam/dist/doc/man/pam_set_data.3 (props changed) vendor/openpam/dist/doc/man/pam_set_item.3 (props changed) vendor/openpam/dist/doc/man/pam_setcred.3 (props changed) vendor/openpam/dist/doc/man/pam_setenv.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_acct_mgmt.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_authenticate.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_chauthtok.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_close_session.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_open_session.3 (props changed) vendor/openpam/dist/doc/man/pam_sm_setcred.3 (props changed) vendor/openpam/dist/doc/man/pam_start.3 (props changed) vendor/openpam/dist/doc/man/pam_strerror.3 (props changed) vendor/openpam/dist/doc/man/pam_verror.3 (props changed) vendor/openpam/dist/doc/man/pam_vinfo.3 (props changed) vendor/openpam/dist/doc/man/pam_vprompt.3 (props changed) vendor/openpam/dist/include/Makefile.am (props changed) vendor/openpam/dist/include/Makefile.in (props changed) vendor/openpam/dist/include/security/Makefile.am (props changed) vendor/openpam/dist/include/security/Makefile.in (props changed) vendor/openpam/dist/include/security/openpam.h (props changed) vendor/openpam/dist/include/security/openpam_attr.h (props changed) vendor/openpam/dist/include/security/openpam_version.h (props changed) vendor/openpam/dist/include/security/pam_appl.h (props changed) vendor/openpam/dist/include/security/pam_constants.h (props changed) vendor/openpam/dist/include/security/pam_modules.h (props changed) vendor/openpam/dist/include/security/pam_types.h (props changed) vendor/openpam/dist/lib/Makefile.am (props changed) vendor/openpam/dist/lib/Makefile.in (props changed) vendor/openpam/dist/lib/openpam_borrow_cred.c (props changed) vendor/openpam/dist/lib/openpam_configure.c (props changed) vendor/openpam/dist/lib/openpam_dispatch.c (props changed) vendor/openpam/dist/lib/openpam_dynamic.c (props changed) vendor/openpam/dist/lib/openpam_findenv.c (props changed) vendor/openpam/dist/lib/openpam_free_data.c (props changed) vendor/openpam/dist/lib/openpam_free_envlist.c (props changed) vendor/openpam/dist/lib/openpam_get_option.c (props changed) vendor/openpam/dist/lib/openpam_impl.h (props changed) vendor/openpam/dist/lib/openpam_load.c (props changed) vendor/openpam/dist/lib/openpam_log.c (props changed) vendor/openpam/dist/lib/openpam_nullconv.c (props changed) vendor/openpam/dist/lib/openpam_readline.c (props changed) vendor/openpam/dist/lib/openpam_restore_cred.c (props changed) vendor/openpam/dist/lib/openpam_set_option.c (props changed) vendor/openpam/dist/lib/openpam_static.c (props changed) vendor/openpam/dist/lib/openpam_ttyconv.c (props changed) vendor/openpam/dist/lib/pam_acct_mgmt.c (props changed) vendor/openpam/dist/lib/pam_authenticate.c (props changed) vendor/openpam/dist/lib/pam_authenticate_secondary.c (props changed) vendor/openpam/dist/lib/pam_chauthtok.c (props changed) vendor/openpam/dist/lib/pam_close_session.c (props changed) vendor/openpam/dist/lib/pam_end.c (props changed) vendor/openpam/dist/lib/pam_error.c (props changed) vendor/openpam/dist/lib/pam_get_authtok.c (props changed) vendor/openpam/dist/lib/pam_get_data.c (props changed) vendor/openpam/dist/lib/pam_get_item.c (props changed) vendor/openpam/dist/lib/pam_get_mapped_authtok.c (props changed) vendor/openpam/dist/lib/pam_get_mapped_username.c (props changed) vendor/openpam/dist/lib/pam_get_user.c (props changed) vendor/openpam/dist/lib/pam_getenv.c (props changed) vendor/openpam/dist/lib/pam_getenvlist.c (props changed) vendor/openpam/dist/lib/pam_info.c (props changed) vendor/openpam/dist/lib/pam_open_session.c (props changed) vendor/openpam/dist/lib/pam_prompt.c (props changed) vendor/openpam/dist/lib/pam_putenv.c (props changed) vendor/openpam/dist/lib/pam_set_data.c (props changed) vendor/openpam/dist/lib/pam_set_item.c (props changed) vendor/openpam/dist/lib/pam_set_mapped_authtok.c (props changed) vendor/openpam/dist/lib/pam_set_mapped_username.c (props changed) vendor/openpam/dist/lib/pam_setcred.c (props changed) vendor/openpam/dist/lib/pam_setenv.c (props changed) vendor/openpam/dist/lib/pam_sm_acct_mgmt.c (props changed) vendor/openpam/dist/lib/pam_sm_authenticate.c (props changed) vendor/openpam/dist/lib/pam_sm_authenticate_secondary.c (props changed) vendor/openpam/dist/lib/pam_sm_chauthtok.c (props changed) vendor/openpam/dist/lib/pam_sm_close_session.c (props changed) vendor/openpam/dist/lib/pam_sm_get_mapped_authtok.c (props changed) vendor/openpam/dist/lib/pam_sm_get_mapped_username.c (props changed) vendor/openpam/dist/lib/pam_sm_open_session.c (props changed) vendor/openpam/dist/lib/pam_sm_set_mapped_authtok.c (props changed) vendor/openpam/dist/lib/pam_sm_set_mapped_username.c (props changed) vendor/openpam/dist/lib/pam_sm_setcred.c (props changed) vendor/openpam/dist/lib/pam_start.c (props changed) vendor/openpam/dist/lib/pam_strerror.c (props changed) vendor/openpam/dist/lib/pam_verror.c (props changed) vendor/openpam/dist/lib/pam_vinfo.c (props changed) vendor/openpam/dist/lib/pam_vprompt.c (props changed) vendor/openpam/dist/misc/gendoc.pl (props changed) vendor/openpam/dist/modules/Makefile.am (props changed) vendor/openpam/dist/modules/Makefile.in (props changed) vendor/openpam/dist/modules/pam_deny/Makefile.am (props changed) vendor/openpam/dist/modules/pam_deny/Makefile.in (props changed) vendor/openpam/dist/modules/pam_deny/pam_deny.c (props changed) vendor/openpam/dist/modules/pam_permit/Makefile.am (props changed) vendor/openpam/dist/modules/pam_permit/Makefile.in (props changed) vendor/openpam/dist/modules/pam_permit/pam_permit.c (props changed) vendor/openpam/dist/modules/pam_unix/Makefile.am (props changed) vendor/openpam/dist/modules/pam_unix/Makefile.in (props changed) vendor/openpam/dist/modules/pam_unix/pam_unix.c (props changed) Copied: vendor/openpam/CALAMITE/HISTORY (from r186060, vendor/openpam/CALAMITE/contrib/openpam/HISTORY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/HISTORY Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/HISTORY) @@ -0,0 +1,6 @@ +============================================================================ +OpenPAM Calamite 2002-02-09 + +First (beta) release. +============================================================================ +$Id$ Copied: vendor/openpam/CALAMITE/INSTALL (from r186060, vendor/openpam/CALAMITE/contrib/openpam/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/INSTALL Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/INSTALL) @@ -0,0 +1,25 @@ + + Installing OpenPAM + ================== + +1. REQUIREMENTS + + This release of OpenPAM is targeted at FreeBSD-CURRENT, and has not + been tested on other platforms. It should, however, build with + little or no trouble other BSDs such as BSDI, Darwin, NetBSD or + OpenBSD, and should not prove much of a challenge to port to other + platforms, except for the static linking support. + +2. CONFIGURATION + + No configuration is necessary or possible at this time. + +3. COMPILATION + + Change into the top-level OpenPAM directory and run 'make'. + +4. INSTALLATION + + Change into the top-level OpenPAM directory and run 'make install'. + +$Id$ Copied: vendor/openpam/CALAMITE/LICENSE (from r186060, vendor/openpam/CALAMITE/contrib/openpam/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/LICENSE Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/LICENSE) @@ -0,0 +1,34 @@ + +Copyright (c) 2002 Networks Associates Technologies, Inc. +All rights reserved. + +This software was developed for the FreeBSD Project by ThinkSec AS and +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 name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +$Id$ Copied: vendor/openpam/CALAMITE/MANIFEST (from r186060, vendor/openpam/CALAMITE/contrib/openpam/MANIFEST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/MANIFEST Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/MANIFEST) @@ -0,0 +1,87 @@ +HISTORY +INSTALL +LICENSE +MANIFEST +Makefile +README +RELNOTES +bin/Makefile +bin/su/Makefile +bin/su/su.c +doc/Makefile +doc/man/Makefile +doc/man/pam.3 +doc/man/pam_acct_mgmt.3 +doc/man/pam_authenticate.3 +doc/man/pam_chauthtok.3 +doc/man/pam_close_session.3 +doc/man/pam_end.3 +doc/man/pam_error.3 +doc/man/pam_get_authtok.3 +doc/man/pam_get_data.3 +doc/man/pam_get_item.3 +doc/man/pam_get_user.3 +doc/man/pam_getenv.3 +doc/man/pam_getenvlist.3 +doc/man/pam_info.3 +doc/man/pam_open_session.3 +doc/man/pam_prompt.3 +doc/man/pam_putenv.3 +doc/man/pam_set_data.3 +doc/man/pam_set_item.3 +doc/man/pam_setcred.3 +doc/man/pam_setenv.3 +doc/man/pam_start.3 +doc/man/pam_strerror.3 +doc/man/pam_verror.3 +doc/man/pam_vinfo.3 +doc/man/pam_vprompt.3 +include/security/openpam.h +include/security/pam_appl.h +include/security/pam_constants.h +include/security/pam_modules.h +include/security/pam_types.h +lib/Makefile +lib/openpam_dispatch.c +lib/openpam_findenv.c +lib/openpam_impl.h +lib/openpam_load.c +lib/openpam_log.c +lib/openpam_ttyconv.c +lib/pam_acct_mgmt.c +lib/pam_authenticate.c +lib/pam_authenticate_secondary.c +lib/pam_chauthtok.c +lib/pam_close_session.c +lib/pam_end.c +lib/pam_error.c +lib/pam_get_authtok.c +lib/pam_get_data.c +lib/pam_get_item.c +lib/pam_get_mapped_authtok.c +lib/pam_get_mapped_username.c +lib/pam_get_user.c +lib/pam_getenv.c +lib/pam_getenvlist.c +lib/pam_info.c +lib/pam_open_session.c +lib/pam_prompt.c +lib/pam_putenv.c +lib/pam_set_data.c +lib/pam_set_item.c +lib/pam_set_mapped_authtok.c +lib/pam_set_mapped_username.c +lib/pam_setcred.c +lib/pam_setenv.c +lib/pam_start.c +lib/pam_strerror.c +lib/pam_verror.c +lib/pam_vinfo.c +lib/pam_vprompt.c +modules/Makefile +modules/pam_deny/Makefile +modules/pam_deny/pam_deny.c +modules/pam_dummy/Makefile +modules/pam_dummy/pam_dummy.c +modules/pam_permit/Makefile +modules/pam_permit/pam_permit.c Copied: vendor/openpam/CALAMITE/Makefile (from r186060, vendor/openpam/CALAMITE/contrib/openpam/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/Makefile Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/Makefile) @@ -0,0 +1,43 @@ +#- +# Copyright (c) 2002 Networks Associates Technologies, Inc. +# All rights reserved. +# +# This software was developed for the FreeBSD Project by ThinkSec AS and +# 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 name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $Id$ +# + +SUBDIR = +SUBDIR += modules +SUBDIR += lib +SUBDIR += bin +SUBDIR += doc + +.include Copied: vendor/openpam/CALAMITE/README (from r186060, vendor/openpam/CALAMITE/contrib/openpam/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/README Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/README) @@ -0,0 +1,30 @@ +OpenPAM is an open source PAM library that focuses on simplicity, +correctness, and cleanliness. + +OpenPAM aims to gather the best features of Solaris PAM, XSSO and +Linux-PAM, plus some innovations of its own. In areas where these +implementations disagree, OpenPAM tries to remain compatible with +Solaris, at the expense of XSSO conformance and Linux-PAM +compatibility. + +These are some of OpenPAM's features: + + - Implements the complete PAM API as described in the original PAM + paper and in OSF-RFC 86.0; this corresponds to the full XSSO API + except for mappings and secondary authentication. + + - Extends the API with several useful and time-saving functions: + pam_error(), pam_get_authtok(), pam_info(), pam_prompt(), + pam_setenv(), pam_verror(), pam_vinfo(), pam_vprompt() + + - Offers a number of time-saving convenience functions: + openpam_log(), openpam_ttyconv(). + + - Performs strict checking of return values from service modules. + + - Reads configuration from /etc/pam.d/, /usr/local/etc/pam.d/ and + /etc/pam.conf, in that order; this will be made configurable in a + future release.Please direct bug reports and inquiries to + openpam@thinksec.com. + +$Id$ Copied: vendor/openpam/CALAMITE/RELNOTES (from r186060, vendor/openpam/CALAMITE/contrib/openpam/RELNOTES) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALAMITE/RELNOTES Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALAMITE/contrib/openpam/RELNOTES) @@ -0,0 +1,16 @@ + + Release notes for OpenPAM Calamite + ================================== + +This is a beta release. + +The library itself is mostly complete. Documentation exists in the +form of skeletal man pages for the library itself, but no detailed +documentation is provided in this release. + +This release is primarily intended for reviewers and developers +interested in testing OpenPAM on FreeBSD. It has not been tested on +any other OS, though it should build and run with minimal tweaks on +NetBSD and OpenBSD. + +$Id$ Modified: vendor/openpam/CALAMITE/modules/pam_deny/pam_deny.c ============================================================================== --- vendor/openpam/CALAMITE/contrib/openpam/modules/pam_deny/pam_deny.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALAMITE/modules/pam_deny/pam_deny.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALAMITE/contrib/openpam/modules/pam_deny/pam_deny.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CALAMITE/modules/pam_dummy/pam_dummy.c ============================================================================== --- vendor/openpam/CALAMITE/contrib/openpam/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALAMITE/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALAMITE/contrib/openpam/modules/pam_dummy/pam_dummy.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CALAMITE/modules/pam_permit/pam_permit.c ============================================================================== --- vendor/openpam/CALAMITE/contrib/openpam/modules/pam_permit/pam_permit.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALAMITE/modules/pam_permit/pam_permit.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALAMITE/contrib/openpam/modules/pam_permit/pam_permit.c 91094 2002-02-23 01:22:51Z des $ */ #include Copied: vendor/openpam/CALIOPSIS/HISTORY (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/HISTORY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/HISTORY Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/HISTORY) @@ -0,0 +1,17 @@ +============================================================================ +OpenPAM Caliopsis 2002-02-13 + +Fixed a number of bugs in the previous release, including: + - a number of bugs in and related to pam_[gs]et_item(3) + - off-by-one bug in pam_start.c would trim last character off certain + configuration lines + - incorrect ordering of an array in openpam_load.c would cause service + module functions to get mixed up + - missing 'continue' in openpam_dispatch.c caused successes to be + counted as failures +============================================================================ +OpenPAM Calamite 2002-02-09 + +First (beta) release. +============================================================================ +$Id$ Copied: vendor/openpam/CALIOPSIS/INSTALL (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/INSTALL Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/INSTALL) @@ -0,0 +1,25 @@ + + Installing OpenPAM + ================== + +1. REQUIREMENTS + + This release of OpenPAM is targeted at FreeBSD-CURRENT, and has not + been tested on other platforms. It should, however, build with + little or no trouble other BSDs such as BSDI, Darwin, NetBSD or + OpenBSD, and should not prove much of a challenge to port to other + platforms, except for the static linking support. + +2. CONFIGURATION + + No configuration is necessary or possible at this time. + +3. COMPILATION + + Change into the top-level OpenPAM directory and run 'make'. + +4. INSTALLATION + + Change into the top-level OpenPAM directory and run 'make install'. + +$Id$ Copied: vendor/openpam/CALIOPSIS/LICENSE (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/LICENSE Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/LICENSE) @@ -0,0 +1,34 @@ + +Copyright (c) 2002 Networks Associates Technologies, Inc. +All rights reserved. + +This software was developed for the FreeBSD Project by ThinkSec AS and +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 name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +$Id$ Copied: vendor/openpam/CALIOPSIS/MANIFEST (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/MANIFEST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/MANIFEST Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/MANIFEST) @@ -0,0 +1,87 @@ +HISTORY +INSTALL +LICENSE +MANIFEST +Makefile +README +RELNOTES +bin/Makefile +bin/su/Makefile +bin/su/su.c +doc/Makefile +doc/man/Makefile +doc/man/pam.3 +doc/man/pam_acct_mgmt.3 +doc/man/pam_authenticate.3 +doc/man/pam_chauthtok.3 +doc/man/pam_close_session.3 +doc/man/pam_end.3 +doc/man/pam_error.3 +doc/man/pam_get_authtok.3 +doc/man/pam_get_data.3 +doc/man/pam_get_item.3 +doc/man/pam_get_user.3 +doc/man/pam_getenv.3 +doc/man/pam_getenvlist.3 +doc/man/pam_info.3 +doc/man/pam_open_session.3 +doc/man/pam_prompt.3 +doc/man/pam_putenv.3 +doc/man/pam_set_data.3 +doc/man/pam_set_item.3 +doc/man/pam_setcred.3 +doc/man/pam_setenv.3 +doc/man/pam_start.3 +doc/man/pam_strerror.3 +doc/man/pam_verror.3 +doc/man/pam_vinfo.3 +doc/man/pam_vprompt.3 +include/security/openpam.h +include/security/pam_appl.h +include/security/pam_constants.h +include/security/pam_modules.h +include/security/pam_types.h +lib/Makefile +lib/openpam_dispatch.c +lib/openpam_findenv.c +lib/openpam_impl.h +lib/openpam_load.c +lib/openpam_log.c +lib/openpam_ttyconv.c +lib/pam_acct_mgmt.c +lib/pam_authenticate.c +lib/pam_authenticate_secondary.c +lib/pam_chauthtok.c +lib/pam_close_session.c +lib/pam_end.c +lib/pam_error.c +lib/pam_get_authtok.c +lib/pam_get_data.c +lib/pam_get_item.c +lib/pam_get_mapped_authtok.c +lib/pam_get_mapped_username.c +lib/pam_get_user.c +lib/pam_getenv.c +lib/pam_getenvlist.c +lib/pam_info.c +lib/pam_open_session.c +lib/pam_prompt.c +lib/pam_putenv.c +lib/pam_set_data.c +lib/pam_set_item.c +lib/pam_set_mapped_authtok.c +lib/pam_set_mapped_username.c +lib/pam_setcred.c +lib/pam_setenv.c +lib/pam_start.c +lib/pam_strerror.c +lib/pam_verror.c +lib/pam_vinfo.c +lib/pam_vprompt.c +modules/Makefile +modules/pam_deny/Makefile +modules/pam_deny/pam_deny.c +modules/pam_dummy/Makefile +modules/pam_dummy/pam_dummy.c +modules/pam_permit/Makefile +modules/pam_permit/pam_permit.c Copied: vendor/openpam/CALIOPSIS/Makefile (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/Makefile Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/Makefile) @@ -0,0 +1,43 @@ +#- +# Copyright (c) 2002 Networks Associates Technologies, Inc. +# All rights reserved. +# +# This software was developed for the FreeBSD Project by ThinkSec AS and +# 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 name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $Id$ +# + +SUBDIR = +SUBDIR += modules +SUBDIR += lib +SUBDIR += bin +SUBDIR += doc + +.include Copied: vendor/openpam/CALIOPSIS/README (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/README Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/README) @@ -0,0 +1,30 @@ +OpenPAM is an open source PAM library that focuses on simplicity, +correctness, and cleanliness. + +OpenPAM aims to gather the best features of Solaris PAM, XSSO and +Linux-PAM, plus some innovations of its own. In areas where these +implementations disagree, OpenPAM tries to remain compatible with +Solaris, at the expense of XSSO conformance and Linux-PAM +compatibility. + +These are some of OpenPAM's features: + + - Implements the complete PAM API as described in the original PAM + paper and in OSF-RFC 86.0; this corresponds to the full XSSO API + except for mappings and secondary authentication. + + - Extends the API with several useful and time-saving functions: + pam_error(), pam_get_authtok(), pam_info(), pam_prompt(), + pam_setenv(), pam_verror(), pam_vinfo(), pam_vprompt() + + - Offers a number of time-saving convenience functions: + openpam_log(), openpam_ttyconv(). + + - Performs strict checking of return values from service modules. + + - Reads configuration from /etc/pam.d/, /usr/local/etc/pam.d/ and + /etc/pam.conf, in that order; this will be made configurable in a + future release.Please direct bug reports and inquiries to + openpam@thinksec.com. + +$Id$ Copied: vendor/openpam/CALIOPSIS/RELNOTES (from r186060, vendor/openpam/CALIOPSIS/contrib/openpam/RELNOTES) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CALIOPSIS/RELNOTES Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CALIOPSIS/contrib/openpam/RELNOTES) @@ -0,0 +1,28 @@ + + Release notes for OpenPAM Caliopsis + =================================== + +This is a beta release. + +The library itself is mostly complete. Documentation exists in the +form of skeletal man pages for the library itself, but no detailed +documentation is provided in this release. + +This release is primarily intended for reviewers and developers +interested in testing OpenPAM on FreeBSD. It has not been tested on +any other OS, though it should build and run with minimal tweaks on +NetBSD and OpenBSD. + +Known issues: + + - The pam_get_user() and pam_get_authtok() functions do not check + for commonly used options such as {use,try}_first_pass or + auth_as_self. In fact, pam_get_authtok() behaves as if + try_first_pass was always specified. + + - The provided conversation function, openpam_ttyconv(), should + block signals, and support some sort of timeout. + + - The documentation is far from complete. + +$Id$ Modified: vendor/openpam/CALIOPSIS/modules/pam_deny/pam_deny.c ============================================================================== --- vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_deny/pam_deny.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALIOPSIS/modules/pam_deny/pam_deny.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_deny/pam_deny.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CALIOPSIS/modules/pam_dummy/pam_dummy.c ============================================================================== --- vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALIOPSIS/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_dummy/pam_dummy.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CALIOPSIS/modules/pam_permit/pam_permit.c ============================================================================== --- vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_permit/pam_permit.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CALIOPSIS/modules/pam_permit/pam_permit.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CALIOPSIS/contrib/openpam/modules/pam_permit/pam_permit.c 91094 2002-02-23 01:22:51Z des $ */ #include Copied: vendor/openpam/CANTALOUPE/HISTORY (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/HISTORY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/HISTORY Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/HISTORY) @@ -0,0 +1,47 @@ +============================================================================ +OpenPAM Cantaloupe 2002-02-22 + + - BUGFIX: The proper use of PAM_SYMBOL_ERR is to indicate an invalid + argument to pam_[gs]et_item(3), not to indicate dlsym(3) failures. + + - ENHANCE: Add in-line documentation in most source files, and a Perl + script that generates mdoc code from that. + + - BUGFIX: The environment list was not properly NULL-terminated. + + - ENHANCE: Allow the PAM_AUTHTOK_PROMPT item to override the prompt + specified by the module. + + - BUGFIX: PAM_NUM_ITEMS was set too low. It has been moved to + pam_constants.h to avoid it going stale again. + + - ENHANCE: Move all code related to static modules into a separate + file. + + - ENHANCE: openpam_ttyconv() now masks most signals while prompting the + user, and supports setting a timeout (which defaults to off). + + - BUGFIX: Some manual pages referenced XSSO even though they + documented OpenPAM-specific functions. + + - ENHANCE: Added openpam_get_option() and openpam_set_option(). + + - ENHANCE: openpam_get_authtok() now respects the echo_pass, + try_first_pass, and use_first_pass options. +============================================================================ +OpenPAM Caliopsis 2002-02-13 + +Fixed a number of bugs in the previous release, including: + - a number of bugs in and related to pam_[gs]et_item(3) + - off-by-one bug in pam_start.c would trim last character off certain + configuration lines + - incorrect ordering of an array in openpam_load.c would cause service + module functions to get mixed up + - missing 'continue' in openpam_dispatch.c caused successes to be + counted as failures +============================================================================ +OpenPAM Calamite 2002-02-09 + +First (beta) release. +============================================================================ +$Id$ Copied: vendor/openpam/CANTALOUPE/INSTALL (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/INSTALL Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/INSTALL) @@ -0,0 +1,25 @@ + + Installing OpenPAM + ================== + +1. REQUIREMENTS + + This release of OpenPAM is targeted at FreeBSD-CURRENT, and has not + been tested on other platforms. It should, however, build with + little or no trouble other BSDs such as BSDI, Darwin, NetBSD or + OpenBSD, and should not prove much of a challenge to port to other + platforms, except for the static linking support. + +2. CONFIGURATION + + No configuration is necessary or possible at this time. + +3. COMPILATION + + Change into the top-level OpenPAM directory and run 'make'. + +4. INSTALLATION + + Change into the top-level OpenPAM directory and run 'make install'. + +$Id$ Copied: vendor/openpam/CANTALOUPE/LICENSE (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/LICENSE Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/LICENSE) @@ -0,0 +1,34 @@ + +Copyright (c) 2002 Networks Associates Technologies, Inc. +All rights reserved. + +This software was developed for the FreeBSD Project by ThinkSec AS and +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 name of the author may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. + +$Id$ Copied: vendor/openpam/CANTALOUPE/MANIFEST (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/MANIFEST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/MANIFEST Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/MANIFEST) @@ -0,0 +1,112 @@ +HISTORY +INSTALL +LICENSE +MANIFEST +Makefile +README +RELNOTES +bin/Makefile +bin/su/Makefile +bin/su/su.c +doc/Makefile +doc/man/Makefile +doc/man/openpam_get_option.3 +doc/man/openpam_log.3 +doc/man/openpam_set_option.3 +doc/man/openpam_ttyconv.3 +doc/man/pam.3 +doc/man/pam_acct_mgmt.3 +doc/man/pam_authenticate.3 +doc/man/pam_chauthtok.3 +doc/man/pam_close_session.3 +doc/man/pam_end.3 +doc/man/pam_error.3 +doc/man/pam_get_authtok.3 +doc/man/pam_get_data.3 +doc/man/pam_get_item.3 +doc/man/pam_get_user.3 +doc/man/pam_getenv.3 +doc/man/pam_getenvlist.3 +doc/man/pam_info.3 +doc/man/pam_open_session.3 +doc/man/pam_prompt.3 +doc/man/pam_putenv.3 +doc/man/pam_set_data.3 +doc/man/pam_set_item.3 +doc/man/pam_setcred.3 +doc/man/pam_setenv.3 +doc/man/pam_sm_acct_mgmt.3 +doc/man/pam_sm_authenticate.3 +doc/man/pam_sm_chauthtok.3 +doc/man/pam_sm_close_session.3 +doc/man/pam_sm_open_session.3 +doc/man/pam_sm_setcred.3 +doc/man/pam_start.3 +doc/man/pam_strerror.3 +doc/man/pam_verror.3 +doc/man/pam_vinfo.3 +doc/man/pam_vprompt.3 +include/security/openpam.h +include/security/pam_appl.h +include/security/pam_constants.h +include/security/pam_modules.h +include/security/pam_types.h +lib/Makefile +lib/openpam_dispatch.c +lib/openpam_findenv.c +lib/openpam_get_option.c +lib/openpam_impl.h +lib/openpam_load.c +lib/openpam_log.c +lib/openpam_set_option.c +lib/openpam_static.c +lib/openpam_ttyconv.c +lib/pam_acct_mgmt.c +lib/pam_authenticate.c +lib/pam_authenticate_secondary.c +lib/pam_chauthtok.c +lib/pam_close_session.c +lib/pam_end.c +lib/pam_error.c +lib/pam_get_authtok.c +lib/pam_get_data.c +lib/pam_get_item.c +lib/pam_get_mapped_authtok.c +lib/pam_get_mapped_username.c +lib/pam_get_user.c +lib/pam_getenv.c +lib/pam_getenvlist.c +lib/pam_info.c +lib/pam_open_session.c +lib/pam_prompt.c +lib/pam_putenv.c +lib/pam_set_data.c +lib/pam_set_item.c +lib/pam_set_mapped_authtok.c +lib/pam_set_mapped_username.c +lib/pam_setcred.c +lib/pam_setenv.c +lib/pam_sm_acct_mgmt.c +lib/pam_sm_authenticate.c +lib/pam_sm_authenticate_secondary.c +lib/pam_sm_chauthtok.c +lib/pam_sm_close_session.c +lib/pam_sm_get_mapped_authtok.c +lib/pam_sm_get_mapped_username.c +lib/pam_sm_open_session.c +lib/pam_sm_set_mapped_authtok.c +lib/pam_sm_set_mapped_username.c +lib/pam_sm_setcred.c +lib/pam_start.c +lib/pam_strerror.c +lib/pam_verror.c +lib/pam_vinfo.c +lib/pam_vprompt.c +misc/gendoc.pl +modules/Makefile +modules/pam_deny/Makefile +modules/pam_deny/pam_deny.c +modules/pam_dummy/Makefile +modules/pam_dummy/pam_dummy.c +modules/pam_permit/Makefile +modules/pam_permit/pam_permit.c Copied: vendor/openpam/CANTALOUPE/Makefile (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/Makefile) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/Makefile Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/Makefile) @@ -0,0 +1,43 @@ +#- +# Copyright (c) 2002 Networks Associates Technologies, Inc. +# All rights reserved. +# +# This software was developed for the FreeBSD Project by ThinkSec AS and +# 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 name of the author may not be used to endorse or promote +# products derived from this software without specific prior written +# permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $Id$ +# + +SUBDIR = +SUBDIR += modules +SUBDIR += lib +SUBDIR += bin +SUBDIR += doc + +.include Copied: vendor/openpam/CANTALOUPE/README (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/README Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/README) @@ -0,0 +1,30 @@ +OpenPAM is an open source PAM library that focuses on simplicity, +correctness, and cleanliness. + +OpenPAM aims to gather the best features of Solaris PAM, XSSO and +Linux-PAM, plus some innovations of its own. In areas where these +implementations disagree, OpenPAM tries to remain compatible with +Solaris, at the expense of XSSO conformance and Linux-PAM +compatibility. + +These are some of OpenPAM's features: + + - Implements the complete PAM API as described in the original PAM + paper and in OSF-RFC 86.0; this corresponds to the full XSSO API + except for mappings and secondary authentication. + + - Extends the API with several useful and time-saving functions: + pam_error(), pam_get_authtok(), pam_info(), pam_prompt(), + pam_setenv(), pam_verror(), pam_vinfo(), pam_vprompt() + + - Offers a number of time-saving convenience functions: + openpam_log(), openpam_ttyconv(). + + - Performs strict checking of return values from service modules. + + - Reads configuration from /etc/pam.d/, /usr/local/etc/pam.d/ and + /etc/pam.conf, in that order; this will be made configurable in a + future release.Please direct bug reports and inquiries to + openpam@thinksec.com. + +$Id$ Copied: vendor/openpam/CANTALOUPE/RELNOTES (from r186060, vendor/openpam/CANTALOUPE/contrib/openpam/RELNOTES) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CANTALOUPE/RELNOTES Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CANTALOUPE/contrib/openpam/RELNOTES) @@ -0,0 +1,23 @@ + + Release notes for OpenPAM Cantaloupe + ==================================== + +This is a beta release. + +The library itself is mostly complete. Documentation exists in the +form of man pages for the library functions, though some pages are +still incomplete. + +This release is primarily intended for reviewers and developers +interested in testing OpenPAM on FreeBSD. It has not been tested on +any other OS, though it should build and run with minimal tweaks on +NetBSD and OpenBSD. + +Known issues: + + - The documentation is still incomplete. + +Oh, and the previous release's code name was misspelled - egg on my +face! It should have been "Calliopsis". + +$Id$ Modified: vendor/openpam/CANTALOUPE/modules/pam_deny/pam_deny.c ============================================================================== --- vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_deny/pam_deny.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CANTALOUPE/modules/pam_deny/pam_deny.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_deny/pam_deny.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CANTALOUPE/modules/pam_dummy/pam_dummy.c ============================================================================== --- vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CANTALOUPE/modules/pam_dummy/pam_dummy.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_dummy/pam_dummy.c 91094 2002-02-23 01:22:51Z des $ */ #include Modified: vendor/openpam/CANTALOUPE/modules/pam_permit/pam_permit.c ============================================================================== --- vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_permit/pam_permit.c Sat Dec 13 22:26:24 2008 (r186060) +++ vendor/openpam/CANTALOUPE/modules/pam_permit/pam_permit.c Sat Dec 13 22:45:22 2008 (r186063) @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD: vendor/openpam/CANTALOUPE/contrib/openpam/modules/pam_permit/pam_permit.c 91094 2002-02-23 01:22:51Z des $ */ #include Copied: vendor/openpam/CELANDINE/HISTORY (from r186060, vendor/openpam/CELANDINE/contrib/openpam/HISTORY) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/openpam/CELANDINE/HISTORY Sat Dec 13 22:45:22 2008 (r186063, copy of r186060, vendor/openpam/CELANDINE/contrib/openpam/HISTORY) @@ -0,0 +1,70 @@ +============================================================================ +OpenPAM Celandine 2002-03-05 + + - BUGFIX: PAM_TRY_AGAIN is a valid return value for pam_chauthtok(). + + - BUGFIX: Run passwd chain twice, first with the PAM_PRELIM_CHECK + flag set, then with the PAM_UPDATE_AUTHTOK flag set. + + - BUGFIX: Failure of a "sufficient" module should not terminate the + passwd chain if the PAM_PRELIM_CHECK flag is set. + + - BUGFIX: Clear PAM_AUTHTOK after running the service modules. + + - ENHANCE: Prevent applications from specifying the PAM_PRELIM_CHECK + or PAM_UPDATE_AUTHTOK flags themselves. + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 23:10:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16218106564A; Sat, 13 Dec 2008 23:10:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 05A1A8FC14; Sat, 13 Dec 2008 23:10:37 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDNAa8R042584; Sat, 13 Dec 2008 23:10:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDNAa6M042583; Sat, 13 Dec 2008 23:10:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200812132310.mBDNAa6M042583@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 13 Dec 2008 23:10:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186064 - vendor/openpam/dist/include/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 23:10:37 -0000 Author: des Date: Sat Dec 13 23:10:36 2008 New Revision: 186064 URL: http://svn.freebsd.org/changeset/base/186064 Log: Merge upstream r418: remove static build autodetection. Modified: vendor/openpam/dist/include/security/openpam.h Modified: vendor/openpam/dist/include/security/openpam.h ============================================================================== --- vendor/openpam/dist/include/security/openpam.h Sat Dec 13 22:45:22 2008 (r186063) +++ vendor/openpam/dist/include/security/openpam.h Sat Dec 13 23:10:36 2008 (r186064) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2002-2003 Networks Associates Technology, Inc. - * Copyright (c) 2004-2007 Dag-Erling Smørgrav + * Copyright (c) 2004-2008 Dag-Erling Smørgrav * All rights reserved. * * This software was developed for the FreeBSD Project by ThinkSec AS and @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: openpam.h 408 2007-12-21 11:36:24Z des $ + * $Id: openpam.h 418 2008-12-13 22:39:24Z des $ */ #ifndef SECURITY_OPENPAM_H_INCLUDED @@ -309,18 +309,17 @@ struct pam_module { * Infrastructure for static modules using GCC linker sets. * You are not expected to understand this. */ -#if defined(__FreeBSD__) +#if !defined(PAM_SOEXT) # define PAM_SOEXT ".so" -#else -# undef NO_STATIC_MODULES -# define NO_STATIC_MODULES #endif -#if defined(__GNUC__) && !defined(__PIC__) && !defined(NO_STATIC_MODULES) +#if defined(OPENPAM_STATIC_MODULES) +# if !defined(__GNUC__) +# error "Don't know how to build static modules on non-GNU compilers" +# endif /* gcc, static linking */ # include # include -# define OPENPAM_STATIC_MODULES # define PAM_EXTERN static # define PAM_MODULE_ENTRY(name) \ static char _pam_name[] = name PAM_SOEXT; \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 13 23:28:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF9AC1065670; Sat, 13 Dec 2008 23:28:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 964098FC14; Sat, 13 Dec 2008 23:28:11 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mBDNSB1D043015; Sat, 13 Dec 2008 23:28:11 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mBDNSBoN043014; Sat, 13 Dec 2008 23:28:11 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200812132328.mBDNSBoN043014@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Sat, 13 Dec 2008 23:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186066 - head/contrib/openpam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Dec 2008 23:28:11 -0000 Author: des Date: Sat Dec 13 23:28:11 2008 New Revision: 186066 URL: http://svn.freebsd.org/changeset/base/186066 Log: Bootstrap mergeinfo Modified: head/contrib/openpam/ (props changed)