From owner-svn-src-stable-7@FreeBSD.ORG Sun Dec 27 07:04:25 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB5D9106566B; Sun, 27 Dec 2009 07:04:25 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D96058FC13; Sun, 27 Dec 2009 07:04:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBR74P1D046608; Sun, 27 Dec 2009 07:04:25 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBR74PCf046606; Sun, 27 Dec 2009 07:04:25 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200912270704.nBR74PCf046606@svn.freebsd.org> From: Xin LI Date: Sun, 27 Dec 2009 07:04: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: r201042 - stable/7/lib/libexpat X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Dec 2009 07:04:26 -0000 Author: delphij Date: Sun Dec 27 07:04:25 2009 New Revision: 201042 URL: http://svn.freebsd.org/changeset/base/201042 Log: Explicitly say that this is an internal library which is intended to be used within FreeBSD base system only, and discourage user applications from using it. User applications should use the expat version from the ports/package collection. Reviewed by: simon (earlier version) Modified: stable/7/lib/libexpat/libbsdxml.3 Directory Properties: stable/7/lib/libexpat/ (props changed) Modified: stable/7/lib/libexpat/libbsdxml.3 ============================================================================== --- stable/7/lib/libexpat/libbsdxml.3 Sun Dec 27 07:04:23 2009 (r201041) +++ stable/7/lib/libexpat/libbsdxml.3 Sun Dec 27 07:04:25 2009 (r201042) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd October 4, 2002 +.Dd December 12, 2009 .Dt LIBBSDXML 3 .Os .Sh NAME @@ -38,6 +38,15 @@ The .Nm library is a verbatim copy of the eXpat XML library version 1.95.5. .Pp +The +.Nm +library is intended to use within the +.Fx +base system only. +Use of the +.Nm +library for other purposes is not supported and discouraged. +.Pp To avoid version and autoconfiguration issues, the library has been renamed to .Nm From owner-svn-src-stable-7@FreeBSD.ORG Mon Dec 28 14:55:32 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44316106568D; Mon, 28 Dec 2009 14:55: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 3217D8FC08; Mon, 28 Dec 2009 14:55:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBSEtWbA093573; Mon, 28 Dec 2009 14:55:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBSEtWWc093571; Mon, 28 Dec 2009 14:55:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200912281455.nBSEtWWc093571@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 28 Dec 2009 14:55:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201132 - stable/7/sys/kern X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Dec 2009 14:55:32 -0000 Author: bz Date: Mon Dec 28 14:55:31 2009 New Revision: 201132 URL: http://svn.freebsd.org/changeset/base/201132 Log: MFC rr200995: Remove an unused global. Modified: stable/7/sys/kern/kern_proc.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/kern_proc.c ============================================================================== --- stable/7/sys/kern/kern_proc.c Mon Dec 28 14:48:32 2009 (r201131) +++ stable/7/sys/kern/kern_proc.c Mon Dec 28 14:55:31 2009 (r201132) @@ -140,7 +140,6 @@ struct sx allproc_lock; struct sx proctree_lock; struct mtx ppeers_lock; uma_zone_t proc_zone; -uma_zone_t ithread_zone; int kstack_pages = KSTACK_PAGES; SYSCTL_INT(_kern, OID_AUTO, kstack_pages, CTLFLAG_RD, &kstack_pages, 0, ""); From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 29 04:29:39 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 413031065672; Tue, 29 Dec 2009 04:29:39 +0000 (UTC) (envelope-from nyan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C8E68FC13; Tue, 29 Dec 2009 04:29:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBT4Tdha010630; Tue, 29 Dec 2009 04:29:39 GMT (envelope-from nyan@svn.freebsd.org) Received: (from nyan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBT4Tdlo010628; Tue, 29 Dec 2009 04:29:39 GMT (envelope-from nyan@svn.freebsd.org) Message-Id: <200912290429.nBT4Tdlo010628@svn.freebsd.org> From: Takahashi Yoshihiro Date: Tue, 29 Dec 2009 04:29:39 +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: r201153 - stable/7/sys/boot/pc98/kgzldr X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 04:29:39 -0000 Author: nyan Date: Tue Dec 29 04:29:38 2009 New Revision: 201153 URL: http://svn.freebsd.org/changeset/base/201153 Log: MFC: revision 200776 Move cursor position after putting a character. Modified: stable/7/sys/boot/pc98/kgzldr/crt.s Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/boot/pc98/kgzldr/crt.s ============================================================================== --- stable/7/sys/boot/pc98/kgzldr/crt.s Tue Dec 29 04:23:46 2009 (r201152) +++ stable/7/sys/boot/pc98/kgzldr/crt.s Tue Dec 29 04:29:38 2009 (r201153) @@ -75,5 +75,15 @@ crt_putchr.3: cmpw $SCR_ROW*SCR_COL*2,%d stosw # line movw $(SCR_ROW-1)*SCR_COL*2,%dx crt_putchr.4: movw %dx,(%ebx) # Update position + shrw $1,%dx +crt_putchr.5: inb $0x60,%al # Move cursor + testb $0x04,%al + jz crt_putchr.5 + movb $0x49,%al + outb %al,$0x62 + movb %dl,%al + outb %al,$0x60 + movb %dh,%al + outb %al,$0x60 popa # Restore ret # To caller From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 29 05:51:24 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73F9106566C; Tue, 29 Dec 2009 05:51:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D17718FC13; Tue, 29 Dec 2009 05:51:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBT5pOQj012642; Tue, 29 Dec 2009 05:51:24 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBT5pOpA012634; Tue, 29 Dec 2009 05:51:24 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912290551.nBT5pOpA012634@svn.freebsd.org> From: Doug Barton Date: Tue, 29 Dec 2009 05:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201164 - in stable/7/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf sun4v/conf X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 05:51:25 -0000 Author: dougb Date: Tue Dec 29 05:51:24 2009 New Revision: 201164 URL: http://svn.freebsd.org/changeset/base/201164 Log: MFC r200594: Add INCLUDE_CONFIG_FILE, and a note in comments about how to also include the comments with CONFIGARGS Modified: stable/7/sys/amd64/conf/DEFAULTS stable/7/sys/i386/conf/DEFAULTS stable/7/sys/ia64/conf/DEFAULTS stable/7/sys/pc98/conf/DEFAULTS stable/7/sys/powerpc/conf/DEFAULTS stable/7/sys/sparc64/conf/DEFAULTS stable/7/sys/sun4v/conf/DEFAULTS Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/amd64/conf/DEFAULTS ============================================================================== --- stable/7/sys/amd64/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/amd64/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -21,3 +21,10 @@ options GEOM_MBR # KSE support went from being default to a kernel option options KSE + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/i386/conf/DEFAULTS ============================================================================== --- stable/7/sys/i386/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/i386/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -25,3 +25,10 @@ options GEOM_MBR # KSE support went from being default to a kernel option options KSE + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/ia64/conf/DEFAULTS ============================================================================== --- stable/7/sys/ia64/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/ia64/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -20,3 +20,10 @@ options GEOM_PART_MBR # KSE support went from being default to a kernel option options KSE + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/pc98/conf/DEFAULTS ============================================================================== --- stable/7/sys/pc98/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/pc98/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -27,3 +27,10 @@ options GEOM_PC98 # KSE support went from being default to a kernel option options KSE + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/powerpc/conf/DEFAULTS ============================================================================== --- stable/7/sys/powerpc/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/powerpc/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -17,3 +17,10 @@ options GEOM_PART_MBR # KSE support went from being default to a kernel option options KSE + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/sparc64/conf/DEFAULTS ============================================================================== --- stable/7/sys/sparc64/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/sparc64/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -22,3 +22,10 @@ options GEOM_SUNLABEL # Let sunkbd emulate an AT keyboard by default. options SUNKBD_EMULATE_ATKBD + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: stable/7/sys/sun4v/conf/DEFAULTS ============================================================================== --- stable/7/sys/sun4v/conf/DEFAULTS Tue Dec 29 05:50:34 2009 (r201163) +++ stable/7/sys/sun4v/conf/DEFAULTS Tue Dec 29 05:51:24 2009 (r201164) @@ -12,3 +12,10 @@ device genclock # Generic clock interfa # Default partitioning schemes options GEOM_BSD options GEOM_SUNLABEL + +# Store the plain version of the configuration file in the kernel itself. +# To store the entire file, including comments, put this in /etc/src.conf: +# CONFIGARGS= -C +# See config(8) for more details. +# +options INCLUDE_CONFIG_FILE # Include this file in kernel From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 29 07:13:18 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B187106566B; Tue, 29 Dec 2009 07:13:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 16A438FC14; Tue, 29 Dec 2009 07:13:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBT7DI54014574; Tue, 29 Dec 2009 07:13:18 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBT7DIbl014570; Tue, 29 Dec 2009 07:13:18 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200912290713.nBT7DIbl014570@svn.freebsd.org> From: Doug Barton Date: Tue, 29 Dec 2009 07:13:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201173 - in stable/7/etc: mtree namedb rc.d X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 07:13:18 -0000 Author: dougb Date: Tue Dec 29 07:13:17 2009 New Revision: 201173 URL: http://svn.freebsd.org/changeset/base/201173 Log: MFC r200448: Since the change to rc.subr in r198162 it's not necessary to specify command in the rc.d script if we have a corresponding ${name}_program entry, which we do for named. Rename named_precmd to named_prestart to make it more clear and match convention. Move the command_args definition related to -u up into _prestart(). It (and the associated $named_uid value) are only used there, and unlike required_* and pidfile don't need to be used until this stage. Fix a silly bug that would only have affected people who were using the new named_wait or named_auto_forward features, AND had set up an rndc.conf file instead of using the automatically generated rndc.key. For named_conf: Add "-c $named_conf" to command_args if it's not set to the default. If it is set to the default and we're using the base BIND it's not necessary. If we're using BIND from the ports the user is likely to have included it in _flags (due to long necessity for doing so) so don't duplicate that if it's set. Add $named_conf to required_files MFC r200563: The named process needs to have a "working directory" that it can write to. This is specified in "options { directory }" in named.conf. So, create /etc/namedb/working with appropriate permissions, and update the entry in named.conf to match. In addition to specifying the working directory, file and path names in named.conf can be specified relative to the directory listed. However, since that directory is now different from /etc/namedb (where the configuration, zone, rndc.*, and other files are located) further update named.conf to specify all file names with fully qualified paths. Also update the comment about file and path names so users know this should be done for all file/path names in the file. This change will eliminate the 'working directory is not writable' messages at boot time without sacrificing security. It will also allow for features in newer versions of BIND (9.7+) to work as designed. Modified: stable/7/etc/mtree/BIND.chroot.dist stable/7/etc/namedb/named.conf stable/7/etc/rc.d/named Directory Properties: stable/7/etc/ (props changed) Modified: stable/7/etc/mtree/BIND.chroot.dist ============================================================================== --- stable/7/etc/mtree/BIND.chroot.dist Tue Dec 29 07:08:48 2009 (r201172) +++ stable/7/etc/mtree/BIND.chroot.dist Tue Dec 29 07:13:17 2009 (r201173) @@ -15,6 +15,8 @@ .. slave uname=bind .. + working uname=bind + .. .. .. /set type=dir uname=bind gname=wheel mode=0755 Modified: stable/7/etc/namedb/named.conf ============================================================================== --- stable/7/etc/namedb/named.conf Tue Dec 29 07:08:48 2009 (r201172) +++ stable/7/etc/namedb/named.conf Tue Dec 29 07:13:17 2009 (r201173) @@ -9,8 +9,9 @@ // or cause huge amounts of useless Internet traffic. options { - // Relative to the chroot directory, if any - directory "/etc/namedb"; + // All file and path names are relative to the chroot directory, + // if any, and should be fully qualified. + directory "/etc/namedb/working"; pid-file "/var/run/named/pid"; dump-file "/var/dump/named_dump.db"; statistics-file "/var/stats/named.stats"; @@ -74,7 +75,7 @@ options { // Also, make sure to enable it in /etc/rc.conf. // The traditional root hints mechanism. Use this, OR the slave zones below. -zone "." { type hint; file "named.root"; }; +zone "." { type hint; file "/etc/namedb/named.root"; }; /* Slaving the following zones from the root name servers has some significant advantages: @@ -94,7 +95,7 @@ zone "." { type hint; file "named.root"; /* zone "." { type slave; - file "slave/root.slave"; + file "/etc/namedb/slave/root.slave"; masters { 192.5.5.241; // F.ROOT-SERVERS.NET. }; @@ -102,7 +103,7 @@ zone "." { }; zone "arpa" { type slave; - file "slave/arpa.slave"; + file "/etc/namedb/slave/arpa.slave"; masters { 192.5.5.241; // F.ROOT-SERVERS.NET. }; @@ -110,7 +111,7 @@ zone "arpa" { }; zone "in-addr.arpa" { type slave; - file "slave/in-addr.arpa.slave"; + file "/etc/namedb/slave/in-addr.arpa.slave"; masters { 192.5.5.241; // F.ROOT-SERVERS.NET. }; @@ -125,116 +126,116 @@ zone "in-addr.arpa" { 2. No spurious traffic will be sent from your network to the roots */ // RFC 1912 -zone "localhost" { type master; file "master/localhost-forward.db"; }; -zone "127.in-addr.arpa" { type master; file "master/localhost-reverse.db"; }; -zone "255.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "localhost" { type master; file "/etc/namedb/master/localhost-forward.db"; }; +zone "127.in-addr.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; +zone "255.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // RFC 1912-style zone for IPv6 localhost address -zone "0.ip6.arpa" { type master; file "master/localhost-reverse.db"; }; +zone "0.ip6.arpa" { type master; file "/etc/namedb/master/localhost-reverse.db"; }; // "This" Network (RFCs 1912 and 3330) -zone "0.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "0.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // Private Use Networks (RFC 1918) -zone "10.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "16.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "17.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "18.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "20.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "21.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "22.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "23.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "24.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "25.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "26.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "27.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "28.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "29.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "30.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "31.172.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "168.192.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "10.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "16.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "17.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "18.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "19.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "20.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "21.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "22.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "23.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "24.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "25.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "26.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "27.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "28.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "29.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "30.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "31.172.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "168.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // Link-local/APIPA (RFCs 3330 and 3927) -zone "254.169.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "254.169.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // TEST-NET for Documentation (RFC 3330) -zone "2.0.192.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "2.0.192.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // Router Benchmark Testing (RFC 3330) -zone "18.198.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "19.198.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "18.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "19.198.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IANA Reserved - Old Class E Space -zone "240.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "241.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "242.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "243.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "244.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "245.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "246.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "247.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "248.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "249.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "250.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "251.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "252.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "253.in-addr.arpa" { type master; file "master/empty.db"; }; -zone "254.in-addr.arpa" { type master; file "master/empty.db"; }; +zone "240.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "241.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "242.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "243.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "244.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "245.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "246.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "247.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "248.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "249.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "250.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "251.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "252.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "253.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "254.in-addr.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IPv6 Unassigned Addresses (RFC 4291) -zone "1.ip6.arpa" { type master; file "master/empty.db"; }; -zone "3.ip6.arpa" { type master; file "master/empty.db"; }; -zone "4.ip6.arpa" { type master; file "master/empty.db"; }; -zone "5.ip6.arpa" { type master; file "master/empty.db"; }; -zone "6.ip6.arpa" { type master; file "master/empty.db"; }; -zone "7.ip6.arpa" { type master; file "master/empty.db"; }; -zone "8.ip6.arpa" { type master; file "master/empty.db"; }; -zone "9.ip6.arpa" { type master; file "master/empty.db"; }; -zone "a.ip6.arpa" { type master; file "master/empty.db"; }; -zone "b.ip6.arpa" { type master; file "master/empty.db"; }; -zone "c.ip6.arpa" { type master; file "master/empty.db"; }; -zone "d.ip6.arpa" { type master; file "master/empty.db"; }; -zone "e.ip6.arpa" { type master; file "master/empty.db"; }; -zone "0.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "1.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "2.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "3.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "4.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "5.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "6.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "7.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "8.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "9.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "a.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "b.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "0.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "1.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "2.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "3.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "4.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "5.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "6.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "7.e.f.ip6.arpa" { type master; file "master/empty.db"; }; +zone "1.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "3.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "4.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "5.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "6.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "7.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "8.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "9.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "a.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "b.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "c.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "d.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "e.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "0.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "1.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "2.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "3.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "4.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "5.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "6.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "7.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "8.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "9.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "a.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "b.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "0.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "1.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "2.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "3.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "4.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "5.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "6.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "7.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IPv6 ULA (RFC 4193) -zone "c.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "d.f.ip6.arpa" { type master; file "master/empty.db"; }; +zone "c.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "d.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IPv6 Link Local (RFC 4291) -zone "8.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "9.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "a.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "b.e.f.ip6.arpa" { type master; file "master/empty.db"; }; +zone "8.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "9.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "a.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "b.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IPv6 Deprecated Site-Local Addresses (RFC 3879) -zone "c.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "d.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "e.e.f.ip6.arpa" { type master; file "master/empty.db"; }; -zone "f.e.f.ip6.arpa" { type master; file "master/empty.db"; }; +zone "c.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "d.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "e.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; +zone "f.e.f.ip6.arpa" { type master; file "/etc/namedb/master/empty.db"; }; // IP6.INT is Deprecated (RFC 4159) -zone "ip6.int" { type master; file "master/empty.db"; }; +zone "ip6.int" { type master; file "/etc/namedb/master/empty.db"; }; // NB: Do not use the IP addresses below, they are faked, and only // serve demonstration/documentation purposes! @@ -265,17 +266,16 @@ zone "example.org" { allow-update { key "exampleorgkey"; }; - file "dynamic/example.org"; + file "/etc/namedb/dynamic/example.org"; }; */ /* Example of a slave reverse zone zone "1.168.192.in-addr.arpa" { type slave; - file "slave/1.168.192.in-addr.arpa"; + file "/etc/namedb/slave/1.168.192.in-addr.arpa"; masters { 192.168.1.1; }; }; */ - Modified: stable/7/etc/rc.d/named ============================================================================== --- stable/7/etc/rc.d/named Tue Dec 29 07:08:48 2009 (r201172) +++ stable/7/etc/rc.d/named Tue Dec 29 07:13:17 2009 (r201173) @@ -12,10 +12,9 @@ name="named" rcvar=named_enable -command="/usr/sbin/named" extra_commands="reload" -start_precmd="named_precmd" +start_precmd="named_prestart" start_postcmd="named_poststart" reload_cmd="named_reload" stop_cmd="named_stop" @@ -155,8 +154,17 @@ create_file () { chmod 644 $1 } -named_precmd() +named_prestart() { + command_args="-u ${named_uid:=root}" + + if [ ! "$named_conf" = '/etc/namedb/named.conf' ]; then + case "$named_flags" in + -c*|*' -c'*) ;; # No need to add it + *) command_args="-c $named_conf $command_args" ;; + esac + fi + local line nsip firstns # Is the user using a sandbox? @@ -170,11 +178,11 @@ named_precmd() # Create an rndc.key file for the user if none exists # - if [ -s "${named_chrootdir}/etc/namedb/rndc.conf" ]; then - return 0 - fi confgen_command="${command%/named}/rndc-confgen -a -b256 -u $named_uid \ -c ${named_chrootdir}/etc/namedb/rndc.key" + if [ -s "${named_chrootdir}/etc/namedb/rndc.conf" ]; then + unset confgen_command + fi if [ -s "${named_chrootdir}/etc/namedb/rndc.key" ]; then case `stat -f%Su ${named_chrootdir}/etc/namedb/rndc.key` in root|$named_uid) ;; @@ -260,10 +268,11 @@ named_precmd() } load_rc_config $name + # Updating the following variables requires that rc.conf be loaded first # required_dirs="$named_chrootdir" # if it is set, it must exist +required_files="${named_conf:=/etc/namedb/named.conf}" pidfile="${named_pidfile:-/var/run/named/pid}" -command_args="-u ${named_uid:=root}" run_rc_command "$1" From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 29 10:05:43 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B180B10656C6; Tue, 29 Dec 2009 10:05:43 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86EC38FC19; Tue, 29 Dec 2009 10:05:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTA5hhu019098; Tue, 29 Dec 2009 10:05:43 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTA5hmo019095; Tue, 29 Dec 2009 10:05:43 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200912291005.nBTA5hmo019095@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 29 Dec 2009 10:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201184 - in stable/7: lib/libc/stdtime usr.sbin/zic X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 10:05:43 -0000 Author: edwin Date: Tue Dec 29 10:05:43 2009 New Revision: 201184 URL: http://svn.freebsd.org/changeset/base/201184 Log: MFC of r200832, tzdata2009t zic: - Fix URL / reference to Calendrical Calculations: Third Edition libc/stdtime: - Fix typo in tzfile.5 (no changes in our part) Modified: stable/7/lib/libc/stdtime/tzfile.5 stable/7/usr.sbin/zic/Theory Directory Properties: stable/7/lib/libc/ (props changed) stable/7/lib/libc/stdtime/ (props changed) stable/7/usr.sbin/zic/ (props changed) Modified: stable/7/lib/libc/stdtime/tzfile.5 ============================================================================== --- stable/7/lib/libc/stdtime/tzfile.5 Tue Dec 29 10:05:20 2009 (r201183) +++ stable/7/lib/libc/stdtime/tzfile.5 Tue Dec 29 10:05:43 2009 (r201184) @@ -147,6 +147,6 @@ such instants). .Xr ctime 3 , .Xr time2posix 3 , .Xr zic 8 -.\" @(#)tzfile.5 8.2 +.\" @(#)tzfile.5 8.3 .\" This file is in the public domain, so clarified as of .\" 1996-06-05 by Arthur David Olson. Modified: stable/7/usr.sbin/zic/Theory ============================================================================== --- stable/7/usr.sbin/zic/Theory Tue Dec 29 10:05:20 2009 (r201183) +++ stable/7/usr.sbin/zic/Theory Tue Dec 29 10:05:43 2009 (r201184) @@ -1,4 +1,4 @@ -@(#)Theory 8.3 +@(#)Theory 8.4 This file is in the public domain, so clarified as of 2009-05-17 by Arthur David Olson. $FreeBSD$ @@ -361,10 +361,10 @@ abbreviations like `EST'; this avoids th Calendrical issues are a bit out of scope for a time zone database, but they indicate the sort of problems that we would run into if we extended the time zone database further into the past. An excellent -resource in this area is Edward M. Reingold and Nachum Dershowitz, - -Calendrical Calculations: The Millennium Edition -, Cambridge University Press (2001). Other information and +resource in this area is Nachum Dershowitz and Edward M. Reingold, + +Calendrical Calculations: Third Edition +, Cambridge University Press (2008). Other information and sources are given below. They sometimes disagree. From owner-svn-src-stable-7@FreeBSD.ORG Tue Dec 29 10:07:20 2009 Return-Path: Delivered-To: svn-src-stable-7@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 030B11065779; Tue, 29 Dec 2009 10:07:20 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E56298FC17; Tue, 29 Dec 2009 10:07:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTA7JS5019227; Tue, 29 Dec 2009 10:07:19 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTA7Jdt019223; Tue, 29 Dec 2009 10:07:19 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200912291007.nBTA7Jdt019223@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 29 Dec 2009 10:07:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201186 - stable/7/share/zoneinfo X-BeenThere: svn-src-stable-7@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 7-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2009 10:07:20 -0000 Author: edwin Date: Tue Dec 29 10:07:19 2009 New Revision: 201186 URL: http://svn.freebsd.org/changeset/base/201186 Log: MFC of r200835, tzcode2009t Comment only, no data changes. Modified: stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/zone.tab Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Tue Dec 29 10:07:09 2009 (r201185) +++ stable/7/share/zoneinfo/asia Tue Dec 29 10:07:19 2009 (r201186) @@ -1,4 +1,4 @@ -# @(#)asia 8.44 +# @(#)asia 8.48 # This file is in the public domain, so clarified as of # 2009-05-17 by Arthur David Olson. @@ -363,6 +363,69 @@ Zone Asia/Urumqi 5:50:20 - LMT 1928 # or # West Xinjiang, including Aksu, Atushi, Yining, Hetian, Cele, Luopu, Nileke, # Zhaosu, Tekesi, Gongliu, Chabuchaer, Huocheng, Bole, Pishan, Suiding, # and Yarkand. + +# From Luther Ma (2009-10-17): +# Almost all (>99.9%) ethnic Chinese (properly ethnic Han) living in +# Xinjiang use Chinese Standard Time. Some are aware of Xinjiang time, +# but have no need of it. All planes, trains, and schools function on +# what is called "Beijing time." When Han make an appointment in Chinese +# they implicitly use Beijing time. +# +# On the other hand, ethnic Uyghurs, who make up about half the +# population of Xinjiang, typically use "Xinjiang time" which is two +# hours behind Beijing time, or UTC +0600. The government of the Xinjiang +# Uyghur Autonomous Region, (XAUR, or just Xinjiang for short) as well as +# local governments such as the Urumqi city government use both times in +# publications, referring to what is popularly called Xinjiang time as +# "Urumqi time." When Uyghurs make an appointment in the Uyghur language +# they almost invariably use Xinjiang time. +# +# (Their ethnic Han compatriots would typically have no clue of its +# widespread use, however, because so extremely few of them are fluent in +# Uyghur, comparable to the number of Anglo-Americans fluent in Navajo.) +# +# (...As with the rest of China there was a brief interval ending in 1990 +# or 1991 when summer time was in use. The confusion was severe, with +# the province not having dual times but four times in use at the same +# time. Some areas remained on standard Xinjiang time or Beijing time and +# others moving their clocks ahead.) +# +# ...an example of an official website using of Urumqi time. +# +# The first few lines of the Google translation of +# +# http://www.fjysgl.gov.cn/show.aspx?id=2379&cid=39 +# +# (retrieved 2009-10-13) +# > Urumqi fire seven people are missing the alleged losses of at least +# > 500 million yuan +# > +# > (Reporter Dong Liu) the day before 20:20 or so (Urumqi Time 18:20), +# > Urumqi City Department of International Plaza Luther Qiantang River +# > burst fire. As of yesterday, 18:30, Urumqi City Fire officers and men +# > have worked continuously for 22 hours... + +# From Luther Ma (2009-11-19): +# With the risk of being redundant to previous answers these are the most common +# English "transliterations" (w/o using non-English symbols): +# +# 1. Wulumuqi... +# 2. Kashi... +# 3. Urumqi... +# 4. Kashgar... +# ... +# 5. It seems that Uyghurs in Urumqi has been using Xinjiang since at least the +# 1960's. I know of one Han, now over 50, who grew up in the surrounding +# countryside and used Xinjiang time as a child. +# +# 6. Likewise for Kashgar and the rest of south Xinjiang I don't know of any +# start date for Xinjiang time. +# +# Without having access to local historical records, nor the ability to legally +# publish them, I would go with October 1, 1949, when Xinjiang became the Uyghur +# Autonomous Region under the PRC. (Before that Uyghurs, of course, would also +# not be using Beijing time, but some local time.) + Zone Asia/Kashgar 5:03:56 - LMT 1928 # or Kashi or Kaxgar 5:30 - KAST 1940 # Kashgar Time 5:00 - KAST 1980 May @@ -370,8 +433,8 @@ Zone Asia/Kashgar 5:03:56 - LMT 1928 # o # From Lee Yiu Chung (2009-10-24): -# I found there are some mistakes for the historial DST rule for Hong -# Kong. Accoring to the DST record from Hong Kong Observatory (actually, +# I found there are some mistakes for the...DST rule for Hong +# Kong. [According] to the DST record from Hong Kong Observatory (actually, # it is not [an] observatory, but the official meteorological agency of HK, # and also serves as the official timing agency), there are some missing # and incorrect rules. Although the exact switch over time is missing, I Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Tue Dec 29 10:07:09 2009 (r201185) +++ stable/7/share/zoneinfo/europe Tue Dec 29 10:07:19 2009 (r201186) @@ -1,5 +1,5 @@ #
-# @(#)europe	8.24
+# @(#)europe	8.25
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -2130,12 +2130,20 @@ Zone Asia/Irkutsk	 6:57:20 -	LMT	1880
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Aginskij Buryatskij avtonomnyj okrug, Amurskaya oblast',
 # [parts of] Respublika Sakha (Yakutiya), Chitinskaya oblast'.
