From owner-svn-src-stable-6@FreeBSD.ORG Sun Jan 3 03:35:23 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F5F6106568F; Sun, 3 Jan 2010 03:35:23 +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 6E1F48FC14; Sun, 3 Jan 2010 03:35:23 +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 o033ZNBF040425; Sun, 3 Jan 2010 03:35:23 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o033ZN6S040422; Sun, 3 Jan 2010 03:35:23 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001030335.o033ZN6S040422@svn.freebsd.org> From: Xin LI Date: Sun, 3 Jan 2010 03:35:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201414 - stable/6/sys/compat/svr4 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jan 2010 03:35:23 -0000 Author: delphij Date: Sun Jan 3 03:35:23 2010 New Revision: 201414 URL: http://svn.freebsd.org/changeset/base/201414 Log: MFC r193012: Add new sysconfig bits, Fix the bogus numbering of the old bits. Submitted by: "Pedro f. Giffuni" Obtained from: NetBSD PR: kern/91293 Modified: stable/6/sys/compat/svr4/svr4_misc.c stable/6/sys/compat/svr4/svr4_sysconfig.h Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/compat/svr4/svr4_misc.c ============================================================================== --- stable/6/sys/compat/svr4/svr4_misc.c Sun Jan 3 03:23:17 2010 (r201413) +++ stable/6/sys/compat/svr4/svr4_misc.c Sun Jan 3 03:35:23 2010 (r201414) @@ -699,9 +699,6 @@ svr4_sys_sysconfig(td, uap) retval = &(td->td_retval[0]); switch (uap->name) { - case SVR4_CONFIG_UNUSED: - *retval = 0; - break; case SVR4_CONFIG_NGROUPS: *retval = NGROUPS_MAX; break; @@ -781,7 +778,45 @@ svr4_sys_sysconfig(td, uap) #endif break; #endif /* NOTYET */ - + case SVR4_CONFIG_COHERENCY: + *retval = 0; /* XXX */ + break; + case SVR4_CONFIG_SPLIT_CACHE: + *retval = 0; /* XXX */ + break; + case SVR4_CONFIG_ICACHESZ: + *retval = 256; /* XXX */ + break; + case SVR4_CONFIG_DCACHESZ: + *retval = 256; /* XXX */ + break; + case SVR4_CONFIG_ICACHELINESZ: + *retval = 64; /* XXX */ + break; + case SVR4_CONFIG_DCACHELINESZ: + *retval = 64; /* XXX */ + break; + case SVR4_CONFIG_ICACHEBLKSZ: + *retval = 64; /* XXX */ + break; + case SVR4_CONFIG_DCACHEBLKSZ: + *retval = 64; /* XXX */ + break; + case SVR4_CONFIG_DCACHETBLKSZ: + *retval = 64; /* XXX */ + break; + case SVR4_CONFIG_ICACHE_ASSOC: + *retval = 1; /* XXX */ + break; + case SVR4_CONFIG_DCACHE_ASSOC: + *retval = 1; /* XXX */ + break; + case SVR4_CONFIG_MAXPID: + *retval = PID_MAX; + break; + case SVR4_CONFIG_STACK_PROT: + *retval = PROT_READ|PROT_WRITE|PROT_EXEC; + break; default: return EINVAL; } Modified: stable/6/sys/compat/svr4/svr4_sysconfig.h ============================================================================== --- stable/6/sys/compat/svr4/svr4_sysconfig.h Sun Jan 3 03:23:17 2010 (r201413) +++ stable/6/sys/compat/svr4/svr4_sysconfig.h Sun Jan 3 03:35:23 2010 (r201414) @@ -31,7 +31,7 @@ #ifndef _SVR4_SYSCONFIG_H_ #define _SVR4_SYSCONFIG_H_ -#define SVR4_CONFIG_UNUSED 0x01 +#define SVR4_CONFIG_UNUSED_1 0x01 #define SVR4_CONFIG_NGROUPS 0x02 #define SVR4_CONFIG_CHILD_MAX 0x03 #define SVR4_CONFIG_OPEN_FILES 0x04 @@ -43,20 +43,36 @@ #define SVR4_CONFIG_PROF_TCK 0x0a #define SVR4_CONFIG_NPROC_CONF 0x0b #define SVR4_CONFIG_NPROC_ONLN 0x0c -#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0e -#define SVR4_CONFIG_AIO_MAX 0x0f -#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x10 -#define SVR4_CONFIG_DELAYTIMER_MAX 0x11 -#define SVR4_CONFIG_MQ_OPEN_MAX 0x12 -#define SVR4_CONFIG_MQ_PRIO_MAX 0x13 -#define SVR4_CONFIG_RTSIG_MAX 0x14 -#define SVR4_CONFIG_SEM_NSEMS_MAX 0x15 -#define SVR4_CONFIG_SEM_VALUE_MAX 0x16 -#define SVR4_CONFIG_SIGQUEUE_MAX 0x17 -#define SVR4_CONFIG_SIGRT_MIN 0x18 -#define SVR4_CONFIG_SIGRT_MAX 0x19 -#define SVR4_CONFIG_TIMER_MAX 0x20 -#define SVR4_CONFIG_PHYS_PAGES 0x21 -#define SVR4_CONFIG_AVPHYS_PAGES 0x22 +#define SVR4_CONFIG_AIO_LISTIO_MAX 0x0d +#define SVR4_CONFIG_AIO_MAX 0x0e +#define SVR4_CONFIG_AIO_PRIO_DELTA_MAX 0x0f +#define SVR4_CONFIG_DELAYTIMER_MAX 0x10 +#define SVR4_CONFIG_MQ_OPEN_MAX 0x11 +#define SVR4_CONFIG_MQ_PRIO_MAX 0x12 +#define SVR4_CONFIG_RTSIG_MAX 0x13 +#define SVR4_CONFIG_SEM_NSEMS_MAX 0x14 +#define SVR4_CONFIG_SEM_VALUE_MAX 0x15 +#define SVR4_CONFIG_SIGQUEUE_MAX 0x16 +#define SVR4_CONFIG_SIGRT_MIN 0x17 +#define SVR4_CONFIG_SIGRT_MAX 0x18 +#define SVR4_CONFIG_TIMER_MAX 0x19 +#define SVR4_CONFIG_PHYS_PAGES 0x1a +#define SVR4_CONFIG_AVPHYS_PAGES 0x1b +#define SVR4_CONFIG_COHERENCY 0x1c +#define SVR4_CONFIG_SPLIT_CACHE 0x1d +#define SVR4_CONFIG_ICACHESZ 0x1e +#define SVR4_CONFIG_DCACHESZ 0x1f +#define SVR4_CONFIG_ICACHELINESZ 0x20 +#define SVR4_CONFIG_DCACHELINESZ 0x21 +#define SVR4_CONFIG_ICACHEBLKSZ 0x22 +#define SVR4_CONFIG_DCACHEBLKSZ 0x23 +#define SVR4_CONFIG_DCACHETBLKSZ 0x24 +#define SVR4_CONFIG_ICACHE_ASSOC 0x25 +#define SVR4_CONFIG_DCACHE_ASSOC 0x26 +#define SVR4_CONFIG_UNUSED_2 0x27 +#define SVR4_CONFIG_UNUSED_3 0x28 +#define SVR4_CONFIG_UNUSED_4 0x29 +#define SVR4_CONFIG_MAXPID 0x2a +#define SVR4_CONFIG_STACK_PROT 0x2b #endif /* !_SVR4_SYSCONFIG_H_ */ From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 01:13:03 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4E401065692; Mon, 4 Jan 2010 01:13:03 +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 936E78FC18; Mon, 4 Jan 2010 01:13:03 +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 o041D3jP005848; Mon, 4 Jan 2010 01:13:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o041D3IL005846; Mon, 4 Jan 2010 01:13:03 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001040113.o041D3IL005846@svn.freebsd.org> From: Xin LI Date: Mon, 4 Jan 2010 01:13:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201460 - stable/6/usr.bin/finger X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 01:13:03 -0000 Author: delphij Date: Mon Jan 4 01:13:03 2010 New Revision: 201460 URL: http://svn.freebsd.org/changeset/base/201460 Log: MFC r200793: Plug a memory leak. PR: bin/141836 Submitted by: Henning Petersen MFC after: 2 weeks Modified: stable/6/usr.bin/finger/finger.c Directory Properties: stable/6/usr.bin/finger/ (props changed) Modified: stable/6/usr.bin/finger/finger.c ============================================================================== --- stable/6/usr.bin/finger/finger.c Mon Jan 4 01:09:59 2010 (r201459) +++ stable/6/usr.bin/finger/finger.c Mon Jan 4 01:13:03 2010 (r201460) @@ -373,6 +373,7 @@ net: for (p = nargv; *p;) { printf("\n"); } + free(used); if (entries == 0) return; From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 01:14:19 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B51C106566C; Mon, 4 Jan 2010 01:14:19 +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 0A5E08FC08; Mon, 4 Jan 2010 01:14: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 o041EIwc006211; Mon, 4 Jan 2010 01:14:18 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o041EI0E006209; Mon, 4 Jan 2010 01:14:18 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001040114.o041EI0E006209@svn.freebsd.org> From: Xin LI Date: Mon, 4 Jan 2010 01:14:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201462 - stable/6/bin/pax X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 01:14:19 -0000 Author: delphij Date: Mon Jan 4 01:14:18 2010 New Revision: 201462 URL: http://svn.freebsd.org/changeset/base/201462 Log: MFC r200794: Plug a memory leak. PR: bin/141835 Submitted by: Henning Petersen MFC after: 2 weeks Modified: stable/6/bin/pax/sel_subs.c Directory Properties: stable/6/bin/pax/ (props changed) Modified: stable/6/bin/pax/sel_subs.c ============================================================================== --- stable/6/bin/pax/sel_subs.c Mon Jan 4 01:13:05 2010 (r201461) +++ stable/6/bin/pax/sel_subs.c Mon Jan 4 01:14:18 2010 (r201462) @@ -396,6 +396,7 @@ trng_add(char *str) default: paxwarn(1, "Bad option %c with time range %s", *flgpt, str); + free(pt); goto out; } ++flgpt; From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 01:15:42 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8ABA1065693; Mon, 4 Jan 2010 01:15:42 +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 A79C68FC18; Mon, 4 Jan 2010 01:15:42 +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 o041FgGJ006667; Mon, 4 Jan 2010 01:15:42 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o041Fgxu006665; Mon, 4 Jan 2010 01:15:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001040115.o041Fgxu006665@svn.freebsd.org> From: Xin LI Date: Mon, 4 Jan 2010 01:15:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201465 - stable/6/lib/libexpat X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 01:15:42 -0000 Author: delphij Date: Mon Jan 4 01:15:42 2010 New Revision: 201465 URL: http://svn.freebsd.org/changeset/base/201465 Log: MFC r201137 Grammar fix. Submitted by: Kenyon Ralph Modified: stable/6/lib/libexpat/libbsdxml.3 Directory Properties: stable/6/lib/libexpat/ (props changed) Modified: stable/6/lib/libexpat/libbsdxml.3 ============================================================================== --- stable/6/lib/libexpat/libbsdxml.3 Mon Jan 4 01:15:39 2010 (r201464) +++ stable/6/lib/libexpat/libbsdxml.3 Mon Jan 4 01:15:42 2010 (r201465) @@ -40,7 +40,7 @@ library is a verbatim copy of the eXpat .Pp The .Nm -library is intended to use within the +library is intended to be used within the .Fx base system only. Use of the From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 01:30:11 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47B77106566C; Mon, 4 Jan 2010 01:30:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id D02548FC0C; Mon, 4 Jan 2010 01:30:10 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id D5EC441C7A6; Mon, 4 Jan 2010 02:30:09 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id UvnqPOhRybrt; Mon, 4 Jan 2010 02:30:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id A6AEA41C7A5; Mon, 4 Jan 2010 02:30:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 9564A4448EC; Mon, 4 Jan 2010 01:27:55 +0000 (UTC) Date: Mon, 4 Jan 2010 01:27:55 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Warner Losh In-Reply-To: <201001022036.o02KaaGt047964@svn.freebsd.org> Message-ID: <20100104012648.I88477@maildrop.int.zabbadoz.net> References: <201001022036.o02KaaGt047964@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-6@freebsd.org Subject: Re: svn commit: r201405 - stable/6/sys/sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 01:30:11 -0000 On Sat, 2 Jan 2010, Warner Losh wrote: > Author: imp > Date: Sat Jan 2 20:36:36 2010 > New Revision: 201405 > URL: http://svn.freebsd.org/changeset/base/201405 > > Log: > Welcome to 2010. (Note: this was mistakenly not updated for 2009, > even though there were changes on the releng_6 branch). That said, I think /COPYRIGHT wasn't updated in stable/6 this time either (nor was it last year I assume). > Modified: > stable/6/sys/sys/copyright.h > > Modified: stable/6/sys/sys/copyright.h > ============================================================================== > --- stable/6/sys/sys/copyright.h Sat Jan 2 20:35:19 2010 (r201404) > +++ stable/6/sys/sys/copyright.h Sat Jan 2 20:36:36 2010 (r201405) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (C) 1992-2008 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 > @@ -30,7 +30,7 @@ > > /* FreeBSD */ > #define COPYRIGHT_FreeBSD \ > - "Copyright (c) 1992-2008 The FreeBSD Project.\n" > + "Copyright (c) 1992-2010 The FreeBSD Project.\n" > > /* Foundation */ > #define TRADEMARK_Foundation \ > -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 01:52:15 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F26A4106566C; Mon, 4 Jan 2010 01:52:15 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E16228FC0C; Mon, 4 Jan 2010 01:52: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 o041qFZq014869; Mon, 4 Jan 2010 01:52:15 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o041qF0R014867; Mon, 4 Jan 2010 01:52:15 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201001040152.o041qF0R014867@svn.freebsd.org> From: Warner Losh Date: Mon, 4 Jan 2010 01:52:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201467 - stable/6 X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 01:52:16 -0000 Author: imp Date: Mon Jan 4 01:52:15 2010 New Revision: 201467 URL: http://svn.freebsd.org/changeset/base/201467 Log: It is 2010 and we're still making changes to releng_6! Submitted by: bz@ Modified: stable/6/COPYRIGHT Modified: stable/6/COPYRIGHT ============================================================================== --- stable/6/COPYRIGHT Mon Jan 4 01:15:47 2010 (r201466) +++ stable/6/COPYRIGHT Mon Jan 4 01:52:15 2010 (r201467) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (C) 1992-2008 The FreeBSD Project. All rights reserved. +Copyright (C) 1992-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-6@FreeBSD.ORG Mon Jan 4 02:03:52 2010 Return-Path: Delivered-To: svn-src-stable-6@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A47A7106566B; Mon, 4 Jan 2010 02:03:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC778FC0A; Mon, 4 Jan 2010 02:03:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o041r19i019219; Sun, 3 Jan 2010 18:53:01 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 03 Jan 2010 18:53:41 -0700 (MST) Message-Id: <20100103.185341.1064051296187218048.imp@bsdimp.com> To: bz@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20100104012648.I88477@maildrop.int.zabbadoz.net> References: <201001022036.o02KaaGt047964@svn.freebsd.org> <20100104012648.I88477@maildrop.int.zabbadoz.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org Subject: Re: svn commit: r201405 - stable/6/sys/sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 02:03:52 -0000 In message: <20100104012648.I88477@maildrop.int.zabbadoz.net> "Bjoern A. Zeeb" writes: : On Sat, 2 Jan 2010, Warner Losh wrote: : : > Author: imp : > Date: Sat Jan 2 20:36:36 2010 : > New Revision: 201405 : > URL: http://svn.freebsd.org/changeset/base/201405 : > : > Log: : > Welcome to 2010. (Note: this was mistakenly not updated for 2009, : > even though there were changes on the releng_6 branch). : : That said, I think /COPYRIGHT wasn't updated in stable/6 this time : either (nor was it last year I assume). Done. While I don't think there's any more releases planned off this branch, people are still updating it... Warner From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 02:25:08 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F412A106566C; Mon, 4 Jan 2010 02:25:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id AD6C28FC13; Mon, 4 Jan 2010 02:25:07 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 1227541C752; Mon, 4 Jan 2010 03:25:07 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id qhkWewU79RBT; Mon, 4 Jan 2010 03:25:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 23D7841C751; Mon, 4 Jan 2010 03:25:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id A40474448EC; Mon, 4 Jan 2010 02:21:29 +0000 (UTC) Date: Mon, 4 Jan 2010 02:21:29 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: "M. Warner Losh" In-Reply-To: <20100103.185341.1064051296187218048.imp@bsdimp.com> Message-ID: <20100104021924.M88477@maildrop.int.zabbadoz.net> References: <201001022036.o02KaaGt047964@svn.freebsd.org> <20100104012648.I88477@maildrop.int.zabbadoz.net> <20100103.185341.1064051296187218048.imp@bsdimp.com> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-6@FreeBSD.org Subject: Re: svn commit: r201405 - stable/6/sys/sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 02:25:08 -0000 On Sun, 3 Jan 2010, M. Warner Losh wrote: > In message: <20100104012648.I88477@maildrop.int.zabbadoz.net> > "Bjoern A. Zeeb" writes: > : On Sat, 2 Jan 2010, Warner Losh wrote: > : > : > Author: imp > : > Date: Sat Jan 2 20:36:36 2010 > : > New Revision: 201405 > : > URL: http://svn.freebsd.org/changeset/base/201405 > : > > : > Log: > : > Welcome to 2010. (Note: this was mistakenly not updated for 2009, > : > even though there were changes on the releng_6 branch). > : > : That said, I think /COPYRIGHT wasn't updated in stable/6 this time > : either (nor was it last year I assume). > > Done. While I don't think there's any more releases planned off this > branch, people are still updating it... Yeah and it'a security branch till end of this year and make -j 7 universe seems to fail badly there as well and it's really strange to see alpha being built still ;-) Thanks for the update. /bz -- Bjoern A. Zeeb It will not break if you know what you are doing. From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 14:34:01 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC06010656FE; Mon, 4 Jan 2010 14:34:01 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C08738FC08; Mon, 4 Jan 2010 14:34:01 +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 o04EY1Ic085610; Mon, 4 Jan 2010 14:34:01 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EY1Qf085608; Mon, 4 Jan 2010 14:34:01 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041434.o04EY1Qf085608@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:34:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201496 - stable/6/sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:34:02 -0000 Author: bz Date: Mon Jan 4 14:34:01 2010 New Revision: 201496 URL: http://svn.freebsd.org/changeset/base/201496 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/6/sys/opencrypto/deflate.c Modified: stable/6/sys/opencrypto/deflate.c ============================================================================== --- stable/6/sys/opencrypto/deflate.c Mon Jan 4 12:39:42 2010 (r201495) +++ stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:34:01 2010 (r201496) @@ -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-6@FreeBSD.ORG Mon Jan 4 14:41:32 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 707D0106566C; Mon, 4 Jan 2010 14:41: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 44F688FC13; Mon, 4 Jan 2010 14:41: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 o04EfWnB087368; Mon, 4 Jan 2010 14:41:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EfW6p087366; Mon, 4 Jan 2010 14:41:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041441.o04EfW6p087366@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201498 - stable/6/sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:41:32 -0000 Author: bz Date: Mon Jan 4 14:41:31 2010 New Revision: 201498 URL: http://svn.freebsd.org/changeset/base/201498 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/6/sys/opencrypto/deflate.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/opencrypto/deflate.c ============================================================================== --- stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:35:36 2010 (r201497) +++ stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:41:31 2010 (r201498) @@ -113,13 +113,17 @@ deflate_global(data, size, decomp, out) if (error != Z_OK) 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) 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); @@ -130,11 +134,12 @@ deflate_global(data, size, decomp, out) buf[i].flag = 1; zbuf.avail_out = buf[i].size; i++; - } else + } else { + /* Unexpect result. */ goto bad; + } } -end: result = count = zbuf.total_out; *out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT); From owner-svn-src-stable-6@FreeBSD.ORG Mon Jan 4 14:43:23 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B404A1065676; Mon, 4 Jan 2010 14:43:23 +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 A22128FC14; Mon, 4 Jan 2010 14:43:23 +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 o04EhNe9087839; Mon, 4 Jan 2010 14:43:23 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EhNYF087837; Mon, 4 Jan 2010 14:43:23 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041443.o04EhNYF087837@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201499 - stable/6/sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:43:23 -0000 Author: bz Date: Mon Jan 4 14:43:23 2010 New Revision: 201499 URL: http://svn.freebsd.org/changeset/base/201499 Log: MFC r199894: Correct a typo. Modified: stable/6/sys/netipsec/ipsec_mbuf.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netipsec/ipsec_mbuf.c ============================================================================== --- stable/6/sys/netipsec/ipsec_mbuf.c Mon Jan 4 14:41:31 2010 (r201498) +++ stable/6/sys/netipsec/ipsec_mbuf.c Mon Jan 4 14:43:23 2010 (r201499) @@ -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-6@FreeBSD.ORG Mon Jan 4 14:52:45 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3B94106566B; Mon, 4 Jan 2010 14:52: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 B0C568FC15; Mon, 4 Jan 2010 14:52: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 o04EqjYw090013; Mon, 4 Jan 2010 14:52:45 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04Eqjr0090010; Mon, 4 Jan 2010 14:52:45 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041452.o04Eqjr0090010@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201501 - stable/6/sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:52:45 -0000 Author: bz Date: Mon Jan 4 14:52:45 2010 New Revision: 201501 URL: http://svn.freebsd.org/changeset/base/201501 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/6/sys/opencrypto/deflate.c stable/6/sys/opencrypto/deflate.h Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/opencrypto/deflate.c ============================================================================== --- stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:45:31 2010 (r201500) +++ stable/6/sys/opencrypto/deflate.c Mon Jan 4 14:52:45 2010 (r201501) @@ -65,53 +65,52 @@ 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]; - - 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 */ + int error, i; + struct deflate_buf *bufh, *bufp; + bufh = bufp = NULL; if (!decomp) { - buf[i].out = malloc((u_long) size, M_CRYPTO_DATA, - M_NOWAIT); - if (buf[i].out == NULL) - 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) - 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) { + 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) goto bad; + for (;;) { error = decomp ? inflate(&zbuf, Z_SYNC_FLUSH) : deflate(&zbuf, Z_FINISH); @@ -124,16 +123,20 @@ 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) { 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. */ goto bad; @@ -142,25 +145,31 @@ deflate_global(data, size, decomp, out) result = count = zbuf.total_out; - *out = malloc((u_long) result, M_CRYPTO_DATA, M_NOWAIT); - if (*out == NULL) + *out = malloc(result, M_CRYPTO_DATA, M_NOWAIT); + if (*out == NULL) { goto bad; + } if (decomp) inflateEnd(&zbuf); 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; } } @@ -168,13 +177,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/6/sys/opencrypto/deflate.h ============================================================================== --- stable/6/sys/opencrypto/deflate.h Mon Jan 4 14:45:31 2010 (r201500) +++ stable/6/sys/opencrypto/deflate.h Mon Jan 4 14:52:45 2010 (r201501) @@ -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-6@FreeBSD.ORG Mon Jan 4 14:56:17 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3401065692; Mon, 4 Jan 2010 14:56:17 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D4668FC1D; Mon, 4 Jan 2010 14:56:17 +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 o04EuHAB090883; Mon, 4 Jan 2010 14:56:17 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EuHkf090881; Mon, 4 Jan 2010 14:56:17 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041456.o04EuHkf090881@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201502 - stable/6/sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:56:17 -0000 Author: bz Date: Mon Jan 4 14:56:16 2010 New Revision: 201502 URL: http://svn.freebsd.org/changeset/base/201502 Log: MFC r199896: Directly send data uncompressed if the packet payload size is lower than the compression algorithm threshold. Modified: stable/6/sys/netipsec/xform_ipcomp.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:52:45 2010 (r201501) +++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:56:16 2010 (r201502) @@ -350,6 +350,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-6@FreeBSD.ORG Mon Jan 4 14:58:25 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A696106568F; Mon, 4 Jan 2010 14:58:25 +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 1D3038FC2C; Mon, 4 Jan 2010 14:58: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 o04EwP3N091413; Mon, 4 Jan 2010 14:58:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04EwPLD091411; Mon, 4 Jan 2010 14:58:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041458.o04EwPLD091411@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 14:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201503 - stable/6/sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 14:58:25 -0000 Author: bz Date: Mon Jan 4 14:58:24 2010 New Revision: 201503 URL: http://svn.freebsd.org/changeset/base/201503 Log: MFC r199897: Remove whitespace. Modified: stable/6/sys/netipsec/xform_ipcomp.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:56:16 2010 (r201502) +++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:58:24 2010 (r201503) @@ -370,12 +370,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: @@ -575,7 +575,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-6@FreeBSD.ORG Mon Jan 4 15:01:18 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7E1D106566B; Mon, 4 Jan 2010 15:01:18 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B55E48FC1D; Mon, 4 Jan 2010 15:01: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 o04F1IpY092231; Mon, 4 Jan 2010 15:01:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04F1IqZ092229; Mon, 4 Jan 2010 15:01:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041501.o04F1IqZ092229@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 15:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201505 - stable/6/sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:01:18 -0000 Author: bz Date: Mon Jan 4 15:01:18 2010 New Revision: 201505 URL: http://svn.freebsd.org/changeset/base/201505 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/6/sys/netipsec/xform_ipcomp.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 14:58:41 2010 (r201504) +++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 15:01:18 2010 (r201505) @@ -335,13 +335,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__); @@ -362,8 +359,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. */ @@ -388,13 +383,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; } @@ -412,40 +407,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); @@ -458,10 +420,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; @@ -481,7 +443,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 */ @@ -508,7 +471,7 @@ ipcomp_output_cb(struct cryptop *crp) struct ipsecrequest *isr; struct secasvar *sav; struct mbuf *m; - int error, skip, rlen; + int error, skip; NET_LOCK_GIANT(); @@ -516,7 +479,6 @@ ipcomp_output_cb(struct cryptop *crp) 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); @@ -556,7 +518,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 @@ -583,6 +584,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-6@FreeBSD.ORG Mon Jan 4 15:03:33 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59371106566C; Mon, 4 Jan 2010 15:03: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 474A18FC12; Mon, 4 Jan 2010 15:03: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 o04F3XeS092784; Mon, 4 Jan 2010 15:03:33 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04F3Xm7092782; Mon, 4 Jan 2010 15:03:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041503.o04F3Xm7092782@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 15:03:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201506 - stable/6/sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:03:33 -0000 Author: bz Date: Mon Jan 4 15:03:33 2010 New Revision: 201506 URL: http://svn.freebsd.org/changeset/base/201506 Log: MFC r199905: Assimilate very similar input and output code paths (no real functional change). Modified: stable/6/sys/netipsec/xform_ipcomp.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 15:01:18 2010 (r201505) +++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 15:03:33 2010 (r201506) @@ -255,7 +255,6 @@ ipcomp_input_cb(struct cryptop *crp) NET_UNLOCK_GIANT(); return error; } - ipcompstat.ipcomps_noxform++; DPRINTF(("%s: crypto error %d\n", __func__, crp->crp_etype)); error = crp->crp_etype; @@ -493,7 +492,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-6@FreeBSD.ORG Mon Jan 4 15:05:37 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C29D3106566C; Mon, 4 Jan 2010 15:05: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 B06E38FC1C; Mon, 4 Jan 2010 15:05: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 o04F5b4V093342; Mon, 4 Jan 2010 15:05:37 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04F5bZC093340; Mon, 4 Jan 2010 15:05:37 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041505.o04F5bZC093340@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 15:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201508 - stable/6/sys/opencrypto X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:05:37 -0000 Author: bz Date: Mon Jan 4 15:05:37 2010 New Revision: 201508 URL: http://svn.freebsd.org/changeset/base/201508 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/6/sys/opencrypto/cryptosoft.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/opencrypto/cryptosoft.c ============================================================================== --- stable/6/sys/opencrypto/cryptosoft.c Mon Jan 4 15:05:11 2010 (r201507) +++ stable/6/sys/opencrypto/cryptosoft.c Mon Jan 4 15:05:37 2010 (r201508) @@ -539,7 +539,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-6@FreeBSD.ORG Mon Jan 4 15:23:32 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B302A106568F; Mon, 4 Jan 2010 15:23: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 A00E68FC12; Mon, 4 Jan 2010 15:23: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 o04FNWYS097581; Mon, 4 Jan 2010 15:23:32 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04FNWpX097578; Mon, 4 Jan 2010 15:23:32 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001041523.o04FNWpX097578@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 4 Jan 2010 15:23:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201510 - in stable/6: share/man/man4 sys/netipsec X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:23:32 -0000 Author: bz Date: Mon Jan 4 15:23:32 2010 New Revision: 201510 URL: http://svn.freebsd.org/changeset/base/201510 Log: MFC r199947, 199950: Enable IPcomp by default. (Note that fast_ipsec.4 was changed, rather than ipsec.4.) PR: kern/123587 Modified: stable/6/share/man/man4/fast_ipsec.4 stable/6/sys/netipsec/xform_ipcomp.c Directory Properties: stable/6/share/man/man4/ (props changed) stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/share/man/man4/fast_ipsec.4 ============================================================================== --- stable/6/share/man/man4/fast_ipsec.4 Mon Jan 4 15:22:38 2010 (r201509) +++ stable/6/share/man/man4/fast_ipsec.4 Mon Jan 4 15:23:32 2010 (r201510) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 20, 2003 +.Dd November 29, 2009 .Dt FAST_IPSEC 4 .Os .Sh NAME @@ -112,7 +112,9 @@ There is presently no support for IPv6. .Pp The .Tn IPcomp -protocol support does not work. +protocol may occasionally error because of +.Xr zlib 3 +problems. .Pp Certain legacy authentication algorithms are not supported because of issues with the Modified: stable/6/sys/netipsec/xform_ipcomp.c ============================================================================== --- stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 15:22:38 2010 (r201509) +++ stable/6/sys/netipsec/xform_ipcomp.c Mon Jan 4 15:23:32 2010 (r201510) @@ -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-6@FreeBSD.ORG Mon Jan 4 15:34:49 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0627106566C; Mon, 4 Jan 2010 15:34:49 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BD6308FC12; Mon, 4 Jan 2010 15:34:49 +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 o04FYngG001830; Mon, 4 Jan 2010 15:34:49 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o04FYnQ0001828; Mon, 4 Jan 2010 15:34:49 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <201001041534.o04FYnQ0001828@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 4 Jan 2010 15:34:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201511 - stable/6/sys/dev/mxge X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jan 2010 15:34:49 -0000 Author: gallatin Date: Mon Jan 4 15:34:49 2010 New Revision: 201511 URL: http://svn.freebsd.org/changeset/base/201511 Log: MFC 200845: Don't take the driver mutex in mxge_tick(), as it is run with the mutex held. Modified: stable/6/sys/dev/mxge/if_mxge.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/dev/mxge/if_mxge.c ============================================================================== --- stable/6/sys/dev/mxge/if_mxge.c Mon Jan 4 15:23:32 2010 (r201510) +++ stable/6/sys/dev/mxge/if_mxge.c Mon Jan 4 15:34:49 2010 (r201511) @@ -3638,9 +3638,7 @@ mxge_tick(void *arg) uint16_t cmd; ticks = mxge_ticks; - mtx_lock(&sc->driver_mtx); running = sc->ifp->if_drv_flags & IFF_DRV_RUNNING; - mtx_unlock(&sc->driver_mtx); if (running) { /* aggregate stats from different slices */ pkts = mxge_update_stats(sc); From owner-svn-src-stable-6@FreeBSD.ORG Tue Jan 5 19:25:57 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80C881065695; Tue, 5 Jan 2010 19:25:57 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5575B8FC12; Tue, 5 Jan 2010 19:25: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 o05JPvAr090042; Tue, 5 Jan 2010 19:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05JPvR2090040; Tue, 5 Jan 2010 19:25:57 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201001051925.o05JPvR2090040@svn.freebsd.org> From: Ken Smith Date: Tue, 5 Jan 2010 19:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201600 - in stable/6/release: . scripts X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 19:25:57 -0000 Author: kensmith Date: Tue Jan 5 19:25:57 2010 New Revision: 201600 URL: http://svn.freebsd.org/changeset/base/201600 Log: MFS7 r201596: Add FreeBSD- to the beginning of the ISO image filenames. Modified: stable/6/release/Makefile Directory Properties: stable/6/release/ (props changed) stable/6/release/doc/en_US.ISO8859-1/hardware/ (props changed) stable/6/release/scripts/src-install.sh (props changed) Modified: stable/6/release/Makefile ============================================================================== --- stable/6/release/Makefile Tue Jan 5 18:26:41 2010 (r201599) +++ stable/6/release/Makefile Tue Jan 5 19:25:57 2010 (r201600) @@ -1120,39 +1120,39 @@ iso.1: .if defined(CD_BOOT) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_bootonly \ - ${CD}/${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-bootonly.iso ${CD_BOOT} .endif @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ - ${CD}/${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc1.iso ${CD_DISC1} \ ${CD_DISC1_PKGS} @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ FreeBSD_Packages \ - ${CD}/${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc2.iso ${CD_DISC2} \ ${CD_DISC2_PKGS} @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ FreeBSD_Packages_2 \ - ${CD}/${BUILDNAME}-${TARGET}-disc3.iso ${CD_DISC3} \ + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-disc3.iso ${CD_DISC3} \ ${CD_DISC3_PKGS} .if defined(MAKE_DVD) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_Install \ - ${CD}/${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \ ${CD_DVD1_PKGS} .endif .if !defined(NODOC) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \ FreeBSD_Documentation \ - ${CD}/${BUILDNAME}-${TARGET}-docs.iso ${CD_DOCS} + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-docs.iso ${CD_DOCS} .endif .if defined(SEPARATE_LIVEFS) @sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \ FreeBSD_LiveFS \ - ${CD}/${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} + ${CD}/FreeBSD-${BUILDNAME}-${TARGET}-livefs.iso ${CD_LIVEFS} .endif @echo "Generating MD5 and SHA256 sums..." - @(cd ${CD} && md5 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5) - @(cd ${CD} && sha256 *.iso > ${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256) + @(cd ${CD} && md5 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.MD5) + @(cd ${CD} && sha256 *.iso > FreeBSD-${BUILDNAME}-${TARGET}-iso.CHECKSUM.SHA256) touch ${.TARGET} .else @echo "Do not know how to create an ISO for ${TARGET_ARCH}." From owner-svn-src-stable-6@FreeBSD.ORG Tue Jan 5 20:38:59 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B09B106566B; Tue, 5 Jan 2010 20:38:59 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89CB98FC17; Tue, 5 Jan 2010 20:38:59 +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 o05Kcxm2006520; Tue, 5 Jan 2010 20:38:59 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05KcxjT006518; Tue, 5 Jan 2010 20:38:59 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001052038.o05KcxjT006518@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 5 Jan 2010 20:38:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201607 - stable/6/lib/libc/sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 20:38:59 -0000 Author: bz Date: Tue Jan 5 20:38:59 2010 New Revision: 201607 URL: http://svn.freebsd.org/changeset/base/201607 Log: MFC r186834: Document the special loopback address behaviour of jails. PR: kern/103464 Submitted by: brueffer (correct markup) Reviewed by: brueffer Modified: stable/6/lib/libc/sys/jail.2 Directory Properties: stable/6/lib/libc/ (props changed) Modified: stable/6/lib/libc/sys/jail.2 ============================================================================== --- stable/6/lib/libc/sys/jail.2 Tue Jan 5 20:32:08 2010 (r201606) +++ stable/6/lib/libc/sys/jail.2 Tue Jan 5 20:38:59 2010 (r201607) @@ -8,7 +8,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2003 +.Dd January 6, 2009 .Dt JAIL 2 .Os .Sh NAME @@ -97,6 +97,9 @@ or, if present, the per-jail .Pp All IP activity will be forced to happen to/from the IP number specified, which should be an alias on one of the network interfaces. +All connections to/from the loopback address +.Pq Li 127.0.0.1 +will be changed to be to/from the address of the jail. .Pp It is possible to identify a process as jailed by examining .Dq Li /proc//status : From owner-svn-src-stable-6@FreeBSD.ORG Tue Jan 5 23:33:30 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4345C106566C; Tue, 5 Jan 2010 23:33:30 +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 182998FC19; Tue, 5 Jan 2010 23:33: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 o05NXTE7047272; Tue, 5 Jan 2010 23:33:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o05NXTrB047270; Tue, 5 Jan 2010 23:33:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001052333.o05NXTrB047270@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 5 Jan 2010 23:33:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201625 - stable/6/sys/kern X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jan 2010 23:33:30 -0000 Author: bz Date: Tue Jan 5 23:33:29 2010 New Revision: 201625 URL: http://svn.freebsd.org/changeset/base/201625 Log: MFC r185583: Fix a credential reference leak. [1] Close subtle but relatively unlikely race conditions when propagating the vnode write error to other active sessions tracing to the same vnode, without holding a reference on the vnode anymore. [2] PR: kern/126368 [1] Submitted by: rwatson [2] Reviewed by: kib, rwatson (head) Modified: stable/6/sys/kern/kern_ktrace.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/kern/kern_ktrace.c ============================================================================== --- stable/6/sys/kern/kern_ktrace.c Tue Jan 5 23:26:45 2010 (r201624) +++ stable/6/sys/kern/kern_ktrace.c Tue Jan 5 23:33:29 2010 (r201625) @@ -891,12 +891,7 @@ ktr_writerequest(struct thread *td, stru */ mtx_lock(&ktrace_mtx); vp = td->td_proc->p_tracevp; - if (vp != NULL) - VREF(vp); cred = td->td_proc->p_tracecred; - if (cred != NULL) - crhold(cred); - mtx_unlock(&ktrace_mtx); /* * If vp is NULL, the vp has been cleared out from under this @@ -905,9 +900,13 @@ ktr_writerequest(struct thread *td, stru */ if (vp == NULL) { KASSERT(cred == NULL, ("ktr_writerequest: cred != NULL")); + mtx_unlock(&ktrace_mtx); return; } + VREF(vp); KASSERT(cred != NULL, ("ktr_writerequest: cred == NULL")); + crhold(cred); + mtx_unlock(&ktrace_mtx); kth = &req->ktr_header; datalen = data_lengths[(u_short)kth->ktr_type & ~KTR_DROP]; @@ -947,18 +946,26 @@ ktr_writerequest(struct thread *td, stru error = VOP_WRITE(vp, &auio, IO_UNIT | IO_APPEND, cred); VOP_UNLOCK(vp, 0, td); vn_finished_write(mp); - vrele(vp); - mtx_unlock(&Giant); - if (!error) + crfree(cred); + if (!error) { + vrele(vp); + mtx_unlock(&Giant); return; + } + mtx_unlock(&Giant); + /* * If error encountered, give up tracing on this vnode. We defer * all the vrele()'s on the vnode until after we are finished walking * the various lists to avoid needlessly holding locks. + * NB: at this point we still hold the vnode reference that must + * not go away as we need the valid vnode to compare with. Thus let + * vrele_count start at 1 and the reference will be freed + * by the loop at the end after our last use of vp. */ log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n", error); - vrele_count = 0; + vrele_count = 1; /* * First, clear this vnode from being used by any processes in the * system. From owner-svn-src-stable-6@FreeBSD.ORG Wed Jan 6 20:07:19 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D570106566B; Wed, 6 Jan 2010 20:07:19 +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 EFE028FC13; Wed, 6 Jan 2010 20:07: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 o06K7Im1026016; Wed, 6 Jan 2010 20:07:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06K7IlA026014; Wed, 6 Jan 2010 20:07:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201001062007.o06K7IlA026014@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Wed, 6 Jan 2010 20:07:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201663 - stable/6/sys/netinet X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 20:07:19 -0000 Author: bz Date: Wed Jan 6 20:07:18 2010 New Revision: 201663 URL: http://svn.freebsd.org/changeset/base/201663 Log: MFC r186948 (w/o the IPv6 parts): Make SIOCGIFADDR and related, jail-aware. Up to now we returned the first address of the interface for SIOCGIFADDR w/o an ifr_addr in the query. This caused problems for programs querying for an address but running inside a jail, as the address returned usually did not belong to the jail. If there was an ifr_addr given on v4, you could probe for more addresses on the interfaces that you were not allowed to see from inside a jail. Return an error (EADDRNOTAVAIL) in that case now unless the address is on the given interface and valid for the jail. PR: kern/114325 Thanks to: Axel Scheepers (axel.scheepers nl.clara.net) Modified: stable/6/sys/netinet/in.c Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/dev/cxgb/ (props changed) Modified: stable/6/sys/netinet/in.c ============================================================================== --- stable/6/sys/netinet/in.c Wed Jan 6 20:04:36 2010 (r201662) +++ stable/6/sys/netinet/in.c Wed Jan 6 20:07:18 2010 (r201663) @@ -38,7 +38,9 @@ #include #include #include +#include #include +#include #include #include @@ -254,13 +256,19 @@ in_control(so, cmd, data, ifp, td) LIST_FOREACH(iap, INADDR_HASH(dst.s_addr), ia_hash) if (iap->ia_ifp == ifp && iap->ia_addr.sin_addr.s_addr == dst.s_addr) { - ia = iap; + if (td == NULL || !prison_ip( + td->td_ucred, 0, &dst.s_addr)) + ia = iap; break; } if (ia == NULL) TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { iap = ifatoia(ifa); if (iap->ia_addr.sin_family == AF_INET) { + if (td != NULL && + prison_ip(td->td_ucred, 0, + &iap->ia_addr.sin_addr.s_addr)) + continue; ia = iap; break; } From owner-svn-src-stable-6@FreeBSD.ORG Wed Jan 6 21:45:32 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09A0810656A9; Wed, 6 Jan 2010 21:45:32 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E95038FC21; Wed, 6 Jan 2010 21:45:31 +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 o06LjVc2048874; Wed, 6 Jan 2010 21:45:31 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o06LjVr2048866; Wed, 6 Jan 2010 21:45:31 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201001062145.o06LjVr2048866@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 6 Jan 2010 21:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201679 - releng/6.3 releng/6.3/contrib/bind9/bin/named releng/6.3/contrib/bind9/lib/dns releng/6.3/contrib/bind9/lib/dns/include/dns releng/6.3/contrib/ntp/ntpd releng/6.3/sys/conf rel... X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jan 2010 21:45:32 -0000 Author: simon Date: Wed Jan 6 21:45:30 2010 New Revision: 201679 URL: http://svn.freebsd.org/changeset/base/201679 Log: Fix BIND named(8) cache poisoning with DNSSEC validation. [SA-10:01] Fix ntpd mode 7 denial of service. [SA-10:02] Fix ZFS ZIL playback with insecure permissions. [SA-10:03] Various FreeBSD 8.0-RELEASE improvements. [EN-10:01] Security: FreeBSD-SA-10:01.bind Security: FreeBSD-SA-10:02.ntpd Security: FreeBSD-SA-10:03.zfs Errata: FreeBSD-EN-10:01.freebsd Approved by: so (simon) Modified: stable/6/contrib/bind9/bin/named/query.c stable/6/contrib/bind9/lib/dns/include/dns/types.h stable/6/contrib/bind9/lib/dns/masterdump.c stable/6/contrib/bind9/lib/dns/rbtdb.c stable/6/contrib/bind9/lib/dns/resolver.c stable/6/contrib/bind9/lib/dns/validator.c stable/6/contrib/ntp/ntpd/ntp_request.c Changes in other areas also in this revision: Modified: releng/6.3/UPDATING releng/6.3/contrib/bind9/bin/named/query.c releng/6.3/contrib/bind9/lib/dns/include/dns/types.h releng/6.3/contrib/bind9/lib/dns/masterdump.c releng/6.3/contrib/bind9/lib/dns/rbtdb.c releng/6.3/contrib/bind9/lib/dns/resolver.c releng/6.3/contrib/bind9/lib/dns/validator.c releng/6.3/contrib/ntp/ntpd/ntp_request.c releng/6.3/sys/conf/newvers.sh releng/6.4/UPDATING releng/6.4/contrib/bind9/bin/named/query.c releng/6.4/contrib/bind9/lib/dns/include/dns/types.h releng/6.4/contrib/bind9/lib/dns/masterdump.c releng/6.4/contrib/bind9/lib/dns/rbtdb.c releng/6.4/contrib/bind9/lib/dns/resolver.c releng/6.4/contrib/bind9/lib/dns/validator.c releng/6.4/contrib/ntp/ntpd/ntp_request.c releng/6.4/sys/conf/newvers.sh releng/7.1/UPDATING releng/7.1/contrib/bind9/bin/named/query.c releng/7.1/contrib/bind9/lib/dns/include/dns/types.h releng/7.1/contrib/bind9/lib/dns/masterdump.c releng/7.1/contrib/bind9/lib/dns/rbtdb.c releng/7.1/contrib/bind9/lib/dns/resolver.c releng/7.1/contrib/bind9/lib/dns/validator.c releng/7.1/contrib/ntp/ntpd/ntp_request.c releng/7.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c releng/7.1/sys/conf/newvers.sh releng/7.2/UPDATING releng/7.2/contrib/bind9/bin/named/query.c releng/7.2/contrib/bind9/lib/dns/include/dns/types.h releng/7.2/contrib/bind9/lib/dns/masterdump.c releng/7.2/contrib/bind9/lib/dns/rbtdb.c releng/7.2/contrib/bind9/lib/dns/resolver.c releng/7.2/contrib/bind9/lib/dns/validator.c releng/7.2/contrib/ntp/ntpd/ntp_request.c releng/7.2/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c releng/7.2/sys/conf/newvers.sh releng/8.0/UPDATING releng/8.0/contrib/bind9/bin/named/query.c releng/8.0/contrib/bind9/lib/dns/include/dns/types.h releng/8.0/contrib/bind9/lib/dns/masterdump.c releng/8.0/contrib/bind9/lib/dns/rbtdb.c releng/8.0/contrib/bind9/lib/dns/resolver.c releng/8.0/contrib/bind9/lib/dns/validator.c releng/8.0/contrib/ntp/ntpd/ntp_request.c releng/8.0/sys/cddl/compat/opensolaris/sys/vnode.h releng/8.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c releng/8.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c releng/8.0/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c releng/8.0/sys/cddl/contrib/opensolaris/uts/common/sys/vnode.h releng/8.0/sys/conf/newvers.sh releng/8.0/sys/kern/vfs_lookup.c releng/8.0/sys/netinet/ip_mroute.c releng/8.0/sys/netinet/raw_ip.c releng/8.0/sys/netinet/sctp_input.c releng/8.0/sys/netinet6/raw_ip6.c releng/8.0/sys/rpc/clnt_vc.c stable/7/contrib/ntp/ntpd/ntp_request.c stable/7/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c stable/8/contrib/ntp/ntpd/ntp_request.c Modified: stable/6/contrib/bind9/bin/named/query.c ============================================================================== --- stable/6/contrib/bind9/bin/named/query.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/bin/named/query.c Wed Jan 6 21:45:30 2010 (r201679) @@ -92,6 +92,8 @@ #define DNS_GETDB_NOLOG 0x02U #define DNS_GETDB_PARTIAL 0x04U +#define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0) + static void query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype); @@ -1698,14 +1700,14 @@ query_addbestns(ns_client_t *client) { zsigrdataset = NULL; } - if ((client->query.dboptions & DNS_DBFIND_PENDINGOK) == 0 && - (rdataset->trust == dns_trust_pending || - (sigrdataset != NULL && sigrdataset->trust == dns_trust_pending))) + if ((DNS_TRUST_PENDING(rdataset->trust) || + (sigrdataset != NULL && DNS_TRUST_PENDING(sigrdataset->trust))) && + !PENDINGOK(client->query.dboptions)) goto cleanup; - if (WANTDNSSEC(client) && SECURE(client) && - (rdataset->trust == dns_trust_glue || - (sigrdataset != NULL && sigrdataset->trust == dns_trust_glue))) + if ((DNS_TRUST_GLUE(rdataset->trust) || + (sigrdataset != NULL && DNS_TRUST_GLUE(sigrdataset->trust))) && + SECURE(client) && WANTDNSSEC(client)) goto cleanup; query_addrrset(client, &fname, &rdataset, &sigrdataset, dbuf, @@ -2376,6 +2378,8 @@ query_find(ns_client_t *client, dns_fetc isc_boolean_t empty_wild; dns_rdataset_t *noqname; isc_boolean_t resuming; + dns_rdataset_t tmprdataset; + unsigned int dboptions; CTRACE("query_find"); @@ -2577,9 +2581,47 @@ query_find(ns_client_t *client, dns_fetc /* * Now look for an answer in the database. */ + dboptions = client->query.dboptions; + if (sigrdataset == NULL && client->view->enablednssec) { + /* + * If the client doesn't want DNSSEC we still want to + * look for any data pending validation to save a remote + * lookup if possible. + */ + dns_rdataset_init(&tmprdataset); + sigrdataset = &tmprdataset; + dboptions |= DNS_DBFIND_PENDINGOK; + } + refind: result = dns_db_find(db, client->query.qname, version, type, - client->query.dboptions, client->now, - &node, fname, rdataset, sigrdataset); + dboptions, client->now, &node, fname, + rdataset, sigrdataset); + /* + * If we have found pending data try to validate it. + * If the data does not validate as secure and we can't + * use the unvalidated data requery the database with + * pending disabled to prevent infinite looping. + */ + if (result != ISC_R_SUCCESS || !DNS_TRUST_PENDING(rdataset->trust)) + goto validation_done; + if (rdataset->trust != dns_trust_pending_answer || + !PENDINGOK(client->query.dboptions)) { + dns_rdataset_disassociate(rdataset); + if (sigrdataset != NULL && + dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); + if (sigrdataset == &tmprdataset) + sigrdataset = NULL; + dns_db_detachnode(db, &node); + dboptions &= ~DNS_DBFIND_PENDINGOK; + goto refind; + } + validation_done: + if (sigrdataset == &tmprdataset) { + if (dns_rdataset_isassociated(sigrdataset)) + dns_rdataset_disassociate(sigrdataset); + sigrdataset = NULL; + } resume: CTRACE("query_find: resume"); Modified: stable/6/contrib/bind9/lib/dns/include/dns/types.h ============================================================================== --- stable/6/contrib/bind9/lib/dns/include/dns/types.h Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/lib/dns/include/dns/types.h Wed Jan 6 21:45:30 2010 (r201679) @@ -226,40 +226,51 @@ enum { dns_trust_none = 0, #define dns_trust_none ((dns_trust_t)dns_trust_none) - /* Subject to DNSSEC validation but has not yet been validated */ - dns_trust_pending = 1, -#define dns_trust_pending ((dns_trust_t)dns_trust_pending) + /*% + * Subject to DNSSEC validation but has not yet been validated + * dns_trust_pending_additional (from the additional section). + */ + dns_trust_pending_additional = 1, +#define dns_trust_pending_additional \ + ((dns_trust_t)dns_trust_pending_additional) - /* Received in the additional section of a response. */ - dns_trust_additional = 2, + dns_trust_pending_answer = 2, +#define dns_trust_pending_answer ((dns_trust_t)dns_trust_pending_answer) + + /*% Received in the additional section of a response. */ + dns_trust_additional = 3, #define dns_trust_additional ((dns_trust_t)dns_trust_additional) - /* Received in a referral response. */ - dns_trust_glue = 3, + /* Received in a referral response. */ + dns_trust_glue = 4, #define dns_trust_glue ((dns_trust_t)dns_trust_glue) - /* Answser from a non-authoritative server */ - dns_trust_answer = 4, + /* Answer from a non-authoritative server */ + dns_trust_answer = 5, #define dns_trust_answer ((dns_trust_t)dns_trust_answer) /* Received in the authority section as part of an authoritative response */ - dns_trust_authauthority = 5, + dns_trust_authauthority = 6, #define dns_trust_authauthority ((dns_trust_t)dns_trust_authauthority) - /* Answser from an authoritative server */ - dns_trust_authanswer = 6, + /* Answer from an authoritative server */ + dns_trust_authanswer = 7, #define dns_trust_authanswer ((dns_trust_t)dns_trust_authanswer) - /* Successfully DNSSEC validated */ - dns_trust_secure = 7, + /* Successfully DNSSEC validated */ + dns_trust_secure = 8, #define dns_trust_secure ((dns_trust_t)dns_trust_secure) /* This server is authoritative */ - dns_trust_ultimate = 8 + dns_trust_ultimate = 9 #define dns_trust_ultimate ((dns_trust_t)dns_trust_ultimate) }; +#define DNS_TRUST_PENDING(x) ((x) == dns_trust_pending_answer || \ + (x) == dns_trust_pending_additional) +#define DNS_TRUST_GLUE(x) ((x) == dns_trust_glue) + /* * Name checking severites. */ Modified: stable/6/contrib/bind9/lib/dns/masterdump.c ============================================================================== --- stable/6/contrib/bind9/lib/dns/masterdump.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/lib/dns/masterdump.c Wed Jan 6 21:45:30 2010 (r201679) @@ -763,7 +763,8 @@ dump_order_compare(const void *a, const static const char *trustnames[] = { "none", - "pending", + "pending-additional", + "pending-answer", "additional", "glue", "answer", Modified: stable/6/contrib/bind9/lib/dns/rbtdb.c ============================================================================== --- stable/6/contrib/bind9/lib/dns/rbtdb.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/lib/dns/rbtdb.c Wed Jan 6 21:45:30 2010 (r201679) @@ -2667,7 +2667,7 @@ cache_zonecut_callback(dns_rbtnode_t *no } if (dname_header != NULL && - (dname_header->trust != dns_trust_pending || + (!DNS_TRUST_PENDING(dname_header->trust) || (search->options & DNS_DBFIND_PENDINGOK) != 0)) { /* * We increment the reference count on node to ensure that @@ -3129,7 +3129,7 @@ cache_find(dns_db_t *db, dns_name_t *nam if (found == NULL || (found->trust == dns_trust_glue && ((options & DNS_DBFIND_GLUEOK) == 0)) || - (found->trust == dns_trust_pending && + (DNS_TRUST_PENDING(found->trust) && ((options & DNS_DBFIND_PENDINGOK) == 0))) { /* * If there is an NS rdataset at this node, then this is the Modified: stable/6/contrib/bind9/lib/dns/resolver.c ============================================================================== --- stable/6/contrib/bind9/lib/dns/resolver.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/lib/dns/resolver.c Wed Jan 6 21:45:30 2010 (r201679) @@ -3694,6 +3694,7 @@ cache_name(fetchctx_t *fctx, dns_name_t * for it, unless it is glue. */ if (secure_domain && rdataset->trust != dns_trust_glue) { + dns_trust_t trust; /* * RRSIGs are validated as part of validating the * type they cover. @@ -3730,12 +3731,34 @@ cache_name(fetchctx_t *fctx, dns_name_t } /* + * Reject out of bailiwick additional records + * without RRSIGs as they can't possibly validate + * as "secure" and as we will never never want to + * store these as "answers" after validation. + */ + if (rdataset->trust == dns_trust_additional && + sigrdataset == NULL && EXTERNAL(rdataset)) + continue; + + /* + * XXXMPA: If we store as "answer" after validating + * then we need to do bailiwick processing and + * also need to track whether RRsets are in or + * out of bailiwick. This will require a another + * pending trust level. + * * Cache this rdataset/sigrdataset pair as - * pending data. + * pending data. Track whether it was additional + * or not. */ - rdataset->trust = dns_trust_pending; + if (rdataset->trust == dns_trust_additional) + trust = dns_trust_pending_additional; + else + trust = dns_trust_pending_answer; + + rdataset->trust = trust; if (sigrdataset != NULL) - sigrdataset->trust = dns_trust_pending; + sigrdataset->trust = trust; if (!need_validation) addedrdataset = ardataset; else @@ -4081,7 +4104,7 @@ ncache_message(fetchctx_t *fctx, dns_adb for (trdataset = ISC_LIST_HEAD(tname->list); trdataset != NULL; trdataset = ISC_LIST_NEXT(trdataset, link)) - trdataset->trust = dns_trust_pending; + trdataset->trust = dns_trust_pending_answer; result = dns_message_nextname(fctx->rmessage, DNS_SECTION_AUTHORITY); } Modified: stable/6/contrib/bind9/lib/dns/validator.c ============================================================================== --- stable/6/contrib/bind9/lib/dns/validator.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/bind9/lib/dns/validator.c Wed Jan 6 21:45:30 2010 (r201679) @@ -238,7 +238,7 @@ auth_nonpending(dns_message_t *message) rdataset != NULL; rdataset = ISC_LIST_NEXT(rdataset, link)) { - if (rdataset->trust == dns_trust_pending) + if (DNS_TRUST_PENDING(rdataset->trust)) rdataset->trust = dns_trust_authauthority; } } @@ -1176,7 +1176,7 @@ get_key(dns_validator_t *val, dns_rdata_ * We have an rrset for the given keyname. */ val->keyset = &val->frdataset; - if (val->frdataset.trust == dns_trust_pending && + if (DNS_TRUST_PENDING(val->frdataset.trust) && dns_rdataset_isassociated(&val->fsigrdataset)) { /* @@ -1191,7 +1191,7 @@ get_key(dns_validator_t *val, dns_rdata_ if (result != ISC_R_SUCCESS) return (result); return (DNS_R_WAIT); - } else if (val->frdataset.trust == dns_trust_pending) { + } else if (DNS_TRUST_PENDING(val->frdataset.trust)) { /* * Having a pending key with no signature means that * something is broken. @@ -1760,7 +1760,7 @@ validatezonekey(dns_validator_t *val) { * We have DS records. */ val->dsset = &val->frdataset; - if (val->frdataset.trust == dns_trust_pending && + if (DNS_TRUST_PENDING(val->frdataset.trust) && dns_rdataset_isassociated(&val->fsigrdataset)) { result = create_validator(val, @@ -1773,7 +1773,7 @@ validatezonekey(dns_validator_t *val) { if (result != ISC_R_SUCCESS) return (result); return (DNS_R_WAIT); - } else if (val->frdataset.trust == dns_trust_pending) { + } else if (DNS_TRUST_PENDING(val->frdataset.trust)) { /* * There should never be an unsigned DS. */ @@ -2568,7 +2568,7 @@ proveunsecure(dns_validator_t *val, isc_ * There is no DS. If this is a delegation, * we maybe done. */ - if (val->frdataset.trust == dns_trust_pending) { + if (DNS_TRUST_PENDING(val->frdataset.trust)) { result = create_fetch(val, tname, dns_rdatatype_ds, dsfetched2, Modified: stable/6/contrib/ntp/ntpd/ntp_request.c ============================================================================== --- stable/6/contrib/ntp/ntpd/ntp_request.c Wed Jan 6 21:36:33 2010 (r201678) +++ stable/6/contrib/ntp/ntpd/ntp_request.c Wed Jan 6 21:45:30 2010 (r201679) @@ -409,6 +409,7 @@ process_private( int mod_okay ) { + static u_long quiet_until; struct req_pkt *inpkt; struct req_pkt_tail *tailinpkt; struct sockaddr_storage *srcadr; @@ -444,8 +445,14 @@ process_private( || (++ec, INFO_MBZ(inpkt->mbz_itemsize) != 0) || (++ec, rbufp->recv_length < REQ_LEN_HDR) ) { - msyslog(LOG_ERR, "process_private: INFO_ERR_FMT: test %d failed, pkt from %s", ec, stoa(srcadr)); - req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); + NLOG(NLOG_SYSEVENT) + if (current_time >= quiet_until) { + msyslog(LOG_ERR, + "process_private: drop test %d" + " failed, pkt from %s", + ec, stoa(srcadr)); + quiet_until = current_time + 60; + } return; } From owner-svn-src-stable-6@FreeBSD.ORG Thu Jan 7 01:56:36 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E703106566B; Thu, 7 Jan 2010 01:56:36 +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 3CCB58FC17; Thu, 7 Jan 2010 01:56: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 o071uaGw006887; Thu, 7 Jan 2010 01:56:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o071uagp006885; Thu, 7 Jan 2010 01:56:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201001070156.o071uagp006885@svn.freebsd.org> From: Xin LI Date: Thu, 7 Jan 2010 01:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201712 - stable/6/sbin/fsck_ffs X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2010 01:56:36 -0000 Author: delphij Date: Thu Jan 7 01:56:35 2010 New Revision: 201712 URL: http://svn.freebsd.org/changeset/base/201712 Log: MFC r176575: In pass1(), cap inosused to fs_ipg rather than allowing arbitrary number read from cylinder group. Chances that we read a smarshed cylinder group, and we can not 100% trust information it has supplied. fsck_ffs(8) will crash otherwise for some cases. PR: bin/138043 Reminded by: mckusick Modified: stable/6/sbin/fsck_ffs/pass1.c Directory Properties: stable/6/sbin/fsck_ffs/ (props changed) Modified: stable/6/sbin/fsck_ffs/pass1.c ============================================================================== --- stable/6/sbin/fsck_ffs/pass1.c Thu Jan 7 01:55:34 2010 (r201711) +++ stable/6/sbin/fsck_ffs/pass1.c Thu Jan 7 01:56:35 2010 (r201712) @@ -93,9 +93,11 @@ pass1(void) inumber = c * sblock.fs_ipg; setinodebuf(inumber); getblk(&cgblk, cgtod(&sblock, c), sblock.fs_cgsize); - if (sblock.fs_magic == FS_UFS2_MAGIC) + if (sblock.fs_magic == FS_UFS2_MAGIC) { inosused = cgrp.cg_initediblk; - else + if (inosused > sblock.fs_ipg) + inosused = sblock.fs_ipg; + } else inosused = sblock.fs_ipg; if (got_siginfo) { printf("%s: phase 1: cyl group %d of %d (%d%%)\n", From owner-svn-src-stable-6@FreeBSD.ORG Fri Jan 8 21:28:20 2010 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B54910656C2; Fri, 8 Jan 2010 21:28:20 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51AE28FC20; Fri, 8 Jan 2010 21:28: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 o08LSKFB096255; Fri, 8 Jan 2010 21:28:20 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o08LSK5t096254; Fri, 8 Jan 2010 21:28:20 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201001082128.o08LSK5t096254@svn.freebsd.org> From: Brooks Davis Date: Fri, 8 Jan 2010 21:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r201829 - in stable/6/sys: . contrib/pf sys X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2010 21:28:20 -0000 Author: brooks Date: Fri Jan 8 21:28:20 2010 New Revision: 201829 URL: http://svn.freebsd.org/changeset/base/201829 Log: MFC r201349: Ignore .glimpse_* files as generated by the glimpse target. Also ignore cscope.* files. Modified: Directory Properties: stable/6/sys/ (props changed) stable/6/sys/contrib/pf/ (props changed) stable/6/sys/sys/ (props changed)