+
+# From Oscar van Vlijmen (2009-11-29):
+# ...some regions of RUssia were merged with others since 2005...
+# Some names were changed, no big deal, except for one instance: a new name.
+# YAK/YAKST: UTC+9 Zabajkal'skij kraj.
+
+# From Oscar van Vlijmen (2009-11-29):
 # The Sakha districts are: Aldanskij, Amginskij, Anabarskij,
-# Bulunskij, Verkhnekolymskij, Verkhnevilyujskij, Vilyujskij, Gornyj,
+# Verkhnevilyujskij, Vilyujskij, Gornyj,
 # Zhiganskij, Kobyajskij, Lenskij, Megino-Kangalasskij, Mirninskij,
-# Namskij, Nyurbinskij, Olenekskij, Olekminskij, Srednekolymskij,
+# Namskij, Nyurbinskij, Olenyokskij, Olyokminskij,
 # Suntarskij, Tattinskij, Ust'-Aldanskij, Khangalasskij,
-# Churapchinskij, Eveno-Bytantajskij.
+# Churapchinskij, Eveno-Bytantajskij Natsional'nij.
+
 Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 Dec 15
 			 8:00	-	YAKT	1930 Jun 21 # Yakutsk Time
 			 9:00	Russia	YAK%sT	1991 Mar 31 2:00s
@@ -2145,7 +2153,9 @@ Zone Asia/Yakutsk	 8:38:40 -	LMT	1919 De
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Evrejskaya avtonomnaya oblast', Khabarovskij kraj, Primorskij kraj,
 # [parts of] Respublika Sakha (Yakutiya).
-# The Sakha districts are: Verkhoyanskij, Tomponskij, Ust'-Majskij,
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Bulunskij, Verkhoyanskij, Tomponskij, Ust'-Majskij,
 # Ust'-Yanskij.
 Zone Asia/Vladivostok	 8:47:44 -	LMT	1922 Nov 15
 			 9:00	-	VLAT	1930 Jun 21 # Vladivostok Time
@@ -2166,8 +2176,10 @@ Zone Asia/Sakhalin	 9:30:48 -	LMT	1905 A
 # From Oscar van Vlijmen (2003-10-18): [This region consists of]
 # Magadanskaya oblast', Respublika Sakha (Yakutiya).
 # Probably also: Kuril Islands.
-# The Sakha districts are: Abyjskij, Allaikhovskij, Momskij,
-# Nizhnekolymskij, Ojmyakonskij.
+
+# From Oscar van Vlijmen (2009-11-29):
+# The Sakha districts are: Abyjskij, Allaikhovskij, Verkhhhnekolymskij, Momskij,
+# Nizhnekolymskij, Ojmyakonskij, Srednekolymskij.
 Zone Asia/Magadan	10:03:12 -	LMT	1924 May  2
 			10:00	-	MAGT	1930 Jun 21 # Magadan Time
 			11:00	Russia	MAG%sT	1991 Mar 31 2:00s

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Dec 29 10:07:09 2009	(r201185)
+++ stable/7/share/zoneinfo/zone.tab	Tue Dec 29 10:07:19 2009	(r201186)
@@ -1,5 +1,5 @@
 # 
-# @(#)zone.tab	8.29
+# @(#)zone.tab	8.31
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 #

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 10:15:13 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C8B401065670;
	Tue, 29 Dec 2009 10:15:13 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B7CE48FC14;
	Tue, 29 Dec 2009 10:15:13 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTAFDdw019611;
	Tue, 29 Dec 2009 10:15:13 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTAFD7u019609;
	Tue, 29 Dec 2009 10:15:13 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200912291015.nBTAFD7u019609@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 29 Dec 2009 10:15: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: r201191 - stable/7/share/zoneinfo
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 10:15:13 -0000

Author: edwin
Date: Tue Dec 29 10:15:13 2009
New Revision: 201191
URL: http://svn.freebsd.org/changeset/base/201191

Log:
  MFC of tzdata2009u, 201189
  
  Bangladesh will change its clock back to Standard Time on Dec 31, 2009.

Modified:
  stable/7/share/zoneinfo/asia
Directory Properties:
  stable/7/share/zoneinfo/   (props changed)

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Tue Dec 29 10:15:11 2009	(r201190)
+++ stable/7/share/zoneinfo/asia	Tue Dec 29 10:15:13 2009	(r201191)
@@ -1,4 +1,4 @@
-# @(#)asia	8.48
+# @(#)asia	8.50
 # This file is in the public domain, so clarified as of
 # 2009-05-17 by Arthur David Olson.
 
@@ -196,6 +196,41 @@ Zone	Asia/Bahrain	3:22:20 -	LMT	1920		# 
 # http://www.thaindian.com/newsportal/business/bangladesh-to-continue-indefinitely-with-advanced-time_100259987.html
 # 
 
+# From Alexander Krivenyshev (2009-12-24):
+# According to Bangladesh newspaper "The Daily Star,"
+# Bangladesh will change its clock back to Standard Time on Dec 31, 2009.
+#
+# Clock goes back 1-hr on Dec 31 night.
+# 
+# http://www.thedailystar.net/newDesign/news-details.php?nid=119228
+# 
+# and
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_bangladesh05.html
+# 
+#
+# "...The government yesterday decided to put the clock back by one hour
+# on December 31 midnight and the new time will continue until March 31,
+# 2010 midnight. The decision came at a cabinet meeting at the Prime
+# Minister's Office last night..."
+
+# From Danvin Ruangchan (2009-12-24):
+# ...the news mentions DST will be turned off again 7 months after March
+# 31st on Oct 31, 2010.
+
+# From Arthur David Olson (2009-12-26):
+# Indeed, "The government will advance again the Banglasdesh Standard
+# Time by one one hour on March 31 next year by enforcing the Daylight
+# Saving Time (DST) for seven months. It will continue till October 31
+# until further notice." I take that last sentence as the
+# establishment of a rule.
+
+# Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
+Rule	Dhaka	2009	only	-	Jun	29	23:00	1	S
+Rule	Dhaka	2010	only	-	Jan	1	0:00	-	-
+Rule	Dhaka	2010	max	-	Mar	31	23:00	1	S
+Rule	Dhaka	2010	max	-	Nov	1	0:00	-	-
+
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:53:20	-	HMT	1941 Oct    # Howrah Mean Time?
@@ -203,8 +238,8 @@ Zone	Asia/Dhaka	6:01:40 -	LMT	1890
 			5:30	-	IST	1942 Sep
 			6:30	-	BURT	1951 Sep 30
 			6:00	-	DACT	1971 Mar 26 # Dacca Time
-			6:00	-	BDT	2009 Jun 19 23:00 # Bangladesh Time
-			6:00	1:00	BDST
+			6:00	-	BDT	2009
+			6:00	Dhaka	BD%sT
 
 # Bhutan
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 13:55:16 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41788106568D;
	Tue, 29 Dec 2009 13:55: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 308F18FC19;
	Tue, 29 Dec 2009 13:55:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTDtGfs026145;
	Tue, 29 Dec 2009 13:55:16 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTDtGVl026143;
	Tue, 29 Dec 2009 13:55:16 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200912291355.nBTDtGVl026143@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 29 Dec 2009 13:55:16 +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: r201197 - stable/7/sys/kern
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 13:55:16 -0000

Author: rwatson
Date: Tue Dec 29 13:55:15 2009
New Revision: 201197
URL: http://svn.freebsd.org/changeset/base/201197

Log:
  Merge r189063 from head to stable/7:
  
    Add static tracing for privilege checking:
  
      priv:kernel:priv_check:priv_ok fires for granted privileges
      priv:kernel:priv_check:priv_err fires for denied privileges
  
    The first argument is the requested privilege number.  The naming
    convention is a little different from the OpenSolaris equivilent
    because we can't have '-' in probefunc names, and our privilege
    namespace is different.
  
  Requested by:	bz

Modified:
  stable/7/sys/kern/kern_priv.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_priv.c
==============================================================================
--- stable/7/sys/kern/kern_priv.c	Tue Dec 29 13:35:18 2009	(r201196)
+++ stable/7/sys/kern/kern_priv.c	Tue Dec 29 13:55:15 2009	(r201197)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2006 nCircle Network Security, Inc.
+ * Copyright (c) 2009 Robert N. M. Watson
  * All rights reserved.
  *
  * This software was developed by Robert N. M. Watson for the TrustedBSD
@@ -27,6 +28,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "opt_kdtrace.h"
 #include "opt_mac.h"
 
 #include 
@@ -37,6 +39,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -57,6 +60,14 @@ SYSCTL_INT(_security_bsd, OID_AUTO, suse
     &suser_enabled, 0, "processes with uid 0 have privilege");
 TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled);
 
+SDT_PROVIDER_DEFINE(priv);
+
+SDT_PROBE_DEFINE(priv, kernel, priv_check, priv_ok);
+SDT_PROBE_ARGTYPE(priv, kernel, priv_check, priv_ok, 0, "int");
+
+SDT_PROBE_DEFINE(priv, kernel, priv_check, priv_err);
+SDT_PROBE_ARGTYPE(priv, kernel, priv_check, priv_err, 0, "int");
+
 /*
  * Check a credential for privilege.  Lots of good reasons to deny privilege;
  * only a few to grant it.
@@ -76,7 +87,7 @@ priv_check_cred(struct ucred *cred, int 
 #ifdef MAC
 	error = mac_priv_check(cred, priv);
 	if (error)
-		return (error);
+		goto out;
 #endif
 
 	/*
@@ -85,7 +96,7 @@ priv_check_cred(struct ucred *cred, int 
 	 */
 	error = prison_priv_check(cred, priv);
 	if (error)
-		return (error);
+		goto out;
 
 	/*
 	 * Having determined if privilege is restricted by various policies,
@@ -103,13 +114,17 @@ priv_check_cred(struct ucred *cred, int 
 		case PRIV_MAXFILES:
 		case PRIV_MAXPROC:
 		case PRIV_PROC_LIMIT:
-			if (cred->cr_ruid == 0)
-				return (0);
+			if (cred->cr_ruid == 0) {
+				error = 0;
+				goto out;
+			}
 			break;
 
 		default:
-			if (cred->cr_uid == 0)
-				return (0);
+			if (cred->cr_uid == 0) {
+				error = 0;
+				goto out;
+			}
 			break;
 		}
 	}
@@ -119,10 +134,26 @@ priv_check_cred(struct ucred *cred, int 
 	 * privilege.
 	 */
 #ifdef MAC
-	if (mac_priv_grant(cred, priv) == 0)
-		return (0);
+	if (mac_priv_grant(cred, priv) == 0) {
+		error = 0;
+		goto out;
+	}
 #endif
-	return (EPERM);
+
+	/*
+	 * The default is deny, so if no policies have granted it, reject
+	 * with a privilege error here.
+	 */
+	error = EPERM;
+out:
+	if (error) {
+		SDT_PROBE(priv, kernel, priv_check, priv_err, priv, 0, 0, 0,
+		    0);
+	} else {
+		SDT_PROBE(priv, kernel, priv_check, priv_ok, priv, 0, 0, 0,
+		    0);
+	}
+	return (error);
 }
 
 int

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 17:31:53 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3671B1065698;
	Tue, 29 Dec 2009 17:31:53 +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 1930A8FC18;
	Tue, 29 Dec 2009 17:31:53 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTHVqni031190;
	Tue, 29 Dec 2009 17:31:53 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTHVqho031188;
	Tue, 29 Dec 2009 17:31:52 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200912291731.nBTHVqho031188@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 29 Dec 2009 17:31: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: r201206 - stable/7/sys/security/mac
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 17:31:53 -0000

Author: rwatson
Date: Tue Dec 29 17:31:52 2009
New Revision: 201206
URL: http://svn.freebsd.org/changeset/base/201206

Log:
  Merge r187666 from head to stable/7:
  
    Begin to add SDT tracing of the MAC Framework: add policy modevent,
    register, and unregister hooks that give access to the mac_policy_conf
    for the policy.
  
    Obtained from:	TrustedBSD Project
  
  Requested by:	bz

Modified:
  stable/7/sys/security/mac/mac_framework.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/security/mac/mac_framework.c
==============================================================================
--- stable/7/sys/security/mac/mac_framework.c	Tue Dec 29 16:01:22 2009	(r201205)
+++ stable/7/sys/security/mac/mac_framework.c	Tue Dec 29 17:31:52 2009	(r201206)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1999-2002, 2006 Robert N. M. Watson
+ * Copyright (c) 1999-2002, 2006, 2009 Robert N. M. Watson
  * Copyright (c) 2001 Ilmar S. Habibulin
  * Copyright (c) 2001-2005 Networks Associates Technology, Inc.
  * Copyright (c) 2005-2006 SPARTA, Inc.
@@ -62,6 +62,7 @@
  * src/sys/security/mac_*.
  */
 
+#include "opt_kdtrace.h"
 #include "opt_mac.h"
 
 #include 
@@ -74,6 +75,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -82,6 +84,24 @@ __FBSDID("$FreeBSD$");
 #include 
 
 /*
+ * DTrace SDT provider for MAC.
+ */
+SDT_PROVIDER_DEFINE(mac);
+
+SDT_PROBE_DEFINE(mac, kernel, policy, modevent);
+SDT_PROBE_ARGTYPE(mac, kernel, policy, modevent, 0, "int");
+SDT_PROBE_ARGTYPE(mac, kernel, policy, modevent, 1,
+    "struct mac_policy_conf *mpc");
+
+SDT_PROBE_DEFINE(mac, kernel, policy, register);
+SDT_PROBE_ARGTYPE(mac, kernel, policy, register, 0,
+    "struct mac_policy_conf *");
+
+SDT_PROBE_DEFINE(mac, kernel, policy, unregister);
+SDT_PROBE_ARGTYPE(mac, kernel, policy, unregister, 0,
+    "struct mac_policy_conf *");
+
+/*
  * Root sysctl node for all MAC and MAC policy controls.
  */
 SYSCTL_NODE(_security, OID_AUTO, mac, CTLFLAG_RW, 0,
@@ -435,6 +455,7 @@ mac_policy_register(struct mac_policy_co
 		(*(mpc->mpc_ops->mpo_init))(mpc);
 	mac_policy_updateflags();
 
+	SDT_PROBE(mac, kernel, policy, register, mpc, 0, 0, 0, 0);
 	printf("Security policy loaded: %s (%s)\n", mpc->mpc_fullname,
 	    mpc->mpc_name);
 
@@ -482,6 +503,7 @@ mac_policy_unregister(struct mac_policy_
 
 	mac_policy_release_exclusive();
 
+	SDT_PROBE(mac, kernel, policy, unregister, mpc, 0, 0, 0, 0);
 	printf("Security policy unload: %s (%s)\n", mpc->mpc_fullname,
 	    mpc->mpc_name);
 
@@ -507,6 +529,7 @@ mac_policy_modevent(module_t mod, int ty
 	}
 #endif
 
+	SDT_PROBE(mac, kernel, policy, modevent, type, mpc, 0, 0, 0);
 	switch (type) {
 	case MOD_LOAD:
 		if (mpc->mpc_loadtime_flags & MPC_LOADTIME_FLAG_NOTLATE &&

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 17:35:56 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F04281065693;
	Tue, 29 Dec 2009 17:35:56 +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 DBF838FC1A;
	Tue, 29 Dec 2009 17:35:56 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTHZuOB031333;
	Tue, 29 Dec 2009 17:35:56 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTHZudM031329;
	Tue, 29 Dec 2009 17:35:56 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200912291735.nBTHZudM031329@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 29 Dec 2009 17:35:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201207 - in stable/7/sys: kern security/mac sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 17:35:57 -0000

Author: rwatson
Date: Tue Dec 29 17:35:56 2009
New Revision: 201207
URL: http://svn.freebsd.org/changeset/base/201207

Log:
  Merge r189311 from head to stable/7:
  
    Reduce the verbosity of SDT trace points for DTrace by defining several
    wrapper macros that allow trace points and arguments to be declared
    using a single macro rather than several.  This means a lot less
    repetition and vertical space for each trace point.
  
    Use these macros when defining privilege and MAC Framework trace points.
  
    Reviewed by:	jb
  
  Requested by:	bz

Modified:
  stable/7/sys/kern/kern_priv.c
  stable/7/sys/security/mac/mac_framework.c
  stable/7/sys/sys/sdt.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/kern/kern_priv.c
==============================================================================
--- stable/7/sys/kern/kern_priv.c	Tue Dec 29 17:31:52 2009	(r201206)
+++ stable/7/sys/kern/kern_priv.c	Tue Dec 29 17:35:56 2009	(r201207)
@@ -61,12 +61,8 @@ SYSCTL_INT(_security_bsd, OID_AUTO, suse
 TUNABLE_INT("security.bsd.suser_enabled", &suser_enabled);
 
 SDT_PROVIDER_DEFINE(priv);
-
-SDT_PROBE_DEFINE(priv, kernel, priv_check, priv_ok);
-SDT_PROBE_ARGTYPE(priv, kernel, priv_check, priv_ok, 0, "int");
-
-SDT_PROBE_DEFINE(priv, kernel, priv_check, priv_err);
-SDT_PROBE_ARGTYPE(priv, kernel, priv_check, priv_err, 0, "int");
+SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_ok, "int");
+SDT_PROBE_DEFINE1(priv, kernel, priv_check, priv_err, "int");
 
 /*
  * Check a credential for privilege.  Lots of good reasons to deny privilege;

Modified: stable/7/sys/security/mac/mac_framework.c
==============================================================================
--- stable/7/sys/security/mac/mac_framework.c	Tue Dec 29 17:31:52 2009	(r201206)
+++ stable/7/sys/security/mac/mac_framework.c	Tue Dec 29 17:35:56 2009	(r201207)
@@ -87,19 +87,10 @@ __FBSDID("$FreeBSD$");
  * DTrace SDT provider for MAC.
  */
 SDT_PROVIDER_DEFINE(mac);
-
-SDT_PROBE_DEFINE(mac, kernel, policy, modevent);
-SDT_PROBE_ARGTYPE(mac, kernel, policy, modevent, 0, "int");
-SDT_PROBE_ARGTYPE(mac, kernel, policy, modevent, 1,
+SDT_PROBE_DEFINE2(mac, kernel, policy, modevent, "int",
     "struct mac_policy_conf *mpc");
-
-SDT_PROBE_DEFINE(mac, kernel, policy, register);
-SDT_PROBE_ARGTYPE(mac, kernel, policy, register, 0,
-    "struct mac_policy_conf *");
-
-SDT_PROBE_DEFINE(mac, kernel, policy, unregister);
-SDT_PROBE_ARGTYPE(mac, kernel, policy, unregister, 0,
-    "struct mac_policy_conf *");
+SDT_PROBE_DEFINE1(mac, kernel, policy, register, "struct mac_policy_conf *");
+SDT_PROBE_DEFINE1(mac, kernel, policy, unregister, "struct mac_policy_conf *");
 
 /*
  * Root sysctl node for all MAC and MAC policy controls.

Modified: stable/7/sys/sys/sdt.h
==============================================================================
--- stable/7/sys/sys/sdt.h	Tue Dec 29 17:31:52 2009	(r201206)
+++ stable/7/sys/sys/sdt.h	Tue Dec 29 17:35:56 2009	(r201207)
@@ -53,6 +53,12 @@
 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
 #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type)
 
+#define	SDT_PROBE_DEFINE1(prov, mod, func, name, arg0)
+#define	SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1)
+#define	SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2)
+#define	SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3)
+#define	SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+
 #else
 
 /*
@@ -156,6 +162,36 @@ struct sdt_provider {
 	    SI_SUB_KDTRACE, SI_ORDER_SECOND + 2, sdt_argtype_deregister,	\
 	    sdt_##prov##_##mod##_##func##_##name##num )
 
+#define	SDT_PROBE_DEFINE1(prov, mod, func, name, arg0)			\
+	SDT_PROBE_DEFINE(prov, mod, func, name);			\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)
+
+#define	SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1)		\
+	SDT_PROBE_DEFINE(prov, mod, func, name);			\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)
+
+#define	SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2)	\
+	SDT_PROBE_DEFINE(prov, mod, func, name);			\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)
+
+#define	SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \
+	SDT_PROBE_DEFINE(prov, mod, func, name);			\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3)
+
+#define	SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
+	SDT_PROBE_DEFINE(prov, mod, func, name);			\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4)
+
 typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *);
 typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *);
 typedef int (*sdt_provider_listall_func_t)(struct sdt_provider *, void *);

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 17:38:50 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E475B1065670;
	Tue, 29 Dec 2009 17:38: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 B78208FC27;
	Tue, 29 Dec 2009 17:38:50 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTHcoNW031449;
	Tue, 29 Dec 2009 17:38:50 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTHcoNn031447;
	Tue, 29 Dec 2009 17:38:50 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200912291738.nBTHcoNn031447@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 29 Dec 2009 17:38:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201208 - stable/7/sys/sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 17:38:51 -0000

Author: rwatson
Date: Tue Dec 29 17:38:50 2009
New Revision: 201208
URL: http://svn.freebsd.org/changeset/base/201208

Log:
  Merge r189314 from head to stable/7:
  
    Adding missing ";"'s required by some SDT_PROBE_DEFINEx() macros.
  
  Requested by:	bz

Modified:
  stable/7/sys/sys/sdt.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sys/sdt.h
==============================================================================
--- stable/7/sys/sys/sdt.h	Tue Dec 29 17:35:56 2009	(r201207)
+++ stable/7/sys/sys/sdt.h	Tue Dec 29 17:38:50 2009	(r201208)
@@ -168,28 +168,28 @@ struct sdt_provider {
 
 #define	SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1)		\
 	SDT_PROBE_DEFINE(prov, mod, func, name);			\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0);		\
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)
 
 #define	SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2)	\
 	SDT_PROBE_DEFINE(prov, mod, func, name);			\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1);		\
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)
 
 #define	SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \
 	SDT_PROBE_DEFINE(prov, mod, func, name);			\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2);		\
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3)
 
 #define	SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
 	SDT_PROBE_DEFINE(prov, mod, func, name);			\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2)		\
-	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3)		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2);		\
+	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3);		\
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4)
 
 typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *);

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 21:19:53 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0E613106566B;
	Tue, 29 Dec 2009 21:19:53 +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 F23518FC1C;
	Tue, 29 Dec 2009 21:19:52 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTLJqVc036417;
	Tue, 29 Dec 2009 21:19:52 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTLJqco036415;
	Tue, 29 Dec 2009 21:19:52 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200912292119.nBTLJqco036415@svn.freebsd.org>
From: John Baldwin 
Date: Tue, 29 Dec 2009 21:19: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: r201218 - stable/7/etc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 21:19:53 -0000

Author: jhb
Date: Tue Dec 29 21:19:52 2009
New Revision: 201218
URL: http://svn.freebsd.org/changeset/base/201218

Log:
  Partial MFC of 178527:
  Add support for create_args_ to interfaces created via
  cloned_interfaces.

Modified:
  stable/7/etc/network.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/network.subr
==============================================================================
--- stable/7/etc/network.subr	Tue Dec 29 21:07:17 2009	(r201217)
+++ stable/7/etc/network.subr	Tue Dec 29 21:19:52 2009	(r201218)
@@ -426,7 +426,7 @@ clone_up()
 	_prefix=
 	_list=
 	for ifn in ${cloned_interfaces}; do
-		ifconfig ${ifn} create
+		ifconfig ${ifn} create `get_if_var ${ifn} create_args_IF`
 		if [ $? -eq 0 ]; then
 			_list="${_list}${_prefix}${ifn}"
 			[ -z "$_prefix" ] && _prefix=' '

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 21:41:51 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A8F0310656BB;
	Tue, 29 Dec 2009 21:41:51 +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 9825B8FC13;
	Tue, 29 Dec 2009 21:41:51 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTLfphr037008;
	Tue, 29 Dec 2009 21:41:51 GMT (envelope-from mav@svn.freebsd.org)
Received: (from mav@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTLfpq9037005;
	Tue, 29 Dec 2009 21:41:51 GMT (envelope-from mav@svn.freebsd.org)
Message-Id: <200912292141.nBTLfpq9037005@svn.freebsd.org>
From: Alexander Motin 
Date: Tue, 29 Dec 2009 21:41:51 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201220 - stable/7/sys/geom/raid3
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 21:41:52 -0000

Author: mav
Date: Tue Dec 29 21:41:51 2009
New Revision: 201220
URL: http://svn.freebsd.org/changeset/base/201220

Log:
  MFC r200821:
  Make graid3 fallback to malloc() when component request size is bigger
  then maximal prepared UMA zone size. This fixes crash with MAXPHYS > 128K.

Modified:
  stable/7/sys/geom/raid3/g_raid3.c
  stable/7/sys/geom/raid3/g_raid3.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/geom/raid3/g_raid3.c
==============================================================================
--- stable/7/sys/geom/raid3/g_raid3.c	Tue Dec 29 21:23:18 2009	(r201219)
+++ stable/7/sys/geom/raid3/g_raid3.c	Tue Dec 29 21:41:51 2009	(r201220)
@@ -183,15 +183,17 @@ static void *
 g_raid3_alloc(struct g_raid3_softc *sc, size_t size, int flags)
 {
 	void *ptr;
+	enum g_raid3_zones zone;
 
-	if (g_raid3_use_malloc)
+	if (g_raid3_use_malloc ||
+	    (zone = g_raid3_zone(size)) == G_RAID3_NUM_ZONES)
 		ptr = malloc(size, M_RAID3, flags);
 	else {
-		ptr = uma_zalloc_arg(sc->sc_zones[g_raid3_zone(size)].sz_zone,
-		   &sc->sc_zones[g_raid3_zone(size)], flags);
-		sc->sc_zones[g_raid3_zone(size)].sz_requested++;
+		ptr = uma_zalloc_arg(sc->sc_zones[zone].sz_zone,
+		   &sc->sc_zones[zone], flags);
+		sc->sc_zones[zone].sz_requested++;
 		if (ptr == NULL)
-			sc->sc_zones[g_raid3_zone(size)].sz_failed++;
+			sc->sc_zones[zone].sz_failed++;
 	}
 	return (ptr);
 }
@@ -199,12 +201,14 @@ g_raid3_alloc(struct g_raid3_softc *sc, 
 static void
 g_raid3_free(struct g_raid3_softc *sc, void *ptr, size_t size)
 {
+	enum g_raid3_zones zone;
 
-	if (g_raid3_use_malloc)
+	if (g_raid3_use_malloc ||
+	    (zone = g_raid3_zone(size)) == G_RAID3_NUM_ZONES)
 		free(ptr, M_RAID3);
 	else {
-		uma_zfree_arg(sc->sc_zones[g_raid3_zone(size)].sz_zone,
-		    ptr, &sc->sc_zones[g_raid3_zone(size)]);
+		uma_zfree_arg(sc->sc_zones[zone].sz_zone,
+		    ptr, &sc->sc_zones[zone]);
 	}
 }
 

Modified: stable/7/sys/geom/raid3/g_raid3.h
==============================================================================
--- stable/7/sys/geom/raid3/g_raid3.h	Tue Dec 29 21:23:18 2009	(r201219)
+++ stable/7/sys/geom/raid3/g_raid3.h	Tue Dec 29 21:41:51 2009	(r201220)
@@ -183,7 +183,9 @@ enum g_raid3_zones {
 
 static __inline enum g_raid3_zones
 g_raid3_zone(size_t nbytes) {
-	if (nbytes > 16384)
+	if (nbytes > 65536)
+		return (G_RAID3_NUM_ZONES);
+	else if (nbytes > 16384)
 		return (G_RAID3_ZONE_64K);
 	else if (nbytes > 4096)
 		return (G_RAID3_ZONE_16K);

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:15:55 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E73FC106568B;
	Tue, 29 Dec 2009 23:15:55 +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 BCEF38FC19;
	Tue, 29 Dec 2009 23:15:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNFtc6039392;
	Tue, 29 Dec 2009 23:15:55 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNFtNX039390;
	Tue, 29 Dec 2009 23:15:55 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292315.nBTNFtNX039390@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:15:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201228 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:15:56 -0000

Author: bz
Date: Tue Dec 29 23:15:55 2009
New Revision: 201228
URL: http://svn.freebsd.org/changeset/base/201228

Log:
  "Merge" a single file out of r184205 by des@ w/o placing mergeinfo
  to be able to keep files in sync between branches and still allow a
  possible of the entire commit:
  
    Retire the MALLOC and FREE macros.  They are an abomination unto style(9).

Modified:
  stable/7/sys/opencrypto/deflate.c

Modified: stable/7/sys/opencrypto/deflate.c
==============================================================================
--- stable/7/sys/opencrypto/deflate.c	Tue Dec 29 22:53:27 2009	(r201227)
+++ stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:15:55 2009	(r201228)
@@ -79,7 +79,7 @@ deflate_global(data, size, decomp, out)
 	zbuf.avail_in = size;	/* Total length of data to be processed */
 
 	if (!decomp) {
-		MALLOC(buf[i].out, u_int8_t *, (u_long) size, M_CRYPTO_DATA, 
+		buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, 
 		    M_NOWAIT);
 		if (buf[i].out == NULL)
 			goto bad;
@@ -94,7 +94,7 @@ deflate_global(data, size, decomp, out)
 	 	 * updated while the decompression is going on
 	 	 */
 
-		MALLOC(buf[i].out, u_int8_t *, (u_long) (size * 4), 
+		buf[i].out = malloc((u_long) (size * 4), 
 		    M_CRYPTO_DATA, M_NOWAIT);
 		if (buf[i].out == NULL)
 			goto bad;
@@ -121,7 +121,7 @@ deflate_global(data, size, decomp, out)
 			goto end;
 		else if (zbuf.avail_out == 0 && i < (ZBUF - 1)) {
 			/* we need more output space, allocate size */
-			MALLOC(buf[i].out, u_int8_t *, (u_long) size,
+			buf[i].out = malloc((u_long) size,
 			    M_CRYPTO_DATA, M_NOWAIT);
 			if (buf[i].out == NULL)
 				goto bad;
@@ -137,7 +137,7 @@ deflate_global(data, size, decomp, out)
 end:
 	result = count = zbuf.total_out;
 
-	MALLOC(*out, u_int8_t *, (u_long) result, M_CRYPTO_DATA, M_NOWAIT);
+	*out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT);
 	if (*out == NULL)
 		goto bad;
 	if (decomp)
@@ -149,13 +149,13 @@ end:
 		if (count > buf[j].size) {
 			bcopy(buf[j].out, *out, buf[j].size);
 			*out += buf[j].size;
-			FREE(buf[j].out, M_CRYPTO_DATA);
+			free(buf[j].out, M_CRYPTO_DATA);
 			count -= buf[j].size;
 		} else {
 			/* it should be the last buffer */
 			bcopy(buf[j].out, *out, count);
 			*out += count;
-			FREE(buf[j].out, M_CRYPTO_DATA);
+			free(buf[j].out, M_CRYPTO_DATA);
 			count = 0;
 		}
 	}
@@ -165,7 +165,7 @@ end:
 bad:
 	*out = NULL;
 	for (j = 0; buf[j].flag != 0; j++)
-		FREE(buf[j].out, M_CRYPTO_DATA);
+		free(buf[j].out, M_CRYPTO_DATA);
 	if (decomp)
 		inflateEnd(&zbuf);
 	else

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:19:29 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0F74F1065672;
	Tue, 29 Dec 2009 23:19:29 +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 D95398FC19;
	Tue, 29 Dec 2009 23:19:28 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNJS5J039513;
	Tue, 29 Dec 2009 23:19:28 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNJSfm039511;
	Tue, 29 Dec 2009 23:19:28 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292319.nBTNJSfm039511@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:19: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: r201229 - stable/7/sys/sys
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:19:29 -0000

Author: bz
Date: Tue Dec 29 23:19:28 2009
New Revision: 201229
URL: http://svn.freebsd.org/changeset/base/201229

Log:
  MFC r199883:
  
    Add SDT_PROBE[1-5] in the same way we have SDT_PROBE_DEFINE[1-5] to
    avoid having to add all the unused trailing arguments as zeros.

Modified:
  stable/7/sys/sys/sdt.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sys/sdt.h
==============================================================================
--- stable/7/sys/sys/sdt.h	Tue Dec 29 23:15:55 2009	(r201228)
+++ stable/7/sys/sys/sdt.h	Tue Dec 29 23:19:28 2009	(r201229)
@@ -59,6 +59,12 @@
 #define	SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3)
 #define	SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
 
+#define	SDT_PROBE1(prov, mod, func, name, arg0)
+#define	SDT_PROBE2(prov, mod, func, name, arg0, arg1)
+#define	SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2)
+#define	SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3)
+#define	SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+
 #else
 
 /*
@@ -192,6 +198,17 @@ struct sdt_provider {
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3);		\
 	SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4)
 
+#define	SDT_PROBE1(prov, mod, func, name, arg0)				\
+	SDT_PROBE(prov, mod, func, name, arg0, 0, 0, 0, 0)
+#define	SDT_PROBE2(prov, mod, func, name, arg0, arg1)			\
+	SDT_PROBE(prov, mod, func, name, arg0, arg1, 0, 0, 0)
+#define	SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2)		\
+	SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2,  0, 0)
+#define	SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3)	\
+	SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0)
+#define	SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
+	SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+
 typedef int (*sdt_argtype_listall_func_t)(struct sdt_argtype *, void *);
 typedef int (*sdt_probe_listall_func_t)(struct sdt_probe *, void *);
 typedef int (*sdt_provider_listall_func_t)(struct sdt_provider *, void *);

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:21:07 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5FD4F1065670;
	Tue, 29 Dec 2009 23:21:07 +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 4F7798FC19;
	Tue, 29 Dec 2009 23:21:07 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNL7sI039605;
	Tue, 29 Dec 2009 23:21:07 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNL7D8039603;
	Tue, 29 Dec 2009 23:21:07 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292321.nBTNL7D8039603@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:21:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201230 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:21:07 -0000

Author: bz
Date: Tue Dec 29 23:21:07 2009
New Revision: 201230
URL: http://svn.freebsd.org/changeset/base/201230

Log:
  MFC r199884:
  
    Define an SDT provider for "opencrypto".

Modified:
  stable/7/sys/opencrypto/crypto.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/crypto.c
==============================================================================
--- stable/7/sys/opencrypto/crypto.c	Tue Dec 29 23:19:28 2009	(r201229)
+++ stable/7/sys/opencrypto/crypto.c	Tue Dec 29 23:21:07 2009	(r201230)
@@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$");
 #define	CRYPTO_TIMING				/* enable timing support */
 
 #include "opt_ddb.h"
+#include "opt_kdtrace.h"
 
 #include 
 #include 
@@ -68,6 +69,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -80,6 +82,8 @@ __FBSDID("$FreeBSD$");
 #include 
 #include "cryptodev_if.h"
 
+SDT_PROVIDER_DEFINE(opencrypto);
+
 /*
  * Crypto drivers register themselves by allocating a slot in the
  * crypto_drivers table with crypto_get_driverid() and then registering

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:23:06 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3FE9F106566C;
	Tue, 29 Dec 2009 23:23: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 2E9238FC0A;
	Tue, 29 Dec 2009 23:23:06 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNN6cf039708;
	Tue, 29 Dec 2009 23:23:06 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNN6Hq039706;
	Tue, 29 Dec 2009 23:23:06 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292323.nBTNN6Hq039706@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:23:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201231 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:23:06 -0000

Author: bz
Date: Tue Dec 29 23:23:05 2009
New Revision: 201231
URL: http://svn.freebsd.org/changeset/base/201231

Log:
  MFC r199885:
  
    Add SDT probes for opencrypto:deflate:deflate_gobal:*.
    They are not nice but they were helpful.

Modified:
  stable/7/sys/opencrypto/deflate.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/deflate.c
==============================================================================
--- stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:21:07 2009	(r201230)
+++ stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:23:05 2009	(r201231)
@@ -35,16 +35,30 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#include "opt_kdtrace.h"
+
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
 #include 
 #include 
 
+SDT_PROVIDER_DECLARE(opencrypto);
+SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, entry,
+    "int", "u_int32_t");
+SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, bad,
+    "int", "int", "int", "int", "int");
+SDT_PROBE_DEFINE5(opencrypto, deflate, deflate_global, iter,
+    "int", "int", "int", "int", "int");
+SDT_PROBE_DEFINE2(opencrypto, deflate, deflate_global, return,
+    "int", "u_int32_t");
+
 int window_inflate = -1 * MAX_WBITS;
 int window_deflate = -12;
 
@@ -68,6 +82,8 @@ deflate_global(data, size, decomp, out)
 	int error, i = 0, j;
 	struct deflate_buf buf[ZBUF];
 
+	SDT_PROBE2(opencrypto, deflate, deflate_global, entry, decomp, size);
+
 	bzero(&zbuf, sizeof(z_stream));
 	for (j = 0; j < ZBUF; j++)
 		buf[j].flag = 0;
@@ -81,8 +97,11 @@ deflate_global(data, size, decomp, out)
 	if (!decomp) {
 		buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, 
 		    M_NOWAIT);
-		if (buf[i].out == NULL)
+		if (buf[i].out == NULL) {
+			SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
+			    decomp, 0, __LINE__);
 			goto bad;
+		}
 		buf[i].size = size;
 		buf[i].flag = 1;
 		i++;
@@ -96,8 +115,11 @@ deflate_global(data, size, decomp, out)
 
 		buf[i].out = malloc((u_long) (size * 4), 
 		    M_CRYPTO_DATA, M_NOWAIT);
-		if (buf[i].out == NULL)
+		if (buf[i].out == NULL) {
+			SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
+			    decomp, 0, __LINE__);
 			goto bad;
+		}
 		buf[i].size = size * 4;
 		buf[i].flag = 1;
 		i++;
@@ -110,36 +132,67 @@ deflate_global(data, size, decomp, out)
 	    deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
 		    window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY);
 
-	if (error != Z_OK)
+	if (error != Z_OK) {
+		SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
+		    decomp, error, __LINE__);
 		goto bad;
+	}
 	for (;;) {
 		error = decomp ? inflate(&zbuf, Z_PARTIAL_FLUSH) :
 				 deflate(&zbuf, Z_PARTIAL_FLUSH);
-		if (error != Z_OK && error != Z_STREAM_END)
+		if (error != Z_OK && error != Z_STREAM_END) {
+			/*
+			 * Unfortunately we are limited to 5 arguments,
+			 * thus use two probes.
+			 */
+			SDT_PROBE5(opencrypto, deflate, deflate_global, bad,
+			    decomp, error, __LINE__,
+			    zbuf.avail_in, zbuf.avail_out);
+			SDT_PROBE5(opencrypto, deflate, deflate_global, bad,
+			    decomp, error, __LINE__,
+			    zbuf.state->dummy, zbuf.total_out);
 			goto bad;
+		}
 		else if (zbuf.avail_in == 0 && zbuf.avail_out != 0)
 			goto end;
 		else if (zbuf.avail_out == 0 && i < (ZBUF - 1)) {
 			/* we need more output space, allocate size */
 			buf[i].out = malloc((u_long) size,
 			    M_CRYPTO_DATA, M_NOWAIT);
-			if (buf[i].out == NULL)
+			if (buf[i].out == NULL) {
+				SDT_PROBE3(opencrypto, deflate, deflate_global,
+				    bad, decomp, 0, __LINE__);
 				goto bad;
+			}
 			zbuf.next_out = buf[i].out;
 			buf[i].size = size;
 			buf[i].flag = 1;
 			zbuf.avail_out = buf[i].size;
 			i++;
-		} else
+		} else {
+			/*
+			 * Unfortunately we are limited to 5 arguments,
+			 * thus, again, use two probes.
+			 */
+			SDT_PROBE5(opencrypto, deflate, deflate_global, bad,
+			    decomp, error, __LINE__,
+			    zbuf.avail_in, zbuf.avail_out);
+			SDT_PROBE5(opencrypto, deflate, deflate_global, bad,
+			    decomp, error, __LINE__,
+			    zbuf.state->dummy, zbuf.total_out);
 			goto bad;
+		}
 	}
 
 end:
 	result = count = zbuf.total_out;
 
 	*out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT);
-	if (*out == NULL)
+	if (*out == NULL) {
+		SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
+		    decomp, 0, __LINE__);
 		goto bad;
+	}
 	if (decomp)
 		inflateEnd(&zbuf);
 	else
@@ -160,6 +213,7 @@ end:
 		}
 	}
 	*out = output;
+	SDT_PROBE2(opencrypto, deflate, deflate_global, return, decomp, result);
 	return result;
 
 bad:

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:25:45 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id AA7B5106566C;
	Tue, 29 Dec 2009 23:25:45 +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 99B198FC14;
	Tue, 29 Dec 2009 23:25:45 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNPjaJ039824;
	Tue, 29 Dec 2009 23:25:45 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNPjAg039822;
	Tue, 29 Dec 2009 23:25:45 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292325.nBTNPjAg039822@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:25:45 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201232 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:25:45 -0000

Author: bz
Date: Tue Dec 29 23:25:45 2009
New Revision: 201232
URL: http://svn.freebsd.org/changeset/base/201232

Log:
  MFC r199887:
  
    Z_PARTIAL_FLUSH is marked deprecated. Z_SYNC_FLUSH is the suggested
    replacement but only use it for inflate. For deflate use Z_FINISH
    as Z_SYNC_FLUSH adds a trailing marker in some cases that inflate(),
    despite the comment in zlib, does not seem to cope well with, resulting
    in errors when uncompressing exactly fills the output buffer without
    a Z_STREAM_END and a successive call returns an error.

Modified:
  stable/7/sys/opencrypto/deflate.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/deflate.c
==============================================================================
--- stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:23:05 2009	(r201231)
+++ stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:25:45 2009	(r201232)
@@ -138,8 +138,8 @@ deflate_global(data, size, decomp, out)
 		goto bad;
 	}
 	for (;;) {
-		error = decomp ? inflate(&zbuf, Z_PARTIAL_FLUSH) :
-				 deflate(&zbuf, Z_PARTIAL_FLUSH);
+		error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
+				 deflate(&zbuf, Z_FINISH);
 		if (error != Z_OK && error != Z_STREAM_END) {
 			/*
 			 * Unfortunately we are limited to 5 arguments,
@@ -153,9 +153,13 @@ deflate_global(data, size, decomp, out)
 			    zbuf.state->dummy, zbuf.total_out);
 			goto bad;
 		}
-		else if (zbuf.avail_in == 0 && zbuf.avail_out != 0)
-			goto end;
-		else if (zbuf.avail_out == 0 && i < (ZBUF - 1)) {
+		if (decomp && zbuf.avail_in == 0 && error == Z_STREAM_END) {
+			/* Done. */
+			break;
+		} else if (!decomp && error == Z_STREAM_END) {
+			/* Done. */
+			break;
+		} else if (zbuf.avail_out == 0) {
 			/* we need more output space, allocate size */
 			buf[i].out = malloc((u_long) size,
 			    M_CRYPTO_DATA, M_NOWAIT);
@@ -170,6 +174,7 @@ deflate_global(data, size, decomp, out)
 			zbuf.avail_out = buf[i].size;
 			i++;
 		} else {
+			/* Unexpect result. */
 			/*
 			 * Unfortunately we are limited to 5 arguments,
 			 * thus, again, use two probes.
@@ -184,7 +189,6 @@ deflate_global(data, size, decomp, out)
 		}
 	}
 
-end:
 	result = count = zbuf.total_out;
 
 	*out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT);

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:27:15 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D8667106568B;
	Tue, 29 Dec 2009 23:27:15 +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 C7A9D8FC20;
	Tue, 29 Dec 2009 23:27:15 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNRFCk039906;
	Tue, 29 Dec 2009 23:27:15 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNRFMX039904;
	Tue, 29 Dec 2009 23:27:15 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292327.nBTNRFMX039904@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:27:15 +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: r201233 - stable/7/sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:27:16 -0000

Author: bz
Date: Tue Dec 29 23:27:15 2009
New Revision: 201233
URL: http://svn.freebsd.org/changeset/base/201233

Log:
  MFC r199894:
  
    Correct a typo.

Modified:
  stable/7/sys/netipsec/ipsec_mbuf.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/ipsec_mbuf.c
==============================================================================
--- stable/7/sys/netipsec/ipsec_mbuf.c	Tue Dec 29 23:25:45 2009	(r201232)
+++ stable/7/sys/netipsec/ipsec_mbuf.c	Tue Dec 29 23:27:15 2009	(r201233)
@@ -67,7 +67,7 @@ m_makespace(struct mbuf *m0, int skip, i
 	 * At this point skip is the offset into the mbuf m
 	 * where the new header should be placed.  Figure out
 	 * if there's space to insert the new header.  If so,
-	 * and copying the remainder makese sense then do so.
+	 * and copying the remainder makes sense then do so.
 	 * Otherwise insert a new mbuf in the chain, splitting
 	 * the contents of m as needed.
 	 */

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:30:16 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A50481065676;
	Tue, 29 Dec 2009 23:30:16 +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 5F8768FC1B;
	Tue, 29 Dec 2009 23:30:16 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNUGZ5040048;
	Tue, 29 Dec 2009 23:30:16 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNUGb7040045;
	Tue, 29 Dec 2009 23:30:16 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292330.nBTNUGb7040045@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:30:16 +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: r201235 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:30:16 -0000

Author: bz
Date: Tue Dec 29 23:30:16 2009
New Revision: 201235
URL: http://svn.freebsd.org/changeset/base/201235

Log:
  MFC r199895:
  
    Change memory managment from a fixed size array to a list.
    This is needed to avoid running into out of buffer situations
    where we cannot alloc a new buffer because we hit the array size
    limit (ZBUF).
    Use a combined allocation for the struct and the actual data buffer
    to not increase the number of malloc calls. [1]
  
    Defer initialization of zbuf until we actually need it.
  
    Make sure the output buffer will be large enough in all cases.
  
    Details discussed with:	kib [1]
    Reviewed by:		kib [1]

Modified:
  stable/7/sys/opencrypto/deflate.c
  stable/7/sys/opencrypto/deflate.h
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/deflate.c
==============================================================================
--- stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:28:13 2009	(r201234)
+++ stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:30:16 2009	(r201235)
@@ -79,64 +79,59 @@ deflate_global(data, size, decomp, out)
 	z_stream zbuf;
 	u_int8_t *output;
 	u_int32_t count, result;
-	int error, i = 0, j;
-	struct deflate_buf buf[ZBUF];
+	int error, i;
+	struct deflate_buf *bufh, *bufp;
 
 	SDT_PROBE2(opencrypto, deflate, deflate_global, entry, decomp, size);
 
-	bzero(&zbuf, sizeof(z_stream));
-	for (j = 0; j < ZBUF; j++)
-		buf[j].flag = 0;
-
-	zbuf.next_in = data;	/* data that is going to be processed */
-	zbuf.zalloc = z_alloc;
-	zbuf.zfree = z_free;
-	zbuf.opaque = Z_NULL;
-	zbuf.avail_in = size;	/* Total length of data to be processed */
-
+	bufh = bufp = NULL;
 	if (!decomp) {
-		buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, 
-		    M_NOWAIT);
-		if (buf[i].out == NULL) {
-			SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
-			    decomp, 0, __LINE__);
-			goto bad;
-		}
-		buf[i].size = size;
-		buf[i].flag = 1;
-		i++;
+		i = 1;
 	} else {
 		/*
 	 	 * Choose a buffer with 4x the size of the input buffer
 	 	 * for the size of the output buffer in the case of
 	 	 * decompression. If it's not sufficient, it will need to be
-	 	 * updated while the decompression is going on
+	 	 * updated while the decompression is going on.
 	 	 */
-
-		buf[i].out = malloc((u_long) (size * 4), 
-		    M_CRYPTO_DATA, M_NOWAIT);
-		if (buf[i].out == NULL) {
-			SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
-			    decomp, 0, __LINE__);
-			goto bad;
-		}
-		buf[i].size = size * 4;
-		buf[i].flag = 1;
+		i = 4;
+	}
+	/*
+	 * Make sure we do have enough output space.  Repeated calls to
+	 * deflate need at least 6 bytes of output buffer space to avoid
+	 * repeated markers.  We will always provide at least 16 bytes.
+	 */
+	while ((size * i) < 16)
 		i++;
+
+	bufh = bufp = malloc(sizeof(*bufp) + (size_t)(size * i),
+	    M_CRYPTO_DATA, M_NOWAIT);
+	if (bufp == NULL) {
+		SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
+		    decomp, 0, __LINE__);
+		goto bad2;
 	}
+	bufp->next = NULL;
+	bufp->size = size * i;
 
-	zbuf.next_out = buf[0].out;
-	zbuf.avail_out = buf[0].size;
+	bzero(&zbuf, sizeof(z_stream));
+	zbuf.zalloc = z_alloc;
+	zbuf.zfree = z_free;
+	zbuf.opaque = Z_NULL;
+	zbuf.next_in = data;	/* Data that is going to be processed. */
+	zbuf.avail_in = size;	/* Total length of data to be processed. */
+	zbuf.next_out = bufp->data;
+	zbuf.avail_out = bufp->size;
 
 	error = decomp ? inflateInit2(&zbuf, window_inflate) :
 	    deflateInit2(&zbuf, Z_DEFAULT_COMPRESSION, Z_METHOD,
 		    window_deflate, Z_MEMLEVEL, Z_DEFAULT_STRATEGY);
-
 	if (error != Z_OK) {
 		SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
 		    decomp, error, __LINE__);
 		goto bad;
 	}
+
 	for (;;) {
 		error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) :
 				 deflate(&zbuf, Z_FINISH);
@@ -160,19 +155,22 @@ deflate_global(data, size, decomp, out)
 			/* Done. */
 			break;
 		} else if (zbuf.avail_out == 0) {
-			/* we need more output space, allocate size */
-			buf[i].out = malloc((u_long) size,
+			struct deflate_buf *p;
+
+			/* We need more output space for another iteration. */
+			p = malloc(sizeof(*p) + (size_t)(size * i),
 			    M_CRYPTO_DATA, M_NOWAIT);
-			if (buf[i].out == NULL) {
+			if (p == NULL) {
 				SDT_PROBE3(opencrypto, deflate, deflate_global,
 				    bad, decomp, 0, __LINE__);
 				goto bad;
 			}
-			zbuf.next_out = buf[i].out;
-			buf[i].size = size;
-			buf[i].flag = 1;
-			zbuf.avail_out = buf[i].size;
-			i++;
+			p->next = NULL;
+			p->size = size * i;
+			bufp->next = p;
+			bufp = p;
+			zbuf.next_out = bufp->data;
+			zbuf.avail_out = bufp->size;
 		} else {
 			/* Unexpect result. */
 			/*
@@ -191,7 +189,7 @@ deflate_global(data, size, decomp, out)
 
 	result = count = zbuf.total_out;
 
-	*out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT);
+	*out = malloc(result, M_CRYPTO_DATA, M_NOWAIT);
 	if (*out == NULL) {
 		SDT_PROBE3(opencrypto, deflate, deflate_global, bad,
 		    decomp, 0, __LINE__);
@@ -202,17 +200,22 @@ deflate_global(data, size, decomp, out)
 	else
 		deflateEnd(&zbuf);
 	output = *out;
-	for (j = 0; buf[j].flag != 0; j++) {
-		if (count > buf[j].size) {
-			bcopy(buf[j].out, *out, buf[j].size);
-			*out += buf[j].size;
-			free(buf[j].out, M_CRYPTO_DATA);
-			count -= buf[j].size;
+	for (bufp = bufh; bufp != NULL; ) {
+		if (count > bufp->size) {
+			struct deflate_buf *p;
+
+			bcopy(bufp->data, *out, bufp->size);
+			*out += bufp->size;
+			count -= bufp->size;
+			p = bufp;
+			bufp = bufp->next;
+			free(p, M_CRYPTO_DATA);
 		} else {
-			/* it should be the last buffer */
-			bcopy(buf[j].out, *out, count);
+			/* It should be the last buffer. */
+			bcopy(bufp->data, *out, count);
 			*out += count;
-			free(buf[j].out, M_CRYPTO_DATA);
+			free(bufp, M_CRYPTO_DATA);
+			bufp = NULL;
 			count = 0;
 		}
 	}
@@ -221,13 +224,19 @@ deflate_global(data, size, decomp, out)
 	return result;
 
 bad:
-	*out = NULL;
-	for (j = 0; buf[j].flag != 0; j++)
-		free(buf[j].out, M_CRYPTO_DATA);
 	if (decomp)
 		inflateEnd(&zbuf);
 	else
 		deflateEnd(&zbuf);
+	for (bufp = bufh; bufp != NULL; ) {
+		struct deflate_buf *p;
+
+		p = bufp;
+		bufp = bufp->next;
+		free(p, M_CRYPTO_DATA);
+	}
+bad2:
+	*out = NULL;
 	return 0;
 }
 

Modified: stable/7/sys/opencrypto/deflate.h
==============================================================================
--- stable/7/sys/opencrypto/deflate.h	Tue Dec 29 23:28:13 2009	(r201234)
+++ stable/7/sys/opencrypto/deflate.h	Tue Dec 29 23:30:16 2009	(r201235)
@@ -47,10 +47,14 @@ u_int32_t deflate_global(u_int8_t *, u_i
 void *z_alloc(void *, u_int, u_int);
 void z_free(void *, void *);
 
+/*
+ * We are going to use a combined allocation to hold the metadata
+ * from the struct immediately followed by the real application data.
+ */
 struct deflate_buf {
-	u_int8_t *out;
-	u_int32_t size;
-	int flag;
+	struct deflate_buf *next;
+	uint32_t size;
+	uint8_t data[];
 };
 
 #endif /* _CRYPTO_DEFLATE_H_ */

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:33:20 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6D51E106566C;
	Tue, 29 Dec 2009 23:33:20 +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 5CC758FC14;
	Tue, 29 Dec 2009 23:33:20 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNXKY5040205;
	Tue, 29 Dec 2009 23:33:20 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNXKiu040203;
	Tue, 29 Dec 2009 23:33:20 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292333.nBTNXKiu040203@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:33:20 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201237 - stable/7/sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:33:20 -0000

Author: bz
Date: Tue Dec 29 23:33:20 2009
New Revision: 201237
URL: http://svn.freebsd.org/changeset/base/201237

Log:
  MFC r199896:
  
    Directly send data uncompressed if the packet payload size is lower than
    the compression algorithm threshold.

Modified:
  stable/7/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:31:21 2009	(r201236)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:33:20 2009	(r201237)
@@ -345,6 +345,17 @@ ipcomp_output(
 	ipcompx = sav->tdb_compalgxform;
 	IPSEC_ASSERT(ipcompx != NULL, ("null compression xform"));
 
+	/*
+	 * Do not touch the packet in case our payload to compress
+	 * is lower than the minimal threshold of the compression
+	 * alogrithm.  We will just send out the data uncompressed.
+	 * See RFC 3173, 2.2. Non-Expansion Policy.
+	 */
+	if (m->m_pkthdr.len <= ipcompx->minlen) {
+		/* XXX-BZ V_ipcompstat.threshold++; */
+		return ipsec_process_done(m, isr);
+	}
+
 	ralen = m->m_pkthdr.len - skip;	/* Raw payload length before comp. */
 	hlen = IPCOMP_HLENGTH;
 

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:35:05 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED6F21065672;
	Tue, 29 Dec 2009 23:35: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 DCFC28FC1A;
	Tue, 29 Dec 2009 23:35:05 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNZ5xG040294;
	Tue, 29 Dec 2009 23:35:05 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNZ5Jm040292;
	Tue, 29 Dec 2009 23:35:05 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292335.nBTNZ5Jm040292@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:35:05 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201238 - stable/7/sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:35:06 -0000

Author: bz
Date: Tue Dec 29 23:35:05 2009
New Revision: 201238
URL: http://svn.freebsd.org/changeset/base/201238

Log:
  MFC r199897:
  
    Remove whitespace.

Modified:
  stable/7/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:33:20 2009	(r201237)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:35:05 2009	(r201238)
@@ -365,12 +365,12 @@ ipcomp_output(
 	switch (sav->sah->saidx.dst.sa.sa_family) {
 #ifdef INET
 	case AF_INET:
-		maxpacketsize =  IP_MAXPACKET;
+		maxpacketsize = IP_MAXPACKET;
 		break;
 #endif /* INET */
 #ifdef INET6
 	case AF_INET6:
-		maxpacketsize =  IPV6_MAXPACKET;
+		maxpacketsize = IPV6_MAXPACKET;
 		break;
 #endif /* INET6 */
 	default:
@@ -567,7 +567,7 @@ ipcomp_output_cb(struct cryptop *crp)
 			DPRINTF(("%s: unknown/unsupported protocol "
 			    "family %d, IPCA %s/%08lx\n", __func__,
 			    sav->sah->saidx.dst.sa.sa_family,
-			    ipsec_address(&sav->sah->saidx.dst), 
+			    ipsec_address(&sav->sah->saidx.dst),
 			    (u_long) ntohl(sav->spi)));
 			error = EPFNOSUPPORT;
 			goto bad;

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:40:58 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 563AB1065670;
	Tue, 29 Dec 2009 23:40: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 44F6C8FC15;
	Tue, 29 Dec 2009 23:40:58 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNewJ3040445;
	Tue, 29 Dec 2009 23:40:58 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNewGP040443;
	Tue, 29 Dec 2009 23:40:58 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292340.nBTNewGP040443@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:40: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: r201239 - stable/7/sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:40:58 -0000

Author: bz
Date: Tue Dec 29 23:40:57 2009
New Revision: 201239
URL: http://svn.freebsd.org/changeset/base/201239

Log:
  MFC r199899:
  
    Only add the IPcomp header if crypto reported success and we have a lower
    payload size.  Before we had always added the header, no matter if we
    actually send out compressed data or not.
  
    With this, after the opencrypto/deflate changes, IPcomp starts to work
    apart from edge cases.  Leave it disabled by default until those are
    fixed as well.
  
  PR:		kern/123587

Modified:
  stable/7/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:35:05 2009	(r201238)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:40:57 2009	(r201239)
@@ -330,13 +330,10 @@ ipcomp_output(
 {
 	struct secasvar *sav;
 	struct comp_algo *ipcompx;
-	int error, ralen, hlen, maxpacketsize, roff;
-	u_int8_t prot;
+	int error, ralen, maxpacketsize;
 	struct cryptodesc *crdc;
 	struct cryptop *crp;
 	struct tdb_crypto *tc;
-	struct mbuf *mo;
-	struct ipcomp *ipcomp;
 
 	IPSEC_SPLASSERT_SOFTNET(__func__);
 
@@ -357,8 +354,6 @@ ipcomp_output(
 	}
 
 	ralen = m->m_pkthdr.len - skip;	/* Raw payload length before comp. */
-	hlen = IPCOMP_HLENGTH;
-
 	ipcompstat.ipcomps_output++;
 
 	/* Check for maximum packet size violations. */
@@ -383,13 +378,13 @@ ipcomp_output(
 		error = EPFNOSUPPORT;
 		goto bad;
 	}
-	if (skip + hlen + ralen > maxpacketsize) {
+	if (ralen + skip + IPCOMP_HLENGTH > maxpacketsize) {
 		ipcompstat.ipcomps_toobig++;
 		DPRINTF(("%s: packet in IPCA %s/%08lx got too big "
 		    "(len %u, max len %u)\n", __func__,
 		    ipsec_address(&sav->sah->saidx.dst),
 		    (u_long) ntohl(sav->spi),
-		    skip + hlen + ralen, maxpacketsize));
+		    ralen + skip + IPCOMP_HLENGTH, maxpacketsize));
 		error = EMSGSIZE;
 		goto bad;
 	}
@@ -407,40 +402,7 @@ ipcomp_output(
 		goto bad;
 	}
 
-	/* Inject IPCOMP header */
-	mo = m_makespace(m, skip, hlen, &roff);
-	if (mo == NULL) {
-		ipcompstat.ipcomps_wrap++;
-		DPRINTF(("%s: IPCOMP header inject failed for IPCA %s/%08lx\n",
-		    __func__, ipsec_address(&sav->sah->saidx.dst),
-		    (u_long) ntohl(sav->spi)));
-		error = ENOBUFS;
-		goto bad;
-	}
-	ipcomp = (struct ipcomp *)(mtod(mo, caddr_t) + roff);
-
-	/* Initialize the IPCOMP header */
-	/* XXX alignment always correct? */
-	switch (sav->sah->saidx.dst.sa.sa_family) {
-#ifdef INET
-	case AF_INET:
-		ipcomp->comp_nxt = mtod(m, struct ip *)->ip_p;
-		break;
-#endif /* INET */
-#ifdef INET6
-	case AF_INET6:
-		ipcomp->comp_nxt = mtod(m, struct ip6_hdr *)->ip6_nxt;
-		break;
-#endif
-	}
-	ipcomp->comp_flags = 0;
-	ipcomp->comp_cpi = htons((u_int16_t) ntohl(sav->spi));
-
-	/* Fix Next Protocol in IPv4/IPv6 header */
-	prot = IPPROTO_IPCOMP;
-	m_copyback(m, protoff, sizeof(u_int8_t), (u_char *) &prot);
-
-	/* Ok now, we can pass to the crypto processing */
+	/* Ok now, we can pass to the crypto processing. */
 
 	/* Get crypto descriptors */
 	crp = crypto_getreq(1);
@@ -453,10 +415,10 @@ ipcomp_output(
 	crdc = crp->crp_desc;
 
 	/* Compression descriptor */
-	crdc->crd_skip = skip + hlen;
-	crdc->crd_len = m->m_pkthdr.len - (skip + hlen);
+	crdc->crd_skip = skip;
+	crdc->crd_len = ralen;
 	crdc->crd_flags = CRD_F_COMP;
-	crdc->crd_inject = skip + hlen;
+	crdc->crd_inject = skip;
 
 	/* Compression operation */
 	crdc->crd_alg = ipcompx->type;
@@ -476,7 +438,8 @@ ipcomp_output(
 	tc->tc_spi = sav->spi;
 	tc->tc_dst = sav->sah->saidx.dst;
 	tc->tc_proto = sav->sah->saidx.proto;
-	tc->tc_skip = skip + hlen;
+	tc->tc_protoff = protoff;
+	tc->tc_skip = skip;
 
 	/* Crypto operation descriptor */
 	crp->crp_ilen = m->m_pkthdr.len;	/* Total input length */
@@ -503,13 +466,12 @@ ipcomp_output_cb(struct cryptop *crp)
 	struct ipsecrequest *isr;
 	struct secasvar *sav;
 	struct mbuf *m;
-	int error, skip, rlen;
+	int error, skip;
 
 	tc = (struct tdb_crypto *) crp->crp_opaque;
 	IPSEC_ASSERT(tc != NULL, ("null opaque data area!"));
 	m = (struct mbuf *) crp->crp_buf;
 	skip = tc->tc_skip;
-	rlen = crp->crp_ilen - skip;
 
 	isr = tc->tc_isr;
 	IPSECREQUEST_LOCK(isr);
@@ -531,8 +493,7 @@ ipcomp_output_cb(struct cryptop *crp)
 		if (crp->crp_etype == EAGAIN) {
 			KEY_FREESAV(&sav);
 			IPSECREQUEST_UNLOCK(isr);
-			error = crypto_dispatch(crp);
-			return error;
+			return crypto_dispatch(crp);
 		}
 		ipcompstat.ipcomps_noxform++;
 		DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype));
@@ -548,7 +509,46 @@ ipcomp_output_cb(struct cryptop *crp)
 	}
 	ipcompstat.ipcomps_hist[sav->alg_comp]++;
 
-	if (rlen > crp->crp_olen) {
+	if (crp->crp_ilen - skip > crp->crp_olen) {
+		struct mbuf *mo;
+		struct ipcomp *ipcomp;
+		int roff;
+		uint8_t prot;
+
+		/* Compression helped, inject IPCOMP header. */
+		mo = m_makespace(m, skip, IPCOMP_HLENGTH, &roff);
+		if (mo == NULL) {
+			ipcompstat.ipcomps_wrap++;
+			DPRINTF(("%s: IPCOMP header inject failed for IPCA %s/%08lx\n",
+			    __func__, ipsec_address(&sav->sah->saidx.dst),
+			    (u_long) ntohl(sav->spi)));
+			error = ENOBUFS;
+			goto bad;
+		}
+		ipcomp = (struct ipcomp *)(mtod(mo, caddr_t) + roff);
+
+		/* Initialize the IPCOMP header */
+		/* XXX alignment always correct? */
+		switch (sav->sah->saidx.dst.sa.sa_family) {
+#ifdef INET
+		case AF_INET:
+			ipcomp->comp_nxt = mtod(m, struct ip *)->ip_p;
+			break;
+#endif /* INET */
+#ifdef INET6
+		case AF_INET6:
+			ipcomp->comp_nxt = mtod(m, struct ip6_hdr *)->ip6_nxt;
+			break;
+#endif
+		}
+		ipcomp->comp_flags = 0;
+		ipcomp->comp_cpi = htons((u_int16_t) ntohl(sav->spi));
+
+		/* Fix Next Protocol in IPv4/IPv6 header */
+		prot = IPPROTO_IPCOMP;
+		m_copyback(m, tc->tc_protoff, sizeof(u_int8_t),
+		    (u_char *)&prot);
+
 		/* Adjust the length in the IP header */
 		switch (sav->sah->saidx.dst.sa.sa_family) {
 #ifdef INET
@@ -575,6 +575,8 @@ ipcomp_output_cb(struct cryptop *crp)
 	} else {
 		/* compression was useless, we have lost time */
 		/* XXX add statistic */
+		/* XXX remember state to not compress the next couple
+		 *     of packets, RFC 3173, 2.2. Non-Expansion Policy */
 	}
 
 	/* Release the crypto descriptor */

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:42:54 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 92AD81065672;
	Tue, 29 Dec 2009 23:42: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 81F2A8FC08;
	Tue, 29 Dec 2009 23:42:54 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNgsOu040531;
	Tue, 29 Dec 2009 23:42:54 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNgs3r040529;
	Tue, 29 Dec 2009 23:42:54 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292342.nBTNgs3r040529@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:42:54 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201240 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:42:54 -0000

Author: bz
Date: Tue Dec 29 23:42:54 2009
New Revision: 201240
URL: http://svn.freebsd.org/changeset/base/201240

Log:
  MFC r199904:
  
    Add SDT iter probes forgotten in r199885 (r201231 in stable/7).

Modified:
  stable/7/sys/opencrypto/deflate.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/deflate.c
==============================================================================
--- stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:40:57 2009	(r201239)
+++ stable/7/sys/opencrypto/deflate.c	Tue Dec 29 23:42:54 2009	(r201240)
@@ -148,6 +148,12 @@ deflate_global(data, size, decomp, out)
 			    zbuf.state->dummy, zbuf.total_out);
 			goto bad;
 		}
+		SDT_PROBE5(opencrypto, deflate, deflate_global, iter,
+		    decomp, error, __LINE__,
+		    zbuf.avail_in, zbuf.avail_out);
+		SDT_PROBE5(opencrypto, deflate, deflate_global, iter,
+		    decomp, error, __LINE__,
+		    zbuf.state->dummy, zbuf.total_out);
 		if (decomp && zbuf.avail_in == 0 && error == Z_STREAM_END) {
 			/* Done. */
 			break;

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:44:33 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 3A0BB106566C;
	Tue, 29 Dec 2009 23:44:33 +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 296058FC12;
	Tue, 29 Dec 2009 23:44:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNiXpJ040623;
	Tue, 29 Dec 2009 23:44:33 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNiX3n040621;
	Tue, 29 Dec 2009 23:44:33 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292344.nBTNiX3n040621@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:44:33 +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: r201241 - stable/7/sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:44:33 -0000

Author: bz
Date: Tue Dec 29 23:44:32 2009
New Revision: 201241
URL: http://svn.freebsd.org/changeset/base/201241

Log:
  MFC r199905:
  
    Assimilate very similar input and output code paths
    (no real functional change).

Modified:
  stable/7/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:42:54 2009	(r201240)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:44:32 2009	(r201241)
@@ -249,10 +249,8 @@ ipcomp_input_cb(struct cryptop *crp)
 
 		if (crp->crp_etype == EAGAIN) {
 			KEY_FREESAV(&sav);
-			error = crypto_dispatch(crp);
-			return error;
+			return crypto_dispatch(crp);
 		}
-
 		ipcompstat.ipcomps_noxform++;
 		DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype));
 		error = crp->crp_etype;
@@ -486,7 +484,7 @@ ipcomp_output_cb(struct cryptop *crp)
 
 	/* Check for crypto errors */
 	if (crp->crp_etype) {
-		/* Reset session ID */
+		/* Reset the session ID */
 		if (sav->tdb_cryptoid != 0)
 			sav->tdb_cryptoid = crp->crp_sid;
 

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:47:22 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 41F28106566B;
	Tue, 29 Dec 2009 23:47:22 +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 30E5B8FC19;
	Tue, 29 Dec 2009 23:47:22 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNlMSl040743;
	Tue, 29 Dec 2009 23:47:22 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNlMRY040741;
	Tue, 29 Dec 2009 23:47:22 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292347.nBTNlMRY040741@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:47:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201242 - stable/7/sys/opencrypto
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:47:22 -0000

Author: bz
Date: Tue Dec 29 23:47:21 2009
New Revision: 201242
URL: http://svn.freebsd.org/changeset/base/201242

Log:
  MFC r199906:
    In case the compression result is the same size as the orignal version,
    the compression was useless as well.  Make sure to not update the data
    and return, else we would waste resources when decompressing.
  
    This also avoids the copyback() changing data other consumers like
    xform_ipcomp.c would have ignored because of no win and sent out without
    noting that compression was used, resulting in invalid packets at the
    receiver.

Modified:
  stable/7/sys/opencrypto/cryptosoft.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/opencrypto/cryptosoft.c
==============================================================================
--- stable/7/sys/opencrypto/cryptosoft.c	Tue Dec 29 23:44:32 2009	(r201241)
+++ stable/7/sys/opencrypto/cryptosoft.c	Tue Dec 29 23:47:21 2009	(r201242)
@@ -543,7 +543,7 @@ swcr_compdec(struct cryptodesc *crd, str
 	sw->sw_size = result;
 	/* Check the compressed size when doing compression */
 	if (crd->crd_flags & CRD_F_COMP) {
-		if (result > crd->crd_len) {
+		if (result >= crd->crd_len) {
 			/* Compression was useless, we lost time */
 			FREE(out, M_CRYPTO_DATA);
 			return 0;

From owner-svn-src-stable-7@FreeBSD.ORG  Tue Dec 29 23:58:33 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1742C1065670;
	Tue, 29 Dec 2009 23:58:33 +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 0573F8FC13;
	Tue, 29 Dec 2009 23:58:33 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBTNwWvx041005;
	Tue, 29 Dec 2009 23:58:32 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBTNwWpM041001;
	Tue, 29 Dec 2009 23:58:32 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912292358.nBTNwWpM041001@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Tue, 29 Dec 2009 23:58:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201243 - in stable/7: sys/netipsec usr.bin/netstat
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Tue, 29 Dec 2009 23:58:33 -0000

Author: bz
Date: Tue Dec 29 23:58:32 2009
New Revision: 201243
URL: http://svn.freebsd.org/changeset/base/201243

Log:
  MFC r199946:
  
    Add more statistics variables for IPcomp.
  
    Try to version the struct in a backward compatible way.
    People asked for the versioning of the stats structs in general before.
  
  Note: old netstat binaries, as only consumer, continue to work as they are
        still using kvm but will not display the new stats. [1]
  
  Discussed with:		rwatson [1] (for stable/8)

Modified:
  stable/7/sys/netipsec/ipcomp_var.h
  stable/7/sys/netipsec/xform_ipcomp.c
  stable/7/usr.bin/netstat/ipsec.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/usr.bin/netstat/   (props changed)

Modified: stable/7/sys/netipsec/ipcomp_var.h
==============================================================================
--- stable/7/sys/netipsec/ipcomp_var.h	Tue Dec 29 23:47:21 2009	(r201242)
+++ stable/7/sys/netipsec/ipcomp_var.h	Tue Dec 29 23:58:32 2009	(r201243)
@@ -41,6 +41,7 @@
  */
 #define	IPCOMP_ALG_MAX	8
 
+#define	IPCOMPSTAT_VERSION	1
 struct ipcompstat {
 	u_int32_t	ipcomps_hdrops;	/* Packet shorter than header shows */
 	u_int32_t	ipcomps_nopf;	/* Protocol family not supported */
@@ -58,6 +59,9 @@ struct ipcompstat {
 	u_int32_t	ipcomps_pdrops;	/* Packet blocked due to policy */
 	u_int32_t	ipcomps_crypto;	/* "Crypto" processing failure */
 	u_int32_t	ipcomps_hist[IPCOMP_ALG_MAX];/* Per-algorithm op count */
+	u_int32_t	version;	/* Version of this structure. */
+	u_int32_t	ipcomps_threshold; /* Packet < comp. algo. threshold. */
+	u_int32_t	ipcomps_uncompr; /* Compression was useles. */
 };
 
 #ifdef _KERNEL

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:47:21 2009	(r201242)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:58:32 2009	(r201243)
@@ -347,7 +347,7 @@ ipcomp_output(
 	 * See RFC 3173, 2.2. Non-Expansion Policy.
 	 */
 	if (m->m_pkthdr.len <= ipcompx->minlen) {
-		/* XXX-BZ V_ipcompstat.threshold++; */
+		ipcompstat.ipcomps_threshold++;
 		return ipsec_process_done(m, isr);
 	}
 
@@ -571,8 +571,10 @@ ipcomp_output_cb(struct cryptop *crp)
 			goto bad;
 		}
 	} else {
-		/* compression was useless, we have lost time */
-		/* XXX add statistic */
+		/* Compression was useless, we have lost time. */
+		ipcompstat.ipcomps_uncompr++;
+		DPRINTF(("%s: compressions was useless %d - %d <= %d\n",
+		    __func__, crp->crp_ilen, skip, crp->crp_olen));
 		/* XXX remember state to not compress the next couple
 		 *     of packets, RFC 3173, 2.2. Non-Expansion Policy */
 	}
@@ -606,6 +608,8 @@ static struct xformsw ipcomp_xformsw = {
 static void
 ipcomp_attach(void)
 {
+
+	ipcompstat.version = IPCOMPSTAT_VERSION;
 	xform_register(&ipcomp_xformsw);
 }
 SYSINIT(ipcomp_xform_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_MIDDLE, ipcomp_attach, NULL);

Modified: stable/7/usr.bin/netstat/ipsec.c
==============================================================================
--- stable/7/usr.bin/netstat/ipsec.c	Tue Dec 29 23:47:21 2009	(r201242)
+++ stable/7/usr.bin/netstat/ipsec.c	Tue Dec 29 23:58:32 2009	(r201243)
@@ -418,6 +418,7 @@ esp_stats(u_long off, const char *name, 
 static void
 print_ipcompstats(const struct ipcompstat *ipcompstat)
 {
+	uint32_t version;
 #define	p32(f, m) if (ipcompstat->f || sflag <= 1) \
     printf("\t%u" m, (unsigned int)ipcompstat->f, plural(ipcompstat->f))
 #define	p64(f, m) if (ipcompstat->f || sflag <= 1) \
@@ -425,6 +426,11 @@ print_ipcompstats(const struct ipcompsta
 #define	hist(f, n, t) \
     ipsec_hist_new((f), sizeof(f)/sizeof(f[0]), (n), (t));
 
+#ifndef IPCOMPSTAT_VERSION
+	version = 0;
+#else
+	version = ipcompstat->version;
+#endif
 	p32(ipcomps_hdrops, " packet%s shorter than header shows\n");
 	p32(ipcomps_nopf, " packet%s dropped; protocol family not supported\n");
 	p32(ipcomps_notdb, " packet%s dropped; no TDB\n");
@@ -441,6 +447,10 @@ print_ipcompstats(const struct ipcompsta
 	p32(ipcomps_pdrops, " packet%s blocked due to policy\n");
 	p32(ipcomps_crypto, " crypto processing failure%s\n");
 	hist(ipcompstat->ipcomps_hist, ipsec_compnames, "COMP output");
+	if (version >= 1) {
+	p32(ipcomps_threshold, " packet%s sent uncompressed; size < compr. algo. threshold\n");
+	p32(ipcomps_uncompr, " packet%s sent uncompressed; compression was useless\n");
+	}
 
 #undef p32
 #undef p64

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 00:03:37 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4691B106566B;
	Wed, 30 Dec 2009 00:03: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 355138FC0A;
	Wed, 30 Dec 2009 00:03:37 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBU03bTl041222;
	Wed, 30 Dec 2009 00:03:37 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBU03bjT041219;
	Wed, 30 Dec 2009 00:03:37 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200912300003.nBU03bjT041219@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 30 Dec 2009 00:03: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: r201244 - in stable/7: share/man/man4 sys/netipsec
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 00:03:37 -0000

Author: bz
Date: Wed Dec 30 00:03:36 2009
New Revision: 201244
URL: http://svn.freebsd.org/changeset/base/201244

Log:
  MFC r199947, 199950:
    Enable IPcomp by default.
  
  PR:	kern/123587

Modified:
  stable/7/share/man/man4/ipsec.4
  stable/7/sys/netipsec/xform_ipcomp.c
Directory Properties:
  stable/7/share/man/man4/   (props changed)
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/share/man/man4/ipsec.4
==============================================================================
--- stable/7/share/man/man4/ipsec.4	Tue Dec 29 23:58:32 2009	(r201243)
+++ stable/7/share/man/man4/ipsec.4	Wed Dec 30 00:03:36 2009	(r201244)
@@ -29,7 +29,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 5, 2007
+.Dd November 29, 2009
 .Dt IPSEC 4
 .Os
 .Sh NAME
@@ -213,7 +213,7 @@ To selectively enable/disable protocols,
 .It Sy "Name	Default"
 .It "net.inet.esp.esp_enable	On"
 .It "net.inet.ah.ah_enable	On"
-.It "net.inet.ipcomp.ipcomp_enable	Off"
+.It "net.inet.ipcomp.ipcomp_enable	On"
 .El
 .Pp
 In addition the following variables are accessible via
@@ -406,6 +406,8 @@ size may alleviate this problem.
 .Pp
 The
 .Tn IPcomp
-protocol support is currently broken.
+protocol may occasionally error because of
+.Xr zlib 3
+problems.
 .Pp
 This documentation needs more review.

Modified: stable/7/sys/netipsec/xform_ipcomp.c
==============================================================================
--- stable/7/sys/netipsec/xform_ipcomp.c	Tue Dec 29 23:58:32 2009	(r201243)
+++ stable/7/sys/netipsec/xform_ipcomp.c	Wed Dec 30 00:03:36 2009	(r201244)
@@ -66,7 +66,7 @@
 #include 
 #include 
 
-int	ipcomp_enable = 0;
+int	ipcomp_enable = 1;
 struct	ipcompstat ipcompstat;
 
 SYSCTL_DECL(_net_inet_ipcomp);

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 17:45:36 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 562C310656C1;
	Wed, 30 Dec 2009 17:45:36 +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 4501F8FC1D;
	Wed, 30 Dec 2009 17:45:36 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUHjaAm065926;
	Wed, 30 Dec 2009 17:45:36 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUHjaXM065924;
	Wed, 30 Dec 2009 17:45:36 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200912301745.nBUHjaXM065924@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 30 Dec 2009 17:45:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201266 - stable/7/sys/boot/i386
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 17:45:36 -0000

Author: jhb
Date: Wed Dec 30 17:45:35 2009
New Revision: 201266
URL: http://svn.freebsd.org/changeset/base/201266

Log:
  MFC 200872:
  Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is enabled.

Modified:
  stable/7/sys/boot/i386/Makefile
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/boot/i386/Makefile
==============================================================================
--- stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:42:41 2009	(r201265)
+++ stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:45:35 2009	(r201266)
@@ -1,10 +1,16 @@
 # $FreeBSD$
 .include 
 
-SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \
-		gptzfsboot kgzldr libi386 libfirewire loader zfsloader
+.include 
+
+SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \
+		libi386 libfirewire loader
 
 # special boot programs, 'self-extracting boot2+loader'
 SUBDIR+=	pxeldr
 
+.if ${MK_ZFS} != "no"
+SUBDIR+=	zfsboot gptzfsboot zfsloader
+.endif
+
 .include 

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 17:55:21 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4768C106566C;
	Wed, 30 Dec 2009 17:55:21 +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 3542B8FC1E;
	Wed, 30 Dec 2009 17:55:21 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUHtLTd066251;
	Wed, 30 Dec 2009 17:55:21 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUHtLj5066248;
	Wed, 30 Dec 2009 17:55:21 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200912301755.nBUHtLj5066248@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 30 Dec 2009 17:55:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201268 - stable/7/lib/libstand
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 17:55:21 -0000

Author: jhb
Date: Wed Dec 30 17:55:20 2009
New Revision: 201268
URL: http://svn.freebsd.org/changeset/base/201268

Log:
  MFC 174741,200919:
  - Fix logical bug in the bzip2 reading code, which results in bogus EIO
    returned on a perfectly valid bzip2 stream whose decompressed size
    is multiple of read-ahead buffer size.
  - Add a similar fix to the gzipfs code to be safe (along with a subsequent
    bugfix to un-break seeking of gzip streams).
  - Add some ifdef'ed code to enable testing bzipfs.c from witin normal
    FreeBSD environment as opposed to the restricted loader one, so that
    one can use gdb and whatnot.
  - Add lseek() support to bzip2fs.

Modified:
  stable/7/lib/libstand/bzipfs.c
  stable/7/lib/libstand/gzipfs.c
Directory Properties:
  stable/7/lib/libstand/   (props changed)

Modified: stable/7/lib/libstand/bzipfs.c
==============================================================================
--- stable/7/lib/libstand/bzipfs.c	Wed Dec 30 17:53:07 2009	(r201267)
+++ stable/7/lib/libstand/bzipfs.c	Wed Dec 30 17:55:20 2009	(r201268)
@@ -28,7 +28,24 @@
 #include 
 __FBSDID("$FreeBSD$");
 
+#ifndef REGRESSION
 #include "stand.h"
+#else
+#include 
+#include 
+#include 
+#include 
+#include 
+
+struct open_file {
+    int                 f_flags;        /* see F_* below */
+    void                *f_fsdata;      /* file system specific data */
+};
+#define F_READ          0x0001  /* file opened for reading */
+#define EOFFSET (ELAST+8)       /* relative seek not supported */
+static inline u_int min(u_int a, u_int b) { return(a < b ? a : b); }
+#define panic(x, y) abort()
+#endif
 
 #include 
 #include 
@@ -41,6 +58,7 @@ struct bz_file
     int			bzf_rawfd;
     bz_stream		bzf_bzstream;
     char		bzf_buf[BZ_BUFSIZE];
+    int			bzf_endseen;
 };
 
 static int	bzf_fill(struct bz_file *z);
@@ -50,6 +68,7 @@ static int	bzf_read(struct open_file *f,
 static off_t	bzf_seek(struct open_file *f, off_t offset, int where);
 static int	bzf_stat(struct open_file *f, struct stat *sb);
 
+#ifndef REGRESSION
 struct fs_ops bzipfs_fsops = {
     "bzip",
     bzf_open, 
@@ -60,6 +79,7 @@ struct fs_ops bzipfs_fsops = {
     bzf_stat,
     null_readdir
 };
+#endif
 
 #if 0
 void *
@@ -155,6 +175,8 @@ bzf_open(const char *fname, struct open_
 
     /* Construct new name */
     bzfname = malloc(strlen(fname) + 5);
+    if (bzfname == NULL)
+	return(ENOMEM);
     sprintf(bzfname, "%s.bz2", fname);
 
     /* Try to open the compressed datafile */
@@ -176,13 +198,14 @@ bzf_open(const char *fname, struct open_
 
     /* Allocate a bz_file structure, populate it */
     bzf = malloc(sizeof(struct bz_file));
+    if (bzf == NULL)
+	return(ENOMEM);
     bzero(bzf, sizeof(struct bz_file));
     bzf->bzf_rawfd = rawfd;
 
-    /* Verify that the file is bzipped (XXX why do this afterwards?) */
+    /* Verify that the file is bzipped */
     if (check_header(bzf)) {
 	close(bzf->bzf_rawfd);
-	BZ2_bzDecompressEnd(&(bzf->bzf_bzstream));
 	free(bzf);
 	return(EFTYPE);
     }
@@ -220,7 +243,7 @@ bzf_read(struct open_file *f, void *buf,
     bzf->bzf_bzstream.next_out = buf;			/* where and how much */
     bzf->bzf_bzstream.avail_out = size;
 
-    while (bzf->bzf_bzstream.avail_out) {
+    while (bzf->bzf_bzstream.avail_out && bzf->bzf_endseen == 0) {
 	if ((bzf->bzf_bzstream.avail_in == 0) && (bzf_fill(bzf) == -1)) {
 	    printf("bzf_read: fill error\n");
 	    return(EIO);
@@ -228,12 +251,13 @@ bzf_read(struct open_file *f, void *buf,
 	if (bzf->bzf_bzstream.avail_in == 0) {		/* oops, unexpected EOF */
 	    printf("bzf_read: unexpected EOF\n");
 	    if (bzf->bzf_bzstream.avail_out == size)
-		return (EIO);
+		return(EIO);
 	    break;
 	}
 
 	error = BZ2_bzDecompress(&bzf->bzf_bzstream);	/* decompression pass */
 	if (error == BZ_STREAM_END) {			/* EOF, all done */
+	    bzf->bzf_endseen = 1;
 	    break;
 	}
 	if (error != BZ_OK) {				/* argh, decompression error */
@@ -246,6 +270,50 @@ bzf_read(struct open_file *f, void *buf,
     return(0);
 }
 
+static int
+bzf_rewind(struct open_file *f)
+{
+    struct bz_file	*bzf = (struct bz_file *)f->f_fsdata;
+    struct bz_file	*bzf_tmp;
+
+    /*
+     * Since bzip2 does not have an equivalent inflateReset function a crude
+     * one needs to be provided.  The functions all called in such a way that
+     * at any time an error occurs a role back can be done (effectively making
+     * this rewind 'atomic', either the reset occurs successfully or not at all,
+     * with no 'undefined' state happening).
+     */
+
+    /* Allocate a bz_file structure, populate it */
+    bzf_tmp = malloc(sizeof(struct bz_file));
+    if (bzf_tmp == NULL)
+	return(-1);
+    bzero(bzf_tmp, sizeof(struct bz_file));
+    bzf_tmp->bzf_rawfd = bzf->bzf_rawfd;
+
+    /* Initialise the inflation engine */
+    if (BZ2_bzDecompressInit(&(bzf_tmp->bzf_bzstream), 0, 1) != BZ_OK) {
+	free(bzf_tmp);
+	return(-1);
+    }
+
+    /* Seek back to the beginning of the file */
+    if (lseek(bzf->bzf_rawfd, 0, SEEK_SET) == -1) {
+	BZ2_bzDecompressEnd(&(bzf_tmp->bzf_bzstream));
+	free(bzf_tmp);
+	return(-1);
+    }
+
+    /* Free old bz_file data */
+    BZ2_bzDecompressEnd(&(bzf->bzf_bzstream));
+    free(bzf);
+
+    /* Use the new bz_file data */
+    f->f_fsdata = bzf_tmp;
+
+    return(0);
+}
+
 static off_t
 bzf_seek(struct open_file *f, off_t offset, int where)
 {
@@ -264,14 +332,17 @@ bzf_seek(struct open_file *f, off_t offs
 	target = -1;
     default:
 	errno = EINVAL;
-	return (-1);
+	return(-1);
     }
 
     /* Can we get there from here? */
-    if (target < bzf->bzf_bzstream.total_out_lo32) {
+    if (target < bzf->bzf_bzstream.total_out_lo32 && bzf_rewind(f) != 0) {
 	errno = EOFFSET;
 	return -1;
-    } 
+    }
+
+    /* if bzf_rewind was called then bzf has changed */
+    bzf = (struct bz_file *)f->f_fsdata;
 
     /* skip forwards if required */
     while (target > bzf->bzf_bzstream.total_out_lo32) {
@@ -281,7 +352,7 @@ bzf_seek(struct open_file *f, off_t offs
 	    return(-1);
     }
     /* This is where we are (be honest if we overshot) */
-    return (bzf->bzf_bzstream.total_out_lo32);
+    return(bzf->bzf_bzstream.total_out_lo32);
 }
 
 static int
@@ -301,3 +372,27 @@ bz_internal_error(int errorcode)
 {
     panic("bzipfs: critical error %d in bzip2 library occured\n", errorcode);
 }
+
+#ifdef REGRESSION
+/* Small test case, open and decompress test.bz2 */
+int main()
+{
+    struct open_file f;
+    char buf[1024];
+    size_t resid;
+    int err;
+
+    memset(&f, '\0', sizeof(f));
+    f.f_flags = F_READ;
+    err = bzf_open("test", &f);
+    if (err != 0)
+	exit(1);
+    do {
+	err = bzf_read(&f, buf, sizeof(buf), &resid);
+    } while (err == 0 && resid != sizeof(buf));
+
+    if (err != 0)
+	exit(2);
+    exit(0);
+}
+#endif

Modified: stable/7/lib/libstand/gzipfs.c
==============================================================================
--- stable/7/lib/libstand/gzipfs.c	Wed Dec 30 17:53:07 2009	(r201267)
+++ stable/7/lib/libstand/gzipfs.c	Wed Dec 30 17:55:20 2009	(r201268)
@@ -41,6 +41,7 @@ struct z_file
     off_t		zf_dataoffset;
     z_stream		zf_zstream;
     char		zf_buf[Z_BUFSIZE];
+    int			zf_endseen;
 };
 
 static int	zf_fill(struct z_file *z);
@@ -211,10 +212,9 @@ zf_open(const char *fname, struct open_f
     bzero(zf, sizeof(struct z_file));
     zf->zf_rawfd = rawfd;
 
-    /* Verify that the file is gzipped (XXX why do this afterwards?) */
+    /* Verify that the file is gzipped */
     if (check_header(zf)) {
 	close(zf->zf_rawfd);
-	inflateEnd(&(zf->zf_zstream));
 	free(zf);
 	return(EFTYPE);
     }
@@ -252,7 +252,7 @@ zf_read(struct open_file *f, void *buf, 
     zf->zf_zstream.next_out = buf;			/* where and how much */
     zf->zf_zstream.avail_out = size;
 
-    while (zf->zf_zstream.avail_out) {
+    while (zf->zf_zstream.avail_out && zf->zf_endseen == 0) {
 	if ((zf->zf_zstream.avail_in == 0) && (zf_fill(zf) == -1)) {
 	    printf("zf_read: fill error\n");
 	    return(EIO);
@@ -260,12 +260,13 @@ zf_read(struct open_file *f, void *buf, 
 	if (zf->zf_zstream.avail_in == 0) {		/* oops, unexpected EOF */
 	    printf("zf_read: unexpected EOF\n");
 	    if (zf->zf_zstream.avail_out == size)
-		return (EIO);
+		return(EIO);
 	    break;
 	}
 
 	error = inflate(&zf->zf_zstream, Z_SYNC_FLUSH);	/* decompression pass */
 	if (error == Z_STREAM_END) {			/* EOF, all done */
+	    zf->zf_endseen = 1;
 	    break;
 	}
 	if (error != Z_OK) {				/* argh, decompression error */
@@ -284,12 +285,13 @@ zf_rewind(struct open_file *f)
     struct z_file	*zf = (struct z_file *)f->f_fsdata;
 
     if (lseek(zf->zf_rawfd, zf->zf_dataoffset, SEEK_SET) == -1)
-	return -1;
+	return(-1);
     zf->zf_zstream.avail_in = 0;
     zf->zf_zstream.next_in = NULL;
+    zf->zf_endseen = 0;
     (void)inflateReset(&zf->zf_zstream);
 
-    return 0;
+    return(0);
 }
 
 static off_t
@@ -310,12 +312,12 @@ zf_seek(struct open_file *f, off_t offse
 	target = -1;
     default:
 	errno = EINVAL;
-	return (-1);
+	return(-1);
     }
 
     /* rewind if required */
     if (target < zf->zf_zstream.total_out && zf_rewind(f) != 0)
-	return -1;
+	return(-1);
 
     /* skip forwards if required */
     while (target > zf->zf_zstream.total_out) {
@@ -325,7 +327,7 @@ zf_seek(struct open_file *f, off_t offse
 	    return(-1);
     }
     /* This is where we are (be honest if we overshot) */
-    return (zf->zf_zstream.total_out);
+    return(zf->zf_zstream.total_out);
 }
 
 

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 19:26:46 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 754791065676;
	Wed, 30 Dec 2009 19:26:46 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 642378FC19;
	Wed, 30 Dec 2009 19:26:46 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUJQkHk068403;
	Wed, 30 Dec 2009 19:26:46 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUJQk17068401;
	Wed, 30 Dec 2009 19:26:46 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912301926.nBUJQk17068401@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 30 Dec 2009 19:26:46 +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: r201272 - stable/7/etc
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 19:26:46 -0000

Author: dougb
Date: Wed Dec 30 19:26:46 2009
New Revision: 201272
URL: http://svn.freebsd.org/changeset/base/201272

Log:
  MFC r201036:
  
  Delete some trailing whitespace

Modified:
  stable/7/etc/rc.subr
Directory Properties:
  stable/7/etc/   (props changed)

Modified: stable/7/etc/rc.subr
==============================================================================
--- stable/7/etc/rc.subr	Wed Dec 30 19:25:40 2009	(r201271)
+++ stable/7/etc/rc.subr	Wed Dec 30 19:26:46 2009	(r201272)
@@ -678,7 +678,7 @@ $command $rc_flags $command_args"
 				if [ -n "$_nice" ]; then
 					if [ -z "$_user" ]; then
 						_doit="sh -c \"$_doit\""
-					fi	
+					fi
 					_doit="nice -n $_nice $_doit"
 				fi
 			fi
@@ -928,7 +928,7 @@ load_rc_config()
 		. /etc/rc.conf.d/"$_name"
 	fi
 }
-  
+
 #
 # load_rc_config_var name var
 #	Read the rc.conf(5) var for name and set in the

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 19:38:57 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id C4C3C1065721;
	Wed, 30 Dec 2009 19:38:57 +0000 (UTC)
	(envelope-from dougb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B1A338FC13;
	Wed, 30 Dec 2009 19:38:57 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUJcvdR068782;
	Wed, 30 Dec 2009 19:38:57 GMT (envelope-from dougb@svn.freebsd.org)
Received: (from dougb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUJcvkn068778;
	Wed, 30 Dec 2009 19:38:57 GMT (envelope-from dougb@svn.freebsd.org)
Message-Id: <200912301938.nBUJcvkn068778@svn.freebsd.org>
From: Doug Barton 
Date: Wed, 30 Dec 2009 19:38:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201274 - in stable/7/usr.sbin: . service
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 19:38:58 -0000

Author: dougb
Date: Wed Dec 30 19:38:57 2009
New Revision: 201274
URL: http://svn.freebsd.org/changeset/base/201274

Log:
  MFC r200743:
  
  The service command is an easy interface to the rc.d system.
  Its primary purpose is to start and stop services provided by
  the rc.d scripts, however it can also be used to list the scripts
  using various criteria.
  
  MFC r200809, r200980, r201035, r201069, 201070:
  
  Updates/fixes suggested after the initial introduction

Added:
     - copied from r200743, head/usr.sbin/service/
Directory Properties:
  stable/7/usr.sbin/service/   (props changed)
Modified:
  stable/7/usr.sbin/Makefile   (contents, props changed)
  stable/7/usr.sbin/service/service.8
  stable/7/usr.sbin/service/service.sh
Directory Properties:
  stable/7/usr.sbin/   (props changed)

Modified: stable/7/usr.sbin/Makefile
==============================================================================
--- stable/7/usr.sbin/Makefile	Wed Dec 30 19:36:40 2009	(r201273)
+++ stable/7/usr.sbin/Makefile	Wed Dec 30 19:38:57 2009	(r201274)
@@ -164,6 +164,7 @@ SUBDIR=	${_ac} \
 	${_sa} \
 	${_sade} \
 	${_sendmail} \
+	service \
 	setfib \
 	setfmac \
 	setpmac \

Modified: stable/7/usr.sbin/service/service.8
==============================================================================
--- head/usr.sbin/service/service.8	Sun Dec 20 01:34:12 2009	(r200743)
+++ stable/7/usr.sbin/service/service.8	Wed Dec 30 19:38:57 2009	(r201274)
@@ -24,18 +24,18 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd December 19, 2009
+.Dd December 26, 2009
 .Dt service 8
 .Os
 .Sh NAME
 .Nm service
-.Nd "service command manual page"
+.Nd "control (start/stop/etc.) or list system services"
 .Sh SYNOPSIS
 .Nm
 .Fl e
 .Nm
 .Op Fl v
-.Fl l|r
+.Fl l | r
 .Nm
 .Op Fl v
 .Ar  start|stop|etc.
@@ -44,7 +44,10 @@ The
 .Nm
 command is an easy interface to the rc.d system.
 Its primary purpose is to start and stop services provided
-by the rc.d scripts, however it can also be used to list
+by the rc.d scripts.
+When used for this purpose it will set the same restricted
+environment that is in use at boot time (see below).
+It can also be used to list
 the scripts using various criteria.
 .Pp
 The options are as follows:
@@ -78,6 +81,20 @@ above, but list all of the files, not ju
 .It Fl v
 Be slightly more verbose
 .El
+.Sh ENVIRONMENT
+When used to run rc.d scripts the
+.Nm
+command sets
+.Ev HOME
+to
+.Pa /
+and
+.Ev PATH
+to
+.Pa /sbin:/bin:/usr/sbin:/usr/bin
+which is how they are set in
+.Pa /etc/rc
+at boot time.
 .Sh EXIT STATUS
 .Ex -std
 .Sh EXAMPLES
@@ -99,8 +116,8 @@ for the names of the rc.d scripts:
 .Dl "}"
 .Dl "complete -F _service service"
 .Sh SEE ALSO
-.Xr bash 1 ,
-.Xr rc.conf 5 .
+.Xr bash 1 Pq Pa ports/shells/bash ,
+.Xr rc.conf 5 ,
 .Xr rc 8 ,
 .Xr rcorder 8
 .Sh HISTORY

Modified: stable/7/usr.sbin/service/service.sh
==============================================================================
--- head/usr.sbin/service/service.sh	Sun Dec 20 01:34:12 2009	(r200743)
+++ stable/7/usr.sbin/service/service.sh	Wed Dec 30 19:38:57 2009	(r201274)
@@ -33,7 +33,7 @@ usage () {
 	echo ''
 	echo 'Usage:'
 	echo "${0##*/} -e"
-	echo "${0##*/} [-v] -l|r"
+	echo "${0##*/} [-v] -l | -r"
 	echo "${0##*/} [-v]  start|stop|etc."
 	echo "${0##*/} -h"
 	echo ''
@@ -106,11 +106,11 @@ else
 	exit 1
 fi
 
+cd /
 for dir in /etc/rc.d $local_startup; do
 	if [ -x "$dir/$script" ]; then
 		[ -n "$VERBOSE" ] && echo "$script is located in $dir"
-		$dir/$script $*
-		exit $?
+		exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $*
 	fi
 done
 

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 21:35:15 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 509F4106568D;
	Wed, 30 Dec 2009 21:35:15 +0000 (UTC)
	(envelope-from oliver.pntr@gmail.com)
Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com
	[209.85.218.213])
	by mx1.freebsd.org (Postfix) with ESMTP id 30C828FC1C;
	Wed, 30 Dec 2009 21:35:13 +0000 (UTC)
Received: by bwz5 with SMTP id 5so7827773bwz.3
	for ; Wed, 30 Dec 2009 13:35:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:in-reply-to:references
	:date:message-id:subject:from:to:cc:content-type;
	bh=uQEXmBcELxLz7Vm0vT89dljJ8igcRKdunJ9RwGKfpNE=;
	b=iorSN7QE1hqqTb1NNPyG1ehRJYxPc961QUxj/j7avQGyTouxq3OUoysppzPPTxGS4J
	I9Nd9qcpcekpuyHMoqFX5yDQlvGW9KX9udQd7xsnvIlnlKEhZbYj+QD7RR6iU8oMnSDx
	kE6zfZGCteyeMmrkpY4x159k2mNZ/lez/jyJo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:cc:content-type;
	b=hcO80CrHTPSRS+myQzTfWFRB1Dd9cwg/anAVGoJw1HExMmxX4R69iiJTi2B611yIro
	bZicxC1jcIMY5Btjn6bGNGrM+l2Wifth+etvsKI2JErTQ2KZR7YJTen3YFtHcHOzxnn3
	bdb+P6LvtILUZ9KlgmKjtcgPONSlxtVkfg1xg=
MIME-Version: 1.0
Received: by 10.204.3.220 with SMTP id 28mr4892542bko.4.1262208903895; Wed, 30 
	Dec 2009 13:35:03 -0800 (PST)
In-Reply-To: <200912301745.nBUHjaXM065924@svn.freebsd.org>
References: <200912301745.nBUHjaXM065924@svn.freebsd.org>
Date: Wed, 30 Dec 2009 22:35:03 +0100
Message-ID: <6101e8c40912301335h6ba1a529s99366eb67779b876@mail.gmail.com>
From: Oliver Pinter 
To: John Baldwin 
Content-Type: text/plain; charset=ISO-8859-1
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r201266 - stable/7/sys/boot/i386
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 21:35:15 -0000

remove duplocated  .include 

--
--- Makefile.orig	2009-12-30 22:33:30.000000000 +0100
+++ Makefile	2009-12-30 22:33:36.000000000 +0100
@@ -1,8 +1,6 @@
 # $FreeBSD$
 .include 

-.include 
-
 SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \
 		libi386 libfirewire loader



On 12/30/09, John Baldwin  wrote:
> Author: jhb
> Date: Wed Dec 30 17:45:35 2009
> New Revision: 201266
> URL: http://svn.freebsd.org/changeset/base/201266
>
> Log:
>   MFC 200872:
>   Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is enabled.
>
> Modified:
>   stable/7/sys/boot/i386/Makefile
> Directory Properties:
>   stable/7/sys/   (props changed)
>   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
>   stable/7/sys/contrib/dev/acpica/   (props changed)
>   stable/7/sys/contrib/pf/   (props changed)
>
> Modified: stable/7/sys/boot/i386/Makefile
> ==============================================================================
> --- stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:42:41 2009	(r201265)
> +++ stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:45:35 2009	(r201266)
> @@ -1,10 +1,16 @@
>  # $FreeBSD$
>  .include 
>
> -SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \
> -		gptzfsboot kgzldr libi386 libfirewire loader zfsloader
> +.include 
> +
> +SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \
> +		libi386 libfirewire loader
>
>  # special boot programs, 'self-extracting boot2+loader'
>  SUBDIR+=	pxeldr
>
> +.if ${MK_ZFS} != "no"
> +SUBDIR+=	zfsboot gptzfsboot zfsloader
> +.endif
> +
>  .include 
> _______________________________________________
> svn-src-stable@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-stable
> To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org"
>

From owner-svn-src-stable-7@FreeBSD.ORG  Wed Dec 30 22:40:30 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8B1E51065672;
	Wed, 30 Dec 2009 22:40:30 +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 5F5A98FC17;
	Wed, 30 Dec 2009 22:40:30 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBUMeU5e074867;
	Wed, 30 Dec 2009 22:40:30 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBUMeUg2074865;
	Wed, 30 Dec 2009 22:40:30 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200912302240.nBUMeUg2074865@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 30 Dec 2009 22:40: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: r201288 - stable/7/sys/boot/i386
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Wed, 30 Dec 2009 22:40:30 -0000

Author: jhb
Date: Wed Dec 30 22:40:30 2009
New Revision: 201288
URL: http://svn.freebsd.org/changeset/base/201288

Log:
  Remove duplicate include of bsd.own.mk.

Modified:
  stable/7/sys/boot/i386/Makefile

Modified: stable/7/sys/boot/i386/Makefile
==============================================================================
--- stable/7/sys/boot/i386/Makefile	Wed Dec 30 22:37:28 2009	(r201287)
+++ stable/7/sys/boot/i386/Makefile	Wed Dec 30 22:40:30 2009	(r201288)
@@ -1,5 +1,4 @@
 # $FreeBSD$
-.include 
 
 .include 
 

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Dec 31 10:00:56 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9E8EE10656DE;
	Thu, 31 Dec 2009 10:00:55 +0000 (UTC)
	(envelope-from obrien@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 596A88FC25;
	Thu, 31 Dec 2009 10:00:55 +0000 (UTC)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBVA0t9w093032;
	Thu, 31 Dec 2009 10:00:55 GMT (envelope-from obrien@svn.freebsd.org)
Received: (from obrien@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBVA0tvI093030;
	Thu, 31 Dec 2009 10:00:55 GMT (envelope-from obrien@svn.freebsd.org)
Message-Id: <200912311000.nBVA0tvI093030@svn.freebsd.org>
From: "David E. O'Brien" 
Date: Thu, 31 Dec 2009 10:00:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r201336 - stable/7
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 31 Dec 2009 10:00:56 -0000

Author: obrien
Date: Thu Dec 31 10:00:55 2009
New Revision: 201336
URL: http://svn.freebsd.org/changeset/base/201336

Log:
  Happy New Year 2010! :-)

Modified:
  stable/7/COPYRIGHT

Modified: stable/7/COPYRIGHT
==============================================================================
--- stable/7/COPYRIGHT	Thu Dec 31 10:00:49 2009	(r201335)
+++ stable/7/COPYRIGHT	Thu Dec 31 10:00:55 2009	(r201336)
@@ -4,7 +4,7 @@
 The compilation of software known as FreeBSD is distributed under the
 following terms:
 
-Copyright (c) 1992-2009 The FreeBSD Project. All rights reserved.
+Copyright (c) 1992-2010 The FreeBSD Project. All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions

From owner-svn-src-stable-7@FreeBSD.ORG  Thu Dec 31 12:47:14 2009
Return-Path: 
Delivered-To: svn-src-stable-7@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9FD32106566B;
	Thu, 31 Dec 2009 12:47:14 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42])
	by mx1.freebsd.org (Postfix) with ESMTP id 6F9228FC15;
	Thu, 31 Dec 2009 12:47:14 +0000 (UTC)
Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net
	[66.111.2.69])
	by cyrus.watson.org (Postfix) with ESMTPSA id 2118246B52;
	Thu, 31 Dec 2009 07:47:14 -0500 (EST)
Received: from jhbbsd.localnet (unknown [209.249.190.9])
	by bigwig.baldwin.cx (Postfix) with ESMTPA id 6BD848A01D;
	Thu, 31 Dec 2009 07:47:08 -0500 (EST)
From: John Baldwin 
To: Oliver Pinter 
Date: Wed, 30 Dec 2009 17:38:44 -0500
User-Agent: KMail/1.12.1 (FreeBSD/7.2-CBSD-20091103; KDE/4.3.1; amd64; ; )
References: <200912301745.nBUHjaXM065924@svn.freebsd.org>
	<6101e8c40912301335h6ba1a529s99366eb67779b876@mail.gmail.com>
In-Reply-To: <6101e8c40912301335h6ba1a529s99366eb67779b876@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Message-Id: <200912301738.44368.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1
	(bigwig.baldwin.cx); Thu, 31 Dec 2009 07:47:08 -0500 (EST)
X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.0 required=4.2 tests=AWL,BAYES_00,
	DATE_IN_PAST_12_24,RDNS_NONE autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx
Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-stable-7@freebsd.org
Subject: Re: svn commit: r201266 - stable/7/sys/boot/i386
X-BeenThere: svn-src-stable-7@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: SVN commit messages for only the 7-stable src tree
	
List-Unsubscribe: , 
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: , 
	
X-List-Received-Date: Thu, 31 Dec 2009 12:47:14 -0000

On Wednesday 30 December 2009 4:35:03 pm Oliver Pinter wrote:
> remove duplocated  .include 
> 
> --
> --- Makefile.orig	2009-12-30 22:33:30.000000000 +0100
> +++ Makefile	2009-12-30 22:33:36.000000000 +0100
> @@ -1,8 +1,6 @@
>  # $FreeBSD$
>  .include 
> 
> -.include 
> -
>  SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \
>  		libi386 libfirewire loader

Oops, will fix, thanks!
 
> On 12/30/09, John Baldwin  wrote:
> > Author: jhb
> > Date: Wed Dec 30 17:45:35 2009
> > New Revision: 201266
> > URL: http://svn.freebsd.org/changeset/base/201266
> >
> > Log:
> >   MFC 200872:
> >   Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is 
enabled.
> >
> > Modified:
> >   stable/7/sys/boot/i386/Makefile
> > Directory Properties:
> >   stable/7/sys/   (props changed)
> >   stable/7/sys/cddl/contrib/opensolaris/   (props changed)
> >   stable/7/sys/contrib/dev/acpica/   (props changed)
> >   stable/7/sys/contrib/pf/   (props changed)
> >
> > Modified: stable/7/sys/boot/i386/Makefile
> > 
==============================================================================
> > --- stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:42:41 2009	(r201265)
> > +++ stable/7/sys/boot/i386/Makefile	Wed Dec 30 17:45:35 2009	(r201266)
> > @@ -1,10 +1,16 @@
> >  # $FreeBSD$
> >  .include 
> >
> > -SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot zfsboot \
> > -		gptzfsboot kgzldr libi386 libfirewire loader zfsloader
> > +.include 
> > +
> > +SUBDIR=		mbr pmbr boot0 boot0sio btx boot2 cdboot gptboot kgzldr \
> > +		libi386 libfirewire loader
> >
> >  # special boot programs, 'self-extracting boot2+loader'
> >  SUBDIR+=	pxeldr
> >
> > +.if ${MK_ZFS} != "no"
> > +SUBDIR+=	zfsboot gptzfsboot zfsloader
> > +.endif
> > +
> >  .include 
> > _______________________________________________
> > svn-src-stable@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/svn-src-stable
> > To unsubscribe, send any mail to "svn-src-stable-unsubscribe@freebsd.org"
> >
> 

-- 
John Baldwin