From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 00:45:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C62DAD9F; Sun, 28 Jul 2013 00:45:25 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AFA0A2AB1; Sun, 28 Jul 2013 00:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S0jPfd094999; Sun, 28 Jul 2013 00:45:25 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S0jK9h094967; Sun, 28 Jul 2013 00:45:20 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307280045.r6S0jK9h094967@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 28 Jul 2013 00:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253725 - in head/cddl/contrib/opensolaris: cmd/dtrace/test/cmd/scripts cmd/dtrace/test/tst/common/aggs cmd/dtrace/test/tst/common/arithmetic cmd/dtrace/test/tst/common/print cmd/dtrace... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 00:45:25 -0000 Author: pfg Date: Sun Jul 28 00:45:20 2013 New Revision: 253725 URL: http://svnweb.freebsd.org/changeset/base/253725 Log: DTrace: re-merge remainder of r249367 (original from Illumos). Bring back some important fixes from Illumos: 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work We particularly avoid the LD_NOLAZYLOAD changes that Illumos made as those don't apply to FreeBSD and were causing problems in interactive mode. Illumos Revision: 13758:23432da34147 Reference: https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 MFC after: 1 month Tested by: markj Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out - copied unchanged from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out Deleted: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.complex.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_DYN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/man.TestTransStability.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/scripts/dtest.pl Sun Jul 28 00:45:20 2013 (r253725) @@ -583,6 +583,8 @@ if ($opt_x) { die "$PNAME: failed to open $PNAME.$$.log: $!\n" unless (!$opt_l || open(LOG, ">$PNAME.$$.log")); +$ENV{'DTRACE_DEBUG_REGSET'} = 'true'; + if ($opt_g) { $ENV{'UMEM_DEBUG'} = 'default,verbose'; $ENV{'UMEM_LOGGING'} = 'fail,contents'; Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d) @@ -0,0 +1,35 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +/* + * Make sure the sizes of compatible keys doesn't affect the sort order. + */ + +BEGIN +{ + @[(int)1, 0] = sum(10); + @[(uint64_t)2, 0] = sum(20); + @[(int)3, 0] = sum(30); + @[(uint64_t)4, 0] = sum(40); + printa(@); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/aggs/tst.sizedkeys.d.out) @@ -0,0 +1,6 @@ + + 1 0 10 + 2 0 20 + 3 0 30 + 4 0 40 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.basics.d.out) @@ -0,0 +1,8 @@ +The value of i is 6 +The value of i is 18 +The value of i is 72 +The value of i is 25920 +The value of i is 935761216 +The value of i is -91738734 +The value of i is -91738729 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d) @@ -0,0 +1,50 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test compile-time casting between integer types of different size. + */ + +#pragma D option quiet + +int64_t x; + +BEGIN +{ + x = (int32_t)(int16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (int32_t)(uint16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(int16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(uint16_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + printf("\n"); + + x = (int16_t)(int32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (int16_t)(uint32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(int32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(uint32_t)0xfff0; + printf("%16x %20d %20u\n", x, x, x); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compcast.d.out) @@ -0,0 +1,10 @@ +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fffffff0 4294967280 4294967280 + fff0 65520 65520 + +fffffffffffffff0 -16 18446744073709551600 +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fff0 65520 65520 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test narrowing at assignment. + */ + +#pragma D option quiet + +uint16_t x; +uint32_t y; + +BEGIN +{ + x = 0xbeefcafe; + y = x; + printf("%x", y); /* where's the beef? */ + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.compnarrowassign.d.out) @@ -0,0 +1 @@ +cafe Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d) @@ -0,0 +1,52 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Test execution-time casting between integer types of different size. + */ + +#pragma D option quiet + +int64_t x; + +BEGIN +{ + z = 0xfff0; + + x = (int32_t)(int16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (int32_t)(uint16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(int16_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint32_t)(uint16_t)z; + printf("%16x %20d %20u\n", x, x, x); + printf("\n"); + + x = (int16_t)(int32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (int16_t)(uint32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(int32_t)z; + printf("%16x %20d %20u\n", x, x, x); + x = (uint16_t)(uint32_t)z; + printf("%16x %20d %20u\n", x, x, x); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/arithmetic/tst.execcast.d.out) @@ -0,0 +1,10 @@ +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fffffff0 4294967280 4294967280 + fff0 65520 65520 + +fffffffffffffff0 -16 18446744073709551600 +fffffffffffffff0 -16 18446744073709551600 + fff0 65520 65520 + fff0 65520 65520 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.dyn.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.dyn.d) @@ -0,0 +1,28 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + print(*curpsinfo); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d) @@ -0,0 +1,42 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +#pragma D option quiet + +typedef struct pancakes { + int i; + string s; + timespec_t t; +} pancakes_t; + +translator pancakes_t < void *V > { + i = 2 * 10; + s = strjoin("I like ", "pancakes"); + t = *(timespec_t *)`dtrace_zero; +}; + +BEGIN +{ + print(*(xlate < pancakes_t * > ((void *)NULL))); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/tst.xlate.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.xlate.d.out) @@ -0,0 +1,8 @@ +pancakes_t { + int i = 0x14 + string s = [ "I like pancakes" ] + timespec_t t = { + time_t tv_sec = 0 + long tv_nsec = 0 + } +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.ints.d.out Sun Jul 28 00:45:20 2013 (r253725) @@ -1,6 +1,6 @@ -239 -52719 +-17 +-12817 -1867788817 1311768467294899695 Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d) @@ -0,0 +1,38 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Check %d v. %i v. %u. + */ + +#pragma D option quiet + +uint16_t x; +int16_t y; + +BEGIN +{ + x = 0xffffffff; + y = 0xffffffff; + + printf("%d %i %u\n", x, x, x); + printf("%d %i %u\n", y, y, y); + + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/printf/tst.signs.d.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/printf/tst.signs.d.out) @@ -0,0 +1,3 @@ +65535 -1 65535 +-1 -1 65535 + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/tst.dyn.d Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/trace/tst.dyn.d) @@ -0,0 +1,28 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + trace(*curpsinfo); +} + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh) @@ -0,0 +1,62 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test the output for stable translations. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -v -s /dev/stdin < (curthread); + +#pragma D attributes Stable/Stable/Common myinfo + +BEGIN +{ + this->a = myinfo->pr_flag; + exit(0); +} + +BEGIN +{ + exit(1); +} +EOF + +exit $? Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability1.ksh.out) @@ -0,0 +1,14 @@ + +Stability attributes for script /dev/stdin: + + Minimum Probe Description Attributes + Identifier Names: Unstable + Data Semantics: Unstable + Dependency Class: Common + + Minimum Statement Attributes + Identifier Names: Stable + Data Semantics: Stable + Dependency Class: Common + + Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh) @@ -0,0 +1,60 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Test the output of unstable translations. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -v -s /dev/stdin < (curthread); + +BEGIN +{ + this->a = myinfo->pr_flag; + exit(0); +} + +BEGIN +{ + exit(1); +} +EOF + +exit $? Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out (from r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out Sun Jul 28 00:45:20 2013 (r253725, copy of r253680, vendor/illumos/dist/cmd/dtrace/test/tst/common/translators/tst.TestTransStability2.ksh.out) @@ -0,0 +1,14 @@ + +Stability attributes for script /dev/stdin: + + Minimum Probe Description Attributes + Identifier Names: Unstable + Data Semantics: Unstable + Dependency Class: Common + + Minimum Statement Attributes + Identifier Names: Private + Data Semantics: Private + Dependency Class: Unknown + + Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sun Jul 28 00:45:20 2013 (r253725) @@ -26,6 +26,7 @@ /* * Copyright (c) 2011, Joyent, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ #include @@ -894,33 +895,14 @@ dt_aggregate_valcmp(const void *lhs, con caddr_t rdata = rh->dtahe_data.dtada_data; dtrace_recdesc_t *lrec, *rrec; int64_t *laddr, *raddr; - int rval, i; - - if ((rval = dt_aggregate_hashcmp(lhs, rhs)) != 0) - return (rval); - - if (lagg->dtagd_nrecs > ragg->dtagd_nrecs) - return (DT_GREATERTHAN); - - if (lagg->dtagd_nrecs < ragg->dtagd_nrecs) - return (DT_LESSTHAN); + int rval; - for (i = 0; i < lagg->dtagd_nrecs; i++) { - lrec = &lagg->dtagd_rec[i]; - rrec = &ragg->dtagd_rec[i]; + assert(lagg->dtagd_nrecs == ragg->dtagd_nrecs); - if (lrec->dtrd_offset < rrec->dtrd_offset) - return (DT_LESSTHAN); - - if (lrec->dtrd_offset > rrec->dtrd_offset) - return (DT_GREATERTHAN); + lrec = &lagg->dtagd_rec[lagg->dtagd_nrecs - 1]; + rrec = &ragg->dtagd_rec[ragg->dtagd_nrecs - 1]; - if (lrec->dtrd_action < rrec->dtrd_action) - return (DT_LESSTHAN); - - if (lrec->dtrd_action > rrec->dtrd_action) - return (DT_GREATERTHAN); - } + assert(lrec->dtrd_action == rrec->dtrd_action); laddr = (int64_t *)(uintptr_t)(ldata + lrec->dtrd_offset); raddr = (int64_t *)(uintptr_t)(rdata + rrec->dtrd_offset); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 28 00:45:20 2013 (r253725) @@ -22,7 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, Joyent Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ /* @@ -664,63 +664,48 @@ static void dt_action_trace(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) { dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); + boolean_t istrace = (dnp->dn_ident->di_id == DT_ACT_TRACE); + const char *act = istrace ? "trace" : "print"; if (dt_node_is_void(dnp->dn_args)) { - dnerror(dnp->dn_args, D_TRACE_VOID, - "trace( ) may not be applied to a void expression\n"); + dnerror(dnp->dn_args, istrace ? D_TRACE_VOID : D_PRINT_VOID, + "%s( ) may not be applied to a void expression\n", act); } - if (dt_node_is_dynamic(dnp->dn_args)) { - dnerror(dnp->dn_args, D_TRACE_DYN, - "trace( ) may not be applied to a dynamic expression\n"); + if (dt_node_resolve(dnp->dn_args, DT_IDENT_XLPTR) != NULL) { + dnerror(dnp->dn_args, istrace ? D_TRACE_DYN : D_PRINT_DYN, + "%s( ) may not be applied to a translated pointer\n", act); } dt_cg(yypcb, dnp->dn_args); - ap->dtad_difo = dt_as(yypcb); - ap->dtad_kind = DTRACEACT_DIFEXPR; -} -/* - * The print() action behaves identically to trace(), except that it stores the - * CTF type of the argument (if present) within the DOF for the DIFEXPR action. - * To do this, we set the 'dtsd_strdata' to point to the fully-qualified CTF - * type ID for the result of the DIF action. We use the ID instead of the name - * to handles complex types like arrays and function pointers that can't be - * resolved by ctf_type_lookup(). This is later processed by - * dtrace_dof_create() and turned into a reference into the string table so - * that we can get the type information when we process the data after the - * fact. - */ -static void -dt_action_print(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) -{ - dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); - dt_node_t *dret; - size_t len; - dt_module_t *dmp; - - if (dt_node_is_void(dnp->dn_args)) { - dnerror(dnp->dn_args, D_PRINT_VOID, - "print( ) may not be applied to a void expression\n"); - } - - if (dt_node_is_dynamic(dnp->dn_args)) { - dnerror(dnp->dn_args, D_PRINT_DYN, - "print( ) may not be applied to a dynamic expression\n"); + /* + * The print() action behaves identically to trace(), except that it + * stores the CTF type of the argument (if present) within the DOF for + * the DIFEXPR action. To do this, we set the 'dtsd_strdata' to point + * to the fully-qualified CTF type ID for the result of the DIF + * action. We use the ID instead of the name to handles complex types + * like arrays and function pointers that can't be resolved by + * ctf_type_lookup(). This is later processed by dtrace_dof_create() + * and turned into a reference into the string table so that we can + * get the type information when we process the data after the fact. + */ + if (dnp->dn_ident->di_id == DT_ACT_PRINT) { + dt_node_t *dret; + size_t n; + dt_module_t *dmp; + + dret = yypcb->pcb_dret; + dmp = dt_module_lookup_by_ctf(dtp, dret->dn_ctfp); + + n = snprintf(NULL, 0, "%s`%ld", dmp->dm_name, dret->dn_type) + 1; + sdp->dtsd_strdata = dt_alloc(dtp, n); + if (sdp->dtsd_strdata == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + (void) snprintf(sdp->dtsd_strdata, n, "%s`%ld", dmp->dm_name, + dret->dn_type); } - dt_cg(yypcb, dnp->dn_args); - - dret = yypcb->pcb_dret; - dmp = dt_module_lookup_by_ctf(dtp, dret->dn_ctfp); - - len = snprintf(NULL, 0, "%s`%ld", dmp->dm_name, dret->dn_type) + 1; - sdp->dtsd_strdata = dt_alloc(dtp, len); - if (sdp->dtsd_strdata == NULL) - longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); - (void) snprintf(sdp->dtsd_strdata, len, "%s`%ld", dmp->dm_name, - dret->dn_type); - ap->dtad_difo = dt_as(yypcb); ap->dtad_kind = DTRACEACT_DIFEXPR; } @@ -1145,6 +1130,9 @@ dt_compile_fun(dtrace_hdl_t *dtp, dt_nod case DT_ACT_PANIC: dt_action_panic(dtp, dnp->dn_expr, sdp); break; + case DT_ACT_PRINT: + dt_action_trace(dtp, dnp->dn_expr, sdp); + break; case DT_ACT_PRINTA: dt_action_printa(dtp, dnp->dn_expr, sdp); break; @@ -1181,9 +1169,6 @@ dt_compile_fun(dtrace_hdl_t *dtp, dt_nod case DT_ACT_TRACE: dt_action_trace(dtp, dnp->dn_expr, sdp); break; - case DT_ACT_PRINT: - dt_action_print(dtp, dnp->dn_expr, sdp); - break; case DT_ACT_TRACEMEM: dt_action_tracemem(dtp, dnp->dn_expr, sdp); break; @@ -2559,7 +2544,8 @@ dt_compile(dtrace_hdl_t *dtp, int contex } out: - if (context != DT_CTX_DTYPE && DT_TREEDUMP_PASS(dtp, 3)) + if (context != DT_CTX_DTYPE && yypcb->pcb_root != NULL && + DT_TREEDUMP_PASS(dtp, 3)) dt_node_printr(yypcb->pcb_root, stderr, 0); if (dtp->dt_cdefs_fd != -1 && (ftruncate64(dtp->dt_cdefs_fd, 0) == -1 || Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cg.c Sun Jul 28 00:45:20 2013 (r253725) @@ -1387,6 +1387,162 @@ dt_cg_func_typeref(dtrace_hdl_t *dtp, dt typs->dn_value = ctf_type_size(dtt.dtt_ctfp, dtt.dtt_type); } +typedef struct dt_xlmemb { + dt_ident_t *dtxl_idp; /* translated ident */ + dt_irlist_t *dtxl_dlp; /* instruction list */ + dt_regset_t *dtxl_drp; /* register set */ + int dtxl_sreg; /* location of the translation input */ + int dtxl_dreg; /* location of our allocated buffer */ +} dt_xlmemb_t; + +/*ARGSUSED*/ +static int +dt_cg_xlate_member(const char *name, ctf_id_t type, ulong_t off, void *arg) +{ + dt_xlmemb_t *dx = arg; + dt_ident_t *idp = dx->dtxl_idp; + dt_irlist_t *dlp = dx->dtxl_dlp; + dt_regset_t *drp = dx->dtxl_drp; + + dt_node_t *mnp; + dt_xlator_t *dxp; + + int reg, treg; + uint32_t instr; + size_t size; + + /* Generate code for the translation. */ + dxp = idp->di_data; + mnp = dt_xlator_member(dxp, name); + + /* If there's no translator for the given member, skip it. */ + if (mnp == NULL) + return (0); + + dxp->dx_ident->di_flags |= DT_IDFLG_CGREG; + dxp->dx_ident->di_id = dx->dtxl_sreg; + + dt_cg_node(mnp->dn_membexpr, dlp, drp); + + dxp->dx_ident->di_flags &= ~DT_IDFLG_CGREG; + dxp->dx_ident->di_id = 0; + + treg = mnp->dn_membexpr->dn_reg; + + /* Compute the offset into our buffer and store the result there. */ + reg = dt_regset_alloc(drp); + + dt_cg_setx(dlp, reg, off / NBBY); + instr = DIF_INSTR_FMT(DIF_OP_ADD, dx->dtxl_dreg, reg, reg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + + size = ctf_type_size(mnp->dn_membexpr->dn_ctfp, + mnp->dn_membexpr->dn_type); + if (dt_node_is_scalar(mnp->dn_membexpr)) { + /* + * Copying scalars is simple. + */ + switch (size) { + case 1: + instr = DIF_INSTR_STORE(DIF_OP_STB, treg, reg); + break; + case 2: + instr = DIF_INSTR_STORE(DIF_OP_STH, treg, reg); + break; + case 4: + instr = DIF_INSTR_STORE(DIF_OP_STW, treg, reg); + break; + case 8: + instr = DIF_INSTR_STORE(DIF_OP_STX, treg, reg); + break; + default: + xyerror(D_UNKNOWN, "internal error -- unexpected " + "size: %lu\n", (ulong_t)size); + } + + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + + } else if (dt_node_is_string(mnp->dn_membexpr)) { + int szreg; + + /* + * Use the copys instruction for strings. + */ + szreg = dt_regset_alloc(drp); + dt_cg_setx(dlp, szreg, size); + instr = DIF_INSTR_COPYS(treg, szreg, reg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + dt_regset_free(drp, szreg); + } else { + int szreg; + + /* + * If it's anything else then we'll just bcopy it. + */ + szreg = dt_regset_alloc(drp); + dt_cg_setx(dlp, szreg, size); + dt_irlist_append(dlp, + dt_cg_node_alloc(DT_LBL_NONE, DIF_INSTR_FLUSHTS)); + instr = DIF_INSTR_PUSHTS(DIF_OP_PUSHTV, DIF_TYPE_CTF, + DIF_REG_R0, treg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + instr = DIF_INSTR_PUSHTS(DIF_OP_PUSHTV, DIF_TYPE_CTF, + DIF_REG_R0, reg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + instr = DIF_INSTR_PUSHTS(DIF_OP_PUSHTV, DIF_TYPE_CTF, + DIF_REG_R0, szreg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + instr = DIF_INSTR_CALL(DIF_SUBR_BCOPY, szreg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + dt_regset_free(drp, szreg); + } + + dt_regset_free(drp, reg); + dt_regset_free(drp, treg); + + return (0); +} + +/* + * If we're expanding a translated type, we create an appropriately sized + * buffer with alloca() and then translate each member into it. + */ +static int +dt_cg_xlate_expand(dt_node_t *dnp, dt_ident_t *idp, dt_irlist_t *dlp, + dt_regset_t *drp) +{ + dt_xlmemb_t dlm; + uint32_t instr; + int dreg; + size_t size; + + dreg = dt_regset_alloc(drp); + size = ctf_type_size(dnp->dn_ident->di_ctfp, dnp->dn_ident->di_type); + + /* Call alloca() to create the buffer. */ + dt_cg_setx(dlp, dreg, size); + + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, DIF_INSTR_FLUSHTS)); + + instr = DIF_INSTR_PUSHTS(DIF_OP_PUSHTV, DIF_TYPE_CTF, DIF_REG_R0, dreg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + + instr = DIF_INSTR_CALL(DIF_SUBR_ALLOCA, dreg); + dt_irlist_append(dlp, dt_cg_node_alloc(DT_LBL_NONE, instr)); + + /* Generate the translation for each member. */ + dlm.dtxl_idp = idp; + dlm.dtxl_dlp = dlp; + dlm.dtxl_drp = drp; + dlm.dtxl_sreg = dnp->dn_reg; + dlm.dtxl_dreg = dreg; + (void) ctf_member_iter(dnp->dn_ident->di_ctfp, + dnp->dn_ident->di_type, dt_cg_xlate_member, + &dlm); + + return (dreg); +} + static void dt_cg_node(dt_node_t *dnp, dt_irlist_t *dlp, dt_regset_t *drp) { @@ -1600,7 +1756,16 @@ dt_cg_node(dt_node_t *dnp, dt_irlist_t * dt_cg_node(dnp->dn_child, dlp, drp); dnp->dn_reg = dnp->dn_child->dn_reg; - if (!(dnp->dn_flags & DT_NF_REF)) { + if (dt_node_is_dynamic(dnp->dn_child)) { + int reg; + idp = dt_node_resolve(dnp->dn_child, DT_IDENT_XLPTR); + assert(idp != NULL); + reg = dt_cg_xlate_expand(dnp, idp, dlp, drp); + + dt_regset_free(drp, dnp->dn_child->dn_reg); + dnp->dn_reg = reg; + + } else if (!(dnp->dn_flags & DT_NF_REF)) { uint_t ubit = dnp->dn_flags & DT_NF_USERLAND; /* @@ -1998,6 +2163,13 @@ dt_cg(dt_pcb_t *pcb, dt_node_t *dnp) dt_cg_node(dnp, &pcb->pcb_ir, pcb->pcb_regs); + if ((idp = dt_node_resolve(dnp, DT_IDENT_XLSOU)) != NULL) { + int reg = dt_cg_xlate_expand(dnp, idp, + &pcb->pcb_ir, pcb->pcb_regs); + dt_regset_free(pcb->pcb_regs, dnp->dn_reg); + dnp->dn_reg = reg; + } + instr = DIF_INSTR_RET(dnp->dn_reg); dt_regset_free(pcb->pcb_regs, dnp->dn_reg); dt_irlist_append(&pcb->pcb_ir, dt_cg_node_alloc(DT_LBL_NONE, instr)); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Jul 27 22:44:55 2013 (r253724) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sun Jul 28 00:45:20 2013 (r253725) @@ -2018,13 +2018,13 @@ dt_consume_cpu(dtrace_hdl_t *dtp, FILE * uint64_t tracememsize = 0; dtrace_probedata_t data; uint64_t drops; - data.dtpda_flow = dtp->dt_flow; - data.dtpda_indent = dtp->dt_indent; - data.dtpda_prefix = dtp->dt_prefix; bzero(&data, sizeof (data)); data.dtpda_handle = dtp; data.dtpda_cpu = cpu; + data.dtpda_flow = dtp->dt_flow; + data.dtpda_indent = dtp->dt_indent; + data.dtpda_prefix = dtp->dt_prefix; for (offs = buf->dtbd_oldest; offs < buf->dtbd_size; ) { dtrace_eprobedesc_t *epd; @@ -2611,7 +2611,7 @@ typedef struct dt_begin { static int dt_consume_begin_probe(const dtrace_probedata_t *data, void *arg) { - dt_begin_t *begin = (dt_begin_t *)arg; + dt_begin_t *begin = arg; dtrace_probedesc_t *pd = data->dtpda_pdesc; int r1 = (strcmp(pd->dtpd_provider, "dtrace") == 0); @@ -2636,7 +2636,7 @@ static int dt_consume_begin_record(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg) { - dt_begin_t *begin = (dt_begin_t *)arg; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 01:02:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95274285; Sun, 28 Jul 2013 01:02:21 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D6032B2D; Sun, 28 Jul 2013 01:02:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S12LMV000783; Sun, 28 Jul 2013 01:02:21 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S12I4g000756; Sun, 28 Jul 2013 01:02:18 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201307280102.r6S12I4g000756@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Sun, 28 Jul 2013 01:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253726 - in head/cddl/contrib/opensolaris: cmd/dtrace/test/tst/common/funcs cmd/dtrace/test/tst/common/pointers cmd/dtrace/test/tst/common/print cmd/dtrace/test/tst/common/safety cmd/d... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 01:02:21 -0000 Author: pfg Date: Sun Jul 28 01:02:17 2013 New Revision: 253726 URL: http://svnweb.freebsd.org/changeset/base/253726 Log: DTrace: re-apply r249426 now that the underlying issues have been solved. Merge change from illumos: 3519 DTrace fails to resolve const types from fbt 3520 dtrace internal error -- token type 316 is not a valid D compilation token 3521 clean up dtrace unit tests Illumos Revision: e98f46c Reference: https://www.illumos.org/issues/3519 https://www.illumos.org/issues/3520 https://www.illumos.org/issues/3521 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d - copied unchanged from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d - copied unchanged from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d - copied unchanged from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.strjoin.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ #pragma D option quiet @@ -36,3 +38,8 @@ BEGIN printf("%s\n", strjoin("", "")); exit(0); } + +BEGIN +{ + exit(1); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.BadAlign.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: This test reproduces the alignment error. @@ -39,9 +41,10 @@ BEGIN { - x = (int *) 64; + x = (int *)64; y = *x; trace(y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress2.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: D pointers do not allow invalid pointer accesses. @@ -44,6 +46,7 @@ BEGIN y = (int *) (x - 3300778156056); *y = 3; trace(*y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress3.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: D pointers do not allow invalid pointer accesses. @@ -39,9 +41,10 @@ BEGIN { - y = (int *) (-33007); + y = (int *)-33007; *y = 3; trace(*y); + exit(0); } ERROR Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/pointers/err.InvalidAddress4.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: Demonstrating valid memory access. @@ -40,10 +42,11 @@ BEGIN { x = (int *)alloca(sizeof (int)); - printf("Address x: %x\n", (int) x); - y = (int *) (x - 2); + printf("Address x: %x\n", (int)x); + y = (int *)(x - 2); *y = 3; - printf("Address y: %x\tValue: %d\n", (int) y, *y); + printf("Address y: %x\tValue: %d\n", (int)y, *y); + exit(0); } ERROR Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d (from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d Sun Jul 28 01:02:17 2013 (r253726, copy of r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_AGG.bad.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + @ = count(); + print(@); +} + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PRINT_VOID.bad.d Sun Jul 28 01:02:17 2013 (r253726) @@ -20,10 +20,15 @@ */ /* - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ BEGIN { print((void)`p0); } + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/err.D_PROTO_LEN.bad.d Sun Jul 28 01:02:17 2013 (r253726) @@ -20,10 +20,15 @@ */ /* - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. */ BEGIN { print(); } + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.copyin.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -39,7 +41,7 @@ */ -#pragma D option bufsize=16 +#pragma D option bufsize=32 #pragma D option bufpolicy=ring #pragma D option statusrate=1nsec Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/speculation/err.BufSizeVariations2.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_PROTO_LEN.bad.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,8 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -39,3 +40,8 @@ BEGIN trace(); } + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d (from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d Sun Jul 28 01:02:17 2013 (r253726, copy of r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_AGG.bad.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +BEGIN +{ + @ = count(); + trace(@); +} + +BEGIN +{ + exit(0); +} Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/trace/err.D_TRACE_VOID.bad.d Sun Jul 28 01:02:17 2013 (r253726) @@ -24,7 +24,9 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ /* * ASSERTION: @@ -37,3 +39,8 @@ BEGIN { trace((void)`kmem_flags); } + +BEGIN +{ + exit(0); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d (from r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d Sun Jul 28 01:02:17 2013 (r253726, copy of r249574, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/types/tst.const.d) @@ -0,0 +1,29 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + +/* + * Make sure we can scope types with modifiers. + */ + +BEGIN +{ + trace((D`int *)0); + trace((const D`int *)0); + exit(0); +} Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sun Jul 28 01:02:17 2013 (r253726) @@ -677,6 +677,12 @@ dt_action_trace(dtrace_hdl_t *dtp, dt_no "%s( ) may not be applied to a translated pointer\n", act); } + if (dnp->dn_args->dn_kind == DT_NODE_AGG) { + dnerror(dnp->dn_args, istrace ? D_TRACE_AGG : D_PRINT_AGG, + "%s( ) may not be applied to an aggregation%s\n", act, + istrace ? "" : " -- did you mean printa()?"); + } + dt_cg(yypcb, dnp->dn_args); /* Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_decl.c Sun Jul 28 01:02:17 2013 (r253726) @@ -21,6 +21,7 @@ */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright (c) 2012 by Delphix. All rights reserved. * Use is subject to license terms. */ @@ -254,11 +255,6 @@ dt_decl_spec(ushort_t kind, char *name) ddp->dd_kind = kind; ddp->dd_name = name; - if (name != NULL && strchr(name, '`') != NULL) { - xyerror(D_DECL_SCOPE, "D scoping operator may not be used " - "in a type name\n"); - } - return (dt_decl_check(ddp)); } Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 28 00:45:20 2013 (r253725) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h Sun Jul 28 01:02:17 2013 (r253726) @@ -190,8 +190,10 @@ typedef enum { D_PRINTA_AGGPROTO, /* printa() aggregation mismatch */ D_TRACE_VOID, /* trace() argument has void type */ D_TRACE_DYN, /* trace() argument has dynamic type */ + D_TRACE_AGG, /* trace() argument is an aggregation */ D_PRINT_VOID, /* print() argument has void type */ D_PRINT_DYN, /* print() argument has dynamic type */ + D_PRINT_AGG, /* print() argument is an aggregation */ D_TRACEMEM_ADDR, /* tracemem() address bad type */ D_TRACEMEM_SIZE, /* tracemem() size bad type */ D_TRACEMEM_ARGS, /* tracemem() illegal number of args */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 04:53:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E87EB98; Sun, 28 Jul 2013 04:53:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 189BD20C4; Sun, 28 Jul 2013 04:53:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S4r0lg083221; Sun, 28 Jul 2013 04:53:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S4r0iY083215; Sun, 28 Jul 2013 04:53:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201307280453.r6S4r0iY083215@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Jul 2013 04:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253727 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 04:53:01 -0000 Author: adrian Date: Sun Jul 28 04:53:00 2013 New Revision: 253727 URL: http://svnweb.freebsd.org/changeset/base/253727 Log: Refactor the VAP transmit path code into a utility function that both the normal and the mesh transmit paths can use. The API is a bit horrible because it both consumes the mbuf and frees the node reference regardless of whether it succeeds or not. It's a hold-over from how the code behaves; it'd be nice to have it not free the node reference / mbuf if TX fails and let the caller decide what to do. Modified: head/sys/net80211/ieee80211_mesh.c head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sun Jul 28 01:02:17 2013 (r253726) +++ head/sys/net80211/ieee80211_mesh.c Sun Jul 28 04:53:00 2013 (r253727) @@ -1042,12 +1042,9 @@ mesh_transmit_to_gate(struct ieee80211va struct ifnet *ifp = vap->iv_ifp; struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; - struct ether_header *eh; - int error; IEEE80211_TX_UNLOCK_ASSERT(ic); - eh = mtod(m, struct ether_header *); ni = ieee80211_mesh_find_txnode(vap, rt_gate->rt_dest); if (ni == NULL) { ifp->if_oerrors++; @@ -1055,106 +1052,13 @@ mesh_transmit_to_gate(struct ieee80211va return; } - if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && - (m->m_flags & M_PWR_SAV) == 0) { - /* - * Station in power save mode; pass the frame - * to the 802.11 layer and continue. We'll get - * the frame back when the time is right. - * XXX lose WDS vap linkage? - */ - (void) ieee80211_pwrsave(ni, m); - ieee80211_free_node(ni); - return; - } - - /* calculate priority so drivers can find the tx queue */ - if (ieee80211_classify(ni, m)) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, - eh->ether_dhost, NULL, - "%s", "classification failure"); - vap->iv_stats.is_tx_classify++; - ifp->if_oerrors++; - m_freem(m); - ieee80211_free_node(ni); - return; - } - /* - * Stash the node pointer. Note that we do this after - * any call to ieee80211_dwds_mcast because that code - * uses any existing value for rcvif to identify the - * interface it (might have been) received on. - */ - m->m_pkthdr.rcvif = (void *)ni; - - BPF_MTAP(ifp, m); /* 802.3 tx */ - /* - * Check if A-MPDU tx aggregation is setup or if we - * should try to enable it. The sta must be associated - * with HT and A-MPDU enabled for use. When the policy - * routine decides we should enable A-MPDU we issue an - * ADDBA request and wait for a reply. The frame being - * encapsulated will go out w/o using A-MPDU, or possibly - * it might be collected by the driver and held/retransmit. - * The default ic_ampdu_enable routine handles staggering - * ADDBA requests in case the receiver NAK's us or we are - * otherwise unable to establish a BA stream. + * Send through the VAP packet transmit path. + * This consumes the node ref grabbed above and + * the mbuf, regardless of whether there's a problem + * or not. */ - if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && - (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX) && - (m->m_flags & M_EAPOL) == 0) { - int tid = WME_AC_TO_TID(M_WME_GETAC(m)); - struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; - - ieee80211_txampdu_count_packet(tap); - if (IEEE80211_AMPDU_RUNNING(tap)) { - /* - * Operational, mark frame for aggregation. - * - * XXX do tx aggregation here - */ - m->m_flags |= M_AMPDU_MPDU; - } else if (!IEEE80211_AMPDU_REQUESTED(tap) && - ic->ic_ampdu_enable(ni, tap)) { - /* - * Not negotiated yet, request service. - */ - ieee80211_ampdu_request(ni, tap); - /* XXX hold frame for reply? */ - } - } -#ifdef IEEE80211_SUPPORT_SUPERG - else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF)) { - m = ieee80211_ff_check(ni, m); - if (m == NULL) { - /* NB: any ni ref held on stageq */ - return; - } - } -#endif /* IEEE80211_SUPPORT_SUPERG */ - - IEEE80211_TX_LOCK(ic); - if (__predict_true((vap->iv_caps & IEEE80211_C_8023ENCAP) == 0)) { - /* - * Encapsulate the packet in prep for transmission. - */ - m = ieee80211_encap(vap, ni, m); - if (m == NULL) { - /* NB: stat+msg handled in ieee80211_encap */ - IEEE80211_TX_UNLOCK(ic); - ieee80211_free_node(ni); - return; - } - } - error = ieee80211_parent_transmit(ic, m); - IEEE80211_TX_UNLOCK(ic); - if (error != 0) { - ieee80211_free_node(ni); - } else { - ifp->if_opackets++; - } - ic->ic_lastdata = ticks; + (void) ieee80211_vap_pkt_send_dest(vap, m, ni); } /* Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Jul 28 01:02:17 2013 (r253726) +++ head/sys/net80211/ieee80211_output.c Sun Jul 28 04:53:00 2013 (r253727) @@ -110,6 +110,153 @@ doprint(struct ieee80211vap *vap, int su #endif /* + * Transmit a frame to the given destination on the given VAP. + * + * It's up to the caller to figure out the details of who this + * is going to and resolving the node. + * + * This routine takes care of queuing it for power save, + * A-MPDU state stuff, fast-frames state stuff, encapsulation + * if required, then passing it up to the driver layer. + * + * This routine (for now) consumes the mbuf and frees the node + * reference; it ideally will return a TX status which reflects + * whether the mbuf was consumed or not, so the caller can + * free the mbuf (if appropriate) and the node reference (again, + * if appropriate.) + */ +int +ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, + struct ieee80211_node *ni) +{ + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = vap->iv_ifp; + int error; + + if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && + (m->m_flags & M_PWR_SAV) == 0) { + /* + * Station in power save mode; pass the frame + * to the 802.11 layer and continue. We'll get + * the frame back when the time is right. + * XXX lose WDS vap linkage? + */ + (void) ieee80211_pwrsave(ni, m); + ieee80211_free_node(ni); + /* XXX better status? */ + return (ENOBUFS); + } + /* calculate priority so drivers can find the tx queue */ + if (ieee80211_classify(ni, m)) { + IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, + ni->ni_macaddr, NULL, + "%s", "classification failure"); + vap->iv_stats.is_tx_classify++; + ifp->if_oerrors++; + m_freem(m); + ieee80211_free_node(ni); + /* XXX better status? */ + return (ENOBUFS); + } + /* + * Stash the node pointer. Note that we do this after + * any call to ieee80211_dwds_mcast because that code + * uses any existing value for rcvif to identify the + * interface it (might have been) received on. + */ + m->m_pkthdr.rcvif = (void *)ni; + + BPF_MTAP(ifp, m); /* 802.3 tx */ + + + /* + * Check if A-MPDU tx aggregation is setup or if we + * should try to enable it. The sta must be associated + * with HT and A-MPDU enabled for use. When the policy + * routine decides we should enable A-MPDU we issue an + * ADDBA request and wait for a reply. The frame being + * encapsulated will go out w/o using A-MPDU, or possibly + * it might be collected by the driver and held/retransmit. + * The default ic_ampdu_enable routine handles staggering + * ADDBA requests in case the receiver NAK's us or we are + * otherwise unable to establish a BA stream. + */ + if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && + (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX) && + (m->m_flags & M_EAPOL) == 0) { + int tid = WME_AC_TO_TID(M_WME_GETAC(m)); + struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; + + ieee80211_txampdu_count_packet(tap); + if (IEEE80211_AMPDU_RUNNING(tap)) { + /* + * Operational, mark frame for aggregation. + * + * XXX do tx aggregation here + */ + m->m_flags |= M_AMPDU_MPDU; + } else if (!IEEE80211_AMPDU_REQUESTED(tap) && + ic->ic_ampdu_enable(ni, tap)) { + /* + * Not negotiated yet, request service. + */ + ieee80211_ampdu_request(ni, tap); + /* XXX hold frame for reply? */ + } + } + +#ifdef IEEE80211_SUPPORT_SUPERG + else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF)) { + m = ieee80211_ff_check(ni, m); + if (m == NULL) { + /* NB: any ni ref held on stageq */ + /* XXX better status? */ + return (ENOBUFS); + } + } +#endif /* IEEE80211_SUPPORT_SUPERG */ + + /* + * Grab the TX lock - serialise the TX process from this + * point (where TX state is being checked/modified) + * through to driver queue. + */ + IEEE80211_TX_LOCK(ic); + + if (__predict_true((vap->iv_caps & IEEE80211_C_8023ENCAP) == 0)) { + /* + * Encapsulate the packet in prep for transmission. + */ + m = ieee80211_encap(vap, ni, m); + if (m == NULL) { + /* NB: stat+msg handled in ieee80211_encap */ + IEEE80211_TX_UNLOCK(ic); + ieee80211_free_node(ni); + /* XXX better status? */ + return (ENOBUFS); + } + } + error = ieee80211_parent_transmit(ic, m); + + /* + * Unlock at this point - no need to hold it across + * ieee80211_free_node() (ie, the comlock) + */ + IEEE80211_TX_UNLOCK(ic); + if (error != 0) { + /* NB: IFQ_HANDOFF reclaims mbuf */ + ieee80211_free_node(ni); + } else { + ifp->if_opackets++; + } + ic->ic_lastdata = ticks; + + return (0); +} + + + +/* * Send the given mbuf through the given vap. * * This consumes the mbuf regardless of whether the transmit @@ -129,7 +276,6 @@ ieee80211_start_pkt(struct ieee80211vap struct ifnet *ifp = vap->iv_ifp; struct ieee80211_node *ni; struct ether_header *eh; - int error; /* * Cancel any background scan. @@ -236,124 +382,12 @@ ieee80211_start_pkt(struct ieee80211vap } } #endif - if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && - (m->m_flags & M_PWR_SAV) == 0) { - /* - * Station in power save mode; pass the frame - * to the 802.11 layer and continue. We'll get - * the frame back when the time is right. - * XXX lose WDS vap linkage? - */ - (void) ieee80211_pwrsave(ni, m); - ieee80211_free_node(ni); - /* XXX better status? */ - return (ENOBUFS); - } - /* calculate priority so drivers can find the tx queue */ - if (ieee80211_classify(ni, m)) { - IEEE80211_DISCARD_MAC(vap, IEEE80211_MSG_OUTPUT, - eh->ether_dhost, NULL, - "%s", "classification failure"); - vap->iv_stats.is_tx_classify++; - ifp->if_oerrors++; - m_freem(m); - ieee80211_free_node(ni); - /* XXX better status? */ - return (ENOBUFS); - } - /* - * Stash the node pointer. Note that we do this after - * any call to ieee80211_dwds_mcast because that code - * uses any existing value for rcvif to identify the - * interface it (might have been) received on. - */ - m->m_pkthdr.rcvif = (void *)ni; - - BPF_MTAP(ifp, m); /* 802.3 tx */ - - - /* - * Check if A-MPDU tx aggregation is setup or if we - * should try to enable it. The sta must be associated - * with HT and A-MPDU enabled for use. When the policy - * routine decides we should enable A-MPDU we issue an - * ADDBA request and wait for a reply. The frame being - * encapsulated will go out w/o using A-MPDU, or possibly - * it might be collected by the driver and held/retransmit. - * The default ic_ampdu_enable routine handles staggering - * ADDBA requests in case the receiver NAK's us or we are - * otherwise unable to establish a BA stream. - */ - if ((ni->ni_flags & IEEE80211_NODE_AMPDU_TX) && - (vap->iv_flags_ht & IEEE80211_FHT_AMPDU_TX) && - (m->m_flags & M_EAPOL) == 0) { - int tid = WME_AC_TO_TID(M_WME_GETAC(m)); - struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; - - ieee80211_txampdu_count_packet(tap); - if (IEEE80211_AMPDU_RUNNING(tap)) { - /* - * Operational, mark frame for aggregation. - * - * XXX do tx aggregation here - */ - m->m_flags |= M_AMPDU_MPDU; - } else if (!IEEE80211_AMPDU_REQUESTED(tap) && - ic->ic_ampdu_enable(ni, tap)) { - /* - * Not negotiated yet, request service. - */ - ieee80211_ampdu_request(ni, tap); - /* XXX hold frame for reply? */ - } - } - -#ifdef IEEE80211_SUPPORT_SUPERG - else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF)) { - m = ieee80211_ff_check(ni, m); - if (m == NULL) { - /* NB: any ni ref held on stageq */ - /* XXX better status? */ - return (ENOBUFS); - } - } -#endif /* IEEE80211_SUPPORT_SUPERG */ - - /* - * Grab the TX lock - serialise the TX process from this - * point (where TX state is being checked/modified) - * through to driver queue. - */ - IEEE80211_TX_LOCK(ic); - - if (__predict_true((vap->iv_caps & IEEE80211_C_8023ENCAP) == 0)) { - /* - * Encapsulate the packet in prep for transmission. - */ - m = ieee80211_encap(vap, ni, m); - if (m == NULL) { - /* NB: stat+msg handled in ieee80211_encap */ - IEEE80211_TX_UNLOCK(ic); - ieee80211_free_node(ni); - /* XXX better status? */ - return (ENOBUFS); - } - } - error = ieee80211_parent_transmit(ic, m); /* - * Unlock at this point - no need to hold it across - * ieee80211_free_node() (ie, the comlock) + * We've resolved the sender, so attempt to transmit it. */ - IEEE80211_TX_UNLOCK(ic); - if (error != 0) { - /* NB: IFQ_HANDOFF reclaims mbuf */ - ieee80211_free_node(ni); - } else { - ifp->if_opackets++; - } - ic->ic_lastdata = ticks; - + if (ieee80211_vap_pkt_send_dest(vap, m, ni) != 0) + return (ENOBUFS); return (0); #undef IS_DWDS } From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:04:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C0EAD5B; Sun, 28 Jul 2013 05:04:43 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2577720EF; Sun, 28 Jul 2013 05:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S54hIr091849; Sun, 28 Jul 2013 05:04:43 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S54f7d091830; Sun, 28 Jul 2013 05:04:41 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280504.r6S54f7d091830@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:04:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253728 - in vendor/subversion/dist: . subversion/include subversion/include/private subversion/libsvn_client subversion/libsvn_delta subversion/libsvn_fs_base subversion/libsvn_fs_base... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:04:43 -0000 Author: peter Date: Sun Jul 28 05:04:41 2013 New Revision: 253728 URL: http://svnweb.freebsd.org/changeset/base/253728 Log: Import subversion-1.8.1 into vendor staging area. Modified: vendor/subversion/dist/CHANGES vendor/subversion/dist/Makefile.in vendor/subversion/dist/build-outputs.mk vendor/subversion/dist/configure vendor/subversion/dist/configure.ac vendor/subversion/dist/get-deps.sh vendor/subversion/dist/subversion/include/private/svn_client_private.h vendor/subversion/dist/subversion/include/private/svn_io_private.h vendor/subversion/dist/subversion/include/private/svn_ra_private.h vendor/subversion/dist/subversion/include/svn_version.h vendor/subversion/dist/subversion/libsvn_client/client.h vendor/subversion/dist/subversion/libsvn_client/commit.c vendor/subversion/dist/subversion/libsvn_client/copy.c vendor/subversion/dist/subversion/libsvn_client/diff.c vendor/subversion/dist/subversion/libsvn_client/diff_local.c vendor/subversion/dist/subversion/libsvn_client/log.c vendor/subversion/dist/subversion/libsvn_client/merge.c vendor/subversion/dist/subversion/libsvn_client/mergeinfo.c vendor/subversion/dist/subversion/libsvn_client/ra.c vendor/subversion/dist/subversion/libsvn_client/switch.c vendor/subversion/dist/subversion/libsvn_delta/compat.c vendor/subversion/dist/subversion/libsvn_fs_base/bdb/env.c vendor/subversion/dist/subversion/libsvn_fs_base/tree.c vendor/subversion/dist/subversion/libsvn_fs_fs/fs_fs.c vendor/subversion/dist/subversion/libsvn_fs_fs/rep-cache-db.h vendor/subversion/dist/subversion/libsvn_fs_fs/tree.c vendor/subversion/dist/subversion/libsvn_ra/ra_loader.c vendor/subversion/dist/subversion/libsvn_ra/util.c vendor/subversion/dist/subversion/libsvn_ra_serf/blame.c vendor/subversion/dist/subversion/libsvn_ra_serf/commit.c vendor/subversion/dist/subversion/libsvn_ra_serf/getdate.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocations.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocationsegments.c vendor/subversion/dist/subversion/libsvn_ra_serf/getlocks.c vendor/subversion/dist/subversion/libsvn_ra_serf/inherited_props.c vendor/subversion/dist/subversion/libsvn_ra_serf/log.c vendor/subversion/dist/subversion/libsvn_ra_serf/mergeinfo.c vendor/subversion/dist/subversion/libsvn_ra_serf/options.c vendor/subversion/dist/subversion/libsvn_ra_serf/property.c vendor/subversion/dist/subversion/libsvn_ra_serf/ra_serf.h vendor/subversion/dist/subversion/libsvn_ra_serf/replay.c vendor/subversion/dist/subversion/libsvn_ra_serf/serf.c vendor/subversion/dist/subversion/libsvn_ra_serf/update.c vendor/subversion/dist/subversion/libsvn_ra_serf/util.c vendor/subversion/dist/subversion/libsvn_ra_serf/xml.c vendor/subversion/dist/subversion/libsvn_ra_svn/client.c vendor/subversion/dist/subversion/libsvn_ra_svn/protocol vendor/subversion/dist/subversion/libsvn_repos/fs-wrap.c vendor/subversion/dist/subversion/libsvn_subr/config_file.c vendor/subversion/dist/subversion/libsvn_subr/gpg_agent.c vendor/subversion/dist/subversion/libsvn_subr/internal_statements.h vendor/subversion/dist/subversion/libsvn_subr/io.c vendor/subversion/dist/subversion/libsvn_subr/named_atomic.c vendor/subversion/dist/subversion/libsvn_subr/sqlite.c vendor/subversion/dist/subversion/libsvn_subr/stream.c vendor/subversion/dist/subversion/libsvn_subr/subst.c vendor/subversion/dist/subversion/libsvn_subr/utf.c vendor/subversion/dist/subversion/libsvn_wc/adm_ops.c vendor/subversion/dist/subversion/libsvn_wc/crop.c vendor/subversion/dist/subversion/libsvn_wc/externals.c vendor/subversion/dist/subversion/libsvn_wc/update_editor.c vendor/subversion/dist/subversion/libsvn_wc/upgrade.c vendor/subversion/dist/subversion/libsvn_wc/wc-checks.h vendor/subversion/dist/subversion/libsvn_wc/wc-metadata.h vendor/subversion/dist/subversion/libsvn_wc/wc-queries.h vendor/subversion/dist/subversion/libsvn_wc/wc-queries.sql vendor/subversion/dist/subversion/libsvn_wc/wc_db.c vendor/subversion/dist/subversion/libsvn_wc/wc_db.h vendor/subversion/dist/subversion/libsvn_wc/wc_db_update_move.c vendor/subversion/dist/subversion/libsvn_wc/wc_db_wcroot.c vendor/subversion/dist/subversion/libsvn_wc/workqueue.c vendor/subversion/dist/subversion/svn/cl.h vendor/subversion/dist/subversion/svn/conflict-callbacks.c vendor/subversion/dist/subversion/svn/file-merge.c vendor/subversion/dist/subversion/svn/merge-cmd.c vendor/subversion/dist/subversion/svn/mergeinfo-cmd.c vendor/subversion/dist/subversion/svn/svn.c vendor/subversion/dist/subversion/svn/util.c vendor/subversion/dist/subversion/svnadmin/svnadmin.c vendor/subversion/dist/subversion/svnlook/svnlook.c vendor/subversion/dist/subversion/svnserve/serve.c vendor/subversion/dist/win-tests.py Modified: vendor/subversion/dist/CHANGES ============================================================================== --- vendor/subversion/dist/CHANGES Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/CHANGES Sun Jul 28 05:04:41 2013 (r253728) @@ -1,3 +1,91 @@ +Version 1.8.1 +(23 July 2013, from /branches/1.8.x) +http://svn.apache.org/repos/asf/subversion/tags/1.8.1 + + User-visible changes: + - Client- and server-side bugfixes: + * translation updates for German and Simplified Chinese + * improve sqlite error message output (r1497804) + * support platforms lacking mmap (r1498136) + * allow configuration files to start with UTF-8 BOM (r1499100 et al) + * don't fail on UTF-8 data when encoding conversion not available (r1503009) + * improve error messages when encoding conversion fails (r1503010) + + - Client-side bugfixes: + * merge: rename 'automatic merge' to 'complete merge' (r1491432) + * mergeinfo: reduce network usage for '--show-revs' (r1492005) + * ra_serf: improve http status handling (r1495104) + * merge: avoid unneeded ra session (r1493475) + * merge: reduce network usage (r1478987) + * merge: remove duplicated ancestry check (r1493424, r1495597) + * ra_serf: fix 'Accept-Encoding' header for IIS interoperability (r1497551) + * svn status: improve documentation for lock columns (r1497318, r1497319) + * ra_serf: fix support for 'get-file-revs-reversed' capability (r1498456) + * log: reduce network usage on repository roots (r1496957) + * diff: avoid temporary files when calling external diff (issue #4382) + * upgrade: fix notification of 1.7.x working copies (r1493703, r1494171) + * fix crash during tree conflict resolution (issue #4388) + * interactive file merge: add two additional choices (r1491816, r1494089) + * diff: use local style paths in error messages (r1500680) + * resolve: improve the interactive conflict resolution menu (r1491739 et al) + * switch: use local style path in error message (r1500074) + * ra_serf: improve error output when receiving invalid XML (r1498851) + * svn cleanup: explain what the command does in help output (r1497310) + * blame: error on -r M:N where M>N unless server supports (r1498449 et al) + * gpg-agent auth: don't try to use agent when unavailable (r1500762 et al) + * gpg-agent auth: don't require GPG_TTY or TERM env vars (r1500801) + * update: fix some tree conflicts not triggering resolver (r1491868 et al) + * commit: remove stale entries from wc lock table when deleting (r1491756) + * merge: fix --record-only erroring out on renamed path (issue #4387) + * svnmucc: fix 'make install' symlink to work when DESTDIR is set (r1501072) + * wc: fix crash when target is symlink to a working copy root (issue #4383) + * ra_serf: change "internal malfunction" errors to normal errors (r1502577) + * ra_serf: handle proxies not supporting chunked requests (r1502401 et al) + + - Server-side bugfixes: + * fsfs: resolve endless loop problem when repos/db/uuid has \r\n (r1492145) + * fsfs: remove revision property buffer limit (r1491770) + * mod_dav_svn: better status codes for anonymous user errors (r1495918) + * mod_dav_svn: better status codes for commit failures (r1490684) + * fix performance regression in 'svn log' against root (r1494913) + * allow deleting non-user-visible 'svn:' properties (r1495432) + * fsfs: fix crash on strict-alignment architectures (r1495806, r1495985) + * svnadmin upgrade: fix error of non-sharded fsfs repositories (r1494287) + * svnadmin create: deny '--fs-type=fsfs --compatible-version=1.0' (r1494223) + * svnadmin upgrade: fix data loss when cancelling in last stage (r1494298) + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fsfs-stats (tool): resolve segfault when passing invalid path (r1492164) + * svn-bench: fix help output (r1493951) + * svnpubsub: add version header to server (r1491707) + + Developer-visible changes + - General: + * ra_serf: fix some test runner issues on Windows (r1490679) + * fix two issues in reverse svn_ra_get_file_revs() (r1492148, et al) + * handle --compatible-version=1.8 in the C tests (r1494342) + * improve clang compatibility (r1480080 et al) + * use proper cancel baton when handling conflicts (r1495850) + * fs: BDB: provide proper error value from BDB (r1495428) + * ra_serf: tweak connection failed error value (r1496132, et al) + * svn_client_log5: resolve possible segfault (r1496110) + * fix metadata_only move to work when target is unversioned node (r1498564) + * ra_svn: fix segfault with a NULL commit message (r1498550, r1499727) + * Ev2: correctly initialize node kind in shims' change table (r1501058) + * Ev2: fix copyfrom URL construction in shims (r1500226) + * fs: improve test against newlines in filenames (r1498483 et al) + * make building with BDB 6 an opt-in feature (r1499438) + * sqlite: allow placing amalgamation in build dir (r1499034, r1500175) + * ra_svn: make sessions usable after log callback early out (r1503554) + + - Bindings: + * swig-rb: fix tests with out-of-tree-builds (r1492295) + * javahl: fix encoding of error messages produced by javahl (r1492264) + * swig-pl: silence compiler warnings (r1487094) + * swig-pl: improve documentation (r1488693, r1490721, r1500904) + + Version 1.8.0 (18 Jun 2013, from /branches/1.8.x) http://svn.apache.org/repos/asf/subversion/tags/1.8.0 @@ -99,7 +187,6 @@ http://svn.apache.org/repos/asf/subversi * support ipv6 in URLs (e.g. http://[::1]/svn/repos) (r1454047) * conflict resolver now iterates paths in a sorted order (r1461820) * mod_dav_svn does keyword expansion with 'kw=1' query arg (r1466055) - * add support for custom keyword definitions (issue #890) - Minor new features and improvements (server-side): * improve performance of config file parsing (r1344347 et al) @@ -339,6 +426,25 @@ http://svn.apache.org/repos/asf/subversi * fix some reference counting bugs in swig-py bindings (r1464899, r1466524) +Version 1.7.11 +(23 Jul 2013, from /branches/1.7.x) +http://svn.apache.org/repos/asf/subversion/tags/1.7.11 + + User-visible changes: + - General + * translation updates for Simplified Chinese + + - Server-side bugfixes: + * mod_dav_svn: fix incorrect path canonicalization (r1503528) + + - Other tool improvements and bugfixes: + * fix argument processing in contrib hook scripts (r1485350) + + Developer-visible changes: + - Bindings: + * javahl: fix bug in error constructing code (r1405922) + + Version 1.7.10 (30 May 2013, from /branches/1.7.x) http://svn.apache.org/repos/asf/subversion/tags/1.7.10 Modified: vendor/subversion/dist/Makefile.in ============================================================================== --- vendor/subversion/dist/Makefile.in Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/Makefile.in Sun Jul 28 05:04:41 2013 (r253728) @@ -903,5 +903,5 @@ INSTALL_EXTRA_TOOLS=\ test -n "$$SVN_SVNMUCC_IS_SVNSYITF" && \ ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \ if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \ - ln -sf $(DESTDIR)$(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ + ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \ fi Modified: vendor/subversion/dist/build-outputs.mk ============================================================================== --- vendor/subversion/dist/build-outputs.mk Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/build-outputs.mk Sun Jul 28 05:04:41 2013 (r253728) @@ -1985,7 +1985,7 @@ subversion/libsvn_client/delete.lo: subv subversion/libsvn_client/deprecated.lo: subversion/libsvn_client/deprecated.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_opt_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_compat.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn _types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/libsvn_client/mergeinfo.h subversion/svn_private_config.h -subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/ svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h +subversion/libsvn_client/diff.lo: subversion/libsvn_client/diff.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_io_private.h subversion/include/private/svn_magic.h subversion/include/private/svn_subr_private.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subvers ion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_wc.h subversion/libsvn_client/client.h subversion/svn_private_config.h subversion/libsvn_client/diff_local.lo: subversion/libsvn_client/diff_local.c subversion/include/private/svn_client_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_editor.h subversion/include/private/svn_magic.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_wc.h subversi on/libsvn_client/client.h subversion/svn_private_config.h @@ -2703,7 +2703,7 @@ subversion/svnadmin/svnadmin.lo: subvers subversion/svndumpfilter/svndumpfilter.lo: subversion/svndumpfilter/svndumpfilter.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_mergeinfo_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/svn_private_config.h -subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/i nclude/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h +subversion/svnlook/svnlook.lo: subversion/svnlook/svnlook.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_diff_private.h subversion/include/private/svn_fspath.h subversion/include/private/svn_io_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_sorts.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_time.h subversion/include/svn_types .h subversion/include/svn_utf.h subversion/include/svn_version.h subversion/include/svn_xml.h subversion/svn_private_config.h subversion/svnmucc/svnmucc.lo: subversion/svnmucc/svnmucc.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_ra_private.h subversion/include/private/svn_string_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_ra.h subversion/include/svn_string.h subversion/include/svn_subst.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/include/svn_ver sion.h subversion/include/svn_wc.h subversion/svn_private_config.h @@ -2749,7 +2749,7 @@ subversion/tests/libsvn_diff/diff-diff3- subversion/tests/libsvn_diff/parse-diff-test.lo: subversion/tests/libsvn_diff/parse-diff-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h -subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/libsvn_fs/fs-test.lo: subversion/tests/libsvn_fs/fs-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_editor.h subversion/include/private/svn_fs_private.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_props.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_time.h subversion/include/svn_types.h subversion/include/svn_version.h subversion/libsvn_delta/delta.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/libsvn_fs/locks-test.lo: subversion/tests/libsvn_fs/locks-test.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h @@ -2849,7 +2849,7 @@ subversion/tests/libsvn_wc/wc-queries-te subversion/tests/libsvn_wc/wc-test.lo: subversion/tests/libsvn_wc/wc-test.c subversion/include/private/svn_debug.h subversion/include/private/svn_dep_compat.h subversion/include/private/svn_diff_tree.h subversion/include/private/svn_skel.h subversion/include/private/svn_sqlite.h subversion/include/private/svn_token.h subversion/include/private/svn_wc_private.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_client.h subversion/include/svn_config.h subversion/include/svn_delta.h subversion/include/svn_diff.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_ra.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversi on/include/svn_wc.h subversion/libsvn_wc/wc.h subversion/libsvn_wc/wc_db.h subversion/libsvn_wc/wc_db_private.h subversion/svn_private_config.h subversion/tests/libsvn_wc/utils.h subversion/tests/svn_test.h -subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h +subversion/tests/svn_test_fs.lo: subversion/tests/svn_test_fs.c subversion/include/private/svn_debug.h subversion/include/svn_checksum.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_fs.h subversion/include/svn_hash.h subversion/include/svn_io.h subversion/include/svn_mergeinfo.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_repos.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/include/svn_utf.h subversion/tests/svn_test.h subversion/tests/svn_test_fs.h subversion/tests/svn_test_main.lo: subversion/tests/svn_test_main.c subversion/include/private/svn_cmdline_private.h subversion/include/private/svn_debug.h subversion/include/svn_auth.h subversion/include/svn_checksum.h subversion/include/svn_cmdline.h subversion/include/svn_config.h subversion/include/svn_ctype.h subversion/include/svn_delta.h subversion/include/svn_dirent_uri.h subversion/include/svn_error.h subversion/include/svn_error_codes.h subversion/include/svn_io.h subversion/include/svn_opt.h subversion/include/svn_path.h subversion/include/svn_pools.h subversion/include/svn_string.h subversion/include/svn_types.h subversion/svn_private_config.h subversion/tests/svn_test.h Modified: vendor/subversion/dist/configure ============================================================================== --- vendor/subversion/dist/configure Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/configure Sun Jul 28 05:04:41 2013 (r253728) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for subversion 1.8.0. +# Generated by GNU Autoconf 2.69 for subversion 1.8.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='subversion' PACKAGE_TARNAME='subversion' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='subversion 1.8.0' +PACKAGE_VERSION='1.8.1' +PACKAGE_STRING='subversion 1.8.1' PACKAGE_BUGREPORT='http://subversion.apache.org/' PACKAGE_URL='' @@ -872,6 +872,7 @@ with_trang with_doxygen with_expat with_berkeley_db +enable_bdb6 with_sasl enable_keychain with_gpg_agent @@ -1455,7 +1456,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures subversion 1.8.0 to adapt to many kinds of systems. +\`configure' configures subversion 1.8.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1521,7 +1522,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of subversion 1.8.0:";; + short | recursive ) echo "Configuration of subversion 1.8.1:";; esac cat <<\_ACEOF @@ -1547,6 +1548,10 @@ Optional Features: testing prior to installation on some platforms. It does not work on some platforms (Darwin, OpenBSD, ...). + --enable-bdb6 Allow building against BDB 6+. See + --with-berkeley-db for specifying the location of + the Berkeley DB installation. Using BDB 6 will fail + if this option is not used. --disable-keychain Disable use of Mac OS KeyChain for auth credentials --enable-ev2-impl Use Ev2 implementations, where available [EXPERIMENTAL] @@ -1609,9 +1614,9 @@ Optional Packages: Specify location of Expat --with-berkeley-db[=HEADER:INCLUDES:LIB_SEARCH_DIRS:LIBS] The Subversion Berkeley DB based filesystem library - requires Berkeley DB $db_version or newer. If you - specify `--without-berkeley-db', that library will - not be built. If you omit the argument of this + requires Berkeley DB $db_version or $db_alt_version. + If you specify `--without-berkeley-db', that library + will not be built. If you omit the argument of this option completely, the configure script will use Berkeley DB used by APR-UTIL. --with-sasl=PATH Compile with libsasl2 in PATH @@ -1731,7 +1736,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -subversion configure 1.8.0 +subversion configure 1.8.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2275,7 +2280,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by subversion $as_me 1.8.0, which was +It was created by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2655,8 +2660,8 @@ ac_configure="$SHELL $ac_aux_dir/configu -{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.0" >&5 -$as_echo "$as_me: Configuring Subversion 1.8.0" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Subversion 1.8.1" >&5 +$as_echo "$as_me: Configuring Subversion 1.8.1" >&6;} abs_srcdir="`cd $srcdir && pwd`" @@ -3612,6 +3617,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CFLAGS" + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CC accepts -Werror=unknown-warning-option... " >&6; } + CFLAGS="-Werror=unknown-warning-option $CFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C++ compiler (before anything can set CXXFLAGS) CXXMAINTAINERFLAGS="$CXXUSERFLAGS" CXXUSERFLAGS="$CXXFLAGS" @@ -3921,6 +3964,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + _svn_xxflags__save="$CXXFLAGS" + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts -Werror=unknown-warning-option" >&5 +$as_echo_n "checking if $CXX accepts -Werror=unknown-warning-option... " >&6; } + CXXFLAGS="-Werror=unknown-warning-option $CXXFLAGS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +_ACEOF +if ac_fn_cxx_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + CXXFLAGS="$_svn_xxflags__save" + + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + # Look for a C pre-processor ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -6161,6 +6242,10 @@ $as_echo "$as_me: WARNING: no suitable s echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -6461,6 +6546,299 @@ rm -f conftest* if test -z "$svn_lib_sqlite"; then + sqlite_amalg="$abs_builddir/sqlite-amalgamation/sqlite3.c" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation" >&5 +$as_echo_n "checking sqlite amalgamation... " >&6; } + if test ! -e $sqlite_amalg; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking sqlite amalgamation file version" >&5 +$as_echo_n "checking sqlite amalgamation file version... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include "$sqlite_amalg" +#if SQLITE_VERSION_NUMBER >= $sqlite_min_ver_num +SQLITE_VERSION_OKAY +#endif +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "SQLITE_VERSION_OKAY" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: amalgamation found and is okay" >&5 +$as_echo "amalgamation found and is okay" >&6; } + + case $host_os in + beos* | mingw* | pw32* | cegcc* | cygwin*) + svn_sqlite_dso_ldflags= + ;; + + darwin*) + # if libdl is installed we need to link against it + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + lt_cv_dlopen="dlopen" svn_sqlite_dso_ldflags="-ldl" +else + + svn_sqlite_dso_ldflags= + +fi + + ;; + + *) + ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" +if test "x$ac_cv_func_shl_load" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 +$as_echo_n "checking for shl_load in -ldld... " >&6; } +if ${ac_cv_lib_dld_shl_load+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (); +int +main () +{ +return shl_load (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_shl_load=yes +else + ac_cv_lib_dld_shl_load=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 +$as_echo "$ac_cv_lib_dld_shl_load" >&6; } +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +else + ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" +if test "x$ac_cv_func_dlopen" = xyes; then : + svn_sqlite_dso_ldflags= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 +$as_echo_n "checking for dlopen in -ldl... " >&6; } +if ${ac_cv_lib_dl_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dl_dlopen=yes +else + ac_cv_lib_dl_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 +$as_echo "$ac_cv_lib_dl_dlopen" >&6; } +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-ldl" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 +$as_echo_n "checking for dlopen in -lsvld... " >&6; } +if ${ac_cv_lib_svld_dlopen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (); +int +main () +{ +return dlopen (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_svld_dlopen=yes +else + ac_cv_lib_svld_dlopen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 +$as_echo "$ac_cv_lib_svld_dlopen" >&6; } +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : + svn_sqlite_dso_ldflags="-lsvld" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 +$as_echo_n "checking for dld_link in -ldld... " >&6; } +if ${ac_cv_lib_dld_dld_link+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char dld_link (); +int +main () +{ +return dld_link (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_dld_dld_link=yes +else + ac_cv_lib_dld_dld_link=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 +$as_echo "$ac_cv_lib_dld_dld_link" >&6; } +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : + svn_sqlite_dso_ldflags="-ldld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional libraries for sqlite" >&5 +$as_echo_n "checking additional libraries for sqlite... " >&6; } + if test -n "$svn_sqlite_dso_ldflags"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${svn_sqlite_dso_ldflags}" >&5 +$as_echo "${svn_sqlite_dso_ldflags}" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 +$as_echo "none" >&6; } + fi + + +$as_echo "#define SVN_SQLITE_INLINE 1" >>confdefs.h + + SVN_SQLITE_INCLUDES="-I`dirname $sqlite_amalg`" + if test -n "$svn_sqlite_dso_ldflags"; then + SVN_SQLITE_LIBS="$svn_sqlite_dso_ldflags -lpthread" + else + SVN_SQLITE_LIBS="-lpthread" + fi + svn_lib_sqlite="yes" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported amalgamation SQLite version" >&5 +$as_echo "unsupported amalgamation SQLite version" >&6; } +fi +rm -f conftest* + + fi + + fi + + if test -z "$svn_lib_sqlite"; then + if test -z ""; then sqlite_dir="" sqlite_include="sqlite3.h" @@ -6633,6 +7011,10 @@ $as_echo "no" >&6; } echo "unpack the archive using unzip and rename the resulting" echo "directory to:" echo "$abs_srcdir/sqlite-amalgamation" + if test x"$abs_srcdir" != x"$abs_builddir"; then + echo "or to:" + echo "$abs_builddir/sqlite-amalgamation" + fi echo "" as_fn_error $? "Subversion requires SQLite" "$LINENO" 5 @@ -17537,6 +17919,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: db_version=$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH @@ -17624,6 +18007,14 @@ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for availability of Berkeley DB" >&5 $as_echo_n "checking for availability of Berkeley DB... " >&6; } + # Check whether --enable-bdb6 was given. +if test "${enable_bdb6+set}" = set; then : + enableval=$enable_bdb6; enable_bdb6=$enableval +else + enable_bdb6=unspecified +fi + + svn_lib_berkeley_db_try_save_cppflags="$CPPFLAGS" svn_lib_berkeley_db_try_save_libs="$LIBS" @@ -17631,6 +18022,7 @@ $as_echo_n "checking for availability of svn_check_berkeley_db_major=$SVN_FS_WANT_DB_MAJOR svn_check_berkeley_db_minor=$SVN_FS_WANT_DB_MINOR svn_check_berkeley_db_patch=$SVN_FS_WANT_DB_PATCH + enable_bdb6=$enable_bdb6 if test -z "$SVN_DB_LIBS"; then # We pass --dbm-libs here since Debian has modified apu-config not @@ -17673,6 +18065,7 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#include #include $svn_db_header @@ -17688,6 +18081,12 @@ int main () || patch != DB_VERSION_PATCH) exit (1); + /* Block Berkeley DB 6, because (a) we haven't tested with it, (b) 6.0.20 + and newer are under the AGPL, and we want use of AGPL dependencies to be + opt-in. */ + if (major >= 6 && strcmp("$enable_bdb6", "yes")) + exit(2); + /* Run-time check: ensure the library claims to be the correct version. */ if (major < $svn_check_berkeley_db_major) @@ -17710,7 +18109,11 @@ _ACEOF if ac_fn_c_try_run "$LINENO"; then : svn_have_berkeley_db=yes else - svn_have_berkeley_db=no + rc=$? + svn_have_berkeley_db=no + if test $rc = 2; then + svn_have_berkeley_db=no6 + fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -17726,11 +18129,17 @@ fi $as_echo "yes" >&6; } svn_lib_berkeley_db=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + if test "$svn_have_berkeley_db" = "no6"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (found version 6, but --enable-bdb6 not specified)" >&5 +$as_echo "no (found version 6, but --enable-bdb6 not specified)" >&6; } + # A warning will be printed at the end of configure.ac. + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } + fi svn_lib_berkeley_db=no if test "$bdb_status" = "required"; then - as_fn_error $? "Berkeley DB $db_version or newer wasn't found." "$LINENO" 5 + as_fn_error $? "Berkeley DB $db_version or $db_alt_version wasn't found." "$LINENO" 5 fi fi fi @@ -21156,6 +21565,18 @@ $as_echo "$as_me: Disabling optimization # # do nothing fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: C compiler flags: $CFLAGS" >&5 +$as_echo "$as_me: C compiler flags: $CFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CMAINTAINERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: C++ compiler flags: $CXXFLAGS" >&5 +$as_echo "$as_me: C++ compiler flags: $CXXFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: user-defined: $CXXUSERFLAGS" >&5 +$as_echo "$as_me: user-defined: $CXXUSERFLAGS" >&6;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: maintainer-mode: $CXXMAINTAINERFLAGS" >&5 +$as_echo "$as_me: maintainer-mode: $CXXMAINTAINERFLAGS" >&6;} # Check whether --enable-full-version-match was given. if test "${enable_full_version_match+set}" = set; then : @@ -25315,7 +25736,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by subversion $as_me 1.8.0, which was +This file was extended by subversion $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -25381,7 +25802,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -subversion config.status 1.8.0 +subversion config.status 1.8.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -27295,30 +27716,51 @@ fi # ==== Print final messages to user ========================================== -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We have configured without BDB filesystem support + + +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated -or explicitly specify --without-berkeley-db to silence this warning. +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&5 -$as_echo "$as_me: WARNING: we have configured without BDB filesystem support +$as_echo "$as_me: WARNING: We have configured without BDB filesystem support + + +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated -or explicitly specify --without-berkeley-db to silence this warning. +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. " >&2;} fi Modified: vendor/subversion/dist/configure.ac ============================================================================== --- vendor/subversion/dist/configure.ac Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/configure.ac Sun Jul 28 05:04:41 2013 (r253728) @@ -460,6 +460,7 @@ powerpc-apple-darwin*) SVN_FS_WANT_DB_PATCH=14 ;; esac +db_alt_version="5.x" # Look for libdb4.so first: SVN_LIB_BERKELEY_DB($SVN_FS_WANT_DB_MAJOR, $SVN_FS_WANT_DB_MINOR, $SVN_FS_WANT_DB_PATCH, [db4 db]) @@ -1117,6 +1118,13 @@ elif test "$enable_optimization" = "no"; # # do nothing fi +dnl Dump the current compiler options +AC_MSG_NOTICE([C compiler flags: $CFLAGS]) +AC_MSG_NOTICE([ user-defined: $CUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CMAINTAINERFLAGS]) +AC_MSG_NOTICE([C++ compiler flags: $CXXFLAGS]) +AC_MSG_NOTICE([ user-defined: $CXXUSERFLAGS]) +AC_MSG_NOTICE([ maintainer-mode: $CXXMAINTAINERFLAGS]) AC_ARG_ENABLE(full-version-match, AS_HELP_STRING([--disable-full-version-match], @@ -1504,18 +1512,28 @@ dnl Configure is long - users tend to mi dnl Hence, print a warnings about what we did and didn't configure at the dnl end, where people will actually see them. -if test "$svn_lib_berkeley_db" = "no" && test "$with_berkeley_db" != "no"; then - db_version="$SVN_FS_WANT_DB_MAJOR.$SVN_FS_WANT_DB_MINOR.$SVN_FS_WANT_DB_PATCH" - AC_MSG_WARN([we have configured without BDB filesystem support +if test "$svn_have_berkeley_db" = "no6" && test "$enable_bdb6" != "no"; then + AC_MSG_WARN([We have configured without BDB filesystem support -You don't seem to have Berkeley DB version $db_version or newer -installed and linked to APR-UTIL. We have created a Makefile which will build -Subversion without support for the Berkeley DB back-end. You can find the -latest version of Berkeley DB here: +Berkeley DB 6 was found, but not used. Please re-run configure (see +./config.nice) with the '--enable-bdb6' flag to use it, +or explicitly specify '--disable-bdb6' or '--without-berkeley-db' +to silence this warning. - http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html +Please note that some versions of Berkeley DB 6+ are under the GNU Affero +General Public License, version 3: +https://oss.oracle.com/pipermail/bdb/2013-June/000056.html -or explicitly specify --without-berkeley-db to silence this warning. +The AGPL-3.0 licence may impose special requirements for making available +source code of server-side software. The text of the licence is: +https://www.gnu.org/licenses/agpl-3.0.html +http://opensource.org/licenses/AGPL-3.0 + +The Berkeley DB backend to Subversion is deprecated; see +http://subversion.apache.org/docs/release-notes/1.8#bdb-deprecated + +The Subversion developers have not tested Subversion with Berkeley DB 6 for +technical problems or bugs. ]) fi Modified: vendor/subversion/dist/get-deps.sh ============================================================================== --- vendor/subversion/dist/get-deps.sh Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/get-deps.sh Sun Jul 28 05:04:41 2013 (r253728) @@ -37,7 +37,7 @@ SERF_VERSION=${SERF_VERSION:-"1.2.1"} ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"} SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"} GTEST_VERSION=${GTEST_VERSION:-"1.6.0"} -HTTPD_VERSION=${HTTPD_VERSION:-"2.4.3"} +HTTPD_VERSION=${HTTPD_VERSION:-"2.4.6"} APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"} APR=apr-${APR_VERSION} Modified: vendor/subversion/dist/subversion/include/private/svn_client_private.h ============================================================================== --- vendor/subversion/dist/subversion/include/private/svn_client_private.h Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/subversion/include/private/svn_client_private.h Sun Jul 28 05:04:41 2013 (r253728) @@ -291,6 +291,39 @@ svn_client__copy_foreign(const char *url svn_client_ctx_t *ctx, apr_pool_t *scratch_pool); +/* Same as the public svn_client_mergeinfo_log2 API, except for the addition + * of the TARGET_MERGEINFO_CATALOG and RESULT_POOL parameters. + * + * If TARGET_MERGEINFO_CATALOG is NULL then this acts exactly as the public + * API. If *TARGET_MERGEINFO_CATALOG is NULL, then *TARGET_MERGEINFO_CATALOG + * is set to the a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH, (like the public API only + * depths of svn_depth_empty or svn_depth_infinity are supported) allocated in + * RESULT_POOL. Finally, if *TARGET_MERGEINFO_CATALOG is non-NULL, then it is + * assumed to be a mergeinfo catalog representing the mergeinfo on + * TARGET_PATH_OR_URL@TARGET_PEG_REVISION at DEPTH. + * + * The keys for the subtree mergeinfo are the repository root-relative + * paths of TARGET_PATH_OR_URL and/or its subtrees, regardless of whether + * TARGET_PATH_OR_URL is a URL or WC path. + */ +svn_error_t * +svn_client__mergeinfo_log(svn_boolean_t finding_merged, + const char *target_path_or_url, + const svn_opt_revision_t *target_peg_revision, + svn_mergeinfo_catalog_t *target_mergeinfo_catalog, + const char *source_path_or_url, + const svn_opt_revision_t *source_peg_revision, + const svn_opt_revision_t *source_start_revision, + const svn_opt_revision_t *source_end_revision, + svn_log_entry_receiver_t log_receiver, + void *log_receiver_baton, + svn_boolean_t discover_changed_paths, + svn_depth_t depth, + const apr_array_header_t *revprops, + svn_client_ctx_t *ctx, + apr_pool_t *result_pool, + apr_pool_t *scratch_pool); #ifdef __cplusplus } Modified: vendor/subversion/dist/subversion/include/private/svn_io_private.h ============================================================================== --- vendor/subversion/dist/subversion/include/private/svn_io_private.h Sun Jul 28 04:53:00 2013 (r253727) +++ vendor/subversion/dist/subversion/include/private/svn_io_private.h Sun Jul 28 05:04:41 2013 (r253728) @@ -90,6 +90,11 @@ svn_stream__set_is_buffered(svn_stream_t svn_boolean_t svn_stream__is_buffered(svn_stream_t *stream); +/** Return the underlying file, if any, associated with the stream, or + * NULL if not available. Accessing the file bypasses the stream. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:05:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D25DE7C; Sun, 28 Jul 2013 05:05:10 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E516820F2; Sun, 28 Jul 2013 05:05:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S559ht092092; Sun, 28 Jul 2013 05:05:09 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S559rg092091; Sun, 28 Jul 2013 05:05:09 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280505.r6S559rg092091@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:05:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253729 - vendor/subversion/subversion-1.8.1 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:05:10 -0000 Author: peter Date: Sun Jul 28 05:05:09 2013 New Revision: 253729 URL: http://svnweb.freebsd.org/changeset/base/253729 Log: Tag subversion-1.8.1 Added: vendor/subversion/subversion-1.8.1/ - copied from r253728, vendor/subversion/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:06:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C2929FB4; Sun, 28 Jul 2013 05:06:54 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ACC3E20FC; Sun, 28 Jul 2013 05:06:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S56scS092788; Sun, 28 Jul 2013 05:06:54 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S56rXa092772; Sun, 28 Jul 2013 05:06:53 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280506.r6S56rXa092772@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:06:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253730 - in vendor/apr/dist: . atomic/unix docs file_io/unix include network_io/unix random/unix tables threadproc/unix X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:06:54 -0000 Author: peter Date: Sun Jul 28 05:06:53 2013 New Revision: 253730 URL: http://svnweb.freebsd.org/changeset/base/253730 Log: Import Apache apr-1.4.8 to vendor staging area. Modified: vendor/apr/dist/CHANGES vendor/apr/dist/Makefile.win vendor/apr/dist/apr.spec vendor/apr/dist/atomic/unix/ia32.c vendor/apr/dist/atomic/unix/ppc.c vendor/apr/dist/atomic/unix/s390.c vendor/apr/dist/configure vendor/apr/dist/docs/pool-design.html vendor/apr/dist/file_io/unix/seek.c vendor/apr/dist/include/apr.hw vendor/apr/dist/include/apr_allocator.h vendor/apr/dist/include/apr_general.h vendor/apr/dist/include/apr_network_io.h vendor/apr/dist/include/apr_pools.h vendor/apr/dist/include/apr_strings.h vendor/apr/dist/include/apr_thread_proc.h vendor/apr/dist/include/apr_version.h vendor/apr/dist/libapr.rc vendor/apr/dist/network_io/unix/multicast.c vendor/apr/dist/network_io/unix/sendrecv.c vendor/apr/dist/network_io/unix/sockaddr.c vendor/apr/dist/network_io/unix/sockopt.c vendor/apr/dist/random/unix/sha2.c vendor/apr/dist/random/unix/sha2.h vendor/apr/dist/random/unix/sha2_glue.c vendor/apr/dist/tables/apr_tables.c vendor/apr/dist/threadproc/unix/thread.c Modified: vendor/apr/dist/CHANGES ============================================================================== --- vendor/apr/dist/CHANGES Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/CHANGES Sun Jul 28 05:06:53 2013 (r253730) @@ -1,11 +1,73 @@ -*- coding: utf-8 -*- +Changes for APR 1.4.8 + + *) Fix compiltation with FreeBSD on ARM. [Olli Hauer ] + + *) Fix 1.4.7 regression in apr_mcast_hops() and apr_mcast_loopback() + for AF_INET (IPv4) sockets on most Unix platforms. [Joe Orton] + + *) Fix the return value of apr_threadattr_detach_get() on some + platforms like OS X and Solaris. [Rainer Jung, ] + +Changes for APR 1.4.7 + + *) Fix apr_sockaddr_info_get() not returning an error in some cases. + PR 54779. [Jan Kaluža ] + + *) Fix amd64 assembler version of apr_atomic_xchgptr(). PR 51851. [Mattias + EngdegÃ¥rd ] + + *) Fix PPC atomics to work with gcc 4.0. PR 54840. [Mattias EngdegÃ¥rd + ] + + *) configure: Fix detection of O_NONBLOCK inheritance on busy + systems. [Rainer Jung] + + *) Remove unused code, fix strict C compliance bug in SHA-256 + implementation. [Jan Kaluza ] + + *) Fix apr_ipsubnet_test() false positives when comparing IPv4 + subnet representation against an IPv6 address. PR 54047. [Joe Orton] + + *) apr_socket_accept_filter: Return success when trying to again set + the filter to the same value as before, avoiding an unhelpful + APR_EINVAL. PR 37863. [Jeff Trawick] + + *) configure: Fix Linux 3.x detection. PR 54001. [Gilles Espinasse + ] + + *) apr_time_exp_*() on Windows: Fix error in the tm_yday field of + apr_time_exp_t for times within leap years. PR 53175. + [Jeff Trawick] + + *) Improve platform detection by updating config.guess and config.sub. + [Rainer Jung] + + *) Add support for OSX Mountain Lion (10.8) [Jim Jagielski] + + *) Add various gcc function attributes. [Stefan Fritsch] + + *) Fix some problems in apr_sockaddr_info_get() when trying to resolve + the loopback addresses of a protocol family that is not otherwise + configured on the system. PR 52709. [Nirgal Vourgère + , Stefan Fritsch] + + *) Fix file not being unlocked if truncate call on a file fails. + [Mladen Turk] + + *) apr_mcast_hops: Fix EINVAL for IPv6 sockets caused by using byte + instead integer for setsockopt. [Mladen Turk] + + *) Windows: Fix compile-time checks for 64-bit builds, resolving a + crash in httpd's mod_rewrite. PR 49155. [] + Changes for APR 1.4.6 *) Flush write buffer before truncate call on a file. [Mladen Turk] - *) Security: oCERT-2011-003 - Randomise hashes by providing a seed. + *) Randomise hashes by providing a seed. + Assigned CVE-2012-0840, oCERT-2011-003, but not known to be exploitable. [Bojan Smojver, Branko ÄŒibej, Ruediger Pluem et al.] *) apr_random: Prevent segfault if pool used to initialize apr_random is Modified: vendor/apr/dist/Makefile.win ============================================================================== --- vendor/apr/dist/Makefile.win Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/Makefile.win Sun Jul 28 05:06:53 2013 (r253730) @@ -25,7 +25,7 @@ # # For example; # -# nmake -f Makefile.win PREFIX=C:\APR buildall checkall installall clean +# nmake -f Makefile.win PREFIX=C:\APR buildall checkall install clean # !IF EXIST("apr.sln") && ([devenv /help > NUL 2>&1] == 0) \ Modified: vendor/apr/dist/apr.spec ============================================================================== --- vendor/apr/dist/apr.spec Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/apr.spec Sun Jul 28 05:06:53 2013 (r253730) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime library Name: apr -Version: 1.4.6 +Version: 1.4.8 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: vendor/apr/dist/atomic/unix/ia32.c ============================================================================== --- vendor/apr/dist/atomic/unix/ia32.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/ia32.c Sun Jul 28 05:06:53 2013 (r253730) @@ -117,7 +117,7 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo #elif APR_SIZEOF_VOIDP == 8 asm volatile ("xchgq %q2, %1" : "=a" (prev), "+m" (*mem) - : "r" ((unsigned long)with)); + : "0" (with)); #else #error APR_SIZEOF_VOIDP value not supported #endif Modified: vendor/apr/dist/atomic/unix/ppc.c ============================================================================== --- vendor/apr/dist/atomic/unix/ppc.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/ppc.c Sun Jul 28 05:06:53 2013 (r253730) @@ -19,7 +19,7 @@ #ifdef USE_ATOMICS_PPC #ifdef PPC405_ERRATA -# define PPC405_ERR77_SYNC " sync\n" +# define PPC405_ERR77_SYNC " sync\n" #else # define PPC405_ERR77_SYNC #endif @@ -43,12 +43,12 @@ APR_DECLARE(apr_uint32_t) apr_atomic_add { apr_uint32_t prev, temp; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%3\n" /* load and reserve */ - " add %1,%0,%4\n" /* add val and prev */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %1,0,%3\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%3\n" /* load and reserve */ + " add %1,%0,%4\n" /* add val and prev */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %1,0,%3\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&r" (prev), "=&r" (temp), "=m" (*mem) : "b" (mem), "r" (val) : "cc", "memory"); @@ -60,12 +60,12 @@ APR_DECLARE(void) apr_atomic_sub32(volat { apr_uint32_t temp; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " subf %0,%3,%0\n" /* subtract val */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " subf %0,%3,%0\n" /* subtract val */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&r" (temp), "=m" (*mem) : "b" (mem), "r" (val) : "cc", "memory"); @@ -75,13 +75,13 @@ APR_DECLARE(apr_uint32_t) apr_atomic_inc { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " addi %0,%0,1\n" /* add immediate */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " subi %0,%0,1\n" /* return old value */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " addi %0,%0,1\n" /* add immediate */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " subi %0,%0,1\n" /* return old value */ : "=&b" (prev), "=m" (*mem) : "b" (mem), "m" (*mem) : "cc", "memory"); @@ -93,12 +93,12 @@ APR_DECLARE(int) apr_atomic_dec32(volati { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%2\n" /* load and reserve */ - " subi %0,%0,1\n" /* subtract immediate */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %0,0,%2\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%2\n" /* load and reserve */ + " subi %0,%0,1\n" /* subtract immediate */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %0,0,%2\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ : "=&b" (prev), "=m" (*mem) : "b" (mem), "m" (*mem) : "cc", "memory"); @@ -111,14 +111,14 @@ APR_DECLARE(apr_uint32_t) apr_atomic_cas { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - " cmpw %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + " cmpw %0,%3\n" /* compare operands */ + " bne- exit_%=\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "exit_%=:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); @@ -130,11 +130,11 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xch { apr_uint32_t prev; - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=" /* loop if lost */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b" /* loop if lost */ : "=&r" (prev) : "b" (mem), "r" (val) : "cc", "memory"); @@ -146,26 +146,26 @@ APR_DECLARE(void*) apr_atomic_casptr(vol { void *prev; #if APR_SIZEOF_VOIDP == 4 - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - " cmpw %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + " cmpw %0,%3\n" /* compare operands */ + " bne- 2f\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "2:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile ("loop_%=:\n" /* lost reservation */ - " ldarx %0,0,%1\n" /* load and reserve */ - " cmpd %0,%3\n" /* compare operands */ - " bne- exit_%=\n" /* skip if not equal */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stdcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - "exit_%=:\n" /* not equal */ + asm volatile ("1:\n" /* lost reservation */ + " ldarx %0,0,%1\n" /* load and reserve */ + " cmpd %0,%3\n" /* compare operands */ + " bne- 2f\n" /* skip if not equal */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stdcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + "2:\n" /* not equal */ : "=&r" (prev) : "b" (mem), "r" (with), "r" (cmp) : "cc", "memory"); @@ -179,22 +179,22 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo { void *prev; #if APR_SIZEOF_VOIDP == 4 - asm volatile ("loop_%=:\n" /* lost reservation */ - " lwarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stwcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " isync\n" /* memory barrier */ + asm volatile ("1:\n" /* lost reservation */ + " lwarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stwcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " isync\n" /* memory barrier */ : "=&r" (prev) : "b" (mem), "r" (with) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile ("loop_%=:\n" /* lost reservation */ - " ldarx %0,0,%1\n" /* load and reserve */ - PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ - " stdcx. %2,0,%1\n" /* store new value */ - " bne- loop_%=\n" /* loop if lost */ - " isync\n" /* memory barrier */ + asm volatile ("1:\n" /* lost reservation */ + " ldarx %0,0,%1\n" /* load and reserve */ + PPC405_ERR77_SYNC /* ppc405 Erratum 77 */ + " stdcx. %2,0,%1\n" /* store new value */ + " bne- 1b\n" /* loop if lost */ + " isync\n" /* memory barrier */ : "=&r" (prev) : "b" (mem), "r" (with) : "cc", "memory"); Modified: vendor/apr/dist/atomic/unix/s390.c ============================================================================== --- vendor/apr/dist/atomic/unix/s390.c Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/atomic/unix/s390.c Sun Jul 28 05:06:53 2013 (r253730) @@ -38,10 +38,10 @@ static APR_INLINE apr_uint32_t atomic_ad apr_uint32_t prev = *mem, temp; asm volatile ("loop_%=:\n" - " lr %1,%0\n" - " alr %1,%3\n" - " cs %0,%1,%2\n" - " jl loop_%=\n" + " lr %1,%0\n" + " alr %1,%3\n" + " cs %0,%1,%2\n" + " jl loop_%=\n" : "+d" (prev), "+d" (temp), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -64,10 +64,10 @@ static APR_INLINE apr_uint32_t atomic_su apr_uint32_t prev = *mem, temp; asm volatile ("loop_%=:\n" - " lr %1,%0\n" - " slr %1,%3\n" - " cs %0,%1,%2\n" - " jl loop_%=\n" + " lr %1,%0\n" + " slr %1,%3\n" + " cs %0,%1,%2\n" + " jl loop_%=\n" : "+d" (prev), "+d" (temp), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -88,7 +88,7 @@ APR_DECLARE(int) apr_atomic_dec32(volati APR_DECLARE(apr_uint32_t) apr_atomic_cas32(volatile apr_uint32_t *mem, apr_uint32_t with, apr_uint32_t cmp) { - asm volatile (" cs %0,%2,%1\n" + asm volatile (" cs %0,%2,%1\n" : "+d" (cmp), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); @@ -101,8 +101,8 @@ APR_DECLARE(apr_uint32_t) apr_atomic_xch apr_uint32_t prev = *mem; asm volatile ("loop_%=:\n" - " cs %0,%2,%1\n" - " jl loop_%=\n" + " cs %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (val), "m" (*mem) : "cc", "memory"); @@ -114,12 +114,12 @@ APR_DECLARE(void*) apr_atomic_casptr(vol { void *prev = (void *) cmp; #if APR_SIZEOF_VOIDP == 4 - asm volatile (" cs %0,%2,%1\n" + asm volatile (" cs %0,%2,%1\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 - asm volatile (" csg %0,%2,%1\n" + asm volatile (" csg %0,%2,%1\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); @@ -134,15 +134,15 @@ APR_DECLARE(void*) apr_atomic_xchgptr(vo void *prev = (void *) *mem; #if APR_SIZEOF_VOIDP == 4 asm volatile ("loop_%=:\n" - " cs %0,%2,%1\n" - " jl loop_%=\n" + " cs %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); #elif APR_SIZEOF_VOIDP == 8 asm volatile ("loop_%=:\n" - " csg %0,%2,%1\n" - " jl loop_%=\n" + " csg %0,%2,%1\n" + " jl loop_%=\n" : "+d" (prev), "=Q" (*mem) : "d" (with), "m" (*mem) : "cc", "memory"); Modified: vendor/apr/dist/configure ============================================================================== --- vendor/apr/dist/configure Sun Jul 28 05:05:09 2013 (r253729) +++ vendor/apr/dist/configure Sun Jul 28 05:06:53 2013 (r253730) @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -220,21 +244,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -336,6 +364,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -457,6 +493,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -491,16 +531,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -512,28 +552,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1371,8 +1391,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1642,9 +1660,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1917,7 +1935,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2074,7 +2092,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2090,7 +2109,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2116,7 +2136,8 @@ int main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2132,7 +2153,8 @@ int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2166,7 +2188,8 @@ int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2342,7 +2365,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3192,14 +3215,6 @@ ac_configure="$SHELL $ac_aux_dir/configu # _LT_LANG - -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_GO. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ -#m4_defun #m4_ifndef @@ -5069,7 +5084,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5109,7 +5124,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5162,7 +5177,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5203,7 +5218,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -5261,7 +5276,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5305,7 +5320,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5751,8 +5766,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -5860,7 +5874,7 @@ do for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -6444,83 +6458,12 @@ if test "x$apr_preload_done" != "xyes" ; ;; *-linux*) - case `uname -r` in - 2.* ) - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX=2\"" - CPPFLAGS="-DLINUX=2" - else - apr_addto_bugger="-DLINUX=2" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - 1.* ) - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX=1\"" - CPPFLAGS="-DLINUX=1" - else - apr_addto_bugger="-DLINUX=1" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - * ) - ;; - esac - - if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_REENTRANT -D_GNU_SOURCE\"" - CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE" - else - apr_addto_bugger="-D_REENTRANT -D_GNU_SOURCE" - for i in $apr_addto_bugger; do - apr_addto_duplicate="0" - for j in $CPPFLAGS; do - if test "x$i" = "x$j"; then - apr_addto_duplicate="1" - break - fi - done - if test $apr_addto_duplicate = "0"; then - test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" - CPPFLAGS="$CPPFLAGS $i" - fi - done - fi - - ;; - *-GNU*) if test "x$CPPFLAGS" = "x"; then - test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DHURD -D_GNU_SOURCE\"" - CPPFLAGS="-DHURD -D_GNU_SOURCE" + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DLINUX -D_REENTRANT -D_GNU_SOURCE\"" + CPPFLAGS="-DLINUX -D_REENTRANT -D_GNU_SOURCE" else - apr_addto_bugger="-DHURD -D_GNU_SOURCE" + apr_addto_bugger="-DLINUX -D_REENTRANT -D_GNU_SOURCE" for i in $apr_addto_bugger; do apr_addto_duplicate="0" for j in $CPPFLAGS; do @@ -6770,6 +6713,29 @@ if test "x$apr_preload_done" != "xyes" ; fi ;; + *-gnu*|*-GNU*) + + if test "x$CPPFLAGS" = "x"; then + test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-D_REENTRANT -D_GNU_SOURCE -DHURD\"" + CPPFLAGS="-D_REENTRANT -D_GNU_SOURCE -DHURD" + else + apr_addto_bugger="-D_REENTRANT -D_GNU_SOURCE -DHURD" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $CPPFLAGS; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to CPPFLAGS" + CPPFLAGS="$CPPFLAGS $i" + fi + done + fi + + ;; *-next-nextstep*) if test -z "$CFLAGS"; then @@ -6898,7 +6864,7 @@ if test "x$apr_preload_done" != "xyes" ; fi # See issue 34332 ;; - *-apple-darwin1[01].*) + *-apple-darwin1?.*) if test "x$CPPFLAGS" = "x"; then test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN_10\"" @@ -9512,7 +9478,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9564,7 +9530,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9604,7 +9570,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9676,7 +9642,7 @@ case $as_dir/ in #(( # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -9748,7 +9714,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RM="rm" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9785,7 +9751,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9822,7 +9788,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ASCPP="cpp" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9860,7 +9826,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9900,7 +9866,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9955,7 +9921,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -10021,7 +9987,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -10228,8 +10194,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -10421,7 +10387,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:07:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 057D2168; Sun, 28 Jul 2013 05:07:12 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE96420FF; Sun, 28 Jul 2013 05:07:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S57Bgu092954; Sun, 28 Jul 2013 05:07:11 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S57BFi092953; Sun, 28 Jul 2013 05:07:11 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280507.r6S57BFi092953@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:07:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253731 - vendor/apr/apr-1.4.8 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:07:12 -0000 Author: peter Date: Sun Jul 28 05:07:11 2013 New Revision: 253731 URL: http://svnweb.freebsd.org/changeset/base/253731 Log: Tag apr-1.4.8 Added: vendor/apr/apr-1.4.8/ - copied from r253730, vendor/apr/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:14:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F143A33A; Sun, 28 Jul 2013 05:14:56 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DAA3F2126; Sun, 28 Jul 2013 05:14:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S5EulH097732; Sun, 28 Jul 2013 05:14:56 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S5EsA7097707; Sun, 28 Jul 2013 05:14:54 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280514.r6S5EsA7097707@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:14:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253732 - in vendor/apr-util: . dist dist/buckets dist/crypto dist/dbd dist/dbm dist/hooks dist/include dist/include/private dist/ldap dist/memcache dist/misc dist/test dist/uri X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:14:57 -0000 Author: peter Date: Sun Jul 28 05:14:54 2013 New Revision: 253732 URL: http://svnweb.freebsd.org/changeset/base/253732 Log: Import Apache apr-util-1.5.2 into vendor staging area. Added: vendor/apr-util/dist/crypto/apr_passwd.c vendor/apr-util/dist/crypto/crypt_blowfish.c vendor/apr-util/dist/crypto/crypt_blowfish.h Deleted: vendor/apr-util/dist/aprutil.dsp vendor/apr-util/dist/crypto/apr_crypto_nss.dsp vendor/apr-util/dist/crypto/apr_crypto_openssl.dsp vendor/apr-util/dist/dbd/apr_dbd_freetds.dsp vendor/apr-util/dist/dbd/apr_dbd_mysql.dsp vendor/apr-util/dist/dbd/apr_dbd_odbc.dsp vendor/apr-util/dist/dbd/apr_dbd_oracle.dsp vendor/apr-util/dist/dbd/apr_dbd_pgsql.dsp vendor/apr-util/dist/dbd/apr_dbd_sqlite2.dsp vendor/apr-util/dist/dbd/apr_dbd_sqlite3.dsp vendor/apr-util/dist/dbm/apr_dbm_db.dsp vendor/apr-util/dist/dbm/apr_dbm_gdbm.dsp vendor/apr-util/dist/ldap/apr_ldap.dsp vendor/apr-util/dist/libaprutil.dsp vendor/apr-util/dist/test/testutildll.dsp vendor/apr-util/dist/test/testutillib.dsp Modified: vendor/apr-util/FREEBSD-Xlist vendor/apr-util/dist/CHANGES vendor/apr-util/dist/Makefile.win vendor/apr-util/dist/NWGNUmakefile vendor/apr-util/dist/apr-util.spec vendor/apr-util/dist/buckets/apr_brigade.c vendor/apr-util/dist/buckets/apr_buckets_alloc.c vendor/apr-util/dist/build-outputs.mk vendor/apr-util/dist/build.conf vendor/apr-util/dist/configure vendor/apr-util/dist/configure.in vendor/apr-util/dist/crypto/apr_crypto.c vendor/apr-util/dist/crypto/apr_crypto_nss.c vendor/apr-util/dist/crypto/apr_crypto_openssl.c vendor/apr-util/dist/crypto/apr_md5.c vendor/apr-util/dist/dbd/NWGNUdbdmysql vendor/apr-util/dist/dbd/apr_dbd_freetds.c vendor/apr-util/dist/dbd/apr_dbd_mysql.c vendor/apr-util/dist/dbd/apr_dbd_pgsql.c vendor/apr-util/dist/dbd/apr_dbd_sqlite2.c vendor/apr-util/dist/hooks/apr_hooks.c vendor/apr-util/dist/include/apr_base64.h vendor/apr-util/dist/include/apr_buckets.h vendor/apr-util/dist/include/apr_md5.h vendor/apr-util/dist/include/apr_queue.h vendor/apr-util/dist/include/apu.h.in vendor/apr-util/dist/include/apu_version.h vendor/apr-util/dist/include/private/apr_crypto_internal.h vendor/apr-util/dist/memcache/apr_memcache.c vendor/apr-util/dist/misc/apr_thread_pool.c vendor/apr-util/dist/test/Makefile.in vendor/apr-util/dist/test/Makefile.win vendor/apr-util/dist/test/NWGNUmakefile vendor/apr-util/dist/test/testbuckets.c vendor/apr-util/dist/test/testmd5.c vendor/apr-util/dist/test/testmemcache.c vendor/apr-util/dist/test/testpass.c vendor/apr-util/dist/test/testuri.c vendor/apr-util/dist/test/testutil.c vendor/apr-util/dist/test/testutil.h vendor/apr-util/dist/uri/apr_uri.c Modified: vendor/apr-util/FREEBSD-Xlist ============================================================================== --- vendor/apr-util/FREEBSD-Xlist Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/FREEBSD-Xlist Sun Jul 28 05:14:54 2013 (r253732) @@ -1,2 +1,5 @@ build xml/expat +*.mak +*.dep +*.dsp Modified: vendor/apr-util/dist/CHANGES ============================================================================== --- vendor/apr-util/dist/CHANGES Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/CHANGES Sun Jul 28 05:14:54 2013 (r253732) @@ -1,45 +1,100 @@ -*- coding: utf-8 -*- -Changes with APR-Util 1.4.1 +Changes with APR-util 1.5.2 - *) Apply Windows build fixes for the apr_crypto API. [Mladen Turk] + *) Windows: Add command line makefiles. [Gregg Smith] -Changes with APR-util 1.4.0 + *) apr_uri_parse(): Do not accept invalid characters in the scheme. + Per RFC 3986 3.3, enforce that the first segment of a relative path does + not contain a colon. PR 52479. [Stefan Fritsch] - *) apr_ldap_init: Pass secure=1 to ldapssl_init() with Solaris LDAP SDK. - PR: 42682 [Stefan Fritsch] + *) Fix memory leak in hook sorting function. PR 51256. + [] - *) apr_memcache_server_create: Fix possible segfault. PR 51064. - [Michajlo Matijkiw ] + *) Speedup md5 calculation by avoiding some copying on little endian + architectures. PR 49011. [Stefan Fritsch, Stefan Fuhrmann + ] - *) apr_thread_pool: Fix thread unsafe pool usage. [Stefan Fritsch] + *) Use heap memory for crypt in apr_password_validate(), to reduce stack + usage. PR 54572. [Stefan Fritsch] - *) Do not include apr.h and apr_errno.h from system search path in - apu_errno.h. PR 46487 [Rainer Jung] + *) Fix password validation failure for all crypt and crypt_r based + algorithms. PR 54603. [Harvey Eneman ] - *) Add optional dbm, openssl and nss subpackages to the RPM spec file. - [Graham Leggett] + *) Fix syntax error in crypto/apr_passwd.c on non-glibc systems. PR 54275. + [Stefan Fritsch] - *) apr_dbd_freetds: The sybdb.h header file might be freetds/sybdb.h - or sybdb.h. [Graham Leggett] + *) Fix potential data corruption in apr_brigade_write() and friends if + the last bucket of the brigade is a heap bucket that has been split, + and there are still references to the next part of the original bucket + in use. [Stefan Fritsch] - *) Add apr_crypto implementations for OpenSSL and Mozilla NSS. Add a unit - test to verify the interoperability of the two modules. Builds default - to disabled unless explicitly enabled. - [Graham Leggett] + *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe + Jaillet ] - *) Add the apr_crypto interface, a rewrite of the earlier apr_ssl code, - based on the modular dso interface used for dbd and ldap. Initially, - the interface supports symmetrical encryption and decryption. The - purpose of the interface is to offer portable and interoperable - access to basic crypto using the native crypto libraries present on - each platform. [Graham Leggett] + *) apr_crypto: If --with-crypto is passed to configure but no crypto + libraries are enabled, autodetect available libraries. [Jeff Trawick] - *) Add trace probes to hooks, making it easier to inspect APR Hook based - applications with DTrace or other such mechanisms. - [Theo Schlossnagle , generalized by Jeff Trawick] + *) memcache: Fix dead server retry logic. [Gavin Shelley ] - *) Implement resource list when threads are unavailable. PR 24325 - [Bojan Smojver] +Changes with APR-util 1.5.1 + + *) testmemcache: Fix crash. PR 52705. [Peter Poeml ] + + *) MinGW: Support shared builds of apr-util when apr is shared. + PR 46175. [Carlo Bramini , Jeff Trawick] + + *) Add support for Berkeley DB 5.2 and 5.3. Simplify detection script. + PR 53684. [Rainer Jung] + + *) configure: Allow to specify library specific custom linker flags + via the LDADD_XXX variables. [Rainer Jung] + + *) apr_password_validate(): Fix intermittent errors on systems + such as FreeBSD where the crypt() function is used. + (Broken only in 1.5.0) [Jeff Trawick] + + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] + +Changes with APR-util 1.5.0 + + *) dbd_pgsql_escape: Use PQescapeStringConn. [Nick Kew] + + *) apr_password_validate, apr_bcrypt_encode: Add support for bcrypt encoded + passwords. The bcrypt implementation uses code from crypt_blowfish + written by Solar Designer . apr_bcrypt_encode creates + hashes with "$2y$" prefix, but apr_password_validate also accepts the old + prefix "$2a$". PR 49288. [Stefan Fritsch] + + *) APR dbd: Allow to use apr_dbd_get_row() with a different pool than + apr_dbd_select(). PR 53533. [] + + *) APR dbd FreeTDS support: Fix spurious API errors caused by uninitialized + fields. [TROY.LIU åŠ‰æ˜¥å‰ ] + + *) apr_password_validate: Increase maximum hash string length to allow + more than 9999 rounds with sha512-crypt. PR 53410. [Stefan Fritsch] + + *) Fix segfaults in crypt() and crypt_r() failure modes. + PR 47272. [Arkadiusz Miskiewicz ] + + *) apr_crypto: Ensure that the if/else that governs the static + initialisation of each crypto driver works when the first driver + isn't in use. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when a statically + compiled library is initialised for the first time. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when the library + has already been loaded. Fix ported from apr_dbd. [Graham Leggett] + + *) apr_crypto: Move the static initialisation of DRIVER_LOAD from + apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose + the parameters. [Graham Leggett] + +Changes with APR-util 1.4.x and later: + + *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?view=markup Changes for APR-util 1.3.x and later: Modified: vendor/apr-util/dist/Makefile.win ============================================================================== --- vendor/apr-util/dist/Makefile.win Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/Makefile.win Sun Jul 28 05:14:54 2013 (r253732) @@ -7,7 +7,7 @@ # install - compile everything # clean - mop up everything # -# You can override the build mechansim, choose only one; +# You can override the build mechanism, choose only one; # # USEMAK=1 - compile from exported make files # USEDSW=1 - compile from .dsw / .dsp VC6 projects Modified: vendor/apr-util/dist/NWGNUmakefile ============================================================================== --- vendor/apr-util/dist/NWGNUmakefile Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/NWGNUmakefile Sun Jul 28 05:14:54 2013 (r253732) @@ -259,6 +259,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_md4.o \ $(OBJDIR)/apr_md5.o \ $(OBJDIR)/apr_memcache.o \ + $(OBJDIR)/apr_passwd.o \ $(OBJDIR)/apr_queue.o \ $(OBJDIR)/apr_reslist.o \ $(OBJDIR)/apr_rmm.o \ @@ -269,6 +270,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_strmatch.o \ $(OBJDIR)/apr_thread_pool.o \ $(OBJDIR)/apr_uri.o \ + $(OBJDIR)/crypt_blowfish.o \ $(OBJDIR)/sdbm.o \ $(OBJDIR)/sdbm_hash.o \ $(OBJDIR)/sdbm_lock.o \ Modified: vendor/apr-util/dist/apr-util.spec ============================================================================== --- vendor/apr-util/dist/apr-util.spec Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/apr-util.spec Sun Jul 28 05:14:54 2013 (r253732) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.4.1 +Version: 1.5.2 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: vendor/apr-util/dist/buckets/apr_brigade.c ============================================================================== --- vendor/apr-util/dist/buckets/apr_brigade.c Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/buckets/apr_brigade.c Sun Jul 28 05:14:54 2013 (r253732) @@ -391,17 +391,30 @@ APU_DECLARE(apr_status_t) apr_brigade_vp void *ctx, va_list va) { +#define MAX_VECS 8 + struct iovec vec[MAX_VECS]; + apr_size_t i = 0; + for (;;) { - const char *str = va_arg(va, const char *); + char *str = va_arg(va, char *); apr_status_t rv; if (str == NULL) break; - rv = apr_brigade_write(b, flush, ctx, str, strlen(str)); - if (rv != APR_SUCCESS) - return rv; + vec[i].iov_base = str; + vec[i].iov_len = strlen(str); + i++; + + if (i == MAX_VECS) { + rv = apr_brigade_writev(b, flush, ctx, vec, i); + if (rv != APR_SUCCESS) + return rv; + i = 0; + } } + if (i != 0) + return apr_brigade_writev(b, flush, ctx, vec, i); return APR_SUCCESS; } @@ -422,7 +435,12 @@ APU_DECLARE(apr_status_t) apr_brigade_wr apr_size_t remaining = APR_BUCKET_BUFF_SIZE; char *buf = NULL; - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + /* + * If the last bucket is a heap bucket and its buffer is not shared with + * another bucket, we may write into that bucket. + */ + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; /* HEAP bucket start offsets are always in-memory, safe to cast */ @@ -512,10 +530,11 @@ APU_DECLARE(apr_status_t) apr_brigade_wr i = 0; /* If there is a heap bucket at the end of the brigade - * already, copy into the existing bucket. + * already, and its refcount is 1, copy into the existing bucket. */ e = APR_BRIGADE_LAST(b); - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; apr_size_t remaining = h->alloc_len - (e->length + (apr_size_t)e->start); @@ -591,29 +610,7 @@ APU_DECLARE(apr_status_t) apr_brigade_pu apr_brigade_flush flush, void *ctx, const char *str) { - apr_size_t len = strlen(str); - apr_bucket *bkt = APR_BRIGADE_LAST(bb); - if (!APR_BRIGADE_EMPTY(bb) && APR_BUCKET_IS_HEAP(bkt)) { - /* If there is enough space available in a heap bucket - * at the end of the brigade, copy the string directly - * into the heap bucket - */ - apr_bucket_heap *h = bkt->data; - apr_size_t bytes_avail = h->alloc_len - bkt->length; - - if (bytes_avail >= len) { - char *buf = h->base + bkt->start + bkt->length; - memcpy(buf, str, len); - bkt->length += len; - return APR_SUCCESS; - } - } - - /* If the string could not be copied into an existing heap - * bucket, delegate the work to apr_brigade_write(), which - * knows how to grow the brigade - */ - return apr_brigade_write(bb, flush, ctx, str, len); + return apr_brigade_write(bb, flush, ctx, str, strlen(str)); } APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b, Modified: vendor/apr-util/dist/buckets/apr_buckets_alloc.c ============================================================================== --- vendor/apr-util/dist/buckets/apr_buckets_alloc.c Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/buckets/apr_buckets_alloc.c Sun Jul 28 05:14:54 2013 (r253732) @@ -65,12 +65,20 @@ APU_DECLARE_NONSTD(apr_bucket_alloc_t *) /* may be NULL for debug mode. */ if (allocator == NULL) { if (apr_allocator_create(&allocator) != APR_SUCCESS) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); abort(); } } #endif - list = apr_bucket_alloc_create_ex(allocator); + if (list == NULL) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); + abort(); + } list->pool = p; apr_pool_cleanup_register(list->pool, list, alloc_cleanup, apr_pool_cleanup_null); @@ -131,6 +139,7 @@ APU_DECLARE_NONSTD(void *) apr_bucket_al if (endp >= active->endp) { list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT); if (!list->blocks) { + list->blocks = active; return NULL; } list->blocks->next = active; Modified: vendor/apr-util/dist/build-outputs.mk ============================================================================== --- vendor/apr-util/dist/build-outputs.mk Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/build-outputs.mk Sun Jul 28 05:14:54 2013 (r253732) @@ -15,8 +15,10 @@ buckets/apr_buckets_simple.lo: buckets/a buckets/apr_buckets_socket.lo: buckets/apr_buckets_socket.c .make.dirs include/apr_buckets.h crypto/apr_crypto.lo: crypto/apr_crypto.c .make.dirs include/apr_crypto.h include/apu_errno.h include/apu_version.h include/private/apr_crypto_internal.h include/private/apu_internal.h crypto/apr_md4.lo: crypto/apr_md4.c .make.dirs include/apr_md4.h include/apr_xlate.h -crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h +crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_xlate.h +crypto/apr_passwd.lo: crypto/apr_passwd.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h crypto/apr_sha1.lo: crypto/apr_sha1.c .make.dirs include/apr_base64.h include/apr_sha1.h include/apr_xlate.h +crypto/crypt_blowfish.lo: crypto/crypt_blowfish.c .make.dirs crypto/getuuid.lo: crypto/getuuid.c .make.dirs include/apr_md5.h include/apr_uuid.h include/apr_xlate.h crypto/uuid.lo: crypto/uuid.c .make.dirs include/apr_uuid.h dbd/apr_dbd.lo: dbd/apr_dbd.c .make.dirs include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apu_internal.h @@ -43,7 +45,7 @@ uri/apr_uri.lo: uri/apr_uri.c .make.dirs xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xlate.h include/apr_xml.h -OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo +OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo OBJECTS_unix = $(OBJECTS_all) Modified: vendor/apr-util/dist/build.conf ============================================================================== --- vendor/apr-util/dist/build.conf Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/build.conf Sun Jul 28 05:14:54 2013 (r253732) @@ -10,9 +10,11 @@ paths = crypto/apr_crypto.c crypto/apr_md4.c crypto/apr_md5.c + crypto/apr_passwd.c crypto/apr_sha1.c crypto/getuuid.c crypto/uuid.c + crypto/crypt_blowfish.c dbm/apr_dbm_sdbm.c dbm/apr_dbm.c dbm/sdbm/*.c Modified: vendor/apr-util/dist/configure ============================================================================== --- vendor/apr-util/dist/configure Sun Jul 28 05:07:11 2013 (r253731) +++ vendor/apr-util/dist/configure Sun Jul 28 05:14:54 2013 (r253732) @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -212,21 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -328,6 +356,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1245,8 +1265,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1422,7 +1440,8 @@ Optional Packages: --with-ldap-lib=path path to ldap lib file --with-ldap=library ldap library to use --with-dbm=DBM choose the DBM type to use. - DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50,db51} + DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X} + for some X=0,...,9 --with-gdbm=DIR enable GDBM support --with-ndbm=PATH Find the NDBM header and library in `PATH/include' and `PATH/lib'. If PATH is of the form `HEADER:LIB', @@ -1526,9 +1545,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1604,7 +1623,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1937,7 +1956,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2491,19 +2510,6 @@ ac_configure="$SHELL $ac_aux_dir/configu - - - - - - - - - - - - - rm -f config.nice cat >config.nice</dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2786,13 +2792,20 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Use -no-install to link the test programs on all platforms -# but Darwin, where it would cause the programs to be linked -# against installed versions of libapr instead of those just -# built. +# Use -no-install or -no-fast-install to link the test +# programs on all platforms but Darwin, where it would cause +# the programs to be linked against installed versions of +# libapr instead of those just built. case $host in -*-apple-darwin*) LT_NO_INSTALL="" ;; -*) LT_NO_INSTALL="-no-install" ;; + *-apple-darwin*) + LT_NO_INSTALL="" + ;; + *-mingw*) + LT_NO_INSTALL="-no-fast-install" + ;; + *) + LT_NO_INSTALL="-no-install" + ;; esac @@ -3060,7 +3073,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3100,7 +3113,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3153,7 +3166,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3194,7 +3207,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3252,7 +3265,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3296,7 +3309,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3742,8 +3755,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4480,7 +4492,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4546,7 +4558,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4725,6 +4737,8 @@ done apu_have_crypto=0 + apu_have_openssl=0 + apu_have_nss=0 old_libs="$LIBS" old_cppflags="$CPPFLAGS" @@ -4734,9 +4748,35 @@ done # Check whether --with-crypto was given. if test "${with_crypto+set}" = set; then : withval=$with_crypto; + cryptolibs="openssl nss" + if test "$withval" = "yes"; then - apu_have_openssl=0 + crypto_library_enabled=0 + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "" -a "$v" != "no"; then + crypto_library_enabled=1 + fi + done + + if test "$crypto_library_enabled" = "0"; then + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "no"; then + eval with_$cryptolib=yes + crypto_library_enabled=1 + fi + done + if test "$crypto_library_enabled" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5 +$as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;} + else + as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5 + fi + fi + + openssl_have_headers=0 openssl_have_libs=0 @@ -5196,7 +5236,27 @@ fi if test "$apu_have_openssl" = "1"; then + + if test "x$LDADD_crypto_openssl" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\"" LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto" + else + apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_openssl; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_openssl" + LDADD_crypto_openssl="$LDADD_crypto_openssl $i" + fi + done + fi + apu_have_crypto=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5 @@ -5243,8 +5303,6 @@ rm -f core conftest.err conftest.$ac_obj LDFLAGS="$old_ldflags" - apu_have_nss=0 - nss_have_headers=0 nss_have_libs=0 old_libs="$LIBS" @@ -5255,7 +5313,6 @@ rm -f core conftest.err conftest.$ac_obj # Check whether --with-nss was given. if test "${with_nss+set}" = set; then : withval=$with_nss; - if test "$withval" = "yes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -5276,7 +5333,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5319,7 +5376,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5401,7 +5458,35 @@ fi fi fi - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5409,11 +5494,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5493,7 +5579,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi elif test "$withval" = "no"; then @@ -5548,7 +5634,35 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5 $as_echo "$as_me: checking for nss in $withval" >&6;} - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5556,11 +5670,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5640,7 +5755,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi @@ -5679,7 +5794,27 @@ fi if test "$apu_have_nss" = "1"; then + + if test "x$LDADD_crypto_nss" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\"" LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3" + else + apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_nss; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_nss" + LDADD_crypto_nss="$LDADD_crypto_nss $i" + fi + done + fi + apu_have_crypto=1 fi @@ -5689,7 +5824,10 @@ fi CPPFLAGS="$old_cppflags" LDFLAGS="$old_ldflags" - fi + if test "$apu_have_crypto" = "0"; then + as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, etc." "$LINENO" 5 + fi + fi else @@ -5702,38 +5840,134 @@ fi - apu_have_openssl=0 - openssl_have_headers=0 - openssl_have_libs=0 - old_libs="$LIBS" - old_cppflags="$CPPFLAGS" - old_ldflags="$LDFLAGS" +echo $ac_n "${nl}checking for ldap support..." + +apu_has_ldap="0"; +apu_has_ldapssl_client_init="0" +apu_has_ldapssl_client_deinit="0" +apu_has_ldapssl_add_trusted_cert="0" +apu_has_ldap_start_tls_s="0" +apu_has_ldapssl_init="0" +apu_has_ldap_sslinit="0" +apu_has_ldapssl_install_routines="0" +apu_has_ldap_openldap="0" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 05:15:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0481B45F; Sun, 28 Jul 2013 05:15:39 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB875212A; Sun, 28 Jul 2013 05:15:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S5FcOh098058; Sun, 28 Jul 2013 05:15:38 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S5Fc38098057; Sun, 28 Jul 2013 05:15:38 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280515.r6S5Fc38098057@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 05:15:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253733 - vendor/apr-util/apr-util-1.5.2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 05:15:39 -0000 Author: peter Date: Sun Jul 28 05:15:38 2013 New Revision: 253733 URL: http://svnweb.freebsd.org/changeset/base/253733 Log: Tag apr-util-1.5.2 Added: vendor/apr-util/apr-util-1.5.2/ - copied from r253732, vendor/apr-util/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 06:02:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38630BF2; Sun, 28 Jul 2013 06:02:43 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2170D220E; Sun, 28 Jul 2013 06:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S62hOk024314; Sun, 28 Jul 2013 06:02:43 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S62fa7024296; Sun, 28 Jul 2013 06:02:41 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201307280602.r6S62fa7024296@svn.freebsd.org> From: Peter Wemm Date: Sun, 28 Jul 2013 06:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253734 - in head: contrib/apr contrib/apr-util contrib/apr-util/buckets contrib/apr-util/crypto contrib/apr-util/dbd contrib/apr-util/dbm contrib/apr-util/hooks contrib/apr-util/includ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 06:02:43 -0000 Author: peter Date: Sun Jul 28 06:02:40 2013 New Revision: 253734 URL: http://svnweb.freebsd.org/changeset/base/253734 Log: Update subversion-1.8.0 -> 1.8.1. Update supporting components: apr-1.4.6 -> 1.4.8 and apr-util-1.4.1 -> 1.5.2. This is a post point-zero bug-fix / fix-sharp-edges release, including some workarounds for UTF-8 for people who haven't yet turned on WITH_ICONV. Added: head/contrib/apr-util/crypto/apr_passwd.c - copied unchanged from r253733, vendor/apr-util/dist/crypto/apr_passwd.c head/contrib/apr-util/crypto/crypt_blowfish.c - copied unchanged from r253733, vendor/apr-util/dist/crypto/crypt_blowfish.c head/contrib/apr-util/crypto/crypt_blowfish.h - copied unchanged from r253733, vendor/apr-util/dist/crypto/crypt_blowfish.h Deleted: head/contrib/apr-util/aprutil.dsp head/contrib/apr-util/crypto/apr_crypto_nss.dsp head/contrib/apr-util/crypto/apr_crypto_openssl.dsp head/contrib/apr-util/dbd/apr_dbd_freetds.dsp head/contrib/apr-util/dbd/apr_dbd_mysql.dsp head/contrib/apr-util/dbd/apr_dbd_odbc.dsp head/contrib/apr-util/dbd/apr_dbd_oracle.dsp head/contrib/apr-util/dbd/apr_dbd_pgsql.dsp head/contrib/apr-util/dbd/apr_dbd_sqlite2.dsp head/contrib/apr-util/dbd/apr_dbd_sqlite3.dsp head/contrib/apr-util/dbm/apr_dbm_db.dsp head/contrib/apr-util/dbm/apr_dbm_gdbm.dsp head/contrib/apr-util/ldap/apr_ldap.dsp head/contrib/apr-util/libaprutil.dsp head/contrib/apr-util/test/testutildll.dsp head/contrib/apr-util/test/testutillib.dsp Modified: head/contrib/apr-util/CHANGES head/contrib/apr-util/Makefile.win head/contrib/apr-util/NWGNUmakefile head/contrib/apr-util/apr-util.spec head/contrib/apr-util/buckets/apr_brigade.c head/contrib/apr-util/buckets/apr_buckets_alloc.c head/contrib/apr-util/build-outputs.mk head/contrib/apr-util/build.conf head/contrib/apr-util/configure head/contrib/apr-util/configure.in head/contrib/apr-util/crypto/apr_crypto.c head/contrib/apr-util/crypto/apr_crypto_nss.c head/contrib/apr-util/crypto/apr_crypto_openssl.c head/contrib/apr-util/crypto/apr_md5.c head/contrib/apr-util/dbd/NWGNUdbdmysql head/contrib/apr-util/dbd/apr_dbd_freetds.c head/contrib/apr-util/dbd/apr_dbd_mysql.c head/contrib/apr-util/dbd/apr_dbd_pgsql.c head/contrib/apr-util/dbd/apr_dbd_sqlite2.c head/contrib/apr-util/hooks/apr_hooks.c head/contrib/apr-util/include/apr_base64.h head/contrib/apr-util/include/apr_buckets.h head/contrib/apr-util/include/apr_md5.h head/contrib/apr-util/include/apr_queue.h head/contrib/apr-util/include/apu.h.in head/contrib/apr-util/include/apu_version.h head/contrib/apr-util/include/private/apr_crypto_internal.h head/contrib/apr-util/memcache/apr_memcache.c head/contrib/apr-util/misc/apr_thread_pool.c head/contrib/apr-util/test/Makefile.in head/contrib/apr-util/test/Makefile.win head/contrib/apr-util/test/NWGNUmakefile head/contrib/apr-util/test/testbuckets.c head/contrib/apr-util/test/testmd5.c head/contrib/apr-util/test/testmemcache.c head/contrib/apr-util/test/testpass.c head/contrib/apr-util/test/testuri.c head/contrib/apr-util/test/testutil.c head/contrib/apr-util/test/testutil.h head/contrib/apr-util/uri/apr_uri.c head/contrib/apr/CHANGES head/contrib/apr/Makefile.win head/contrib/apr/apr.spec head/contrib/apr/atomic/unix/ia32.c head/contrib/apr/atomic/unix/ppc.c head/contrib/apr/atomic/unix/s390.c head/contrib/apr/configure head/contrib/apr/docs/pool-design.html head/contrib/apr/file_io/unix/seek.c head/contrib/apr/include/apr.hw head/contrib/apr/include/apr_allocator.h head/contrib/apr/include/apr_general.h head/contrib/apr/include/apr_network_io.h head/contrib/apr/include/apr_pools.h head/contrib/apr/include/apr_strings.h head/contrib/apr/include/apr_thread_proc.h head/contrib/apr/include/apr_version.h head/contrib/apr/libapr.rc head/contrib/apr/network_io/unix/multicast.c head/contrib/apr/network_io/unix/sendrecv.c head/contrib/apr/network_io/unix/sockaddr.c head/contrib/apr/network_io/unix/sockopt.c head/contrib/apr/random/unix/sha2.c head/contrib/apr/random/unix/sha2.h head/contrib/apr/random/unix/sha2_glue.c head/contrib/apr/tables/apr_tables.c head/contrib/apr/threadproc/unix/thread.c head/contrib/subversion/CHANGES head/contrib/subversion/Makefile.in head/contrib/subversion/build-outputs.mk head/contrib/subversion/configure head/contrib/subversion/configure.ac head/contrib/subversion/get-deps.sh head/contrib/subversion/subversion/include/private/svn_client_private.h head/contrib/subversion/subversion/include/private/svn_io_private.h head/contrib/subversion/subversion/include/private/svn_ra_private.h head/contrib/subversion/subversion/include/svn_version.h head/contrib/subversion/subversion/libsvn_client/client.h head/contrib/subversion/subversion/libsvn_client/commit.c head/contrib/subversion/subversion/libsvn_client/copy.c head/contrib/subversion/subversion/libsvn_client/diff.c head/contrib/subversion/subversion/libsvn_client/diff_local.c head/contrib/subversion/subversion/libsvn_client/log.c head/contrib/subversion/subversion/libsvn_client/merge.c head/contrib/subversion/subversion/libsvn_client/mergeinfo.c head/contrib/subversion/subversion/libsvn_client/ra.c head/contrib/subversion/subversion/libsvn_client/switch.c head/contrib/subversion/subversion/libsvn_delta/compat.c head/contrib/subversion/subversion/libsvn_fs_base/bdb/env.c head/contrib/subversion/subversion/libsvn_fs_base/tree.c head/contrib/subversion/subversion/libsvn_fs_fs/fs_fs.c head/contrib/subversion/subversion/libsvn_fs_fs/rep-cache-db.h head/contrib/subversion/subversion/libsvn_fs_fs/tree.c head/contrib/subversion/subversion/libsvn_ra/ra_loader.c head/contrib/subversion/subversion/libsvn_ra/util.c head/contrib/subversion/subversion/libsvn_ra_serf/blame.c head/contrib/subversion/subversion/libsvn_ra_serf/commit.c head/contrib/subversion/subversion/libsvn_ra_serf/getdate.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocations.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocationsegments.c head/contrib/subversion/subversion/libsvn_ra_serf/getlocks.c head/contrib/subversion/subversion/libsvn_ra_serf/inherited_props.c head/contrib/subversion/subversion/libsvn_ra_serf/log.c head/contrib/subversion/subversion/libsvn_ra_serf/mergeinfo.c head/contrib/subversion/subversion/libsvn_ra_serf/options.c head/contrib/subversion/subversion/libsvn_ra_serf/property.c head/contrib/subversion/subversion/libsvn_ra_serf/ra_serf.h head/contrib/subversion/subversion/libsvn_ra_serf/replay.c head/contrib/subversion/subversion/libsvn_ra_serf/serf.c head/contrib/subversion/subversion/libsvn_ra_serf/update.c head/contrib/subversion/subversion/libsvn_ra_serf/util.c head/contrib/subversion/subversion/libsvn_ra_serf/xml.c head/contrib/subversion/subversion/libsvn_ra_svn/client.c head/contrib/subversion/subversion/libsvn_ra_svn/protocol head/contrib/subversion/subversion/libsvn_repos/fs-wrap.c head/contrib/subversion/subversion/libsvn_subr/config_file.c head/contrib/subversion/subversion/libsvn_subr/gpg_agent.c head/contrib/subversion/subversion/libsvn_subr/internal_statements.h head/contrib/subversion/subversion/libsvn_subr/io.c head/contrib/subversion/subversion/libsvn_subr/named_atomic.c head/contrib/subversion/subversion/libsvn_subr/sqlite.c head/contrib/subversion/subversion/libsvn_subr/stream.c head/contrib/subversion/subversion/libsvn_subr/subst.c head/contrib/subversion/subversion/libsvn_subr/utf.c head/contrib/subversion/subversion/libsvn_wc/adm_ops.c head/contrib/subversion/subversion/libsvn_wc/crop.c head/contrib/subversion/subversion/libsvn_wc/externals.c head/contrib/subversion/subversion/libsvn_wc/update_editor.c head/contrib/subversion/subversion/libsvn_wc/upgrade.c head/contrib/subversion/subversion/libsvn_wc/wc-checks.h head/contrib/subversion/subversion/libsvn_wc/wc-metadata.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.h head/contrib/subversion/subversion/libsvn_wc/wc-queries.sql head/contrib/subversion/subversion/libsvn_wc/wc_db.c head/contrib/subversion/subversion/libsvn_wc/wc_db.h head/contrib/subversion/subversion/libsvn_wc/wc_db_update_move.c head/contrib/subversion/subversion/libsvn_wc/wc_db_wcroot.c head/contrib/subversion/subversion/libsvn_wc/workqueue.c head/contrib/subversion/subversion/svn/cl.h head/contrib/subversion/subversion/svn/conflict-callbacks.c head/contrib/subversion/subversion/svn/file-merge.c head/contrib/subversion/subversion/svn/merge-cmd.c head/contrib/subversion/subversion/svn/mergeinfo-cmd.c head/contrib/subversion/subversion/svn/svn.c head/contrib/subversion/subversion/svn/util.c head/contrib/subversion/subversion/svnadmin/svnadmin.c head/contrib/subversion/subversion/svnlook/svnlook.c head/contrib/subversion/subversion/svnserve/serve.c head/contrib/subversion/win-tests.py head/usr.bin/svn/lib/libapr_util/Makefile head/usr.bin/svn/lib/libapr_util/apu.h head/usr.bin/svn/svn_private_config.h Directory Properties: head/contrib/apr/ (props changed) head/contrib/apr-util/ (props changed) head/contrib/subversion/ (props changed) Modified: head/contrib/apr-util/CHANGES ============================================================================== --- head/contrib/apr-util/CHANGES Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/CHANGES Sun Jul 28 06:02:40 2013 (r253734) @@ -1,45 +1,100 @@ -*- coding: utf-8 -*- -Changes with APR-Util 1.4.1 +Changes with APR-util 1.5.2 - *) Apply Windows build fixes for the apr_crypto API. [Mladen Turk] + *) Windows: Add command line makefiles. [Gregg Smith] -Changes with APR-util 1.4.0 + *) apr_uri_parse(): Do not accept invalid characters in the scheme. + Per RFC 3986 3.3, enforce that the first segment of a relative path does + not contain a colon. PR 52479. [Stefan Fritsch] - *) apr_ldap_init: Pass secure=1 to ldapssl_init() with Solaris LDAP SDK. - PR: 42682 [Stefan Fritsch] + *) Fix memory leak in hook sorting function. PR 51256. + [] - *) apr_memcache_server_create: Fix possible segfault. PR 51064. - [Michajlo Matijkiw ] + *) Speedup md5 calculation by avoiding some copying on little endian + architectures. PR 49011. [Stefan Fritsch, Stefan Fuhrmann + ] - *) apr_thread_pool: Fix thread unsafe pool usage. [Stefan Fritsch] + *) Use heap memory for crypt in apr_password_validate(), to reduce stack + usage. PR 54572. [Stefan Fritsch] - *) Do not include apr.h and apr_errno.h from system search path in - apu_errno.h. PR 46487 [Rainer Jung] + *) Fix password validation failure for all crypt and crypt_r based + algorithms. PR 54603. [Harvey Eneman ] - *) Add optional dbm, openssl and nss subpackages to the RPM spec file. - [Graham Leggett] + *) Fix syntax error in crypto/apr_passwd.c on non-glibc systems. PR 54275. + [Stefan Fritsch] - *) apr_dbd_freetds: The sybdb.h header file might be freetds/sybdb.h - or sybdb.h. [Graham Leggett] + *) Fix potential data corruption in apr_brigade_write() and friends if + the last bucket of the brigade is a heap bucket that has been split, + and there are still references to the next part of the original bucket + in use. [Stefan Fritsch] - *) Add apr_crypto implementations for OpenSSL and Mozilla NSS. Add a unit - test to verify the interoperability of the two modules. Builds default - to disabled unless explicitly enabled. - [Graham Leggett] + *) Remove duplicated logic in apr_brigade_puts(). PR 53740. [Christophe + Jaillet ] - *) Add the apr_crypto interface, a rewrite of the earlier apr_ssl code, - based on the modular dso interface used for dbd and ldap. Initially, - the interface supports symmetrical encryption and decryption. The - purpose of the interface is to offer portable and interoperable - access to basic crypto using the native crypto libraries present on - each platform. [Graham Leggett] + *) apr_crypto: If --with-crypto is passed to configure but no crypto + libraries are enabled, autodetect available libraries. [Jeff Trawick] - *) Add trace probes to hooks, making it easier to inspect APR Hook based - applications with DTrace or other such mechanisms. - [Theo Schlossnagle , generalized by Jeff Trawick] + *) memcache: Fix dead server retry logic. [Gavin Shelley ] - *) Implement resource list when threads are unavailable. PR 24325 - [Bojan Smojver] +Changes with APR-util 1.5.1 + + *) testmemcache: Fix crash. PR 52705. [Peter Poeml ] + + *) MinGW: Support shared builds of apr-util when apr is shared. + PR 46175. [Carlo Bramini , Jeff Trawick] + + *) Add support for Berkeley DB 5.2 and 5.3. Simplify detection script. + PR 53684. [Rainer Jung] + + *) configure: Allow to specify library specific custom linker flags + via the LDADD_XXX variables. [Rainer Jung] + + *) apr_password_validate(): Fix intermittent errors on systems + such as FreeBSD where the crypt() function is used. + (Broken only in 1.5.0) [Jeff Trawick] + + *) Improve platform detection for bundled expat by updating + config.guess and config.sub. [Rainer Jung] + +Changes with APR-util 1.5.0 + + *) dbd_pgsql_escape: Use PQescapeStringConn. [Nick Kew] + + *) apr_password_validate, apr_bcrypt_encode: Add support for bcrypt encoded + passwords. The bcrypt implementation uses code from crypt_blowfish + written by Solar Designer . apr_bcrypt_encode creates + hashes with "$2y$" prefix, but apr_password_validate also accepts the old + prefix "$2a$". PR 49288. [Stefan Fritsch] + + *) APR dbd: Allow to use apr_dbd_get_row() with a different pool than + apr_dbd_select(). PR 53533. [] + + *) APR dbd FreeTDS support: Fix spurious API errors caused by uninitialized + fields. [TROY.LIU åŠ‰æ˜¥å‰ ] + + *) apr_password_validate: Increase maximum hash string length to allow + more than 9999 rounds with sha512-crypt. PR 53410. [Stefan Fritsch] + + *) Fix segfaults in crypt() and crypt_r() failure modes. + PR 47272. [Arkadiusz Miskiewicz ] + + *) apr_crypto: Ensure that the if/else that governs the static + initialisation of each crypto driver works when the first driver + isn't in use. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when a statically + compiled library is initialised for the first time. [Graham Leggett] + + *) apr_crypto: Ensure the *driver variable is initialised when the library + has already been loaded. Fix ported from apr_dbd. [Graham Leggett] + + *) apr_crypto: Move the static initialisation of DRIVER_LOAD from + apr_crypto_init() to apr_crypto_get_driver(), so that we don't lose + the parameters. [Graham Leggett] + +Changes with APR-util 1.4.x and later: + + *) http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/CHANGES?view=markup Changes for APR-util 1.3.x and later: Modified: head/contrib/apr-util/Makefile.win ============================================================================== --- head/contrib/apr-util/Makefile.win Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/Makefile.win Sun Jul 28 06:02:40 2013 (r253734) @@ -7,7 +7,7 @@ # install - compile everything # clean - mop up everything # -# You can override the build mechansim, choose only one; +# You can override the build mechanism, choose only one; # # USEMAK=1 - compile from exported make files # USEDSW=1 - compile from .dsw / .dsp VC6 projects Modified: head/contrib/apr-util/NWGNUmakefile ============================================================================== --- head/contrib/apr-util/NWGNUmakefile Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/NWGNUmakefile Sun Jul 28 06:02:40 2013 (r253734) @@ -259,6 +259,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_md4.o \ $(OBJDIR)/apr_md5.o \ $(OBJDIR)/apr_memcache.o \ + $(OBJDIR)/apr_passwd.o \ $(OBJDIR)/apr_queue.o \ $(OBJDIR)/apr_reslist.o \ $(OBJDIR)/apr_rmm.o \ @@ -269,6 +270,7 @@ FILES_lib_objs = \ $(OBJDIR)/apr_strmatch.o \ $(OBJDIR)/apr_thread_pool.o \ $(OBJDIR)/apr_uri.o \ + $(OBJDIR)/crypt_blowfish.o \ $(OBJDIR)/sdbm.o \ $(OBJDIR)/sdbm_hash.o \ $(OBJDIR)/sdbm_lock.o \ Modified: head/contrib/apr-util/apr-util.spec ============================================================================== --- head/contrib/apr-util/apr-util.spec Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/apr-util.spec Sun Jul 28 06:02:40 2013 (r253734) @@ -3,7 +3,7 @@ Summary: Apache Portable Runtime Utility library Name: apr-util -Version: 1.4.1 +Version: 1.5.2 Release: 1 License: Apache Software License Group: System Environment/Libraries Modified: head/contrib/apr-util/buckets/apr_brigade.c ============================================================================== --- head/contrib/apr-util/buckets/apr_brigade.c Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/buckets/apr_brigade.c Sun Jul 28 06:02:40 2013 (r253734) @@ -391,17 +391,30 @@ APU_DECLARE(apr_status_t) apr_brigade_vp void *ctx, va_list va) { +#define MAX_VECS 8 + struct iovec vec[MAX_VECS]; + apr_size_t i = 0; + for (;;) { - const char *str = va_arg(va, const char *); + char *str = va_arg(va, char *); apr_status_t rv; if (str == NULL) break; - rv = apr_brigade_write(b, flush, ctx, str, strlen(str)); - if (rv != APR_SUCCESS) - return rv; + vec[i].iov_base = str; + vec[i].iov_len = strlen(str); + i++; + + if (i == MAX_VECS) { + rv = apr_brigade_writev(b, flush, ctx, vec, i); + if (rv != APR_SUCCESS) + return rv; + i = 0; + } } + if (i != 0) + return apr_brigade_writev(b, flush, ctx, vec, i); return APR_SUCCESS; } @@ -422,7 +435,12 @@ APU_DECLARE(apr_status_t) apr_brigade_wr apr_size_t remaining = APR_BUCKET_BUFF_SIZE; char *buf = NULL; - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + /* + * If the last bucket is a heap bucket and its buffer is not shared with + * another bucket, we may write into that bucket. + */ + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; /* HEAP bucket start offsets are always in-memory, safe to cast */ @@ -512,10 +530,11 @@ APU_DECLARE(apr_status_t) apr_brigade_wr i = 0; /* If there is a heap bucket at the end of the brigade - * already, copy into the existing bucket. + * already, and its refcount is 1, copy into the existing bucket. */ e = APR_BRIGADE_LAST(b); - if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e)) { + if (!APR_BRIGADE_EMPTY(b) && APR_BUCKET_IS_HEAP(e) + && ((apr_bucket_heap *)(e->data))->refcount.refcount == 1) { apr_bucket_heap *h = e->data; apr_size_t remaining = h->alloc_len - (e->length + (apr_size_t)e->start); @@ -591,29 +610,7 @@ APU_DECLARE(apr_status_t) apr_brigade_pu apr_brigade_flush flush, void *ctx, const char *str) { - apr_size_t len = strlen(str); - apr_bucket *bkt = APR_BRIGADE_LAST(bb); - if (!APR_BRIGADE_EMPTY(bb) && APR_BUCKET_IS_HEAP(bkt)) { - /* If there is enough space available in a heap bucket - * at the end of the brigade, copy the string directly - * into the heap bucket - */ - apr_bucket_heap *h = bkt->data; - apr_size_t bytes_avail = h->alloc_len - bkt->length; - - if (bytes_avail >= len) { - char *buf = h->base + bkt->start + bkt->length; - memcpy(buf, str, len); - bkt->length += len; - return APR_SUCCESS; - } - } - - /* If the string could not be copied into an existing heap - * bucket, delegate the work to apr_brigade_write(), which - * knows how to grow the brigade - */ - return apr_brigade_write(bb, flush, ctx, str, len); + return apr_brigade_write(bb, flush, ctx, str, strlen(str)); } APU_DECLARE_NONSTD(apr_status_t) apr_brigade_putstrs(apr_bucket_brigade *b, Modified: head/contrib/apr-util/buckets/apr_buckets_alloc.c ============================================================================== --- head/contrib/apr-util/buckets/apr_buckets_alloc.c Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/buckets/apr_buckets_alloc.c Sun Jul 28 06:02:40 2013 (r253734) @@ -65,12 +65,20 @@ APU_DECLARE_NONSTD(apr_bucket_alloc_t *) /* may be NULL for debug mode. */ if (allocator == NULL) { if (apr_allocator_create(&allocator) != APR_SUCCESS) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); abort(); } } #endif - list = apr_bucket_alloc_create_ex(allocator); + if (list == NULL) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); + abort(); + } list->pool = p; apr_pool_cleanup_register(list->pool, list, alloc_cleanup, apr_pool_cleanup_null); @@ -131,6 +139,7 @@ APU_DECLARE_NONSTD(void *) apr_bucket_al if (endp >= active->endp) { list->blocks = apr_allocator_alloc(list->allocator, ALLOC_AMT); if (!list->blocks) { + list->blocks = active; return NULL; } list->blocks->next = active; Modified: head/contrib/apr-util/build-outputs.mk ============================================================================== --- head/contrib/apr-util/build-outputs.mk Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/build-outputs.mk Sun Jul 28 06:02:40 2013 (r253734) @@ -15,8 +15,10 @@ buckets/apr_buckets_simple.lo: buckets/a buckets/apr_buckets_socket.lo: buckets/apr_buckets_socket.c .make.dirs include/apr_buckets.h crypto/apr_crypto.lo: crypto/apr_crypto.c .make.dirs include/apr_crypto.h include/apu_errno.h include/apu_version.h include/private/apr_crypto_internal.h include/private/apu_internal.h crypto/apr_md4.lo: crypto/apr_md4.c .make.dirs include/apr_md4.h include/apr_xlate.h -crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h +crypto/apr_md5.lo: crypto/apr_md5.c .make.dirs include/apr_md5.h include/apr_xlate.h +crypto/apr_passwd.lo: crypto/apr_passwd.c .make.dirs include/apr_md5.h include/apr_sha1.h include/apr_xlate.h crypto/apr_sha1.lo: crypto/apr_sha1.c .make.dirs include/apr_base64.h include/apr_sha1.h include/apr_xlate.h +crypto/crypt_blowfish.lo: crypto/crypt_blowfish.c .make.dirs crypto/getuuid.lo: crypto/getuuid.c .make.dirs include/apr_md5.h include/apr_uuid.h include/apr_xlate.h crypto/uuid.lo: crypto/uuid.c .make.dirs include/apr_uuid.h dbd/apr_dbd.lo: dbd/apr_dbd.c .make.dirs include/apr_dbd.h include/apu_version.h include/private/apr_dbd_internal.h include/private/apu_internal.h @@ -43,7 +45,7 @@ uri/apr_uri.lo: uri/apr_uri.c .make.dirs xlate/xlate.lo: xlate/xlate.c .make.dirs include/apr_xlate.h xml/apr_xml.lo: xml/apr_xml.c .make.dirs include/apr_xlate.h include/apr_xml.h -OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_sha1.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo +OBJECTS_all = buckets/apr_brigade.lo buckets/apr_buckets.lo buckets/apr_buckets_alloc.lo buckets/apr_buckets_eos.lo buckets/apr_buckets_file.lo buckets/apr_buckets_flush.lo buckets/apr_buckets_heap.lo buckets/apr_buckets_mmap.lo buckets/apr_buckets_pipe.lo buckets/apr_buckets_pool.lo buckets/apr_buckets_refcount.lo buckets/apr_buckets_simple.lo buckets/apr_buckets_socket.lo crypto/apr_crypto.lo crypto/apr_md4.lo crypto/apr_md5.lo crypto/apr_passwd.lo crypto/apr_sha1.lo crypto/crypt_blowfish.lo crypto/getuuid.lo crypto/uuid.lo dbd/apr_dbd.lo dbm/apr_dbm.lo dbm/apr_dbm_sdbm.lo dbm/sdbm/sdbm.lo dbm/sdbm/sdbm_hash.lo dbm/sdbm/sdbm_lock.lo dbm/sdbm/sdbm_pair.lo encoding/apr_base64.lo hooks/apr_hooks.lo ldap/apr_ldap_stub.lo ldap/apr_ldap_url.lo memcache/apr_memcache.lo misc/apr_date.lo misc/apr_queue.lo misc/apr_reslist.lo misc/apr_rmm.lo misc/apr_thread_pool.lo misc/apu_dso.lo misc/apu_version.lo strmatch/apr_strmatch.lo uri/apr_uri.lo xlate/xlate.lo xml/apr_xml.lo OBJECTS_unix = $(OBJECTS_all) Modified: head/contrib/apr-util/build.conf ============================================================================== --- head/contrib/apr-util/build.conf Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/build.conf Sun Jul 28 06:02:40 2013 (r253734) @@ -10,9 +10,11 @@ paths = crypto/apr_crypto.c crypto/apr_md4.c crypto/apr_md5.c + crypto/apr_passwd.c crypto/apr_sha1.c crypto/getuuid.c crypto/uuid.c + crypto/crypt_blowfish.c dbm/apr_dbm_sdbm.c dbm/apr_dbm.c dbm/sdbm/*.c Modified: head/contrib/apr-util/configure ============================================================================== --- head/contrib/apr-util/configure Sun Jul 28 05:15:38 2013 (r253733) +++ head/contrib/apr-util/configure Sun Jul 28 06:02:40 2013 (r253734) @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68. +# Generated by GNU Autoconf 2.69. # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -134,6 +132,31 @@ export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -167,7 +190,8 @@ if ( set x; as_fn_ret_success y && test else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -212,21 +236,25 @@ IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -328,6 +356,14 @@ $as_echo X"$as_dir" | } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -449,6 +485,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -483,16 +523,16 @@ if (echo >conf$$.file) 2>/dev/null; then # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -504,28 +544,8 @@ else as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -1245,8 +1265,6 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1422,7 +1440,8 @@ Optional Packages: --with-ldap-lib=path path to ldap lib file --with-ldap=library ldap library to use --with-dbm=DBM choose the DBM type to use. - DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50,db51} + DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db4X,db5X} + for some X=0,...,9 --with-gdbm=DIR enable GDBM support --with-ndbm=PATH Find the NDBM header and library in `PATH/include' and `PATH/lib'. If PATH is of the form `HEADER:LIB', @@ -1526,9 +1545,9 @@ test -n "$ac_init_help" && exit $ac_stat if $ac_init_version; then cat <<\_ACEOF configure -generated by GNU Autoconf 2.68 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1604,7 +1623,7 @@ $as_echo "$ac_try_echo"; } >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1937,7 +1956,7 @@ This file contains any messages produced running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.68. Invocation command line was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2491,19 +2510,6 @@ ac_configure="$SHELL $ac_aux_dir/configu - - - - - - - - - - - - - rm -f config.nice cat >config.nice</dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2786,13 +2792,20 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCR test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -# Use -no-install to link the test programs on all platforms -# but Darwin, where it would cause the programs to be linked -# against installed versions of libapr instead of those just -# built. +# Use -no-install or -no-fast-install to link the test +# programs on all platforms but Darwin, where it would cause +# the programs to be linked against installed versions of +# libapr instead of those just built. case $host in -*-apple-darwin*) LT_NO_INSTALL="" ;; -*) LT_NO_INSTALL="-no-install" ;; + *-apple-darwin*) + LT_NO_INSTALL="" + ;; + *-mingw*) + LT_NO_INSTALL="-no-fast-install" + ;; + *) + LT_NO_INSTALL="-no-install" + ;; esac @@ -3060,7 +3073,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3100,7 +3113,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3153,7 +3166,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3194,7 +3207,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3252,7 +3265,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3296,7 +3309,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3742,8 +3755,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4480,7 +4492,7 @@ do for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4546,7 +4558,7 @@ do for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4725,6 +4737,8 @@ done apu_have_crypto=0 + apu_have_openssl=0 + apu_have_nss=0 old_libs="$LIBS" old_cppflags="$CPPFLAGS" @@ -4734,9 +4748,35 @@ done # Check whether --with-crypto was given. if test "${with_crypto+set}" = set; then : withval=$with_crypto; + cryptolibs="openssl nss" + if test "$withval" = "yes"; then - apu_have_openssl=0 + crypto_library_enabled=0 + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "" -a "$v" != "no"; then + crypto_library_enabled=1 + fi + done + + if test "$crypto_library_enabled" = "0"; then + for cryptolib in $cryptolibs; do + eval v=\$with_$cryptolib + if test "$v" != "no"; then + eval with_$cryptolib=yes + crypto_library_enabled=1 + fi + done + if test "$crypto_library_enabled" = "1"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&5 +$as_echo "$as_me: Crypto was requested but no crypto library was found; autodetecting possible libraries" >&6;} + else + as_fn_error $? "Crypto was requested but all possible crypto libraries were disabled." "$LINENO" 5 + fi + fi + + openssl_have_headers=0 openssl_have_libs=0 @@ -5196,7 +5236,27 @@ fi if test "$apu_have_openssl" = "1"; then + + if test "x$LDADD_crypto_openssl" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_openssl to \"$openssl_LDFLAGS -lssl -lcrypto\"" LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto" + else + apr_addto_bugger="$openssl_LDFLAGS -lssl -lcrypto" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_openssl; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_openssl" + LDADD_crypto_openssl="$LDADD_crypto_openssl $i" + fi + done + fi + apu_have_crypto=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5 @@ -5243,8 +5303,6 @@ rm -f core conftest.err conftest.$ac_obj LDFLAGS="$old_ldflags" - apu_have_nss=0 - nss_have_headers=0 nss_have_libs=0 old_libs="$LIBS" @@ -5255,7 +5313,6 @@ rm -f core conftest.err conftest.$ac_obj # Check whether --with-nss was given. if test "${with_nss+set}" = set; then : withval=$with_nss; - if test "$withval" = "yes"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -5276,7 +5333,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5319,7 +5376,7 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5401,7 +5458,35 @@ fi fi fi - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5409,11 +5494,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5493,7 +5579,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi elif test "$withval" = "no"; then @@ -5548,7 +5634,35 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5 $as_echo "$as_me: checking for nss in $withval" >&6;} - for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h + nss_have_prerrorh=0 + nss_have_nssh=0 + nss_have_pk11pubh=0 + for ac_header in prerror.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "prerror.h" "ac_cv_header_prerror_h" "$ac_includes_default" +if test "x$ac_cv_header_prerror_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PRERROR_H 1 +_ACEOF + nss_have_prerrorh=1 +fi + +done + + for ac_header in nss/nss.h nss.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + nss_have_nssh=1 +fi + +done + + for ac_header in nss/pk11pub.h pk11pub.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" @@ -5556,11 +5670,12 @@ if eval test \"x\$"$as_ac_Header"\" = x" cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF - nss_have_headers=1 + nss_have_pk11pubh=1 fi done + nss_have_headers=${nss_have_prerrorh}${nss_have_nssh}${nss_have_pk11pubh} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5 $as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; } if ${ac_cv_lib_nspr4_PR_Initialize+:} false; then : @@ -5640,7 +5755,7 @@ fi fi - if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then + if test "$nss_have_headers" = "111" && test "$nss_have_libs" != "0"; then apu_have_nss=1 fi @@ -5679,7 +5794,27 @@ fi if test "$apu_have_nss" = "1"; then + + if test "x$LDADD_crypto_nss" = "x"; then + test "x$silent" != "xyes" && echo " setting LDADD_crypto_nss to \"$nss_LDFLAGS -lnspr4 -lnss3\"" LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3" + else + apr_addto_bugger="$nss_LDFLAGS -lnspr4 -lnss3" + for i in $apr_addto_bugger; do + apr_addto_duplicate="0" + for j in $LDADD_crypto_nss; do + if test "x$i" = "x$j"; then + apr_addto_duplicate="1" + break + fi + done + if test $apr_addto_duplicate = "0"; then + test "x$silent" != "xyes" && echo " adding \"$i\" to LDADD_crypto_nss" + LDADD_crypto_nss="$LDADD_crypto_nss $i" + fi + done + fi + apu_have_crypto=1 fi @@ -5689,7 +5824,10 @@ fi CPPFLAGS="$old_cppflags" LDFLAGS="$old_ldflags" - fi + if test "$apu_have_crypto" = "0"; then + as_fn_error $? "Crypto was requested but no crypto library could be enabled; specify the location of a crypto library using --with-openssl, --with-nss, etc." "$LINENO" 5 + fi + fi else @@ -5702,38 +5840,134 @@ fi - apu_have_openssl=0 - openssl_have_headers=0 - openssl_have_libs=0 - old_libs="$LIBS" - old_cppflags="$CPPFLAGS" - old_ldflags="$LDFLAGS" +echo $ac_n "${nl}checking for ldap support..." + +apu_has_ldap="0"; +apu_has_ldapssl_client_init="0" +apu_has_ldapssl_client_deinit="0" +apu_has_ldapssl_add_trusted_cert="0" +apu_has_ldap_start_tls_s="0" +apu_has_ldapssl_init="0" +apu_has_ldap_sslinit="0" +apu_has_ldapssl_install_routines="0" +apu_has_ldap_openldap="0" +apu_has_ldap_solaris="0" +apu_has_ldap_novell="0" +apu_has_ldap_microsoft="0" +apu_has_ldap_netscape="0" +apu_has_ldap_mozilla="0" +apu_has_ldap_tivoli="0" +apu_has_ldap_zos="0" +apu_has_ldap_other="0" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 06:15:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14C6BE44; Sun, 28 Jul 2013 06:15:26 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB65F2247; Sun, 28 Jul 2013 06:15:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S6FPN8029577; Sun, 28 Jul 2013 06:15:25 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S6FPHF029576; Sun, 28 Jul 2013 06:15:25 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201307280615.r6S6FPHF029576@svn.freebsd.org> From: Joel Dahl Date: Sun, 28 Jul 2013 06:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253735 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 06:15:26 -0000 Author: joel (doc committer) Date: Sun Jul 28 06:15:25 2013 New Revision: 253735 URL: http://svnweb.freebsd.org/changeset/base/253735 Log: mdoc and language improvements. Modified: head/usr.sbin/watchdogd/watchdogd.8 Modified: head/usr.sbin/watchdogd/watchdogd.8 ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.8 Sun Jul 28 06:02:40 2013 (r253734) +++ head/usr.sbin/watchdogd/watchdogd.8 Sun Jul 28 06:15:25 2013 (r253735) @@ -115,7 +115,7 @@ will terminate. The .Nm utility recognizes the following runtime options: -.Bl -tag -width ".Fl -softtimeout-action Ar action " +.Bl -tag -width 30m .It Fl I Ar file Write the process ID of the .Nm @@ -204,16 +204,23 @@ and the kernel .Xr log 4 device for .Xr syslog 8 . +.Sh FILES +.Bl -tag -width ".Pa /var/run/watchdogd.pid" -compact +.It Pa /var/run/watchdogd.pid +.El .Sh EXAMPLES .Ss Debugging watchdogd and/or your watchdog script. +This is a useful recipe for debugging +.Nm +and your watchdog script. .Pp -This is a useful recipe for debugging watchdogd and your watchdog -script. -.Pp -(Note that ^C works oddly because watchdogd calls system(3) so the +(Note that ^C works oddly because +.Nm +calls +.Xr system 3 +so the first ^C will terminate the "sleep" command.) .Pp -.Pp Explanation of options used: .Bl -enum -offset indent -compact .It @@ -224,17 +231,29 @@ Set the watchdog to trip at 30 seconds. Use of a softtimeout: .Bl -enum -offset indent -compact -nested .It -Use a softtimeout (don't arm the hardware watchdog) (--softtimeout) +Use a softtimeout (do not arm the hardware watchdog). +(--softtimeout) .It -Set the softtimeout action to do both kernel printf(9) and log(9) when it trips. (--softtimeout-action log,printf) +Set the softtimeout action to do both kernel +.Xr printf 9 +and +.Xr log 9 +when it trips. +(--softtimeout-action log,printf) .El .It Use of a pre-timeout: .Bl -enum -offset indent -compact -nested .It -Set a pre-timeout of 15 seconds (this will later trigger a panic/dump) (--pretimeout 15) +Set a pre-timeout of 15 seconds (this will later trigger a panic/dump). +(--pretimeout 15) .It -Set the action to also kernel printf(9) and log(9) when it trips. (--pretimeout-action log,printf) +Set the action to also kernel +.Xr printf 9 +and +.Xr log 9 +when it trips. +(--pretimeout-action log,printf) .El .It Use of a script: @@ -279,10 +298,6 @@ watchdogd -t 120 \\ --pretimeout 60 --pretimeout-action log,printf,panic \\ -e '/path/to/your/script 60' -w -T 15 .Ed -.Sh FILES -.Bl -tag -width ".Pa /var/run/watchdogd.pid" -compact -.It Pa /var/run/watchdogd.pid -.El .Sh SEE ALSO .Xr watchdog 4 , .Xr watchdog 8 , From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 06:16:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD250F7B; Sun, 28 Jul 2013 06:16:12 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB2D5224C; Sun, 28 Jul 2013 06:16:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S6GCO9029774; Sun, 28 Jul 2013 06:16:12 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S6GCm2029773; Sun, 28 Jul 2013 06:16:12 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201307280616.r6S6GCm2029773@svn.freebsd.org> From: Joel Dahl Date: Sun, 28 Jul 2013 06:16:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253736 - head/usr.bin/fetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 06:16:12 -0000 Author: joel (doc committer) Date: Sun Jul 28 06:16:12 2013 New Revision: 253736 URL: http://svnweb.freebsd.org/changeset/base/253736 Log: Remove EOL whitespace. Modified: head/usr.bin/fetch/fetch.1 Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Sun Jul 28 06:15:25 2013 (r253735) +++ head/usr.bin/fetch/fetch.1 Sun Jul 28 06:16:12 2013 (r253736) @@ -135,7 +135,7 @@ This option is deprecated and is provide only. .It Fl -ca-cert= Ns Ar file [SSL] -Path to certificate bundle containing trusted CA certificates. +Path to certificate bundle containing trusted CA certificates. If not specified, .Pa /etc/ssl/cert.pem is used. From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 06:59:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C471E811; Sun, 28 Jul 2013 06:59:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1E88231F; Sun, 28 Jul 2013 06:59:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6S6xTKd041741; Sun, 28 Jul 2013 06:59:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6S6xT6G041740; Sun, 28 Jul 2013 06:59:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201307280659.r6S6xT6G041740@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 28 Jul 2013 06:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253737 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 06:59:29 -0000 Author: kib Date: Sun Jul 28 06:59:29 2013 New Revision: 253737 URL: http://svnweb.freebsd.org/changeset/base/253737 Log: When creation of the v_pollinfo raced and our instance of vpollinfo must be destroyed, knlist_clear() and seldrain() calls could be avoided, since vpollinfo was not used. More, the knlist_clear() calling protocol requires the knlist locked, which is not true at the call site. Split the destruction into the helper destroy_vpollinfo_free(), and call it when raced, instead of destroy_vpollinfo(). Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sun Jul 28 06:16:12 2013 (r253736) +++ head/sys/kern/vfs_subr.c Sun Jul 28 06:59:29 2013 (r253737) @@ -3453,16 +3453,23 @@ vfs_msync(struct mount *mp, int flags) } static void -destroy_vpollinfo(struct vpollinfo *vi) +destroy_vpollinfo_free(struct vpollinfo *vi) { - knlist_clear(&vi->vpi_selinfo.si_note, 1); - seldrain(&vi->vpi_selinfo); knlist_destroy(&vi->vpi_selinfo.si_note); mtx_destroy(&vi->vpi_lock); uma_zfree(vnodepoll_zone, vi); } +static void +destroy_vpollinfo(struct vpollinfo *vi) +{ + + knlist_clear(&vi->vpi_selinfo.si_note, 1); + seldrain(&vi->vpi_selinfo); + destroy_vpollinfo_free(vi); +} + /* * Initalize per-vnode helper structure to hold poll-related state. */ @@ -3480,7 +3487,7 @@ v_addpollinfo(struct vnode *vp) VI_LOCK(vp); if (vp->v_pollinfo != NULL) { VI_UNLOCK(vp); - destroy_vpollinfo(vi); + destroy_vpollinfo_free(vi); return; } vp->v_pollinfo = vi; From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 12:29:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 852ECDE0; Sun, 28 Jul 2013 12:29:11 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 714B62B28; Sun, 28 Jul 2013 12:29:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SCTBoP041718; Sun, 28 Jul 2013 12:29:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SCTBDd041717; Sun, 28 Jul 2013 12:29:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201307281229.r6SCTBDd041717@svn.freebsd.org> From: Marius Strobl Date: Sun, 28 Jul 2013 12:29:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253742 - head/sys/fs/cd9660 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 12:29:11 -0000 Author: marius Date: Sun Jul 28 12:29:10 2013 New Revision: 253742 URL: http://svnweb.freebsd.org/changeset/base/253742 Log: - Add const-qualifiers to the arguments of isonum_*(). - According to ISO 9660 7.1.2, isonum_712() should return a signed value. - Try to get isonum_*() closer to style(9). Modified: head/sys/fs/cd9660/iso.h Modified: head/sys/fs/cd9660/iso.h ============================================================================== --- head/sys/fs/cd9660/iso.h Sun Jul 28 09:57:42 2013 (r253741) +++ head/sys/fs/cd9660/iso.h Sun Jul 28 12:29:10 2013 (r253742) @@ -291,56 +291,65 @@ u_short sgetrune(const char *, size_t, c */ static __inline uint8_t -isonum_711(unsigned char *p) +isonum_711(const unsigned char *p) { - return p[0]; + + return (p[0]); } -static __inline uint8_t -isonum_712(unsigned char *p) +static __inline int8_t +isonum_712(const unsigned char *p) { - return p[0]; + + return ((signed char)p[0]); } static __inline uint8_t -isonum_713(unsigned char *p) +isonum_713(const unsigned char *p) { - return p[0]; + + return (p[0]); } static __inline uint16_t -isonum_721(unsigned char *p) +isonum_721(const unsigned char *p) { + return (p[0] | p[1] << 8); } static __inline uint16_t -isonum_722(unsigned char *p) +isonum_722(const unsigned char *p) { + return (p[1] | p[0] << 8); } static __inline uint16_t -isonum_723(unsigned char *p) +isonum_723(const unsigned char *p) { + return (p[0] | p[1] << 8); } static __inline uint32_t -isonum_731(unsigned char *p) +isonum_731(const unsigned char *p) { + return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); } static __inline uint32_t -isonum_732(unsigned char *p) +isonum_732(const unsigned char *p) { + return (p[3] | p[2] << 8 | p[1] << 16 | p[0] << 24); } static __inline uint32_t -isonum_733(unsigned char *p) +isonum_733(const unsigned char *p) { + return (p[0] | p[1] << 8 | p[2] << 16 | p[3] << 24); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 12:45:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 425AE309; Sun, 28 Jul 2013 12:45:12 +0000 (UTC) (envelope-from tijl@coosemans.org) Received: from mailrelay001.isp.belgacom.be (mailrelay001.isp.belgacom.be [195.238.6.51]) by mx1.freebsd.org (Postfix) with ESMTP id 550A42BA2; Sun, 28 Jul 2013 12:45:10 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=TVAeEZsMflEN/Gl6LVQhGIMIvPmivZZxTpw3qWPxQr8= c=1 sm=2 a=xnulW3ATU38A:10 a=ZxPGInapWdQA:10 a=YqRfAJJkAAAA:8 a=uZvujYp8AAAA:8 a=yV6n4f_wk2LWa0TmYloA:9 a=CjuIK1q_8ugA:10 a=PvG2Zffer3IA:10 a=UIDpq6-GphUA:10 a=7mm7v_gwTSDN0Q6uc88A:9 a=0CaTwavtbm8A:10 a=_G8qimlXLBUA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmwGAJgR9VFR8YfH/2dsb2JhbABbgwY1viKBFxd0giQBAQVWIxALDgoJJQ8qHgYTiBQIt1CNLoJPB4QFA5ASh0yBKoh4hyuDFjo Received: from 199.135-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.135.199]) by relay.skynet.be with ESMTP; 28 Jul 2013 14:45:03 +0200 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.7/8.14.7) with ESMTP id r6SCj2Zb002051; Sun, 28 Jul 2013 14:45:02 +0200 (CEST) (envelope-from tijl@coosemans.org) Date: Sun, 28 Jul 2013 14:44:56 +0200 From: Tijl Coosemans To: David Chisnall Subject: Re: svn commit: r253563 - head/contrib/libstdc++/include/c_std Message-ID: <20130728144456.486359e0@kalimero.tijl.coosemans.org> In-Reply-To: References: <201307231023.r6NANhGf065713@svn.freebsd.org> <20130725201948.2f5ae808@kalimero.tijl.coosemans.org> <7D9DA326-0F32-44D2-92F9-EED0751F9AE0@FreeBSD.org> <20130726122654.19448832@kalimero.tijl.coosemans.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA256; boundary="Sig_/sMaHl=NSlGb1CPzpvCdD.I_"; protocol="application/pgp-signature" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 12:45:12 -0000 --Sig_/sMaHl=NSlGb1CPzpvCdD.I_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 26 Jul 2013 11:51:43 +0100 David Chisnall wrote: > On 26 Jul 2013, at 11:26, Tijl Coosemans wrote: >> On Fri, 26 Jul 2013 10:43:07 +0100 David Chisnall wrote: >>> On 25 Jul 2013, at 19:19, Tijl Coosemans wrote: >>>> This also >>>> broke compilation of C code with -D_XOPEN_SOURCE=3D500. >>>=20 >>> Do you have a test case for this? >>=20 >> % cc -c test.c -D_XOPEN_SOURCE=3D500 -Wall -std=3Dgnu89 >> test.c:5:10: warning: implicit declaration of function 'isnan' >> [-Wimplicit-function-declaration] >> return( isnan( d )); >> ^ >> 1 warning generated. >>=20 >> The isnan function is part of SUSv2: >> http://pubs.opengroup.org/onlinepubs/7990989775/xsh/isnan.html >>=20 >> _XOPEN_SOURCE is handled in sys/cdefs.h. It sets the following macros: >> #define __XSI_VISIBLE 500 >> #define __POSIX_VISIBLE 199506 >> #define __ISO_C_VISIBLE 1990 >=20 > So, isnan and isinf should be visible in functions when in > __ISO_C_VISIBLE < 1999 and __XSI_VISIBLE < 600, and __XSI_VISIBLE >=3D 5= 00? Is it possible to put them back where they were but behind #if __cplusplus < 201103L ? That would be the least disruptive. --Sig_/sMaHl=NSlGb1CPzpvCdD.I_ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iF4EAREIAAYFAlH1Ek0ACgkQfoCS2CCgtivDJAD+LWmjpWTZoY5liBpgRUgMUKvr +xAsX9JTmw84SCxrDrMA/1nnfUvMqaSZjldlr7RHNPYxnAY/pvAbvc9Pf5SB3P8a =99UG -----END PGP SIGNATURE----- --Sig_/sMaHl=NSlGb1CPzpvCdD.I_-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 13:21:08 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ACA85963; Sun, 28 Jul 2013 13:21:08 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5CA982C7A; Sun, 28 Jul 2013 13:21:07 +0000 (UTC) Received: from [192.168.0.2] (cpc27-cmbg15-2-0-cust235.5-4.cable.virginmedia.com [86.27.188.236]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6SDKvsk064073 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Sun, 28 Jul 2013 13:20:58 GMT (envelope-from theraven@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_3C932871-3B53-4559-8A37-41C0F30E0343"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253563 - head/contrib/libstdc++/include/c_std From: David Chisnall In-Reply-To: <20130728144456.486359e0@kalimero.tijl.coosemans.org> Date: Sun, 28 Jul 2013 14:20:54 +0100 Message-Id: <35392CE8-A3F5-4644-89C6-1FD58527ED75@FreeBSD.org> References: <201307231023.r6NANhGf065713@svn.freebsd.org> <20130725201948.2f5ae808@kalimero.tijl.coosemans.org> <7D9DA326-0F32-44D2-92F9-EED0751F9AE0@FreeBSD.org> <20130726122654.19448832@kalimero.tijl.coosemans.org> <20130728144456.486359e0@kalimero.tijl.coosemans.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 13:21:08 -0000 --Apple-Mail=_3C932871-3B53-4559-8A37-41C0F30E0343 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 28 Jul 2013, at 13:44, Tijl Coosemans wrote: > Is it possible to put them back where they were but behind > #if __cplusplus < 201103L ? That would be the least disruptive. That would still leave the libc++ header broken. There are some = other failures in this header in C++03 mode that I need to investigate. David --Apple-Mail=_3C932871-3B53-4559-8A37-41C0F30E0343 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJR9Rq2AAoJEKx65DEEsqIdvVIP/3AzK8OgHPZbBmOZkg5qDlpR grimaKUKd3X5f/PrwXREygE3ST0yFWV1RfD6yS/WH0T9f8U0p6XlqNnWn6igeZr0 HZRXpVDkkbxOg4zGRErjfo0LLFIVcJCAeeoWdTTWnhfxdvhWc25zk0Wsrp+yZmeC Ycev0SuFNE9knOkV23SsuS4E2SvkdOo53gd/R7pe8v8WwAW2ZkFZRiQefvPQ3uzL VKN8DEEOmqyc5bbkgY4dRooDDFozChsJeqUfC+XOzJa7TY982autVfrk0sEVacrX DntmI9Uiv9NHQROZHgXMdWDAWMmCT/ybcIXceIYZitmNw4zI23RQ7lmId1Gsb0TS 5l/zfIFeu0pBrtfg/cn8IgngkynydiM4wg4eXnp1+hu43/PhPSXkiao2mDKgCsuA 5lz7uHMVcPhtvhALgHuvzIWw9yY5WthEVdVBuYa8+DwOAGjhqR/H+EmuVhCSgrXN 7nA32eBtbxZLoirVK98RUzkNkhE/dYHEYxW3z6M4nA+S0ynvl4b0CT1C0f0M8q6I pRxke5bEn0oZCSEUZjbILyRyqbin4gY+LW02yEvTcdnGo6eMn8SERR3v38noQhx9 jUKrrUV24caea7Dg1OCHl2ZYPhn7dcrBKDlOdGYsudPgMFwKIxOWnsrFB6B3T/+6 58QJfGZbrmyCLSOelg+P =J7Y4 -----END PGP SIGNATURE----- --Apple-Mail=_3C932871-3B53-4559-8A37-41C0F30E0343-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 16:50:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8F74965E; Sun, 28 Jul 2013 16:50:45 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D80421C8; Sun, 28 Jul 2013 16:50:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SGoj9r022310; Sun, 28 Jul 2013 16:50:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SGojwC022309; Sun, 28 Jul 2013 16:50:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201307281650.r6SGojwC022309@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Jul 2013 16:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253743 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 16:50:45 -0000 Author: adrian Date: Sun Jul 28 16:50:45 2013 New Revision: 253743 URL: http://svnweb.freebsd.org/changeset/base/253743 Log: Commit the missing header change. Modified: head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Sun Jul 28 12:29:10 2013 (r253742) +++ head/sys/net80211/ieee80211_proto.h Sun Jul 28 16:50:45 2013 (r253743) @@ -98,6 +98,8 @@ int ieee80211_raw_xmit(struct ieee80211_ const struct ieee80211_bpf_params *); int ieee80211_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *ro); +int ieee80211_vap_pkt_send_dest(struct ieee80211vap *, struct mbuf *, + struct ieee80211_node *); int ieee80211_raw_output(struct ieee80211vap *, struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); void ieee80211_send_setup(struct ieee80211_node *, struct mbuf *, int, int, From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 16:56:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED18DA8E; Sun, 28 Jul 2013 16:56:31 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D933421F9; Sun, 28 Jul 2013 16:56:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SGuVaf023460; Sun, 28 Jul 2013 16:56:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SGuVYx023459; Sun, 28 Jul 2013 16:56:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201307281656.r6SGuVYx023459@svn.freebsd.org> From: Ian Lepore Date: Sun, 28 Jul 2013 16:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253744 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 16:56:32 -0000 Author: ian Date: Sun Jul 28 16:56:31 2013 New Revision: 253744 URL: http://svnweb.freebsd.org/changeset/base/253744 Log: Fix printf of seconds for systems where time_t is 64 bits. Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:50:45 2013 (r253743) +++ head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:56:31 2013 (r253744) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const if (debugging) { printf("Timeout for %s%s " "is 2^%d nanoseconds " - "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", + "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n", longopt ? "-" : "", longopt ? longopt : shortopt, rv, - myoptarg, ts.tv_sec, ts.tv_nsec, ticks); + myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks); } if (ticks <= 0) { errx(1, "Timeout for %s%s is too small, please choose a higher timeout.", longopt ? "-" : "", longopt ? longopt : shortopt); From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 17:35:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 34B12205; Sun, 28 Jul 2013 17:35:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20D5222E8; Sun, 28 Jul 2013 17:35:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SHZJ1r035805; Sun, 28 Jul 2013 17:35:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SHZJks035804; Sun, 28 Jul 2013 17:35:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201307281735.r6SHZJks035804@svn.freebsd.org> From: Adrian Chadd Date: Sun, 28 Jul 2013 17:35:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253745 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 17:35:20 -0000 Author: adrian Date: Sun Jul 28 17:35:19 2013 New Revision: 253745 URL: http://svnweb.freebsd.org/changeset/base/253745 Log: Fix compilation when debugging is disabled. Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Sun Jul 28 16:56:31 2013 (r253744) +++ head/sys/net80211/ieee80211_mesh.c Sun Jul 28 17:35:19 2013 (r253745) @@ -1040,10 +1040,9 @@ mesh_transmit_to_gate(struct ieee80211va struct ieee80211_mesh_route *rt_gate) { struct ifnet *ifp = vap->iv_ifp; - struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; - IEEE80211_TX_UNLOCK_ASSERT(ic); + IEEE80211_TX_UNLOCK_ASSERT(vap->iv_ic); ni = ieee80211_mesh_find_txnode(vap, rt_gate->rt_dest); if (ni == NULL) { From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 17:37:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 031C937E; Sun, 28 Jul 2013 17:37:32 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3AE22309; Sun, 28 Jul 2013 17:37:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SHbVv2036087; Sun, 28 Jul 2013 17:37:31 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SHbVsS036084; Sun, 28 Jul 2013 17:37:31 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201307281737.r6SHbVsS036084@svn.freebsd.org> From: Ian Lepore Date: Sun, 28 Jul 2013 17:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253746 - in head/sys/arm: conf freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 17:37:32 -0000 Author: ian Date: Sun Jul 28 17:37:30 2013 New Revision: 253746 URL: http://svnweb.freebsd.org/changeset/base/253746 Log: Rename the existing std.imx and imx.files to std.imx51 and files.imx51, to pave the way for adding imx6 support. Added: head/sys/arm/freescale/imx/files.imx51 - copied unchanged from r253742, head/sys/arm/freescale/imx/imx.files head/sys/arm/freescale/imx/std.imx51 - copied, changed from r253742, head/sys/arm/freescale/imx/std.imx Deleted: head/sys/arm/freescale/imx/imx.files head/sys/arm/freescale/imx/std.imx Modified: head/sys/arm/conf/EFIKA_MX Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Sun Jul 28 17:35:19 2013 (r253745) +++ head/sys/arm/conf/EFIKA_MX Sun Jul 28 17:37:30 2013 (r253746) @@ -19,7 +19,7 @@ ident EFIKA_MX -include "../freescale/imx/std.imx" +include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" Copied: head/sys/arm/freescale/imx/files.imx51 (from r253742, head/sys/arm/freescale/imx/imx.files) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/files.imx51 Sun Jul 28 17:37:30 2013 (r253746, copy of r253742, head/sys/arm/freescale/imx/imx.files) @@ -0,0 +1,51 @@ +# $FreeBSD$ +arm/arm/bus_space_asm_generic.S standard +arm/arm/bus_space_generic.c standard +arm/arm/cpufunc_asm_armv5.S standard +arm/arm/cpufunc_asm_arm11.S standard +arm/arm/cpufunc_asm_armv7.S standard +arm/arm/irq_dispatch.S standard +kern/kern_clocksource.c standard + +# Init +arm/freescale/imx/imx_machdep.c standard +arm/freescale/imx/common.c standard +arm/freescale/imx/bus_space.c standard + +# Dummy serial console +#arm/freescale/imx/console.c standard + +# TrustZone Interrupt Controller +arm/freescale/imx/tzic.c standard + +# IOMUX - external pins multiplexor +arm/freescale/imx/imx51_iomux.c optional iomux + +# GPIO +arm/freescale/imx/imx51_gpio.c optional gpio + +# Generic Periodic Timer +arm/freescale/imx/imx_gpt.c standard + +# Clock Configuration Manager +arm/freescale/imx/imx51_ccm.c standard + +# i.MX5xx PATA controller +dev/ata/chipsets/ata-fsl.c optional imxata + +# UART driver +dev/uart/uart_dev_imx.c optional uart + +# USB join controller (1 OTG, 3 EHCI) +dev/usb/controller/ehci_imx.c optional ehci + +# Watchdog +arm/freescale/imx/imx_wdog.c optional imxwdt + +# i2c +arm/freescale/imx/i2c.c optional fsliic +dev/ofw/ofw_iicbus.c optional fsliic + +# IPU - Image Processing Unit (frame buffer also) +arm/freescale/imx/imx51_ipuv3.c optional sc + Copied and modified: head/sys/arm/freescale/imx/std.imx51 (from r253742, head/sys/arm/freescale/imx/std.imx) ============================================================================== --- head/sys/arm/freescale/imx/std.imx Sun Jul 28 12:29:10 2013 (r253742, copy source) +++ head/sys/arm/freescale/imx/std.imx51 Sun Jul 28 17:37:30 2013 (r253746) @@ -11,5 +11,5 @@ makeoptions KERNPHYSADDR=0x90100000 options PHYSADDR=0x90000000 options STARTUP_PAGETABLE_ADDR=0x91000000 -files "../freescale/imx/imx.files" +files "../freescale/imx/files.imx51" From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 17:54:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FF209D1; Sun, 28 Jul 2013 17:54:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E2F023AB; Sun, 28 Jul 2013 17:54:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SHsi1C041494; Sun, 28 Jul 2013 17:54:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SHsg1K041487; Sun, 28 Jul 2013 17:54:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307281754.r6SHsg1K041487@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Jul 2013 17:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253747 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 17:54:44 -0000 Author: avg Date: Sun Jul 28 17:54:42 2013 New Revision: 253747 URL: http://svnweb.freebsd.org/changeset/base/253747 Log: x86: detect mwait capabilities and extensions, when present Reviewed by: kib (earlier amd64-only version) MFC after: 2 weeks Modified: head/sys/amd64/amd64/identcpu.c head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/i386/i386/identcpu.c head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/include/specialreg.h Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/amd64/amd64/identcpu.c Sun Jul 28 17:54:42 2013 (r253747) @@ -532,6 +532,13 @@ identify_cpu(void) } } + if (cpu_high >= 5 && (cpu_feature2 & CPUID2_MON) != 0) { + do_cpuid(5, regs); + cpu_mon_mwait_flags = regs[2]; + cpu_mon_min_size = regs[0] & CPUID5_MON_MIN_SIZE; + cpu_mon_max_size = regs[1] & CPUID5_MON_MAX_SIZE; + } + if (cpu_high >= 7) { cpuid_count(7, 0, regs); cpu_stdext_feature = regs[1]; Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/amd64/amd64/initcpu.c Sun Jul 28 17:54:42 2013 (r253747) @@ -75,6 +75,9 @@ u_int cpu_mxcsr_mask; /* Valid bits in u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; u_int cpu_max_ext_state_size; +u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ +u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ +u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/amd64/include/md_var.h Sun Jul 28 17:54:42 2013 (r253747) @@ -58,6 +58,9 @@ extern u_int cpu_procinfo; extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; +extern u_int cpu_mon_mwait_flags; +extern u_int cpu_mon_min_size; +extern u_int cpu_mon_max_size; extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; Modified: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/i386/i386/identcpu.c Sun Jul 28 17:54:42 2013 (r253747) @@ -1121,6 +1121,13 @@ finishidentcpu(void) } } + if (cpu_high >= 5 && (cpu_feature2 & CPUID2_MON) != 0) { + do_cpuid(5, regs); + cpu_mon_mwait_flags = regs[2]; + cpu_mon_min_size = regs[0] & CPUID5_MON_MIN_SIZE; + cpu_mon_max_size = regs[1] & CPUID5_MON_MAX_SIZE; + } + /* Detect AMD features (PTE no-execute bit, 3dnow, 64 bit mode etc) */ if (cpu_vendor_id == CPU_VENDOR_INTEL || cpu_vendor_id == CPU_VENDOR_AMD) { Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/i386/i386/initcpu.c Sun Jul 28 17:54:42 2013 (r253747) @@ -97,6 +97,9 @@ u_int cpu_procinfo2 = 0; /* Multicore in char cpu_vendor[20] = ""; /* CPU Origin code */ u_int cpu_vendor_id = 0; /* CPU vendor ID */ u_int cpu_clflush_line_size = 32; +u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ +u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ +u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/i386/include/md_var.h Sun Jul 28 17:54:42 2013 (r253747) @@ -57,6 +57,9 @@ extern u_int cpu_procinfo2; extern char cpu_vendor[]; extern u_int cpu_vendor_id; extern u_int cyrix_did; +extern u_int cpu_mon_mwait_flags; +extern u_int cpu_mon_min_size; +extern u_int cpu_mon_max_size; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: head/sys/x86/include/specialreg.h ============================================================================== --- head/sys/x86/include/specialreg.h Sun Jul 28 17:37:30 2013 (r253746) +++ head/sys/x86/include/specialreg.h Sun Jul 28 17:54:42 2013 (r253747) @@ -240,6 +240,29 @@ #define CPUID_LOCAL_APIC_ID 0xff000000 /* + * CPUID instruction 5 info + */ +#define CPUID5_MON_MIN_SIZE 0x0000ffff /* eax */ +#define CPUID5_MON_MAX_SIZE 0x0000ffff /* ebx */ +#define CPUID5_MON_MWAIT_EXT 0x00000001 /* ecx */ +#define CPUID5_MWAIT_INTRBREAK 0x00000002 /* ecx */ + +/* + * MWAIT cpu power states. Lower 4 bits are sub-states. + */ +#define MWAIT_C0 0xf0 +#define MWAIT_C1 0x00 +#define MWAIT_C2 0x10 +#define MWAIT_C3 0x20 +#define MWAIT_C4 0x30 + +/* + * MWAIT extensions. + */ +/* Interrupt breaks MWAIT even when masked. */ +#define MWAIT_INTRBREAK 0x00000001 + +/* * CPUID instruction 6 ecx info */ #define CPUID_PERF_STAT 0x00000001 From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:32:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22642687; Sun, 28 Jul 2013 18:32:29 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 032BE24FA; Sun, 28 Jul 2013 18:32:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SIWS8w053858; Sun, 28 Jul 2013 18:32:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SIWRTU053851; Sun, 28 Jul 2013 18:32:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307281832.r6SIWRTU053851@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Jul 2013 18:32:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253748 - in head/sys: amd64/include arm/include i386/include ia64/include mips/include powerpc/include sparc64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:32:29 -0000 Author: avg Date: Sun Jul 28 18:32:27 2013 New Revision: 253748 URL: http://svnweb.freebsd.org/changeset/base/253748 Log: put contents of cpu.h under _KERNEL no userland-serviceable parts inside MFC after: 20 days Modified: head/sys/amd64/include/cpu.h head/sys/arm/include/cpu.h head/sys/i386/include/cpu.h head/sys/ia64/include/cpu.h head/sys/mips/include/cpu.h head/sys/powerpc/include/cpu.h head/sys/sparc64/include/cpu.h Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/amd64/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -36,6 +36,8 @@ #ifndef _MACHINE_CPU_H_ #define _MACHINE_CPU_H_ +#ifdef _KERNEL + /* * Definitions unique to i386 cpu support. */ @@ -53,7 +55,6 @@ (ISPL((framep)->tf_cs) == SEL_UPL) #define TRAPF_PC(framep) ((framep)->tf_rip) -#ifdef _KERNEL extern char btext[]; extern char etext[]; Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/arm/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -6,10 +6,11 @@ #include +#ifdef _KERNEL + void cpu_halt(void); void swi_vm(void *); -#ifdef _KERNEL static __inline uint64_t get_cyclecount(void) { @@ -19,7 +20,6 @@ get_cyclecount(void) return ((uint64_t)bt.sec << 56 | bt.frac >> 8); } -#endif #define TRAPF_USERMODE(frame) ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) @@ -50,4 +50,5 @@ void *initarm(struct arm_boot_params *); extern char btext[]; extern char etext[]; int badaddr_read(void *, size_t, void *); +#endif #endif /* !MACHINE_CPU_H */ Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/i386/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -43,6 +43,8 @@ #include #include +#ifdef _KERNEL + #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_esp) @@ -53,7 +55,6 @@ ((ISPL((framep)->tf_cs) == SEL_UPL) || ((framep)->tf_eflags & PSL_VM)) #define TRAPF_PC(framep) ((framep)->tf_eip) -#ifdef _KERNEL extern char btext[]; extern char etext[]; Modified: head/sys/ia64/include/cpu.h ============================================================================== --- head/sys/ia64/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/ia64/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -44,12 +44,12 @@ #include +#ifdef _KERNEL + #define TRAPF_PC(tf) ((tf)->tf_special.iip) #define TRAPF_CPL(tf) ((tf)->tf_special.psr & IA64_PSR_CPL) #define TRAPF_USERMODE(tf) (TRAPF_CPL(tf) != IA64_PSR_CPL_KERN) -#ifdef _KERNEL - #ifdef GPROF extern char btext[]; extern char etext[]; Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/mips/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -49,6 +49,8 @@ #include +#if defined(_KERNEL) + /* BEGIN: these are going away */ #define soft_int_mask(softintr) (1 << ((softintr) + 8)) @@ -74,9 +76,7 @@ * A machine-independent interface to the CPU's counter. */ #define get_cyclecount() mips_rd_count() -#endif /* !_LOCORE */ -#if defined(_KERNEL) && !defined(_LOCORE) extern char btext[]; extern char etext[]; @@ -85,5 +85,6 @@ void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); +#endif /* !_LOCORE */ #endif /* _KERNEL */ #endif /* !_MACHINE_CPU_H_ */ Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/powerpc/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -39,6 +39,8 @@ #include #include +#ifdef _KERNEL + /* * CPU Feature Attributes * @@ -98,4 +100,5 @@ void cpu_reset(void); void fork_trampoline(void); void swi_vm(void *); +#endif /* _KERNEL */ #endif /* _MACHINE_CPU_H_ */ Modified: head/sys/sparc64/include/cpu.h ============================================================================== --- head/sys/sparc64/include/cpu.h Sun Jul 28 17:54:42 2013 (r253747) +++ head/sys/sparc64/include/cpu.h Sun Jul 28 18:32:27 2013 (r253748) @@ -40,6 +40,8 @@ #include #include +#ifdef _KERNEL + #define TRAPF_PC(tfp) ((tfp)->tf_tpc) #define TRAPF_USERMODE(tfp) (((tfp)->tf_tstate & TSTATE_PRIV) == 0) @@ -47,8 +49,6 @@ #define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) #define cpu_spinwait() /* nothing */ -#ifdef _KERNEL - extern char btext[]; extern char etext[]; From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:35:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E107826; Sun, 28 Jul 2013 18:35:46 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC5FC2516; Sun, 28 Jul 2013 18:35:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SIZjJU054322; Sun, 28 Jul 2013 18:35:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SIZiI4054311; Sun, 28 Jul 2013 18:35:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307281835.r6SIZiI4054311@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Jul 2013 18:35:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253749 - in head: lib/libc/powerpc/gen lib/libc/powerpc64/gen libexec/rtld-elf/powerpc libexec/rtld-elf/powerpc64 sbin/adjkerntz share/examples/perfmon tools/tools/vhba usr.bin/w X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:35:46 -0000 Author: avg Date: Sun Jul 28 18:35:43 2013 New Revision: 253749 URL: http://svnweb.freebsd.org/changeset/base/253749 Log: remove needless inclusion of machine/cpu.h in userland MFC after: 21 days Modified: head/lib/libc/powerpc/gen/syncicache.c head/lib/libc/powerpc64/gen/syncicache.c head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc64/reloc.c head/sbin/adjkerntz/adjkerntz.c head/share/examples/perfmon/perfmon.c head/tools/tools/vhba/vhba.h head/usr.bin/w/w.c Modified: head/lib/libc/powerpc/gen/syncicache.c ============================================================================== --- head/lib/libc/powerpc/gen/syncicache.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/lib/libc/powerpc/gen/syncicache.c Sun Jul 28 18:35:43 2013 (r253749) @@ -44,7 +44,6 @@ static const char rcsid[] = #endif #include -#include #include #ifdef _STANDALONE Modified: head/lib/libc/powerpc64/gen/syncicache.c ============================================================================== --- head/lib/libc/powerpc64/gen/syncicache.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/lib/libc/powerpc64/gen/syncicache.c Sun Jul 28 18:35:43 2013 (r253749) @@ -44,7 +44,6 @@ static const char rcsid[] = #endif #include -#include #include #ifdef _STANDALONE Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/libexec/rtld-elf/powerpc/reloc.c Sun Jul 28 18:35:43 2013 (r253749) @@ -37,7 +37,6 @@ #include #include #include -#include #include #include Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/libexec/rtld-elf/powerpc64/reloc.c Sun Jul 28 18:35:43 2013 (r253749) @@ -37,7 +37,6 @@ #include #include #include -#include #include #include "debug.h" Modified: head/sbin/adjkerntz/adjkerntz.c ============================================================================== --- head/sbin/adjkerntz/adjkerntz.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/sbin/adjkerntz/adjkerntz.c Sun Jul 28 18:35:43 2013 (r253749) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include "pathnames.h" Modified: head/share/examples/perfmon/perfmon.c ============================================================================== --- head/share/examples/perfmon/perfmon.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/share/examples/perfmon/perfmon.c Sun Jul 28 18:35:43 2013 (r253749) @@ -32,7 +32,6 @@ #include #include -#include #include #include Modified: head/tools/tools/vhba/vhba.h ============================================================================== --- head/tools/tools/vhba/vhba.h Sun Jul 28 18:32:27 2013 (r253748) +++ head/tools/tools/vhba/vhba.h Sun Jul 28 18:35:43 2013 (r253749) @@ -43,7 +43,6 @@ #include #include -#include #include #include Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Sun Jul 28 18:32:27 2013 (r253748) +++ head/usr.bin/w/w.c Sun Jul 28 18:35:43 2013 (r253749) @@ -57,7 +57,6 @@ static const char sccsid[] = "@(#)w.c 8. #include #include -#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:42:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 11856C25; Sun, 28 Jul 2013 18:42:09 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BE4842557; Sun, 28 Jul 2013 18:42:08 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 7DDB2AC6A; Sun, 28 Jul 2013 18:42:06 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 7DDB2AC6A Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sun, 28 Jul 2013 14:42:04 -0400 From: Glen Barber To: Ian Lepore Subject: Re: svn commit: r253744 - head/usr.sbin/watchdogd Message-ID: <20130728184204.GI2272@glenbarber.us> References: <201307281656.r6SGuVYx023459@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GN/IAAAoV4GJoJGS" Content-Disposition: inline In-Reply-To: <201307281656.r6SGuVYx023459@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:42:09 -0000 --GN/IAAAoV4GJoJGS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 28, 2013 at 04:56:31PM +0000, Ian Lepore wrote: > Author: ian > Date: Sun Jul 28 16:56:31 2013 > New Revision: 253744 > URL: http://svnweb.freebsd.org/changeset/base/253744 >=20 > Log: > Fix printf of seconds for systems where time_t is 64 bits. >=20 > Modified: > head/usr.sbin/watchdogd/watchdogd.c >=20 > Modified: head/usr.sbin/watchdogd/watchdogd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:50:45 2013 (r253743) > +++ head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:56:31 2013 (r253744) > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const=20 > if (debugging) { > printf("Timeout for %s%s " > "is 2^%d nanoseconds " > - "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", > + "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n", > longopt ? "-" : "", longopt ? longopt : shortopt, > rv, > - myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > + myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks); This breaks head/ for at least arm. cc -O -pipe -std=3Dgnu99 -Qunused-arguments -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -o= watch watch.o -ltermcap gzip -cn /src/usr.sbin/watch/watch.8 > watch.8.gz =3D=3D=3D> usr.sbin/watchdogd (all) cc -O -pipe -std=3Dgnu99 -Qunused-arguments -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /src/usr.sbin/watchdogd/watchdogd.c /src/usr.sbin/watchdogd/watchdogd.c:236:17: error: format specifies type 'long' but the argument has type 'time_t' (aka 'long long') [-Werror,-Wformat] myoptarg, ts.tv_sec, ts.tv_nsec, ticks); ^~~~~~~~~ 1 error generated. *** Error code 1 Stop. bmake: stopped in /src/usr.sbin/watchdogd *** Error code 1 http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-armv6-arm.full Glen --GN/IAAAoV4GJoJGS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJR9WX8AAoJEFJPDDeguUajZoEIAIBxQ/vYa8/d9DVVxpMeA2Hq l6HfdpHsHR4IhjBwOVMpKopYHOZGxRyzr/w4h5zAarN7L3Xy8gwxGuPbd/Iq15eK 56Bkxst49f5HUHl7qGcvjVgwdU1FFqjT5S1Djx7h6FK1N9Qe/Zc4HZdXZTIGK3JZ zKvj0xVOlphd/cy7xTxRhiMf8Y91e6WwFBfvZ6pTI6t4/zMu3IdHq4MzJBx8TsQm 8ejnctyjjodoCwAMSWEfjxm/POol2JmP3KZW8dUoytBQ3c3NWsdlUo0BwWakg9ll UOckNSy3zdr08PUlYyHNqmixZAq4ic9sQh3l3LlA9tYqCuC/q/ONsCEwjRT8F60= =3q9i -----END PGP SIGNATURE----- --GN/IAAAoV4GJoJGS-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:44:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 98C12E14; Sun, 28 Jul 2013 18:44:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 824E72572; Sun, 28 Jul 2013 18:44:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SIiLJu057108; Sun, 28 Jul 2013 18:44:21 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SIiInv057089; Sun, 28 Jul 2013 18:44:18 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307281844.r6SIiInv057089@svn.freebsd.org> From: Andriy Gapon Date: Sun, 28 Jul 2013 18:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253750 - in head: lib/libc/powerpc/gen lib/libc/powerpc64/gen libexec/rtld-elf/powerpc libexec/rtld-elf/powerpc64 sbin/adjkerntz share/examples/perfmon sys/amd64/include sys/arm/includ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:44:21 -0000 Author: avg Date: Sun Jul 28 18:44:17 2013 New Revision: 253750 URL: http://svnweb.freebsd.org/changeset/base/253750 Log: Revert r253748,253749 This WIP should not have been committed yet. Pointyhat to: avg Modified: head/lib/libc/powerpc/gen/syncicache.c head/lib/libc/powerpc64/gen/syncicache.c head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc64/reloc.c head/sbin/adjkerntz/adjkerntz.c head/share/examples/perfmon/perfmon.c head/sys/amd64/include/cpu.h head/sys/arm/include/cpu.h head/sys/i386/include/cpu.h head/sys/ia64/include/cpu.h head/sys/mips/include/cpu.h head/sys/powerpc/include/cpu.h head/sys/sparc64/include/cpu.h head/tools/tools/vhba/vhba.h head/usr.bin/w/w.c Directory Properties: head/sys/dev/usb/serial/uark.c (props changed) Modified: head/lib/libc/powerpc/gen/syncicache.c ============================================================================== --- head/lib/libc/powerpc/gen/syncicache.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/lib/libc/powerpc/gen/syncicache.c Sun Jul 28 18:44:17 2013 (r253750) @@ -44,6 +44,7 @@ static const char rcsid[] = #endif #include +#include #include #ifdef _STANDALONE Modified: head/lib/libc/powerpc64/gen/syncicache.c ============================================================================== --- head/lib/libc/powerpc64/gen/syncicache.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/lib/libc/powerpc64/gen/syncicache.c Sun Jul 28 18:44:17 2013 (r253750) @@ -44,6 +44,7 @@ static const char rcsid[] = #endif #include +#include #include #ifdef _STANDALONE Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/libexec/rtld-elf/powerpc/reloc.c Sun Jul 28 18:44:17 2013 (r253750) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/libexec/rtld-elf/powerpc64/reloc.c Sun Jul 28 18:44:17 2013 (r253750) @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "debug.h" Modified: head/sbin/adjkerntz/adjkerntz.c ============================================================================== --- head/sbin/adjkerntz/adjkerntz.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/sbin/adjkerntz/adjkerntz.c Sun Jul 28 18:44:17 2013 (r253750) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "pathnames.h" Modified: head/share/examples/perfmon/perfmon.c ============================================================================== --- head/share/examples/perfmon/perfmon.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/share/examples/perfmon/perfmon.c Sun Jul 28 18:44:17 2013 (r253750) @@ -32,6 +32,7 @@ #include #include +#include #include #include Modified: head/sys/amd64/include/cpu.h ============================================================================== --- head/sys/amd64/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/amd64/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -36,8 +36,6 @@ #ifndef _MACHINE_CPU_H_ #define _MACHINE_CPU_H_ -#ifdef _KERNEL - /* * Definitions unique to i386 cpu support. */ @@ -55,6 +53,7 @@ (ISPL((framep)->tf_cs) == SEL_UPL) #define TRAPF_PC(framep) ((framep)->tf_rip) +#ifdef _KERNEL extern char btext[]; extern char etext[]; Modified: head/sys/arm/include/cpu.h ============================================================================== --- head/sys/arm/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/arm/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -6,11 +6,10 @@ #include -#ifdef _KERNEL - void cpu_halt(void); void swi_vm(void *); +#ifdef _KERNEL static __inline uint64_t get_cyclecount(void) { @@ -20,6 +19,7 @@ get_cyclecount(void) return ((uint64_t)bt.sec << 56 | bt.frac >> 8); } +#endif #define TRAPF_USERMODE(frame) ((frame->tf_spsr & PSR_MODE) == PSR_USR32_MODE) @@ -50,5 +50,4 @@ void *initarm(struct arm_boot_params *); extern char btext[]; extern char etext[]; int badaddr_read(void *, size_t, void *); -#endif #endif /* !MACHINE_CPU_H */ Modified: head/sys/i386/include/cpu.h ============================================================================== --- head/sys/i386/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/i386/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -43,8 +43,6 @@ #include #include -#ifdef _KERNEL - #define cpu_exec(p) /* nothing */ #define cpu_swapin(p) /* nothing */ #define cpu_getstack(td) ((td)->td_frame->tf_esp) @@ -55,6 +53,7 @@ ((ISPL((framep)->tf_cs) == SEL_UPL) || ((framep)->tf_eflags & PSL_VM)) #define TRAPF_PC(framep) ((framep)->tf_eip) +#ifdef _KERNEL extern char btext[]; extern char etext[]; Modified: head/sys/ia64/include/cpu.h ============================================================================== --- head/sys/ia64/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/ia64/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -44,12 +44,12 @@ #include -#ifdef _KERNEL - #define TRAPF_PC(tf) ((tf)->tf_special.iip) #define TRAPF_CPL(tf) ((tf)->tf_special.psr & IA64_PSR_CPL) #define TRAPF_USERMODE(tf) (TRAPF_CPL(tf) != IA64_PSR_CPL_KERN) +#ifdef _KERNEL + #ifdef GPROF extern char btext[]; extern char etext[]; Modified: head/sys/mips/include/cpu.h ============================================================================== --- head/sys/mips/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/mips/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -49,8 +49,6 @@ #include -#if defined(_KERNEL) - /* BEGIN: these are going away */ #define soft_int_mask(softintr) (1 << ((softintr) + 8)) @@ -76,7 +74,9 @@ * A machine-independent interface to the CPU's counter. */ #define get_cyclecount() mips_rd_count() +#endif /* !_LOCORE */ +#if defined(_KERNEL) && !defined(_LOCORE) extern char btext[]; extern char etext[]; @@ -85,6 +85,5 @@ void swi_vm(void *); void cpu_halt(void); void cpu_reset(void); -#endif /* !_LOCORE */ #endif /* _KERNEL */ #endif /* !_MACHINE_CPU_H_ */ Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/powerpc/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -39,8 +39,6 @@ #include #include -#ifdef _KERNEL - /* * CPU Feature Attributes * @@ -100,5 +98,4 @@ void cpu_reset(void); void fork_trampoline(void); void swi_vm(void *); -#endif /* _KERNEL */ #endif /* _MACHINE_CPU_H_ */ Modified: head/sys/sparc64/include/cpu.h ============================================================================== --- head/sys/sparc64/include/cpu.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/sys/sparc64/include/cpu.h Sun Jul 28 18:44:17 2013 (r253750) @@ -40,8 +40,6 @@ #include #include -#ifdef _KERNEL - #define TRAPF_PC(tfp) ((tfp)->tf_tpc) #define TRAPF_USERMODE(tfp) (((tfp)->tf_tstate & TSTATE_PRIV) == 0) @@ -49,6 +47,8 @@ #define cpu_setstack(td, sp) ((td)->td_frame->tf_sp = (sp)) #define cpu_spinwait() /* nothing */ +#ifdef _KERNEL + extern char btext[]; extern char etext[]; Modified: head/tools/tools/vhba/vhba.h ============================================================================== --- head/tools/tools/vhba/vhba.h Sun Jul 28 18:35:43 2013 (r253749) +++ head/tools/tools/vhba/vhba.h Sun Jul 28 18:44:17 2013 (r253750) @@ -43,6 +43,7 @@ #include #include +#include #include #include Modified: head/usr.bin/w/w.c ============================================================================== --- head/usr.bin/w/w.c Sun Jul 28 18:35:43 2013 (r253749) +++ head/usr.bin/w/w.c Sun Jul 28 18:44:17 2013 (r253750) @@ -57,6 +57,7 @@ static const char sccsid[] = "@(#)w.c 8. #include #include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:46:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0C9D1FBE; Sun, 28 Jul 2013 18:46:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D516E258B; Sun, 28 Jul 2013 18:46:56 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1V3VzW-00035V-2h; Sun, 28 Jul 2013 18:46:50 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r6SIkkvX016209; Sun, 28 Jul 2013 12:46:46 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+XiPoUGTkjwBHjZPoKb5Km Subject: Re: svn commit: r253744 - head/usr.sbin/watchdogd From: Ian Lepore To: Glen Barber In-Reply-To: <20130728184204.GI2272@glenbarber.us> References: <201307281656.r6SGuVYx023459@svn.freebsd.org> <20130728184204.GI2272@glenbarber.us> Content-Type: text/plain; charset="us-ascii" Date: Sun, 28 Jul 2013 12:46:46 -0600 Message-ID: <1375037206.45247.17.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:46:57 -0000 On Sun, 2013-07-28 at 14:42 -0400, Glen Barber wrote: > On Sun, Jul 28, 2013 at 04:56:31PM +0000, Ian Lepore wrote: > > Author: ian > > Date: Sun Jul 28 16:56:31 2013 > > New Revision: 253744 > > URL: http://svnweb.freebsd.org/changeset/base/253744 > > > > Log: > > Fix printf of seconds for systems where time_t is 64 bits. > > > > Modified: > > head/usr.sbin/watchdogd/watchdogd.c > > > > Modified: head/usr.sbin/watchdogd/watchdogd.c > > ============================================================================== > > --- head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:50:45 2013 (r253743) > > +++ head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:56:31 2013 (r253744) > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > #include > > #include > > #include > > +#include > > #include > > #include > > #include > > @@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const > > if (debugging) { > > printf("Timeout for %s%s " > > "is 2^%d nanoseconds " > > - "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", > > + "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n", > > longopt ? "-" : "", longopt ? longopt : shortopt, > > rv, > > - myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > > + myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks); > > This breaks head/ for at least arm. > > cc -O -pipe -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror > -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign > -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare > -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function > -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -o watch watch.o -ltermcap > gzip -cn /src/usr.sbin/watch/watch.8 > watch.8.gz > ===> usr.sbin/watchdogd (all) > cc -O -pipe -std=gnu99 -Qunused-arguments -Wsystem-headers -Werror > -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align > -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls > -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign > -Wno-empty-body -Wno-string-plus-int -c > /src/usr.sbin/watchdogd/watchdogd.c > /src/usr.sbin/watchdogd/watchdogd.c:236:17: error: format specifies type > 'long' but the argument has type 'time_t' (aka 'long long') > [-Werror,-Wformat] > myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > ^~~~~~~~~ > 1 error generated. > *** Error code 1 > > Stop. > bmake: stopped in /src/usr.sbin/watchdogd > *** Error code 1 > > http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-armv6-arm.full > > Glen > Umm, no, it fixes the error you cite (tinderbox hasn't caught up to the fix yet). -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 18:56:34 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1EF543AC; Sun, 28 Jul 2013 18:56:34 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB50825DA; Sun, 28 Jul 2013 18:56:33 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 30A65ADF2; Sun, 28 Jul 2013 18:56:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 30A65ADF2 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sun, 28 Jul 2013 14:56:30 -0400 From: Glen Barber To: Ian Lepore Subject: Re: svn commit: r253744 - head/usr.sbin/watchdogd Message-ID: <20130728185630.GJ2272@glenbarber.us> References: <201307281656.r6SGuVYx023459@svn.freebsd.org> <20130728184204.GI2272@glenbarber.us> <1375037206.45247.17.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2gg7fA5kVn3CgPY0" Content-Disposition: inline In-Reply-To: <1375037206.45247.17.camel@revolution.hippie.lan> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 18:56:34 -0000 --2gg7fA5kVn3CgPY0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 28, 2013 at 12:46:46PM -0600, Ian Lepore wrote: > On Sun, 2013-07-28 at 14:42 -0400, Glen Barber wrote: > > On Sun, Jul 28, 2013 at 04:56:31PM +0000, Ian Lepore wrote: > > > Author: ian > > > Date: Sun Jul 28 16:56:31 2013 > > > New Revision: 253744 > > > URL: http://svnweb.freebsd.org/changeset/base/253744 > > >=20 > > > Log: > > > Fix printf of seconds for systems where time_t is 64 bits. > > >=20 > > > Modified: > > > head/usr.sbin/watchdogd/watchdogd.c > > >=20 > > > Modified: head/usr.sbin/watchdogd/watchdogd.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > > --- head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:50:45 2013 (r25= 3743) > > > +++ head/usr.sbin/watchdogd/watchdogd.c Sun Jul 28 16:56:31 2013 (r25= 3744) > > > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > > > #include > > > #include > > > #include > > > +#include > > > #include > > > #include > > > #include > > > @@ -230,10 +231,10 @@ parse_timeout_to_pow2ns(char opt, const=20 > > > if (debugging) { > > > printf("Timeout for %s%s " > > > "is 2^%d nanoseconds " > > > - "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", > > > + "(in: %s sec -> out: %jd sec %ld ns -> %d ticks)\n", > > > longopt ? "-" : "", longopt ? longopt : shortopt, > > > rv, > > > - myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > > > + myoptarg, (intmax_t)ts.tv_sec, ts.tv_nsec, ticks); > >=20 > > This breaks head/ for at least arm. > >=20 > > cc -O -pipe -std=3Dgnu99 -Qunused-arguments -Wsystem-headers -Werror > > -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign > > -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare > > -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function > > -Wno-conversion -Wno-switch -Wno-switch-enum -Wno-knr-promoted-paramete= r -o watch watch.o -ltermcap > > gzip -cn /src/usr.sbin/watch/watch.8 > watch.8.gz > > =3D=3D=3D> usr.sbin/watchdogd (all) > > cc -O -pipe -std=3Dgnu99 -Qunused-arguments -Wsystem-headers -Werror > > -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes > > -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual > > -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align > > -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls > > -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign > > -Wno-empty-body -Wno-string-plus-int -c > > /src/usr.sbin/watchdogd/watchdogd.c > > /src/usr.sbin/watchdogd/watchdogd.c:236:17: error: format specifies type > > 'long' but the argument has type 'time_t' (aka 'long long') > > [-Werror,-Wformat] > > myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > > ^~~~~~~~~ > > 1 error generated. > > *** Error code 1 > >=20 > > Stop. > > bmake: stopped in /src/usr.sbin/watchdogd > > *** Error code 1 > >=20 > > http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-armv6-arm.full > >=20 > > Glen > >=20 >=20 > Umm, no, it fixes the error you cite (tinderbox hasn't caught up to the > fix yet). >=20 Ugh. My eyes do not seem to work then... Sorry for the noise. Glen --2gg7fA5kVn3CgPY0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJR9WleAAoJEFJPDDeguUaj12EH/jfAFupJrteFL3/39Eqt+Hx3 Bbk6Grr5JU5HmxFMgbUr5LZF+Lnsxicn0vHyTyKClzPAXMnwaP1hlzOgpfhoG9c8 WvPyIPF+dpURX69GM77z7CSXLvYN23ohCwN1Q0IDqdczB35BqZacAi2SkWhj6ktM /Fw9ckQAb5f5r3alSGQggpd4WRIllZRYwOSc7CtIq0jyyVfMB3UMonz798qsLsWj Mlt7Fh10VN5IUkSHty/lc48Eli28lMzs89mNdx7PVdCUMrhHnyZIIzVv8PdXQOdX Ea0JKNaJXVFUde4UMgUM5coE6KOAblZlj6Ht0tAhFC1xGhhlygDN7kcAYr1TjmQ= =LBHD -----END PGP SIGNATURE----- --2gg7fA5kVn3CgPY0-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 19:49:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B32D568; Sun, 28 Jul 2013 19:49:40 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2EE0227C9; Sun, 28 Jul 2013 19:49:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SJneLH075992; Sun, 28 Jul 2013 19:49:40 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SJnexZ075991; Sun, 28 Jul 2013 19:49:40 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307281949.r6SJnexZ075991@svn.freebsd.org> From: Hiroki Sato Date: Sun, 28 Jul 2013 19:49:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253751 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 19:49:40 -0000 Author: hrs Date: Sun Jul 28 19:49:39 2013 New Revision: 253751 URL: http://svnweb.freebsd.org/changeset/base/253751 Log: - Relax the restriction on the member interfaces with LLAs. Two or more LLAs on the member interfaces are actually harmless when the parent interface does not have a LLA. - Add net.link.bridge.allow_llz_overlap. This is a knob to allow LLAs on a bridge and the member interfaces at the same time. The default is 0. Pointed out by: ume MFC after: 3 days Modified: head/sys/net/if_bridge.c Modified: head/sys/net/if_bridge.c ============================================================================== --- head/sys/net/if_bridge.c Sun Jul 28 18:44:17 2013 (r253750) +++ head/sys/net/if_bridge.c Sun Jul 28 19:49:39 2013 (r253751) @@ -382,6 +382,12 @@ SYSCTL_INT(_net_link_bridge, OID_AUTO, i &bridge_inherit_mac, 0, "Inherit MAC address from the first bridge member"); +static VNET_DEFINE(int, allow_llz_overlap) = 0; +#define V_allow_llz_overlap VNET(allow_llz_overlap) +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, CTLFLAG_RW, + &VNET_NAME(allow_llz_overlap), 0, "Allow overlap of link-local scope " + "zones of a bridge interface and the member interfaces"); + struct bridge_control { int (*bc_func)(struct bridge_softc *, void *); int bc_argsize; @@ -1064,7 +1070,8 @@ bridge_ioctl_add(struct bridge_softc *sc */ /* Check if the parent interface has a link-local scope addr. */ - if (in6ifa_llaonifp(sc->sc_ifp) != NULL) { + if (V_allow_llz_overlap == 0 && + in6ifa_llaonifp(sc->sc_ifp) != NULL) { /* * If any, remove all inet6 addresses from the member * interfaces. @@ -1093,32 +1100,6 @@ bridge_ioctl_add(struct bridge_softc *sc "IPv6 address scope violation.\n", ifs->if_xname); } - } else { - struct in6_ifaddr *ia6_m, *ia6_s; - /* - * If not, check whether one of the existing member - * interfaces have inet6 address. If any, remove - * inet6 addresses on the interface to be added. - */ - ia6_m = NULL; - BRIDGE_XLOCK(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { - ia6_m = in6ifa_llaonifp(bif->bif_ifp); - if (ia6_m != NULL) - break; - } - BRIDGE_XDROP(sc); - ia6_s = in6ifa_llaonifp(ifs); - - if (ia6_m != NULL && ia6_s != NULL) { - BRIDGE_UNLOCK(sc); - in6_ifdetach(ifs); - BRIDGE_LOCK(sc); - if_printf(sc->sc_ifp, "IPv6 addresses on %s have " - "been removed before adding it as a member " - "to prevent IPv6 address scope violation.\n", - ifs->if_xname); - } } #endif /* Allow the first Ethernet member to define the MTU */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 19:56:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 570266FB; Sun, 28 Jul 2013 19:56:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 34DFB27F8; Sun, 28 Jul 2013 19:56:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SJu9mq078546; Sun, 28 Jul 2013 19:56:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SJu8xQ078544; Sun, 28 Jul 2013 19:56:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307281956.r6SJu8xQ078544@svn.freebsd.org> From: Alexander Motin Date: Sun, 28 Jul 2013 19:56:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253752 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 19:56:09 -0000 Author: mav Date: Sun Jul 28 19:56:08 2013 New Revision: 253752 URL: http://svnweb.freebsd.org/changeset/base/253752 Log: Fix returning incorrect bio_resid value with failed BIO_DELETE requests. Neither residual length reported for ATA/SCSI command nor one from another BIO_DELETE request are in any way related to the value to be returned. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sun Jul 28 19:49:39 2013 (r253751) +++ head/sys/cam/ata/ata_da.c Sun Jul 28 19:56:08 2013 (r253752) @@ -1684,6 +1684,7 @@ adadone(struct cam_periph *periph, union struct ccb_ataio *ataio; struct ccb_getdev *cgd; struct cam_path *path; + int state; softc = (struct ada_softc *)periph->softc; ataio = &done_ccb->ataio; @@ -1691,31 +1692,20 @@ adadone(struct cam_periph *periph, union CAM_DEBUG(path, CAM_DEBUG_TRACE, ("adadone\n")); - switch (ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) { + state = ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK; + switch (state) { case ADA_CCB_BUFFER_IO: case ADA_CCB_TRIM: { struct bio *bp; + int error; - bp = (struct bio *)done_ccb->ccb_h.ccb_bp; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - int error; - error = adaerror(done_ccb, 0, 0); if (error == ERESTART) { /* A retry was scheduled, so just return. */ return; } - if (error != 0) { - bp->bio_error = error; - bp->bio_resid = bp->bio_bcount; - bp->bio_flags |= BIO_ERROR; - } else { - bp->bio_resid = ataio->resid; - bp->bio_error = 0; - if (bp->bio_resid != 0) - bp->bio_flags |= BIO_ERROR; - } if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) cam_release_devq(path, /*relsim_flags*/0, @@ -1725,26 +1715,38 @@ adadone(struct cam_periph *periph, union } else { if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) panic("REQ_CMP with QFRZN"); - bp->bio_resid = ataio->resid; - if (ataio->resid > 0) + error = 0; + } + bp = (struct bio *)done_ccb->ccb_h.ccb_bp; + bp->bio_error = error; + if (error != 0) { + bp->bio_resid = bp->bio_bcount; + bp->bio_flags |= BIO_ERROR; + } else { + if (state == ADA_CCB_TRIM) + bp->bio_resid = 0; + else + bp->bio_resid = ataio->resid; + if (bp->bio_resid > 0) bp->bio_flags |= BIO_ERROR; } softc->outstanding_cmds--; if (softc->outstanding_cmds == 0) softc->flags |= ADA_FLAG_WENT_IDLE; - if ((ataio->ccb_h.ccb_state & ADA_CCB_TYPE_MASK) == - ADA_CCB_TRIM) { + if (state == ADA_CCB_TRIM) { struct trim_request *req = (struct trim_request *)ataio->data_ptr; int i; for (i = 1; i < TRIM_MAX_BIOS && req->bps[i]; i++) { struct bio *bp1 = req->bps[i]; - - bp1->bio_resid = bp->bio_resid; + bp1->bio_error = bp->bio_error; - if (bp->bio_flags & BIO_ERROR) + if (bp->bio_flags & BIO_ERROR) { bp1->bio_flags |= BIO_ERROR; + bp1->bio_resid = bp1->bio_bcount; + } else + bp1->bio_resid = 0; biodone(bp1); } softc->trim_running = 0; Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Sun Jul 28 19:49:39 2013 (r253751) +++ head/sys/cam/scsi/scsi_da.c Sun Jul 28 19:56:08 2013 (r253752) @@ -2921,7 +2921,10 @@ dadone(struct cam_periph *periph, union bp->bio_flags |= BIO_ERROR; } } else if (bp != NULL) { - bp->bio_resid = csio->resid; + if (state == DA_CCB_DELETE) + bp->bio_resid = 0; + else + bp->bio_resid = csio->resid; bp->bio_error = 0; if (bp->bio_resid != 0) bp->bio_flags |= BIO_ERROR; @@ -2935,7 +2938,10 @@ dadone(struct cam_periph *periph, union } else if (bp != NULL) { if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) panic("REQ_CMP with QFRZN"); - bp->bio_resid = csio->resid; + if (state == DA_CCB_DELETE) + bp->bio_resid = 0; + else + bp->bio_resid = csio->resid; if (csio->resid > 0) bp->bio_flags |= BIO_ERROR; if (softc->error_inject != 0) { @@ -2944,7 +2950,6 @@ dadone(struct cam_periph *periph, union bp->bio_flags |= BIO_ERROR; softc->error_inject = 0; } - } /* @@ -2959,10 +2964,12 @@ dadone(struct cam_periph *periph, union if (state == DA_CCB_DELETE) { while ((bp1 = bioq_takefirst(&softc->delete_run_queue)) != NULL) { - bp1->bio_resid = bp->bio_resid; bp1->bio_error = bp->bio_error; - if (bp->bio_flags & BIO_ERROR) + if (bp->bio_flags & BIO_ERROR) { bp1->bio_flags |= BIO_ERROR; + bp1->bio_resid = bp1->bio_bcount; + } else + bp1->bio_resid = 0; biodone(bp1); } softc->delete_running = 0; From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 20:02:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D9A8C979; Sun, 28 Jul 2013 20:02:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C552A2831; Sun, 28 Jul 2013 20:02:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SK2fKB081482; Sun, 28 Jul 2013 20:02:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SK2fAq081481; Sun, 28 Jul 2013 20:02:41 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307282002.r6SK2fAq081481@svn.freebsd.org> From: Hiroki Sato Date: Sun, 28 Jul 2013 20:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253753 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 20:02:41 -0000 Author: hrs Date: Sun Jul 28 20:02:41 2013 New Revision: 253753 URL: http://svnweb.freebsd.org/changeset/base/253753 Log: sin6 should be assigned before the loop. Modified: head/sys/net/rtsock.c Modified: head/sys/net/rtsock.c ============================================================================== --- head/sys/net/rtsock.c Sun Jul 28 19:56:08 2013 (r253752) +++ head/sys/net/rtsock.c Sun Jul 28 20:02:41 2013 (r253753) @@ -968,8 +968,8 @@ flush: #ifdef INET6 if (rti_need_deembed) { /* sin6_scope_id is recovered before sending rtm. */ + sin6 = (struct sockaddr_in6 *)&ss; for (i = 0; i < RTAX_MAX; i++) { - sin6 = (struct sockaddr_in6 *)&ss; if (info.rti_info[i] == NULL) continue; if (info.rti_info[i]->sa_family != AF_INET6) From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 20:07:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 69460CC2; Sun, 28 Jul 2013 20:07:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 55D2A2883; Sun, 28 Jul 2013 20:07:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SK7ZQp082254; Sun, 28 Jul 2013 20:07:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SK7ZmR082253; Sun, 28 Jul 2013 20:07:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307282007.r6SK7ZmR082253@svn.freebsd.org> From: Alexander Motin Date: Sun, 28 Jul 2013 20:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253754 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 20:07:35 -0000 Author: mav Date: Sun Jul 28 20:07:34 2013 New Revision: 253754 URL: http://svnweb.freebsd.org/changeset/base/253754 Log: Partially close race between calls of orphan() method from GEOM and close() method from ZFS core, that reliably causes use-after-free panic if SSD vdev detached during inititial erase. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Jul 28 20:02:41 2013 (r253753) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Sun Jul 28 20:07:34 2013 (r253754) @@ -69,6 +69,8 @@ vdev_geom_orphan(struct g_consumer *cp) g_topology_assert(); vd = cp->private; + if (vd == NULL) + return; /* * Orphan callbacks occur from the GEOM event thread. @@ -689,6 +691,7 @@ vdev_geom_close(vdev_t *vd) return; vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; + cp->private = NULL; /* XXX locking */ g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL); } From owner-svn-src-all@FreeBSD.ORG Sun Jul 28 20:11:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C5389F37; Sun, 28 Jul 2013 20:11:31 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B223D28BF; Sun, 28 Jul 2013 20:11:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6SKBVhF084820; Sun, 28 Jul 2013 20:11:31 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6SKBVLA084819; Sun, 28 Jul 2013 20:11:31 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201307282011.r6SKBVLA084819@svn.freebsd.org> From: Baptiste Daroussin Date: Sun, 28 Jul 2013 20:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253755 - head/usr.sbin/pkg X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 20:11:31 -0000 Author: bapt Date: Sun Jul 28 20:11:31 2013 New Revision: 253755 URL: http://svnweb.freebsd.org/changeset/base/253755 Log: Fix detection of arm ABIs Submitted by: andrew Obtained from: pkg git Modified: head/usr.sbin/pkg/config.c Modified: head/usr.sbin/pkg/config.c ============================================================================== --- head/usr.sbin/pkg/config.c Sun Jul 28 20:07:34 2013 (r253754) +++ head/usr.sbin/pkg/config.c Sun Jul 28 20:11:31 2013 (r253755) @@ -108,7 +108,7 @@ pkg_get_myabi(char *dest, size_t sz) Elf_Note note; Elf_Scn *scn; char *src, *osname; - const char *abi; + const char *abi, *fpu; GElf_Ehdr elfhdr; GElf_Shdr shdr; int fd, i, ret; @@ -187,13 +187,25 @@ pkg_get_myabi(char *dest, size_t sz) switch (elfhdr.e_machine) { case EM_ARM: + /* FreeBSD doesn't support the hard-float ABI yet */ + fpu = "softfp"; + if ((elfhdr.e_flags & 0xFF000000) != 0) { + /* This is an EABI file, the conformance level is set */ + abi = "eabi"; + } else if (elfhdr.e_ident[EI_OSABI] != ELFOSABI_NONE) { + /* + * EABI executables all have this field set to + * ELFOSABI_NONE, therefore it must be an oabi file. + */ + abi = "oabi"; + } else { + ret = 1; + goto cleanup; + } snprintf(dest + strlen(dest), sz - strlen(dest), ":%s:%s:%s", elf_corres_to_string(endian_corres, (int)elfhdr.e_ident[EI_DATA]), - (elfhdr.e_flags & EF_ARM_NEW_ABI) > 0 ? - "eabi" : "oabi", - (elfhdr.e_flags & EF_ARM_VFP_FLOAT) > 0 ? - "softfp" : "vfp"); + abi, fpu); break; case EM_MIPS: /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 05:39:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 10000F06; Mon, 29 Jul 2013 05:39:21 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F1AE92C23; Mon, 29 Jul 2013 05:39:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T5dKOd054387; Mon, 29 Jul 2013 05:39:20 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T5dKsE054386; Mon, 29 Jul 2013 05:39:20 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201307290539.r6T5dKsE054386@svn.freebsd.org> From: Justin Hibbits Date: Mon, 29 Jul 2013 05:39:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253756 - head/sys/dev/wi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 05:39:21 -0000 Author: jhibbits Date: Mon Jul 29 05:39:20 2013 New Revision: 253756 URL: http://svnweb.freebsd.org/changeset/base/253756 Log: Use the streaming functions for reading/writing the BAP fields on wi(4). This fixes wi(4) device access on big endian architectures. PR: kern/164499 Reviewed by: adrian Obtained from: NetBSD Modified: head/sys/dev/wi/if_wi.c Modified: head/sys/dev/wi/if_wi.c ============================================================================== --- head/sys/dev/wi/if_wi.c Sun Jul 28 20:11:31 2013 (r253755) +++ head/sys/dev/wi/if_wi.c Mon Jul 29 05:39:20 2013 (r253756) @@ -1905,8 +1905,7 @@ wi_seek_bap(struct wi_softc *sc, int id, static int wi_read_bap(struct wi_softc *sc, int id, int off, void *buf, int buflen) { - u_int16_t *ptr; - int i, error, cnt; + int error, cnt; if (buflen == 0) return 0; @@ -1915,9 +1914,7 @@ wi_read_bap(struct wi_softc *sc, int id, return error; } cnt = (buflen + 1) / 2; - ptr = (u_int16_t *)buf; - for (i = 0; i < cnt; i++) - *ptr++ = CSR_READ_2(sc, WI_DATA0); + CSR_READ_MULTI_STREAM_2(sc, WI_DATA0, (u_int16_t *)buf, cnt); sc->sc_bap_off += cnt * 2; return 0; } @@ -1925,8 +1922,7 @@ wi_read_bap(struct wi_softc *sc, int id, static int wi_write_bap(struct wi_softc *sc, int id, int off, void *buf, int buflen) { - u_int16_t *ptr; - int i, error, cnt; + int error, cnt; if (buflen == 0) return 0; @@ -1936,9 +1932,7 @@ wi_write_bap(struct wi_softc *sc, int id return error; } cnt = (buflen + 1) / 2; - ptr = (u_int16_t *)buf; - for (i = 0; i < cnt; i++) - CSR_WRITE_2(sc, WI_DATA0, ptr[i]); + CSR_WRITE_MULTI_STREAM_2(sc, WI_DATA0, (u_int16_t *)buf, cnt); sc->sc_bap_off += cnt * 2; return 0; From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 05:54:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8E163250; Mon, 29 Jul 2013 05:54:15 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7ABE02C9B; Mon, 29 Jul 2013 05:54:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T5sFFi059475; Mon, 29 Jul 2013 05:54:15 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T5sD1F059466; Mon, 29 Jul 2013 05:54:13 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201307290554.r6T5sD1F059466@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 29 Jul 2013 05:54:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253757 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 05:54:15 -0000 Author: hselasky Date: Mon Jul 29 05:54:13 2013 New Revision: 253757 URL: http://svnweb.freebsd.org/changeset/base/253757 Log: Fix alignment of USB WLAN radiotap headers. This makes USB WLAN adapters work on ARM, MIPS and similar platforms, where alignment matters. MFC after: 1 week Reported by: XiaoQI Ge Modified: head/sys/dev/usb/wlan/if_rumvar.h head/sys/dev/usb/wlan/if_runvar.h head/sys/dev/usb/wlan/if_uathvar.h head/sys/dev/usb/wlan/if_upgtvar.h head/sys/dev/usb/wlan/if_uralvar.h head/sys/dev/usb/wlan/if_urtwnreg.h head/sys/dev/usb/wlan/if_urtwvar.h head/sys/dev/usb/wlan/if_zydreg.h Modified: head/sys/dev/usb/wlan/if_rumvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_rumvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_rumvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -29,7 +29,7 @@ struct rum_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RT2573_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -47,7 +47,7 @@ struct rum_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed __aligned(8); #define RT2573_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_runvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_runvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_runvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -58,7 +58,7 @@ struct run_rx_radiotap_header { int8_t wr_dbm_antsignal; uint8_t wr_antenna; uint8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define RUN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ @@ -75,7 +75,7 @@ struct run_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_hwqueue; -} __packed; +} __packed __aligned(8); #define IEEE80211_RADIOTAP_HWQUEUE 15 Modified: head/sys/dev/usb/wlan/if_uathvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uathvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_uathvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -52,7 +52,7 @@ struct uath_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; u_int8_t wr_antenna; -} __packed; +} __packed __aligned(8); #define UATH_RX_RADIOTAP_PRESENT ( \ (1 << IEEE80211_RADIOTAP_TSFT) | \ @@ -69,7 +69,7 @@ struct uath_tx_radiotap_header { uint8_t wt_flags; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define UATH_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_upgtvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_upgtvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_upgtvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -380,7 +380,7 @@ struct upgt_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_antsignal; -} __packed; +} __packed __aligned(8); #define UPGT_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -394,7 +394,7 @@ struct upgt_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define UPGT_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_uralvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_uralvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_uralvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -34,7 +34,7 @@ struct ural_rx_radiotap_header { int8_t wr_antsignal; int8_t wr_antnoise; uint8_t wr_antenna; -}; +} __packed __aligned(8); #define RAL_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -51,7 +51,7 @@ struct ural_tx_radiotap_header { uint16_t wt_chan_freq; uint16_t wt_chan_flags; uint8_t wt_antenna; -}; +} __packed __aligned(8); #define RAL_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_urtwnreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_urtwnreg.h Mon Jul 29 05:54:13 2013 (r253757) @@ -1030,7 +1030,7 @@ struct urtwn_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; uint8_t wr_dbm_antsignal; -} __packed; +} __packed __aligned(8); #define URTWN_RX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ @@ -1043,7 +1043,7 @@ struct urtwn_tx_radiotap_header { uint8_t wt_flags; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define URTWN_TX_RADIOTAP_PRESENT \ (1 << IEEE80211_RADIOTAP_FLAGS | \ Modified: head/sys/dev/usb/wlan/if_urtwvar.h ============================================================================== --- head/sys/dev/usb/wlan/if_urtwvar.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_urtwvar.h Mon Jul 29 05:54:13 2013 (r253757) @@ -63,7 +63,7 @@ struct urtw_rx_radiotap_header { uint16_t wr_chan_freq; uint16_t wr_chan_flags; int8_t wr_dbm_antsignal; -} __packed; +} __packed __aligned(8); #define URTW_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -75,7 +75,7 @@ struct urtw_tx_radiotap_header { uint8_t wt_flags; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define URTW_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ Modified: head/sys/dev/usb/wlan/if_zydreg.h ============================================================================== --- head/sys/dev/usb/wlan/if_zydreg.h Mon Jul 29 05:39:20 2013 (r253756) +++ head/sys/dev/usb/wlan/if_zydreg.h Mon Jul 29 05:54:13 2013 (r253757) @@ -1185,7 +1185,7 @@ struct zyd_rx_radiotap_header { uint16_t wr_chan_flags; int8_t wr_antsignal; int8_t wr_antnoise; -} __packed; +} __packed __aligned(8); #define ZYD_RX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ @@ -1200,7 +1200,7 @@ struct zyd_tx_radiotap_header { uint8_t wt_rate; uint16_t wt_chan_freq; uint16_t wt_chan_flags; -} __packed; +} __packed __aligned(8); #define ZYD_TX_RADIOTAP_PRESENT \ ((1 << IEEE80211_RADIOTAP_FLAGS) | \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 06:53:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A71DE51D; Mon, 29 Jul 2013 06:53:42 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 918132161; Mon, 29 Jul 2013 06:53:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T6rg3i077103; Mon, 29 Jul 2013 06:53:42 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T6rgA1077102; Mon, 29 Jul 2013 06:53:42 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307290653.r6T6rgA1077102@svn.freebsd.org> From: Rui Paulo Date: Mon, 29 Jul 2013 06:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253759 - head/sys/contrib/dev/rsu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 06:53:42 -0000 Author: rpaulo Date: Mon Jul 29 06:53:42 2013 New Revision: 253759 URL: http://svnweb.freebsd.org/changeset/base/253759 Log: Realtek's RTL8712 firmware blob needed by the upcoming rsu(4) driver. Added: head/sys/contrib/dev/rsu/ head/sys/contrib/dev/rsu/rsu-rtl8712fw.fw.uu Added: head/sys/contrib/dev/rsu/rsu-rtl8712fw.fw.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/contrib/dev/rsu/rsu-rtl8712fw.fw.uu Mon Jul 29 06:53:42 2013 (r253759) @@ -0,0 +1,2149 @@ +begin-base64 644 rsu-rtl8712fw +EofsETAAAAAI6AAAUPUAADAAAACY8wAA8gAAAAUwFlOHEhIBAAASBgAAAAAABwAAAAAAAAAAAAAB +AQABAQEAAAEAAQAAAAEBAAAAAAAAAAB/AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB8AABAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJbAaPIAD +WjcAgBs8gAB7NwAAW68lsBo8GANaNwCAGzyAAHs3AABbrwGAGjwk4lonCABAAwAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAoa8IAKKvDACjrxAApK8UAKWvGACmrxwAp68gAKivJACp +rygAqq8sAKuvMACsrzQAra84AK6vPACvrxJAAAAQSAAAAHAKQEAAsK9EALGvSACyr0wAs69QALSv +VAC1r1gAtq9cALevYAC4r2QAua9oALyvbAC9r3AAvq90AL+veACor3wAqa+AAKqvFzgACCEgoAMA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADg/70nFACx +rwCAAjwlsBE8GAMjNgADQiQAAGKsGACyrxAAsK8cAL+vlkAADAAAAABCsAI8AwBHNAAA45ACgAo8 +AoALPP8AcDAANhAAEAACMgM2BgAXAEAQAoASPPxcQo1gG0QmZDeDlAEARSQQAAIksAMpNhwDKDYA +AOKgBwBgEAAAAABoN4KUZDeApGg3gKQAAAMkAAACrQAAIK0QXmKNAQBjJPxcRa0BAEIkEF5irWQ3 +g6QpAMAEQrACPJtAAAwAAAAAQAACMg8AQBRgG0Qm4BuDlNwbhZQcAL+PGACyjxQAsY8QALCPgABj +MEGwAjwlGGUACABCNCAAvScAAEOkCADgA9wbg6RCsAI8QAADJAMAQjQAAEOgJWIADAAAAABgG0Qm +4BuDlNwbhZQcAL+PGACyjxQAsY8QALCPgABjMEGwAjwlGGUACABCNCAAvScAAEOkCADgA9wbg6SA +/wMkAwBCNAAAQ6BEIgB0AAAAAO8AAAgAAAAA/wCEMAsAgiz//+cwEACokxkAQBAhGAAAAoADPIAQ +BACI5mMkIRBDAAAARIwAAAAACACAAAAAAABDsAI8eABENAcA4jAAAIWsBACGrAQAQBgAAAAA+P/i +MAgAQiT//0cwIRDoAACAAzwIAIKsJRBDAAgAgqwBAAMkCADgAyEQYABDsAI8LgEACGwARDRDsAI8 +LgEACGAARDRDsAI8LgEACFQARDRDsAI8LgEACEgARDRDsAI8LgEACDwARDRDsAI8LgEACDAARDRD +sAI8LgEACCQARDRDsAI8LgEACBgARDRDsAI8LgEACAwARDQuAQAIQ7AEPACAAzwlsAI8GANCNGwF +YyQAAEOsAQAFJEOwAjwEKIUAiABENCEQAAABAEIk//9CMAUAQyz9/2AUAQBCJAAAgpQAAAAA//9C +MCQQRQD1/0AcAAAAAAgA4AMAAAAAJbAIPACAAjzI/70nGAMDNcgFQiQAAGKsMAC2rygAtK8kALOv +HACxrzQAv68sALWvIACyrxgAsK8MAPKECAD1jP8AxjAAAQIkIxBGAP//UTDQAwg1/wCWMAAAEq0h +oKAAITDFAAAAFa0hIMACISigAiE4IAIeAQAMEACgryMYUQL//4IyAJQDAAOUEgC0AQAIApoCACiw +AzzAEBMAIRBDAAAARJAlsBA8IBACPP8AkzAAIhMA//9DMgEBRSohoIIAIaixAtADAjYAAREkC4hl +ACEgwAIAAFOsWwEADLADEDYhMIACISDAAiEooAIhOCACHgEADBAAoK8jGFECAJQDAAOUEgAAABKu +4v9AHgAAAAA0AL+PMAC2jywAtY8oALSPJACzjyAAso8cALGPGACwjwgA4AM4AL0nIVCAAAQAjYwM +AEuNCACEjP/gAjwQAEeN//9CNB8AqTEkIIIAAB4JAAIUCwAlQIMAIXigALcA4AQHAEQwAABClQAA +AAD9D0IouQBAEP/fAjwCgA48CABIrWAbwyXGPWKQAAAAAAsAQBTAMAkAxkBikP/fAzz//2M0BxCC +AAEAQjAkGAMBQBcCACVAYgAIAEitwDAJACEQyQCAEAIAIRBJAIAQAgBgG8klIShJAAglo4wBAAwk +AhMDAAEAQjC1AEwQQhgDAIIRCAABAEIwBgBAFAKAAjzA/wIkJBACAQQASDQIAEitAoACPNFcQ5AA +AAAAagBgFCEgyQDUI4OMv/8CJCQQ4gBAAGMwJThDABAAR63UI4OMf/gCJCQQ4gCAB2MwJThDABAA +R63GPSKRAAAAABIAQBRCFwgAAQBEMLEAjBACgAI8YBvEJSEgxADUI4OM//cCJCQQ4gAACGMwJThD +ABAAR63UI4OM/+8CJCQQ4gAAEGMwJThDABAAR61gG8UlITDFANQjxIz9/wI8AgADPP//QjQkIIMA +JBDiACU4RAAQAEetsBujlPv/Ajz//0I0whsDACQQ4gCAHAMAJThDABAAR607QaOQ5/8CPP//QjQD +AGMwJBDiAMAcAwAlOEMAEABHrdQjxIz//QI8AAIDPP//QjQkIIMAJBDiACU4RAAQAEetsBujlP/7 +Ajz//0I0whsDACQQ4gCAHgMAJThDABAAR607QaOQ/+cCPP//QjQDAGMwJBDiAMAeAwAlOEMAEABH +rdQjw4zA/wIkJBDiAD8AYzAlEEMAEABCrdgjxIwUAEON//8CPP9/QjQkGGIAAICEMCUYZAAUAEOt +2iPElOD/Ajz//0I0HwCEMCQYYgAAJAQAJRhkABQAQ60CAEORAhQNAAEAQjAnAEAQITBvAGAbxCXk +HYWUAAAAAAEAoiTkHYKkDABDjQDwAjz/D6Uw//9CNAAkBQAkGGIAJViDAAwAS60WAMKUABkFAGAb +xCUPAEIwJRBDABYAwqQAAEOVQEGCjAAAAAAhEEMACADgA0BBgqwUAEKNAAAAAEISAgA/AEIwDABC +KET/QBD/3wI8//9CNCRAAgEAQAM8JUADAeMBAAgCgA48YBvDJcY9YpAAAAAAHQBAFAAAAADCEwsA +DgBCMCEQQwDUHUWUAAAAAAEAoyTUHUOkDABEjQDwAjz/D6Uw//9CNAAcBQB3AgAIJCCCAH//AiQk +EAIBgABjMCVAQwAIAEitCCWjjP//Ajz/H0I0BwBjMCQQ4gBAGwMAJThDAPEBAAgQAEetAhQLAP8P +RTAWAMKUABkFAGAbxCUPAEIwJRBDABYAwqQAAEOVQEGCjAAAAAAhEEMACADgA0BBgqzOXEOQAAAA +AE7/ZBRgG8QlPEEikf/3AyQkGOMAAQBCMMASAgAlOGIAEABHrT1BIpH/7wMkJBjjAAEAQjAAEwIA +JThDAB8CAAgQAEet2P+9JyAAsq8YALCvJAC/rxwAsa8EAIuMIYCAAAgAhIwOAAeW/+ACPBAACI4f +AGox//9CNCQgggAAHgoAJUiDACGQoAAhYMAAzwAABQcA5zAAAAKWAAAAAP0PQijRAEAQ/98CPAKA +ETwIAAmuYBsjJsY9YpAAAAAACgBAFAAAAADGQGKQ/98DPP//YzQHEOIAAQBCMCQYIwFAFwIAJUhi +AAgACa4cAAKOAAAAAAMBQAQEAAMkwDAKACEQygCAEAIAIRBKAIAQAgBgGycmIShHAAglo4wBAAok +AhMDAAEAQjDnAEoQQhgDAIIRCQABAEIwBgBAFAKAAjzA/wIkJBAiAQQASTQIAAmuAoACPNFcQ5AA +AAAAbABgFCEoxwDUI6SMEAACjr//AyRAAIQwJBBDACVARAAQAAiu1COjjH/4AiQkEAIBgAdjMCVA +QwAQAAiuxj3ikAAAAAAUAEAUYBslJkIXCQABAEQwCAGKEAKAAjxgGyQmISDEANQjg4z/9wIkJBAC +AQAIYzAlQEMAEAAIrtQjg4z/7wIkJBACAQAQYzAlQEMAEAAIrmAbJSYhMMUA1CPEjP3/AjwCAAM8 +//9CNCQggwAkEAIBJUBEABAACK6wG6OU+/8CPP//QjTCGwMAJBACAYAcAwAlQEMAEAAIrjtBo5Dn +/wI8//9CNAMAYzAkEAIBwBwDACVAQwAQAAiu1CPEjP/9AjwAAgM8//9CNCQggwAkEAIBJUBEABAA +CK6wG6OU//sCPP//QjTCGwMAJBACAYAeAwAlQEMAEAAIrjtBo5D/5wI8//9CNAMAYzAkEAIBwB4D +ACVAQwAQAAiu1CPDjMD/AiQkEAIBPwBjMCUQQwAQAAKu2CPEjBQAA47//wI8/39CNCQYYgAAgIQw +JRhkABQAA67aI8SU4P8CPP//QjQfAIQwJBhiAAAkBAAlGGQAFAADrgIAApICJAsAAoADPCEQTAD/ +/0IwAQCEMDYAgBAlMEMAYBskJuQdhZSAAAckAQCiJOQdgqQMAAOOAPACPP8PpTD//0I0ACQFACQY +YgAlGGQADAADrhYAwpQAGQUAAgAEJA8AQjAlEEMAFgDCpCEogAEhMEACAQACJB4BAAwQAKKvJbAC +PLADQjQAAFKsWwEADAIABCRgGyQmAAADlkBBgowkAL+PIACyjxwAsY8YALCPIRBDACgAvScIAOAD +QEGCrBQAAo4AAAAAQhICAD8AQjAMAEIoLP9AEP/fAjz//0I0JEgiAQBAAzwlSCMB/AIACAKAETxg +GyMmxj1ikAAAAABTAEAUgAAHJA4AApYAAAAABwBCMEAQAgAhEEMA1B1FlAAAAAABAKMk1B1DpAwA +BI4A8AI8/w+lMP//QjQAHAUAJCCCACUggwAMAASuFgDClAAZBQACAAQkDwBCMCUQQwAWAMKkISiA +ASEwQAIBAAIkHgEADBAAoq8lsAI8sANCNAAAUqxbAQAMAgAEJGAbJCYAAAOWQEGCjCQAv48gALKP +HACxjxgAsI8hEEMAKAC9JwgA4ANAQYKsf/8CJCQQIgGAAGMwJUhDAAgACa4IJaOMEAAEjv//AjwH +AGMw/x9CNCQgggBAGwMAJUCDAA4DAAgQAAiuHgACkgAAAAAhMFAAAADEkAAAAAD/AIIwAikCAD8A +oxAGAAIk9P6iFAAAAAAaAAKWAAAAADkAwqAeAAOSGgACliEYcAADEgIAOABioAQAC44IAAmOAgMA +CMAwCgAOAAKWAgAEJP8PRTAWAMKUABkFACEogAEPAEIwJRBDABYAwqQhMEACAQACJB4BAAwQAKKv +JbACPLADQjQAAFKsWwEADAIABCRgGyQmAAADlkBBgowkAL+PIACyjxwAsY8YALCPIRBDACgAvScI +AOADQEGCrM5cQ5AAAAAA9/5kFGAbJCY8QeKQ//cDJCQYAwEBAEIwwBICACVAYgAQAAiuPUHikP/v +AyQkGAMBAQBCMAATAgAlQEMAPgMACBAACK4aAAWWDwCEMIAgBAAhGMQAEQBloB4AApIaAAOWIRBQ +ACEQRAADGgMAEABDoAQAC44IAAmOAgMACMAwCgAAgAM8JbACPGQRYyQYA0I0AABDrAgA4AMAAAAA +wP+9JwKAAjwsALWvJbADPGAbVSQAgAI8OAC+r4ARQiSwA340GANjNAAAYqw8AL+vNAC3rzAAtq8o +ALSvJACzryAAsq8cALGvlkAADBgAsK+OBAAIAAAAAAgABK4IOEaOIShgAoAAByQBAAQkAQAUJB4B +AAwQALSvCDhDjgEABCQAAMOuWwEADAAAAAAqHEKSAAAAAF8AQBAqsAI8CQBCNAIAAyQAAFSgAABD +oP8AAyRxACMSAAAAAAQ4oo5wOLOOAQAEJAAAwq8IOKKuAADTr1sBAAwAAAAAcDikjnQ4o44CgAI8 +tOZCJAAAUoyAAIQk/wBiJCsQRAAKGIIAcDijrgKAAzy45mMkcDhCjgAAdowAAAAAAADCrgKAFzz/ +/2IyJYBXAAAA0K4MAAKSISgAAAAAwq4CAASSAAAAACEgkwD//4Qw4GEADCUglwAMABGSIBACPAEA +BCQAGhEAIRhiAP8AAiQhMGAABgAiEoAAByRwOEWOBDhDrqg3UaIeAQAMEACgrwQABI4IAAOO/+AC +PP//QjQfAIQwJBhiAAAmBAD/3wI8JRhkAP//QjQkGGIAAEAEPCUYZADA/wUkghEDACQgZQABAEIw +o/9AEAQAhDQIAAOuCDhGjiEoYAKAAAckAQAEJAEAFCQeAQAMEAC0rwg4Q44BAAQkAADDrlsBAAwA +AAAAKhxCkgAAAACj/0AUKrACPJtAAAwAAAAAKhxUogIAApIAAAAAIRBTAP//QjAlEFcAAgBDlAAA +AAD/AGQwAMCEJCscQ6KjMQAM//+EMJZAAAwAAAAAKrACPAkAQjQCAAMkAABUoAAAQ6D/AAMkkf8j +FgAAAACbQAAMAAAAAAKAAzxgG2Ik0BtDjDwAv484AL6PNAC3jzAAto8sALWPKAC0jyQAs48gALKP +HACxjxgAsI8AOGM0QbAEPEAAvScAAIOsCADgA9AbQ6wAgAM8JbACPEwUYyQYA0I0AABDrAgA4AMA +AAAAwP+9JzQAt688AL+vOAC+rzAAtq8sALWvKAC0ryQAs68gALKvHACxrxgAsK8CgAY8wF3FkACA +AzwlsAI8GANCNGgUYyRAAKQwAABDrCG4AAADAIAQfwCiML8AojABABckwF3CoJZAAAwCgB48JbAC +PGAb0yewA1U0WQUACAKAFjyEN5GiYBvCJ7w3RowoOEWMAwAEJIAAByQeAQAMEACgr2Ab1CfAN4WO +ISAAAtQCAAwhMEACKrAHPA0A4jQEAEMkCxB3AAEABCQCAAMkAABEoAAAQ6AMXcSWJbAGPGYDxTQB +AIQkDF3Epgxdwpb/AAMkAACipC8AIxIAAAAAvDdijig4co4DAAQkAACirsA3Yq4AALKuWwEADAAA +AAAoOGSOLDhjjgKAAjy85kIkAABUjIAAhCT/AGIkKxBEAAoYggAoOGOuKDiCjgAAAAAAAKKuAoAD +PP//QjIlgEMAAACwrgwAApIBAAUkAACirgIABJIAAAAAISCSAP//hDDgYQAMJSCDAAwAEZIgEAI8 +/wADJAAiEQDC/yMSISCCALj/4Ba8N4SuAoACPGAbQiQ7BQAIgDdRoB4A4BJAAOQ0hDeDkkEA5DSw +A8U0AACDoAAAo6yWQAAMAAAAAJtAAAwAAAAAYBvFJ9AbpIwBAAI8PAC/jzgAvo80ALePMAC2jywA +tY8oALSPJACzjyAAso8cALGPGACwjwCAQjQlIIIAQbADPEAAvScAAGSsCADgA9AbpKyAN4OSsAPF +NAAAg6AAAKOslkAADAAAAACbQAAMAAAAAGAbxSfQG6SMAQACPDwAv484AL6PNAC3jzAAto8sALWP +KAC0jyQAs48gALKPHACxjxgAsI8AgEI0JSCCAEGwAzxAAL0nAABkrAgA4APQG6SswP+9JzQAt688 +AL+vOAC+rzAAtq8sALWvKAC0ryQAs68gALKvHACxrxgAsK8CgAY8wF3FkACAAzwlsAI8GANCNAgX +YyQQAKQwAABDrCG4AAADAIAQ3wCiMO8AojABABckwF3CoMBdw5AlsAI8sANCNAAAQ6wCgB48AABD +rCGoQACWQAAMYBvTJwUGAAgCgBY8jDeRomAbwifIN0aMNDhFjAQABCSAAAckHgEADBAAoK9gG9Qn +zDeFjiEgAALUAgAMITBAAiqwBzwVAOI0BABDJAsQdwABAAQkAgADJAAARKAAAEOgDF3EliWwBjxm +A8U0AQCEJAxdxKYMXcKW/wADJAAAoqQvACMSAAAAAMg3Yo40OHKOBAAEJAAAoq7MN2KuAACyrlsB +AAwAAAAANDhkjjg4Y44CgAI8wOZCJAAAVIyAAIQk/wBiJCsQRAAKGIIANDhjrjQ4go4AAAAAAACi +rgKAAzz//0IyJYBDAAAAsK4MAAKSAgAFJAAAoq4CAASSAAAAACEgkgD//4Qw4GEADCUggwAMABGS +IBACPP8AAyQAIhEAwv8jEiEgggC4/+AWyDeErgKAAjxgG0Ik5wUACIg3UaAdAOASQgDkNIw3g5JD +AOQ0sAPFNAAAg6AAAKOslkAADAAAAACbQAAMAAAAAGAbxSfQG6KMPAC/jzgAvo80ALePMAC2jywA +tY8oALSPJACzjyAAso8cALGPGACwjwYAAzwlEEMAQbAEPEAAvScAAIKsCADgA9AboqyIN4OSsAPF +NAAAg6AAAKOslkAADAAAAACbQAAMAAAAAGAbxSfQG6KMPAC/jzgAvo80ALePMAC2jywAtY8oALSP +JACzjyAAso8cALGPGACwjwYAAzwlEEMAQbAEPEAAvScAAIKsCADgA9AboqzA/70nNAC3rzwAv684 +AL6vMAC2rywAta8oALSvJACzryAAsq8cALGvGACwrwKABjzAXcWQAIADPCWwAjwYA0I0sBljJAEA +pDAAAEOsIbgAAAMAgBD3AKIw/gCiMAEAFyTAXcKgwF3DkCWwAjywA0I0AoAePAAAQ6whqEAAlkAA +DGAb0yeuBgAIAoAWPJw3kaJgG8In1DdGjEA4RYwFAAQkgAAHJB4BAAwQAKCvYBvUJ9g3hY4hIAAC +1AIADCEwQAIqsAc8HQDiNAQAQyQLEHcAAQAEJAIAAyQAAESgAABDoAxdxJYlsAY8ZgPFNAEAhCQM +XcSmDF3Clv8AAyQAAKKkLwAjEgAAAADUN2KOQDhyjgUABCQAAKKu2DdirgAAsq5bAQAMAAAAAEA4 +ZI5EOGOOAoACPMTmQiQAAFSMgACEJP8AYiQrEEQAChiCAEA4Y65AOIKOAAAAAAAAoq4CgAM8//9C +MiWAQwAAALCuDAACkggABSQAAKKuAgAEkgAAAAAhIJIA//+EMOBhAAwlIIMADAARkiAQAjz/AAMk +ACIRAML/IxIhIIIAuP/gFtQ3hK4CgAI8YBtCJJAGAAiQN1GgHQDgEkQA5DScN4OSRQDkNLADxTQA +AIOgAACjrJZAAAwAAAAAm0AADAAAAABgG8Un0BuijDwAv484AL6PNAC3jzAAto8sALWPKAC0jyQA +s48gALKPHACxjxgAsI8YAAM8JRBDAEGwBDxAAL0nAACCrAgA4APQG6KskDeDkrADxTQAAIOgAACj +rJZAAAwAAAAAm0AADAAAAABgG8Un0BuijDwAv484AL6PNAC3jzAAto8sALWPKAC0jyQAs48gALKP +HACxjxgAsI8YAAM8JRBDAEGwBDxAAL0nAACCrAgA4APQG6KswP+9JzQAt688AL+vOAC+rzAAtq8s +ALWvKAC0ryQAs68gALKvHACxrxgAsK8CgAY8wF3FkACAAzwlsAI8GANCNFQcYyQCAKQwAABDrCG4 +AAADAIAQ+wCiMP0AojABABckwF3CoMBdw5AlsAI8sANCNAKAHjwAAEOsIahAAJZAAAxgG9MnVwcA +CAKAFjyYN5GiYBvCJ+A3RoxMOEWMBgAEJIAAByQeAQAMEACgr2Ab1CfkN4WOISAAAtQCAAwhMEAC +KrAHPCUA4jQEAEMkCxB3AAEABCQCAAMkAABEoAAAQ6AMXcSWJbAGPGYDxTQBAIQkDF3Epgxdwpb/ +AAMkAACipC8AIxIAAAAA4Ddijkw4co4GAAQkAACiruQ3Yq4AALKuWwEADAAAAABMOGSOUDhjjgKA +AjzI5kIkAABUjIAAhCT/AGIkKxBEAAoYggBMOGOuTDiCjgAAAAAAAKKuAoADPP//QjIlgEMAAACw +rgwAApIEAAUkAACirgIABJIAAAAAISCSAP//hDDgYQAMJSCDAAwAEZIgEAI8/wADJAAiEQDC/yMS +ISCCALj/4BbgN4SuAoACPGAbQiQ5BwAIlDdRoB0A4BJGAOQ0mDeDkkcA5DSwA8U0AACDoAAAo6yW +QAAMAAAAAJtAAAwAAAAAYBvFJ9Aboow8AL+POAC+jzQAt48wALaPLAC1jygAtI8kALOPIACyjxwA +sY8YALCPYAADPCUQQwBBsAQ8QAC9JwAAgqwIAOAD0BuirJQ3g5KwA8U0AACDoAAAo6yWQAAMAAAA +AJtAAAwAAAAAYBvFJ9Aboow8AL+POAC+jzQAt48wALaPLAC1jygAtI8kALOPIACyjxwAsY8YALCP +YAADPCUQQwBBsAQ8QAC9JwAAgqwIAOAD0BuirACAAzwlsAI8+B5jJBgDQjTo/70nAABDrBAAv6+W +QAAMAAAAAJtAAAwAAAAAAoAFPGAbpSTYG6KM0BukjAAIAzwQAL+PJBBDACUgggBBsAM8GAC9JwAA +ZKwIAOAD0BukrMD/vScgALCvAIACPCWwEDwYAwM2WB9CJAAAYqw0ALWvAoAVPDgAv68sALOvKACy +r2AbsyYkALGvlkAADDAAtK/8AAI2AABFjKwbZJbMOGOWxDhmjiMopAAhEKMAI4hGACMgIwKwAxA2 +KxBxAAAAA64AABGuC4iCACEgIAJTIQAMyDhlriGQQABNAEAQGACkJwwAUazEOGiOyDhijggARY4g +vQM8iANjNCsQSABAEBQ8ISAAAP//JzIAAGWsKgBAFAAAAACsG2aWCABClkAQBTwhIAAAITAGASUo +RQAeAQAMEACgr4pAAAwYAKQnAoACPIhUQiQEAEOMAABCrgQAUqwhIAAAAAByrFsBAAwEAEOuYBul +Jsg4poysG6OUJbACPPgAQjQhGMMAAABDrBgApCfEOKaskEAADAAAAACbQAAMAAAAADgAv480ALWP +MAC0jywAs48oALKPJACxjyAAsI8IAOADQAC9J8w4cI4IAEWWrBtmliOACAL//xAyITAGASUotAAh +OAACHgEADBAAoK9bAQAMISAAAAgARZasG2KWIzgwAiUotAAhEAY8ISiwACEwRgD//+cwDQgACCEg +AACKQAAMAAAAAAKAAzzEXWKMGACkJwgAQjQjCAAIxF1irCWwBTwAgAI8wP+9JxgDpDQ4IUIkKrAD +PAAAgqw8AL+vOAC+rzQAt68wALavLAC1rygAtK8kALOvIACyrxwAsa8YALCvLABjNAAAaYz/AAIk +/wAkMUgAghAAgCIxNwBAEAD/AjwAgAI8AABirP8AAiQUAIIQAoADPGAbcCT/ACMxIBACPAAaAwAh +GGIAfDgFjiWwAjz/ACgxfANCNAAASKQhMGAAEDgDrqw3CaIKAAQkAAEHJB4BAAwQAKCvAQADJIQ4 +A6ICgAI8YBtQJIQ4A5IBAAIkMQBiEAKABDxgG5AkhTgCkgAAAAAIAEAQAAQDPNgbAo7QGwSOJBBD +ACUgggBBsAM8AABkrNAbBK48AL+POAC+jzQAt48wALaPLAC1jygAtI8kALOPIACyjxwAsY8YALCP +CADgA0AAvSckECIBy/9AEP8AAiQCgAI8YBtDJKw3YpAgsAM8sAOkNAASAgAhEEMADABJjAAAAAAA +AImsaQgACP8AJDECgAQ8YBuCJIQ4QKACgAI8YBtQJIQ4A5IBAAIk0f9iFAAAAACWQAAMIYgAAiWw +AjwqsAM8LAB+NAKAFzywA1Y0AQATJCGgAAIhqAACfDgwjgoABCQAANCuWwEADAAAAAACgAI8//8I +MiWAAgHCXOOSAgAEkgIAAiQPAGMwUgBiECE4BAIgAAIkVACCFAKAAjxU9UesAgDikIU4hJIDAOOQ +/wBSMAEAAiQhKOAAfwBmMAgA5yRXAIIQAoAJPA4AAiRRAEISNwACJE8AQhIQAAIkTgBCEgKAAjwC +gAI8ONdCJMAYEgAhGGIANNcmoQQAYowCgAM8ISDgAAn4QABM9WKsAwBAEDkAAiQ7AEISAAAAAJtA +AAwAAAAAhTgzopZAAAwAAAAAOQACJAMAQhICAAIkAQDTowEAwqOFOKOSAQACJEIAYhT/AAIkDAAD +kgAAAAD/AGgwPgACEQKAAjysN6OirDciknw4JY4gEAM8ABICACEQQwAAAMiuITBAABA4Iq4KAAQk +AAEHJB4BAAwQAKCvfDgwjgoABCQAANCuWwEADAAAAAACgAI8//8IMiWAAgHCXOOSAgAEkgIAAiQP +AGMwsP9iFCE4BAIAAAKOAAwDPCQQQwCu/0MQAoACPJVYAAwBAAQkejciloU4M6IBAEIk9QgACHo3 +IqabQAAMAAAAAPMIAAiFOCCiAoACPOIIAAglOAIBNNcikQAAAAB/AEIwEwDCECWwBDxqN4KWHgOE +NBAAQjQ7AEMuAACCpJ//YBRqN4Km9ggACDkAAiQCgAI8sF1EjCWwAzywA2M0AABkrJtAAAwAAAAA +hQgACAKABDwCAKWQNNcnkQKABDzM5oQk/wClMBNYAAz/AOcw9ggACDkAAiTA/70nNAC3rwKAAjwh +uKAA//+lMCVAogAgALKvOAC/rzAAtq8sALWvKAC0ryQAs68cALGvGACwrwAAA43//9IwCABFJgDA +AiQEAAaNJBhiAP8/pTDw/wI8JRhlAP//QjQkGGIAAIAFPCUYZQD/AcY0AAADrQQABq0hSIAA///n +MBgABiUYABKlAgDHoBgAA43/fwI8//9CNCQYYgACgBY8GAADrWAbxSZmN6SQAAAAAAEAgiRmN6Kg +GAADjf+AAjz//0I0fwCEMAAmBAAkGGIAJRhkABgAA60CgAI8wlxEkCAAQyb//3IwAgCEMAQAgBAh +GEACHwBCMlwAQBAIAEIm//9jMF0AQxIAAAAABADCjCGQYAAAwAQkAQBCNAQAwqwAAAONAAAAAP8/ +YjAIAEIkJBhkAP8/QjAlGGIAAAADrSWwAjzAAEI0BwBDMgAAUqQDAGAQ+P9TMggAQib4/1MwYBvV +Juw4po7wOLCOIRDTACsQAgIyAEAQ/wA0MSOABgIhKOAC//8HMgEAESQhIIACHgEADBAAsa8jGHAC +//9yMCIQAjwhEEICISCAAlsBAAzsOKKuISjwAiE4QAIhIIACIhAGPB4BAAwQALGvYBvRJuw4I44l +sBA8sAMCNiEggAIAAEOsWwEADAAAAADsOCWO7AACNr0ABDYAAEWsAACDkMIAEDY4AL+PEABjNAAA +g6A0ALePAAAFpjAAto8sALWPKAC0jyQAs48gALKPHACxjxgAsI8BAAIkCADgA0AAvScBAAIkISjg +AiEggAIhOGACHgEADBAAoq/sOKOOAAAAACEYcwDECQAI7Dijrv//QzD//2Mwpf9DFgAAAAAEAMKM +/v8DJCQQQwChCQAIBADCrOD/vScYALCvIYCAABwAv6+KQAAMEACkJxQAA44WAAIkISgAAAoAYhAI +AAYkCAAClgKABDzsVAAMJSBEAAgABY4MAAaWFAAHllEJAAwJAAQkBAADjgAAAo4hIAACAABirAQA +Q6wAABCudCEADAQAEK6QQAAMEACkJxwAv48YALCPCADgAyAAvSfg/70nGACwryGAgAAcAL+vikAA +DBAApCclsAI8vwBCNAAAQ5AAAAAABABjLAUAYBACgAU8kFSjjJBUoiQNAGIQISAAApBUoiQEAEOM +AAACrgQAUKwAAHCsBAADrpBAAAwQAKQnHAC/jxgAsI8IAOADIAC9J/UJAAwAAAAAkEAADBAApCcc +AL+PGACwjwgA4AMgAL0n2P+9JxgAsK8hgIAAAoAEPAjnhCQkAL+vIACyrxNYAAwcALGvAAAElgAA +AAAgAIMkBwBiMGoAQBDCEAMAKACCJMIQAgBTIQAMwCACAGgAQBAhiEAAAoASPAIABpJgG1AmEDgF +jggAxiQKAAQkcgEADCE4QACwGwOWAAAAAAABYjBnAEAUAQBiMAKAAjxL9UOQYBtQJhAApCcCgAI8 +6DkArgQ6AK78QACuvEAArsZAAKKKQAAMxlxDoKNqAAwAAAAAh2sADAAAAACQQAAMEACkJwKAAjzS +XEiQJbAEPC8AAjzQAYU0FzJCNAAAoqxeAAM8EAACPNwBhzTUAYY0F0NjNCBTQjTYAYQ0AADDrAAA +gqxEpAM0AQACJAAA46xSAAIR//cDJPwjAo7/7wQkJBBDACQQRAD8IwKuYBtCjt//AyT7/wQkJBBD +ACQQRAD+/wMkJBBDAFAMBCRgG1AmMFwADGAbQq44PgKiMFwADFgMBCQ5PgKiUAwEJBpcAAwXAAUk +FwAFJBpcAAxYDAQkWwEADAoABCQIACKWAoAFPAKABDwlKEUAdAMGJPRUAAywVYQkdCEADCEgIAKY +OgKOSUsADMQ9AqIkAL+PIACyjxwAsY8YALCPIRAAAAgA4AMoAL0nUyEADMAgAgCa/0AUIYhAAAKA +BDwCgAU8GOeEJBNYAAz85qUkJAC/jyAAso8cALGPGACwjyEQAAAIAOADKAC9JyAAQBQAAAAAh1QA +DAAAAAAlsAU8TACiNAAAQKBIAKU0sBsDlgAApIx7/wI8//9CNCQgggD//mMwsBsDpgAApKxfCgAI +AoACPAKAAjzTXESQAgADJAYAgxD/9wMk/CMCjgAAAAAkEEMAiQoACAAQQjT8IwKO/+8DJAAIQjSJ +CgAIJBBDAAKABDy0VYQkHE8ADAMABSTGCgAIAAAAAOj/vScQAL+vAACEkAKABjwBAAIk/wCDMAwA +YhBgG8UkBAACJBMAYhBgG8Ikxj1FkAKABDwTWAAMJOeEJBAAv48hEAAACADgAxgAvSfGPaSgYBvC +JMY9RZACgAQ8E1gADCTnhCQQAL+PIRAAAAgA4AMYAL0nYBvDJLAbYpTGPWSgAoAEPAQAQjSwG2Kk +YBvCJMY9RZATWAAMJOeEJBAAv48hEAAACADgAxgAvSfQ/70nIACyrwKAEjwkALOvHACxrywAv68o +ALSvGACwr2AbUSawGyKWAAAAAAAwQjAKAEAQIZiAACwAv48oALSPJACzjyAAso8cALGPGACwjyEQ +AAAIAOADMAC9JxAApCeKQAAMAoAUPO5dgpIAAAAADwBCMAQAQiiJAEAUAAAAAJBAAAwQAKQnYBtC +jt//AyT7/wQkJBBDACQQRAD+/wMkJBBDAFAMBCQwXAAMYBtCrjg+IqIwXAAMWAwEJDk+IqJQDAQk +GlwADBcABSQXAAUkGlwADFgMBCSwGyKWAoAEPDTnhCQAEEI0E1gADLAbIqYBAAIkJbADPAQ+Iq5M +AGM0sBsilgAAZpAIAGWOxD0nksU9KJI7QSmS0D0qkv89K5IAgEIwNz4mogw+Ja4QAKQnAABgoDE+ +J6IyPiiiND4ipjY+KaLEPSqixT0rojw+IK5APiCuikAADDM+IKIQAKQnkEAADFJBIKIhIAAAlQ4A +DCEoAAAIAGaOAAAAAD4AwBQMAHAmAABijiEgIAJEPiMmCD4irj8AAiT//0IkAABgoP3/QQQHAGMk +sBuDlAAAAAAAAWIwCQBAEGAbUCYBAGIwBgBAEAAAAADuXYKSDAADJA8AQjA3AEMQAAAAAMQ9BJJ1 +DQAMAAAAAMQ9BJI4DQAMAQAFJCWwBDxIAIQ0AACDjAg+BY57/wI8//9CNCQYYgABAAIkAACDrAwA +ohBgG0MmPAACJJQ5YqwsAL+PKAC0jyQAs48gALKPHACxjxgAsI8hEAAACADgAzAAvSfEPQKSAAAA +AAwAQizx/0AQAAAAABJJAAwAAAAAYBtDJjwAAiSgCwAIlDlirAKABDwhKAAC9FQADHBZhCQCgAQ8 +ROeEJBNYAAwhKAACdwsACAAAAAAEAAQkSy4ADAEABSQ2CwAIAAAAAA5RAAwBAAQkjQsACGAbUCbo +/70nEACwrxQAv68hgIAAAAACkgKABDwhKEAABABCLAYAQBRQ54QkFAC/jxAAsI8hEAAACADgAxgA +vScTWAAMAAAAAAAAA5IUAL+PEACwjwKAAjyEW0OsGAC9JwgA4AMhEAAAAIADPCWwAjzQ/70nGANC +NIAvYyQkALOvKAC/ryAAsq8cALGvGACwrwAAQ6wCgAQ87F2CkAAAAAASAEAQAoATPAKAAjwGXkOQ +AAAAAGMAYBQBAAQkAoACPA9eRKACgAM87V1kkAEABSRLLgAM/wCEMAKAAjyYVEOMmFRCJKIAYhAC +gBM8lkAADAAAAAAqsAI8NgBCNAAAQ5BgG2Ym9DjFjMAYAwAjsAQ88AdjMP8fAjwhGGQA//9CNCQg +YgAjiIUAAAQiJisohQCYOMOMC4hFAOEBIi6UOMOs+DjErJ44wKQUAEAUnTjAoCD+giQgAoMkChhF +ACMQAjz/A0I0KxBDACEoYAAyAEAU9DjDrPg4wowAAAAAKxhFACOIRQADAGAQ4QEiLgAEMSbhASIu +DgBAEGAbcCZgG3Am+DgDjvQ4BI4AAAAAKxCDACwAQBQrEGQAVgBAFCWwAjyAAAMk0ANCNAAAQ6xg +G3Am9DgDliqwAjw1AEI0wogDAAAAUaBzIwB0AAAAAJ44A5YlsAI8sANCNAAAQ6ybQAAMAAAAANAb +Ao6AAAM8QbAEPCUQQwAAAIKsKAC/j9AbAq4kALOPIACyjxwAsY8YALCPCADgAzAAvScA/KUkIwwA +CPQ4xawkLQAMAAAAAKL/QBAAAAAA4iwADAAAAAD9CwAIAoACPJQ4BY4hMIAA//8nMgkABCQeAQAM +EACgr5Q4A46eOAWW9DgCjiEYcQAhKCUCIRBRAAkABCT0OAKulDgDrlsBAAyeOAWmYBtwJvQ4A5Yq +sAI8NQBCNMKIAwAAAFGgcyMAdAAAAACeOAOWJbACPLADQjQAAEOsm0AADAAAAADQGwKOgAADPEGw +BDwlEEMAAACCrCgAv4/QGwKuJACzjyAAso8cALGPGACwjwgA4AMwAL0n/DgCjpQ4BY4hMIAAI4hE +AP//JzIJAAQkHgEADBAAoK+UOAOOnjgClvg4EpYhGHEAIRAiAiMQETyUOAOunjgCphUAQBb0OBGu +CQAEJFsBAAxgG3AmcQwACAAAAAAkLQAMAAAAAFz/QBBgG2MmKhxikAAAAABY/0AQAAAAAEw6ZJQq +HGCgAMCEJKMxAAz//4QwAQwACAAAAABbAQAMCQAEJJQ4BY4JAAQkIxAGPCE4QAIeAQAMEACgr5Q4 +A46eOAKWISBRAiEYcgAhEEIC9DgErgkABCSUOAOungwACJ44AqYIAOADCQACJP8AhjACgAI8QADD +LEr1R5AAAGM4PwACJAowQwABAAIkCA4EJAB/BSQDAOIQMQDDLMFDAAgAAAAAMAACJMFDAAgKMEMA +wP+9JwKAAzw4ALSvNACzrzAAsq8sALGvKACwr6TnYiQ8AL+vCgBKlAIASJQGAEmU/wCEMP8ApTCk +52uUBABMlAgATZQAHAUAABQEAAA+BQAANgQAJTjjACUwwgAARAgAABIFAABMCQAAVAoAABoEACU4 +4gAlQAsBJUgsASVQTQElMMMAAoACPBAAqK8UAKmvGACqryWY5QAlkMQAYBtUJCGAAAAQALEnAgAC +LjIAQBCAEBAAIRBUAPAcQ4wAAAAAIUBzACE4AAB/AAkkwCAHAAQQiQAkEEgABhCCAAEA5ST/AEMw +ITAnAkAAYyz/AKcwAgBgFAQA5Cw/AAIk8/+AFBAAwqAjAKaTIgCikyEApZNAGBAAABQCACEYcQAg +AKeTADYGACUwwgAAKgUAAABklCUwxQB/fwU8JTDHAMFDAAx/f6U0AQACJv8AUDAGAAMu1f9gFAAA +AAA8AL+POAC0jzQAs48wALKPLACxjygAsI8IAOADQAC9JyEQVADwHEOMBw0ACCFAcgDY/70nFACx +ryAAv68cALOvGACyrxAAsK8CgAI8xlxDkAKABzxgG+Ik/wCRMCEgIgIgAGIwEABjMGMdk5AnAGAQ +AAAAAI0dgpB/HYOQAAAAACMQQwAANgIAAzYGAP8AcDBgG+ckIUAnArcdApGwG+OEDwAFPA8AQjAh +EFAADAgEJA8AxjAA/6U0BgBgBP8AUjDFHQKRAAAAAA8AQjAhEFAA/wBQMMFDAAwAAAAAxQwADCEg +YAIhIAACIShAAiEwIAIgAL+PHACzjxgAso8UALGPEACwj9YMAAgoAL0n4P9AEAAAAACpHYKQmx2D +kE0NAAgjEEMA4P+9JxAAsK8CgAI8GAC/rxQAsa/RXEOQAQACJAkAYhD/AJAwITAAAhgAv48UALGP +EACwjxgABCT/AwUkg0UACCAAvScPAAU8//+lNBUABCQKAAMS9KgGNA8ABTwLAAIk//+lNAUAAhL1 ++AY0DwAFPPT4BjQVAAQk//+lNINFAAwPABE8AoACPEj1RpD+AAMkFQAEJOP/wxT//yU2rEUADAAA +AAD/AEYwAP8jNiQQQwABAMYkJTBGAP//JTaDRQAMFQAEJH8NAAghMAAC/ACEMIAAAiQRAIIQBgAD +JIEAgigQAEAQsAACJCAAAiQLAIIQAgADJCEAgigVAEAQQAACJAYAgBAhGAAAAQADJBAAAiQCAIIQ +AAAAAA0AAyQIAOADIRBgAP3/ghAJAAMksQCCKA8AQBDIAAIkkAACJPf/ghAHAAMkCAADJLkNAAig +AAIk8v+CEAQAAyRBAIIoDwBAEAAAAAADAAMkuQ0ACDAAAiTq/4IQDAADJMkAgigEAEAQAAAAAAoA +AyS5DQAIwAACJAsAAyS5DQAI0AACJAUAAyS5DQAIUAACJND/vScsAL+vKAC0ryQAs68gALKvHACx +rxgAsK8IAIOMJbACPLADQjQAAEOsCACQlAKAAjwhkIAAJYACAv8AtDAhIAAC/wDRMCEoAAAIAAYk +7FQADP8A8zAEAAaOCAAFjv/fAjz/4AMk//9CNCQwwwAkKKIAP/8CPBAACI7//0I0ABLGNABAAzwk +MMIABQAHJAQAAiQLOFQAJSijAAEAhDJ//wMkAIACPBQACY4kKKMAwCEEACVAAgEDADEy/+ACPICN +EQAlKKQA//9CNAwASo4lMNEA/4EDJOD/BCQkKKIAPwBzMvv/AjwkSCMBJDDEAAAeBwBAmhMA//9C +NCRAAgElSDMBJSijACUwxwAgAAIkCAAFrgAACqYCAAKiEAAIrhQACa4EAAauikAADBAApCcCgAI8 +mFRCJAQAQ4wAAEKuBABSrAAAcqwEAEOukEAADBAApCcsAL+PKAC0jyQAs48gALKPHACxjxgAsI8I +AOADMAC9J9j/vScYALCv//+QMBAApCcgALKvHACxryQAv6//ALEwikAADP8A0jAAgAI0IAACEiEg +IAJ1DQAMAAAAACWwAzwDAmM0AABikAAIBCQBAAUkBABCNAAAYqA1RQAMITAAAAAJBCQBAAUkNUUA +DCEwAACECAQk//8FJDVFAAxYAAYkGAAEJAAMBSSDRQAMAQAGJJBAAAwQAKQnJAC/jyAAso8cALGP +GACwjwgA4AMoAL0nAQACJAIAQhICACQm/v8kJnUNAAwAAAAAJbAHPAMC5zQAAOOQ+/8CJAAIBCQk +GGIAAADjoAEABSQ1RQAMAQAGJAMAUDIACQQkAQAFJDVFAAwBAAYkQjAQAAAKBCQ1RQAMEAAFJCEw +AAIADQQkNUUADAAMBSSECAQk//8FJDVFAAwYAAYkGAAEJAAMBSSDRQAMITAAAJBAAAwQAKQnJAC/ +jyAAso8cALGPGACwjwgA4AMoAL0n0P+9JyQAs68CgBM8IACyrxgAsK9gG3Im//+QMBAApCccALGv +KAC/r4pAAAz/ALEwsBtClhAApCcAgEIwEQBQECEwIALEPUWSPA4ADCEgAAIAgAI0FAACEgCAAiSw +G0KWO0FRov9/QjCwG0KmYBtiJrAbRZTEPUSQOA0ADAAQpTAQAKQnkEAADAAAAAAoAL+PJACzjyAA +so8cALGPGACwjwgA4AMwAL0nsBtDljtBUaIlGGIAsA4ACLAbQ6bg/70nEACwryGAgAAUALGvGAC/ +r1MhAAwoAAQkAoAEPCGIQAAhKAACBgAGJBUAQBCs6IQkCABElAgAAiQMACKuAoACPAwAAyQlIIIA +FAAjrvRUAAwgAIQkFwoADCEgIAICgAQ8E1gADATphCQhEAAAGAC/jxQAsY8QALCPCADgAyAAvScC +gAU8E1gADOzopSTgDgAI//8CJNj/vSccALOvIZiAACwABCQYALKvFACxryGQoAAgAL+vUyEADBAA +sK8CgAQ8AoAFPCGIQAAo6YQkITBAAhkAQBAQ6aUkBQBlkhNYAAwAAAAACAAwlgKAAjwLAAMkJYAC +AiAAECYMAAIkISAAAgwAIq4UACOuIShgAvRUAAwGAAYkCAASriEgIAIgAL+PHACzjxgAso8UALGP +EACwjxcKAAgoAL0nAoAEPCAAv48cALOPGACyjxQAsY8QALCPrOiEJBNYAAgoAL0n4P+9JxQAsa8Y +AL+vEACwrwKAAjzuXUOQAoARPAQABCQPAGMwBABjKDoAYBQBAAUkQN8jjg8ABTwCgAI8//+lNCQA +BCRgAAYkEgBgFGAbUCSDRQAMAAAAAEhBBZLQBwIkAQADJAoQBQA8OgKuAoACPO1dRJBA3yOuGAC/ +jxQAsY8QALCPAQAFJP8AhDBLLgAIIAC9Jw8ABTz//6U0rEUADCQABCRJQQSS/wBDMAAsAwAKAGQQ +SkECogKAAjxJ9USQAAAAAAAiBAASJwB0JSCkAEpBA5IAAAAASUEDokhBA5IQJwIkQN8grgoQAwA8 +OgKuAoACPO1dRJAYAL+PFACxjxAAsI8BAAUk/wCEMEsuAAggAL0nSy4ADAAAAAAoDwAIAAAAAMj/ +vScYALKvEACwrzQAv68wAL6vLAC3rygAtq8kALWvIAC0rxwAs68UALGvIYCAAEUAoBQhkAAACACC +kAKAEzxgG2MmDwBCMMBAYqwlsAI8CgAQJtABVzQCgBQ82AFeNNwBVTTUAVY0AwARJAAABpJgG2Im +uEBHkA8AwzABAAWSGABnAAMABJICAAKSDwCnMAA6BwACKQUAACIEACUgggAAKwUAQhEGAAAkBAAD +AEkwAjEGAAEAAiQBAMYwEhgAAAoAYyT/AGMwJRhnACUYZQAwACIRJThkAAIAIik+AEAUAgACJDgA +IhEDAAIkQAAiEQAAAAAhKCABZOmEJhNYAAz//zEm2f8hBgQAECYlsAI85wFCNAAAUqA0AL+PMAC+ +jywAt48oALaPJAC1jyAAtI8cALOPGACyjxQAsY8QALCPCADgAzgAvScCgBM8CACDkGAbYibAQESM +DwBjMLv/gxQAAAAANAC/jzAAvo8sALePKAC2jyQAtY8gALSPHACzjxgAso8UALGPEACwjwgA4AM4 +AL0nAACnriEgAAAlsAg8BxCSAAEAQjABAIQkAgBAEAMAhSzQAQet+f+gFAQACCWjDwAIISggAQ0A +wBAAAAAAog8ACAIAUjbH/yAVISggAQ0AwBAAAAAAow8ACAQAUjYGAMAQAAAAAKIPAAgBAFI2AADH +rqMPAAghKCABAADnrqMPAAghKCABAADHr6MPAAghKCABuP+9JyQAsa8hiIAAAAEEJCwAs69EAL+v +QAC+rzwAt684ALavNAC1rzAAtK8oALKvUyEADCAAsK+sAEAQIZhAAAgAUJQCgAI8ISggAiWAAgIk +AAQmIAAApvRUAAwGAAYkAoAFPCoABCZIN6Uk9FQADAYABiQCgAU8tFWlJAYABiT0VAAMMAAEJiAA +A5YCgAI8YBtUJAP/YzBQAGM0IAADpuQdgpYCgAM8sFVjJHQAciT/D0MwABkDAAEAQiQCIgMA5B2C +piAAESYgAAIkFgAjohcAJKIhIEAC+1EADAwAYq5AABEmISAgAiEoQAD0VAAMAgAGJAwAY44hIEAC +QgARJgIAYyQWUgAMDABjriEoQAAhICAC9FQADAIABiQMAGOOAoACPLBVQiQCAGMkDABjrgwARoxE +AAQmDAB2JmAAUCQhKAAAEABHJCVSAAwQALavISAAAhtTAAwhiEAACQBDLAgABiQhICACCzBDACE4 +AAIBAAUkGACjryG4QAAlUgAMEAC2ryEgQAACgAI8sFVCJAMABSQBAAYkSABHJCVSAAwQALavIYhA +AMA6go4MABAkKxACAjoAQBACgAI8JlZeJGgQAAghqIACIRASAgEAQ5DAOqSOIRhwAAIAcCQrIAQC +LwCAEAAAAAAhEBICAABHkAKAFDwtAAMkISgeAmRchCbx/+MUIAAGJPRUAAwAAAAABEGjlgKAAjzG +XEeQvf9jMAKABTwCgAI8DABjNAEA5zBE36UkZ1xEJBAABiQGAOAUBEGjpgKABTwCgAM8VN+lJGdc +ZCQQAAYk9FQADAAAAAAhEBICAQBGkCEgIAJkXIcmLQAFJCVSAAwQALavIYhAACEQEgIBAEOQwDqk +jiEYcAACAHAkKyAEAtT/gBQhEBICGACijwAAAAAgAEAQISBgAkQAv49AAL6PPAC3jzgAto80ALWP +MAC0jywAs48oALKPJACxjyAAsI8BAAUkITAAACE4AADfDQAISAC9JwKABDwCgAU8RAC/j0AAvo88 +ALePOAC2jzQAtY8wALSPLACzjygAso8kALGPIACwj1jphCSs6aUkE1gACEgAvScCgAM8sFVjJCEg +IAL4/+YmaABnJDIABSQlUgAMEAC2ryEgYAJEAL+PQAC+jzwAt484ALaPNAC1jzAAtI8sALOPKACy +jyQAsY8gALCPAQAFJCEwAAAhOAAA3w0ACEgAvSfY/70nHACxrxgAsK8gAL+vAgCCkAKAAzwQN2WU +DwBCMAAAg4zAEAIAISBEAAAQqDACgAI8AAilMLBVUST/P2MwBgCgEBgAkCTo/2ckMACEJCEoAAAH +AAAREACmJyAAv48cALGPGACwjyEQAAAIAOADKAC9J6saAAwAAAAA9/9AEAAAAAACAEQkEACijwAA +AAAGAEAQEAAlJgwAJo4dVQAMAAAAAO3/QBQAAAAAJlMADCEgAALuDwAMISBAAOgQAAgAAAAAoP+9 +J1gAvq9cAL+vVAC3r1AAtq9MALWvSAC0r0QAs69AALKvPACxrzgAsK8AAIKMAAAAAP8/RjDo/8Uk +AQOiLBYAQBQh8IAAAoADPGAbYyRAPmKMAoAEPNDphCQBAEIkQD5irBNYAAwAAAAAXAC/j1gAvo9U +ALePUAC2j0wAtY9IALSPRACzj0AAso88ALGPOACwjwgA4ANgAL0nfADEJFwAxiRTIQAMJACmr3QA +QBAgAKKvIACjjyQApo8hKAAACABilAKAAzwlEEMAIABXJONUAAwhIOACAoADPOjpYiTo6WeQAQBE +kAIAw5MCAEWQAwBGkAKAAjxgG1AkAADCjwAiBAAPAGMwJSCHAAAsBQDAGAMAS0EHkiEYfgAlKKQA +/z9CMAA2BgAlMMUAMACiryIAZCQYAGIkEACmrywApK8oAKKvUwDgFCgAdiQCgAI8AoADPGAbVCSl +WXMkIZAAAAEAFSRkEQAIIYAAAB1VAAwBAFImBwAQJjIAQBBAAEMqDABgEAAAAAAhiBQCRD4ikiEg +EwIhKMAC9P9VEAYABiQhIBMCISjAAvRUAAwGAAYkRD41ojAApI90APQmgADzJlwAgyTo/4IkHACi +rwAA464oAKOPHACijyEggAIYAGUkITBAAPRUAAxwAOKucADnjiEgYAIhKAAA9P/nJKsaAAwcAKYn +DwBAECGAQAACgAQ8YBuRJAw+Jo4AAAAAMgDAGAAAAAAcAKKPAAAAACkAwhACgAQ8wBASACMQUgAh +EFEARD5AoCAApI90IQAMAAAAAFwAv49YAL6PVAC3j1AAto9MALWPSAC0j0QAs49AALKPPACxjzgA +sI8IAOADYAC9JwKABDwCgAU8rOiEJBsRAAi86aUkAoAEPKxchCQhKMACHVUADAYABiSo/0AUAAAA +AIpAAAwYAKQnUkECkhgApCcBAEIkkEAADFJBAqJWEQAIAoACPHBZhCQdVQAMAgAFJtX/QBTAEBIA +AQAGkgAAAABpAMAUEADkJgwA4K4CAMKXAAAAAA8AQjAEAEIoXgBAECEgwAM0AOCuYADxJiEgIAIh +KAAA41QADBAABiRwAOeOISBgAgEABST0/+ckqxoADBwApicGAEAQIZAAABwApo8CAEUk9FQADCEg +IAIcALKPcADnjiEgYAIyAAUk9P/nJKsaAAwcAKYnBQBAECEg8gIcAKaPYACEJPRUAAwCAEUkHACl +jyEgIAJhUwAMISiyACEYQAABAAIkQABiEAMAAiQ4AOKucADnjiEgYAIDAAUk9P/nJKsaAAwcAKYn +SADgrgQAQBA8AOCuAgBCkAAAAABIAOKu+1EADCEggAIhKEAAQADkJvRUAAwCAAYkGFIADCEg4AL/ +/1AwAQACMhoAQBAhKMACAQACJFwA4q4sAKWPBADkJvRUAAwGAAYkEAACMhMAQBABAAIkMADirgKA +AzxEAOCuYBtiJDw+Q4wgAKSPAQBjJDw+Q6wkAKOPCAACJAwAg6wgAKOPFwoADBQAYqwdEQAIAAAA +AAoSAAhcAOCuERIACDAA4K7jFwAMGADFJ8gRAAg0AOKu9FQADAIABSYBAAOSwREACAwA467vEQAI +OADjrgKAAjxgG0Qk/ECDjAAAAAANAGAQAQAFJLZAgpAAAAAACABCLAcAQBAhKAAAxz2DkAEAAiQD +AGIQAAAAAAgA4AMhEKAAAQAFJAgA4AMhEKAAAoAEPGAbgiREQUWMQEFGjCEgQABAGAUAQBAGACsY +ZgArOEUABABgFCEoAAABAAUkAgACJAooRwAhEKAAQEGArAgA4ANEQYCs6P+9JxAAsK8UAL+vQxIA +DAAAAAAhgEAAAoACPM5cQ5AAAAAAEgBgEAAAAAAvEgAMAAAAAAEAAyQNAEMQAoACPBZcRJACgAI8 +1N1CJEAYBAAhGGQAIRhwAIAYAwAhGGIAAABkjCWwAjzYAUI0AABErBQAv48QALCPCADgAxgAvSfo +/70nEACwrxQAv68hgIAAAgCEkAKABTxIN6UkDwCEMMAgBAAhIJAAHACEJB1VAAwGAAYkBgBAFAKA +AjwQN0OUAAAAAAAQYzAGAGAUISAAAhQAv48QALCPIRAAAAgA4AMYAL0nAhEADAAAAAAUAL+PEACw +jyEQAAAIAOADGAC9JwCAAzwlsAI84P+9J1RKYyQYA0I0GACwrxwAv68AAEOsAgCCkAKABTy0VaUk +DwBCMMAQAgAhEEQAKABEJAYABiQdVQAMGABQJAYAQBAhIAACHAC/jxgAsI8hEAAACADgAyAAvSc5 +UwAMAAAAAAKABDxIN4QkIShAAB1VAAwGAAYk8/9AFAAAAAAYAAKSAAAAABAAQjDu/0AQEACkJ4pA +AAwAAAAAAoACPOxdQ5AFAAIk/wBjMAUAYhACgAI8kEAADBAApCepEgAIAAAAABA3Q5QCgAQ8AAFj +MPj/YBABAAUkB16DkPv/AiQkGGIAB16DoAKAAjztXUSQSy4ADP8AhDCQQAAMEACkJ6kSAAgAAAAA +2P+9JygApKMAAQQkGACyryQAv68gALSvHACzrxQAsa8QALCvLAClo1MhAAwwAKanpABAECGQQAAw +AKeXKAClkywAppMCgAQ8E1gADLDqhCQIAFCWAoACPAKAETwlgAICtFUxJiEoIAIkAAQmBgAGJPRU +AAwgAACmAoAFPEg3pSQqAAQm9FQADAYABiQhKCACMAAEJvRUAAwGAAYkIAADlhgAAiQCgBQ8A/9j +MNAAYzQgAAOmYBuTJgwAQq7kHWKWIAAFJgwAUSb/D0MwABkDAAIiAwABAEIk5B1ipigApicWAKOg +FwCkoCE4IAI4AAQmTFIADAEABSQhIEAAAQAFJCwApidMUgAMITggAigAo5MhIEAAAwACJBIAYhAA +AAAAYBuCJrZAQ5AEAAckISBAAgEAYzgLOAMAISgAAN8NAAwhMAAAJAC/jyAAtI8cALOPGACyjxQA +sY8QALCPCADgAygAvScsAKOTAAAAADYAYBQBAAIkxUBjkiGAYAIBAGgk/wACMf3/QBAhGAABAoAG +PCE4IALFQAiiJVzGJExSAAwBAAUkyEAIjjAApJfD/wMkAgAINQ8AhDAkQAMBgCAEAP//Azw/AGM0 +JUAEASRAAwEACAg1AoAGPCE4IALIQAiuKFzGJCEgQABMUgAMAgAFJAKABjwhOCACKlzGJCEgQAAC +AAUkTFIADMpAAKYwAKOXISBAAAKABjwHAGMwQBgDACEYcADUHWKULFzGJCE4IAIAEQIAAgAFJExS +AAzMQAKmIhMACGAbgia1/2IUAoAGPCE4IAIkXMYkTFIADAEABSQhIEAAMACmJyE4IAJMUgAMAgAF +JMhAaI7//wM8PwBjNCRAAwEACAg1AoAGPCE4IAIhIEAAKFzGJAIABSRMUgAMyEBorgKABjwhIEAA +KlzGJCE4IAJMUgAMAgAFJCITAAhgG4ImAoAEPAKABTys6IQkE1gADKDqpSQkAL+PIAC0jxwAs48Y +ALKPFACxjxAAsI8IAOADKAC9J+D/vScYAL+vFACxrxAAsK8AAIKQAoARPCGAgABgGzEmAoAEPAIA +BiQBAAUmKFyEJPRUAAzEQCKiBAADkgMAApIAGgMAJRhiAMpAI6YGAAKSBQADkgASAgAlEEMAzEAi +pgEABZIGAASSBQACkoIoBQAAIgQAJSCCAGpIAAwPAKUwGAC/jxQAsY8QALCPAwAEJAEABSQhMAAA +2RIACCAAvScAgAM8JbACPOD/vScYA0I0/E5jJBQAsa8QALCvHAC/rxgAsq8AAEOsAgCCkAKABTy0 +VaUkDwBCMMAQAgAhiEQAKAAkJgYABiQdVQAMGAAwJggAQBAAAAAAHAC/jxgAso8UALGPEACwjyEQ +AAAIAOADIAC9JzlTAAwhIAACAoAEPEg3hCQhKEAAHVUADAYABiTx/0AUAwACJDAAI5IAAAAA7f9i +FDAAJCYCgAc8YBvlJPxAoowAAAAA5/9AEAEABiQBAIOQAAAAABoAZhACAGIoLgBAFAIAAiTf/2IU +AAAAAAMAg5AAAAAACABiMAoAQBQCEQMAxkCjkAQQRgAnEAIAJBBDAMZAoqAFAIOQBACCkAAaAwAl +kGIAxkClkAKABDzM6oQkE1gADCEwQALVEwAIAAAAAAQAgpAFAIOQAwCEkAASAgCCGAMAJRBEABUA +QBQHAGQwxkCjkAQQhgAlEEMAxkCioGAb4iT4QEOQxkBFkAKABDwhGGIA3OqEJBNYAAzwQGCg1RMA +CAAAAACy/2AUAAAAAJcTAAwyACQm1RMACAAAAADGQKOQBBCGACcQAgAXFAAIJBBDALj/vSc4ALav +//+WMAABBCQ8ALevKACyr0AAv680ALWvMAC0rywAs68kALGvUyEADCAAsK8hkEAAgQBAECG4AAAC +gAQ8E1gADPjqhCQIAFCWAoACPAKAETwlgAICtFUxJiQABCYhKCACIAAApvRUAAwGAAYkAoAFPCoA +BCZIN6Uk9FQADAYABiQwAAQmISggAvRUAAwGAAYkIAADlhgAAiQCgBU8A/9jMLAAYzQgAAOmYBuo +JgwAQq7kHQKVIAAUJgwAUSb/D0MwABkDAAIiAwABAEIk5B0CpRcAhKIWAIOiIEAEjQMAAiQxAIIQ +OAAQJmAbsyYkQGKOISAAAgIABSQBAEI4AQBCLBgApichOCACTFIADBgAoqcgQGOOISBAAAIABSQY +AKYnITggAkxSAAwYAKOnISBAAAIABSQYAKYnITggAkxSAAwYALanIEBjjiGAQAADAAIkKABiEAAA +AABgG6ImtkBDkAQAByQhIEACAQBjOCEw4AILOAMA3w0ADCEoAABAAL+PPAC3jzgAto80ALWPMAC0 +jywAs48oALKPJACxjyAAsI8IAOADSAC9J7AbApUAAAAAQABCMM3/QBBgG7MmLEADjTBAAo0hIAAC +gB8DACUYQwAEAAUkAQBCJBwApichOCACMEACrUxSAAwcAKOvaRQACCGAQACwG2KWAAAAAEAAQjDW +/0AQYBuiJgKABzwhIAAClFvnJBAABSSAAAYkJVIADBAAsa8AAIOWAQAXJABAYzSFFAAIAACDpgKA +BDwCgAU8rOiEJBNYAAzs6qUkQAC/jzwAt484ALaPNAC1jzAAtI8sALOPKACyjyQAsY8gALCPCADg +A0gAvSew/70nOAC0rzQAs68wALKvLACxrygAsK9IAL+vRAC3r0AAtq88ALWvAgCCkAKAEjwhoIAA +DwBCMMAQAgAhgEQAKAARJrRVRSYhICACBgAGJB1VAAwYABMmnwBAECEgYAICgBU8YBuiJktBQ5AA +AAAAggBgEDwABCZgG7AmsBsDlgAAAAAAEGIwbQBAFBAAYjATAEAUEAB2JmAbsCawGwKWAAAAAAAB +QjCPAEAUIRgAAEgAv49EALePQAC2jzwAtY84ALSPNACzjzAAso8sALGPKACwjyEQYAAIAOADUAC9 +JyEgwAK0VUUmHVUADAYABiTp/0AUBwACJLZAAqLoOQCuAACEjgwAEiT/P4Iw6P9CJCoQQgKcAEAQ +IbgAAh8VAAghgHICGQADkv8/gjDo/0IkIRhyAAIAciQqEEICkwBAEGAbsCYhgHICGAADkt0AAiT0 +/2IUGgARJgKABTxk3qUkISAgAh1VAAwDAAYkVQFAEAKABTxg3qUkISAgAh1VAAwDAAYkTwFAEAKA +BTxU3qUkISAgAh1VAAwDAAYkRAFAEAKABTxQ3qUkISAgAh1VAAwDAAYkPgFAEAKABTxM3qUkISAg +Ah1VAAwDAAYkOAFAEAKABTxE3qUkISAgAh1VAAwDAAYkOwFAEAKABTxA3qUkISAgAh1VAAwDAAYk +UwFAEAKABTxI3qUkISAgAh1VAAwDAAYkRwFAEAKABTwhICACNN6lJB1VAAwEAAYkLwFAEAIAAiQA +AISOFhUACAAAAAACEQAMISCAAiEYAABIAL+PRAC3j0AAto88ALWPOAC0jzQAs48wALKPLACxjygA +sI8hEGAACADgA1AAvScAAIeOBwAFJP8/5zDc/+ckqxoADCAApid4/0AQIThAACAApY8AAAAABgCi +KHP/QBT9/6UkBQDkJOVLAAz/AKUwAoAEPKxchCQhKCAC9FQADAYABiTsFAAIYBuwJrkrAAwhKIAC +5hQACAKAFTy0VUUmEABkJh1VAAwGAAYk1P9AFCEYAAAhIIAC4xcADBgAhSYhIEAAjRcADAUABSSw +GwOWAAAAAAEAYjAMAEAUBABiMEsAQBRgG7Amt0ACkgAAAAABAEQk/wCDMBUAAiRdAGIQIRgAAPkU +AAi3QASiikAADCQApCfoHgOO7B4CjiQApCcBAGMkAQBCJOweAq6QQAAM6B4DrpoVAAhgG7AmYBuw +JrZAA5IHAAIkIQBiEAKABTwCgAQ8XOuEJBNYAAwAAAAAAoACPM5cRpABAAMkDwDDEGAbpCbVTgAM +AAAAAEgAv49EALePQAC2jzwAtY84ALSPNACzjzAAso8sALGPKACwjyEQYAAIAOADUAC9J7ZAg5AD +AAIkKgBiEAAAAAA9QYag1U4ADDxBgKC/FQAIAAAAAFzepSQhIMACHVUADAMABiQHAEAQAoAFPCEg +wAJY3qUkHVUADAMABiTV/0AUAAAAAAKABDxw64QkthUACLZAAKIKAHYmH1QADCEgwAIgABAkNwBQ +ECGIQACKQAAMJACkJ0AQEQAhEFEAYBukJgARAgAhEEQA+B1DjCQApCcBAGMkkEAADPgdQ6xgFQAI +IRgAADxBhqDVTgAMPUGAoL8VAAgAAAAAVRIADLdAAKICgAI80lxEkAIAAyRd/4MUIRgAAAAAh44k +AGQmKgAFJP8/5zDc/+ckqxoADCAApidU/0AQIRgAAAIARJAAAAAAAgCCMJUAQBBgG6UmAQCCMJIA +QBQCgAI801xEkAEAAySfAIMQAAAAAPwjAo7/7wMkAAhCNCQQQwD8IwKuYBUACCEYAAD//wQkx1MA +DCEowALG/1AQIYhAAAAAh44kAHcmISDgAv8/5zDc/+ckAQAFJKsaAAwgAKYny/5AECEYAAAgAKaP +AgBFJPRUAAwQAKQnAACHjiEg4AIyAAUk/z/nMNz/5yQgALCPqxoADCAApicIAEAQEACkJyAApo8h +IJAA9FQADAIARSQgAKOPAAAAACGAAwIQAKQnYVMADCEoAAIhKAACEACkJ6ZTAAwPAFMwAACHjiEg +4AItAAUk/z/nMNz/5yQgAKYnqxoADCGQQAARAEAQAIERAAYARJAFAEOQAoACPMZcRZAAGwMAACUE +ACUYZAAQAKUwJZBDAgIAoBQPAAI8/w8CPP//QjQkkEICCABzNgCBEQAlgBMC//8QMgKABDwhKCAC +ITAAAiE4QAITWAAMjOuEJCEgAAJjXgB0IShAAmAboyY6QWKQISDAAiEoIAIBAEIk6g4ADDpBYqDq +FQAIAAAAAAKABDwBAAIkoOuEJLYVAAi2QOKiAoAEPLjrhCS2FQAItkDgogKABDxgG6MmAwACJMzr +hCS2FQAItkBioB4AA5IAAAAACgBiFAKABDwgAAKSAAAAAAEAQjAFAEAQAoACPMjfQ4wAAAAAGgBg +FBEAAyQTWAAM4OuEJAUAAiS4FQAItkDiogKABDxgG6MmAgACJPjrhCS2FQAItkBioAKABDxgG6Mm +BAACJAzshCS2FQAItkBioPwjooz/7wMk//cEJCQQQwAkEEQAIRgAAGAVAAj8I6KsAoAEPAKAAjwg +7IQkE1gADMZcQ6BgG6MmBgACJLgVAAi2QGKg/CMCjv/3AyQkEEMAABBCNB4WAAj8IwKuCADgAwAA +AADo/70nEACwrwKAEDxgGwImFAC/r7AbQ5QhKAAAAAFiMAMAQBABAGQwBgCAFAAQYjAUAL+PEACw +jyEQoAAIAOADGAC9JwgAQBRgGwQmAoACPO5dQ5AMAAIkDwBjMAkAYhAhIAAAYBsEJmDqAzQEOoOs +FAC/jxAAsI8hEKAACADgAxgAvScOUQAMAAAAAGAbBCZg6gM02xYACAQ6g6zY/70nHACxrwKAETwY +ALCvIAC/r2AbMCYEPgKOABADPCQQQwASAEAQAAAAADM+A5IAAAAAAQBjJP8AYjAhEFAA0D1FkAAA +AAD/AKQwGACAEDM+A6L/PQKSxD0FonUNAAzFPQKixD0EkjgNAAwBAAUkCD4DjgEAAiRSAGIQAAAA +AGAbJSYEPqSMABACPDwAAyQmIIIAlDmjrAQ+pKwgAL+PHACxjxgAsI8IAOADKAC9J7AbApYAAAAA +/+9CMAABQzBJAGAUsBsCpjE+BpI3PgOSMj4FkiWwAjxMAEI0AABDoP8AxDDFPQWidQ0ADMQ9BqLE +PQSSOA0ADCEoAACwGwOWAAAAAAABYjAJAEAQAQBiMAgAQBBgGzAmAoACPO5dQ5AMAAIkDwBjMFgA +YhAAAAAAYBswJjQ+BJY2PgWSlQ4ADAAAAAARSAAMAAAAABAApCeKQAAMBD4ArrAbApYAAAAAAAFC +MCoAQBACgAI87F1DkAAAAAAnAGAQAoACPAKAAzzuXWKQAAAAAA8AQjAEAEIoOgBAFAQABCQCgAM8 +Dl5ikAAAAAAhAEAUAAAAAA5eYpAAAAAAAQBCJA5eYqByFwAIYBswJsQ9ApIAAAAADABCLKv/QBAA +AAAAEkkADAAAAAAHFwAIYBslJiWwBTxIAKU0AACjjGAbJI6EAAI8JRhiACUAhDQAAKOsGBcACGAb +JK4CgAI8Dl5AoAKAAzztXWSQAQAFJEsuAAz/AIQwYBswJpBAAAwQAKQnUkECkgAAAACW/0AUAAAA +AIpAAAwQAKQnAoAEPAKABTwsWYQkoN2lJDQABiT0VAAMS0EAopBAAAwQAKQnDRcACAAAAABLLgAM +AQAFJE0XAAgCgAM8DlEADCEgAAAzFwAIYBswJgKACTxgGyglbDcGjf//AjREAMIQITiAACsQxwA0 +AEAQAhkGACEQxwAjEEMAEABGJGw3Bq1wNwKtYBsmJQUAxJD//wI0/wCDMDMAYhAAEQcA/wCEMCsQ +hwAgAEAQAxkEAAMRBAAhGIcAIxhiABAAZCQFAMSgcDfDrMAQBQAhEEUAgBACACEQRQBgGyMlgBAC +ACEoQwD4JKaMACEHAP//wjgKMIIAKxjHAAcAYBAhEMcAAhkGACMQQwAQAEYk+CSmrAgA4AP8JKKs +AhkGACMQQwD4JKKsCADgA/wkoqwhEIcAIxBDAAUAwqCrFwAIcDfCrCEQxwAjEEMAbDcCrXA3Aq1g +GyYlBQDEkP//AjT/AIMwz/9iFAARBwAhIEAAoRcACAUAwqAAMQQAkxcACGw3Bq1jAIIkdwBCLAAA +hSgEAEAQIRgAAGQAgiRkAAMkCxhFAAgA4AMhEGAA6P+9JxAAv68MAIKMAAAAAD8AQjAEAEIoCABA +FCWwAjwAAKSMEAC/jxgAvSc/AIQwQCAEANkXAAiW/4QkJAhCNAAAQ4wAAAAAAAJjMBsAYBQBAAIk +BQCjkAAAAACCMQMAPADCEAIAwihXAEAUAgACJEYAwhADAAIkLgDCED4AYzDZFwAMISDgAAYARSRl +AKQsZAADJAooZADd/6IkCABCLB8AQBDl/6Ik/v+lJBAAv48hEKAACADgAxgAvScFAKOQAAAAAGAA +ZjBCMQYAJQDCEAIAwig2AEAUAgACJC8AwhADAAIk5v/CFB8AYjBAEAIA2P8DJCM4YgDZFwAMISDg +AAYARSRlAKQsZAADJAooZADd/6IkCABCLOP/QBTl/6IkCABCLAYAQBDx/6IkDhgACPr/pSTY/wIk +AxgACCM4QwAMAEIsDABAEPv/oiQOGAAI+P+lJD4AYzD+/wIkAxgACCM4QwAfAGIwQBACAP7/AyQh +GAAIIzhiAAoAQizL/0AQAAAAAA4YAAj8/6UkPgBjMOz/AiQDGAAIIzhDAB8AYjBAEAIA7P8DJCEY +AAgjOGIAs//AFB8AYjBAEAIADgADJCEYAAgjOGIArf/AFD4AYzAOAAIkAxgACCM4QwCY/70nZAC/ +r2AAvq9cALevWAC2r1QAta9QALSvTACzr0gAsq9EALGvQACwrwKAAjyIVEWMAIAEPGhhgySIVEQk +JbACPBgDQjQAAEOsgQCkEAKAAjzo7EIkAABejAKAAzzs7GMkAAB1jCg51o8huAAACADCjgAAAAAA +AKKuCADDlgKAAjyeGAAIJaBiABcAJZIWACaSyD3Cl/8AozAAGgMA/wDEMCUYZAAUAEMQ/wCiMP8A +wzAAEgIAJRBDAMg9wqcBACSSGABCkgAiBACoDQAMJSCCAEAYAgAhGGIAAoAEPJjegiSAGAMAIRhi +AAgAYowAAAAACfhAACEgYAIMAMKOAAAAACsQ4gJBAEAQAAAAAAAAgo4CgAM8SDdkJEIbAgB4AGMw +Ai4CAP8/QjAhEEMAAwClMCEQRQAYAEIk//9QMH8AAjIhmIACBgAGJIAAAyYAALCuAgBAEID/BTKA +/2UwAAClrgIAYpYhGOUC//93MA8AQjAAAKKuAABjjiGghQJCEwMAeABCMAIeAwADAGMwIRBTACGQ +QwAcAFAmGABRJiEoAAIAALGuHVUADAAAAAACgAM8ISgAAgYABiQLAEAUkN5kJAEAIpIAAAAAABIC +AAAIQjCt/0AUAAAAABYAJpIXACWShhgACP8AojAdVQAMAAAAAPP/QBAAAAAADADCjgAAAAArEOIC +wf9AFAAAAACKQAAMOACkJwQAw44AAMKOISDAAgAAYqwEAEOsAADWrnQhAAwEANaukEAADDgApCcC +gAI8iFRDjIhUQiSG/2IUAAAAAAKAAzzo7GMkAABxjCWwEDwEAQI2AABDjNw4J44AAAAAdwDjEOA4 +I64rEGcAgQBAFCsQ4wCpAEAUAoACPGAbRCSwOIOUAoACPCGAAAA0AOAaJZBiACGIgAAhGAAAAQAU +JADAFTwOGQAIAwAeJIAYEAAqEHcAKgBAEAAAAAAhmHIAAABijkRBI444AKQn/z9CMCEYYgCKQAAM +REEjrugeIo7wHiOOOACkJwEAQiQBAGMk6B4irpBAAAzwHiOu7CwADCEgYAIAAGOOAAAAAAIAYBQG +AAImAQACJv//UDCCFgMAAQBCMOH/VBQCgAQ8YBuCjAAAAABCEQIAAQBCMAwAVBDCEwMAHgBCMCEQ +UAD//1AwgBgQACoQdwDY/0AUAAAAAHQhAAwhIMACdRkACAKAAzwBACKSAAAAABkAQBQAAAAABABj +jgAAAAACFAMADwBCMBEAQBQCFwMAAwBEMAcAgBAkEHUADABAFAAAAAAKAJ4QAAAAAAgAgBAAAAAA +gCgQACEosgDjFwAMISBgAiEgQACNFwAMISgAAAEAIpIAAAAAewBUEAAAAAABACOSAgACJGMAYhAA +AAAAJbACPEwAQjQAAEOQAAAAAAMAYzAIAHQQ0AICJAAAY44AAAAAwhMDAB4AQjAhEFAAMxkACP// +UDBsNyKuAABjjmcZAAjCEwMAAAECNgAAR6wCgAI8YBtCJNw4R6wCgAM8CARkJCEoAAAhMAAAdjkA +DCE4AABmGAAIAoACPOQ4Io7//3MwIxBHAP//UjAhGFMC//93MFMhAAwhIOAC7/9AECGwQAAIAEKM +3DgmjiE4QAIhGFcArDgjriEoQAAIAAQksDgirh4BAAwQAKCvWwEADAgABCSwOCWOJBACPAABEDYA +AAKuIThgAiEosgAIAAQkJBAGPNw4Iq4eAQAMEACgr+A4I44IAAQkWwEADNw4I67cOCKOAAAAAAAA +Aq7+GAAIAoACPCMQZwD//1cwUyEADCEg4AJEAEAQIbBAAAgAQozcOCaOCAAEJCEYVwCsOCOuIShA +ACE44AKwOCKuHgEADBAAoK/gOCOOCAAEJFsBAAzcOCOu3DgjjgABAjYAAEOs/hgACAKAAjwEAGOO +AAAAAAIUAwAPAEIwCABCKJn/QBAlsAI8AhcDAAMAQjCU/0AUAAAAAIAoEAAhKLIA4xcADCEgYAIh +IEAAjRcADCEoAABeGQAIJbACPAQAY44AAAAAAhQDAA8AQjAIAEIoBgBAECQQdQACFwMAAwBCMAoA +QBCAKBAAJBB1AHn/QBQCFwMAAwBCMHb/XhAAAAAAdP9AEAAAAACAKBAAISiyAOMXAAwhIGACISBA +AI0XAAwFAAUkWRkACAAAAADgOCOOAAECNgAAQ6x0GQAI3Dgjrrj/vSclsAM8RAC/r0AAvq88ALev +OAC2rzQAta8wALSvLACzrygAsq8kALGvIACwr0QAYzQAAGKQAAAAAAAWAgADFgIADgBABBwAoK8h +IGAAIRAAAAEAQiT//0IwZABDLP3/YBQBAEIkAACCkAAAAAAAFgIAAxYCAPb/QQQhEAAAAoACPJhU +Q4wAgAY80GfCJCWwBTwCgAY8GAOkNJhU0SQAAIKsSwBxEAEAFSQREQI8KrADPCIiVzQCgAI8IbCA +AAYAfjQFAHM0YBtUJAEAEiQAANeuBQCgEgKAAzzsXWKQAAAAAEwAQBQhqAAAAADClzg5kI4lsAM8 +sANjNAD/QjAAAHCsDwBAGAKABjwCgAI88OzGJPTsQiQAAMWMAABEjAKABjz47MYkAADDjAAApKwA +AGKUAAAAAAD/QjD7/0AcAAAAAAwAA44AAAAABwBiMGAAQBQIAGIkwhADAAgABY74N4aOwBACACAA +QiT//0cwAQAEJB4BAAwQALKvWwEADAEABCQCAAIkGACkJwAAcqIAAGKiikAADAAAAAAAAAKOBAAD +jiEgAAIAAGKsBABDrAAAEK50IQAMBAAQrpBAAAwYAKQnAAAijgAAAADA/1EUAAAAABwAoo8AAAAA +BwBAEAKAAjwCgAM87F1ikAAAAAAtAEAUHACgrwKAAjwICEQkISgAACEwAAB2OQAMITgAABUaAAgC +gAI8m0AADAAAAAACgAY87l3CkAEAAyQPAEIwBABCKA8AQBQcAKOvAoAGPMZcwpAAAAAAAgBCMBIA +QBQAAAAAAAgEJAACBTzBQwAMAQAGJJZAAAwAAAAALxoACAAAAAAEAAQkSy4ADAEABSQCgAY8xlzC +kAAAAAACAEIw8P9AEAAAAACoLQAMAQAEJIoaAAgACAQkm0AADAAAAAACgAY87V3EkAEABSRLLgAM +/wCEMJZAAAwAAAAAcxoACAKAAjxLGgAIwhACABAA4BghGAAAAADArCFAAAAAAIKQAAAAAAwARRAh +GIAAAQCCkAAAAAAhGEgAAgBoJCEQggArGAcB9f9gFAIARCQhGAAACADgAyEQYAABAIKQAAAAAAAA +wqwIAOADIRBgAAKABzxgG+UkzkCjkP8AhDCAEAQADABgFCEwRQDIAAIkIDqirAEAAyRgG+IkBBiD +APhApKDOQESQAAAAACUYZAAIAOADzkBDoCA6o4zIAAIkIxBDANBAwqwBAAMkYBviJAQYgwDOQESQ +AAAAACUYZAAIAOADzkBDoOD/vScUALGvAoARPBAAsK8YAL+vYBslJvhAppABAAIkBBDCAAYAQBTJ +ABAkxkCikAAAAAABAEIwIwBAFCEgxQACgAI8YBtGJCEgAADQQMUkAACijAQApSQFAEAQKxhQAAMA +YBAAAAAAIYBAAPhAxKABAIQkCACCLPX/QBTJAAIkIQACEgKAAjxgG0UkBwAEJNBAooz//4QkAgBA +ECMYUADQQKOs+v+BBAQApSRgGyImIDpQrBgAv48UALGPEACwjwgA4AMgAL0n8ECDkAAAAAABAGMk +/wBiMAMAQizY/0AQ8ECDoIAYBgAhGGUAyAACJAMABCQhKAAA2RIADNBAYqzyGgAIAoACPGAbIiYY +AL+PFACxjxAAsI8gAL0nzkBAoAgA4AMgOkCsuP+9JwKACDwCgAs8AoAMPEAAv688ALWvOAC0rzQA +s68wALKvLACxrygAsK/k7mMl4O4CJejuhCUBAEWQAQBmkAEAh5Dg7g+RAgBKkOTubpECAGmQ6O6N +kQIAiJADAEuQAwBskAMAgpAAKgUAADIGAAA6BwAlKK8AJTDOACU47QAAVAoAAEwJAABECAAlUEUB +JUgmASVABwEAXgsAAGYMAAAWAgACgAQ8JVhqASVgiQElEEgAsFWEJBAAq68YAKyvGFIADCAAoq8Q +AEIwKQBAECEYAAACgBM8YBtjJsA6YowMABAkKxACAiwAQBACgAI8AoADPCRWUSQuVnIkAoACPAKA +AzwmVlQkfBsACDJWdSTdAAIkISAUAisAYhAQAKUnIRARAgEAQ5BgG2QmwDqCjCEYcAACAHAkKxAC +AhcAQBAAAAAAIRARAgAAQ5AwAAIkISASAiAApSft/2IUBAAGJB1VAAwAAAAA7v9AFCEQEQIBAAMk +QAC/jzwAtY84ALSPNACzjzAAso8sALGPKACwjyEQYAAIAOADSAC9J0AAv488ALWPOAC0jzQAs48w +ALKPLACxjygAsI8hGAAAIRBgAAgA4ANIAL0nHVUADAAAAAAhIBUCGAClJ9H/QBQEAAYkHVUADAAA +AADO/0AUIRARAogbAAgBAAMkAoADPGAbZSSwG6KUAAAAAAABQjQIAEAQcBcEJLZAopAAAAAA+/9C +JP8AQjACAEIsCgBAFAAAAAC0QKOUAAAAAIAYAwBwF2IoBABAFHAXBCQhTmIoIE4EJAsgYgAIAOAD +IRCAACE4gAAIAMAQ///DJP//BiQAAKKM//9jJAQApSQAAOKs+/9mFAQA5yQIAOADIRCAAMn3G2pL +6kAyQDIQ8ABrAPRgMwDzGEot9xlL+WNg2gBqDGIL0QrQB9LJ9xtqS+pAMSAxEPAAagD0QDIQ82hB +LfcZSkDbEPACawD0YDNj8wBLZvdIqwFKZvdIywAcm0AAZcDwRkFAqhFaEmEQ8AJsAPSANBDwAm0A +9KA1q/VQnMv1aJ1t6qv1UNwAasv1SN0AHJZAAGVw82BB4JsGJweS//cfbAFKjOoH0v9tAU2gNsAw +T0Dj6g1lgPAeYP9qAUpL6kA1oDXw8E9FYmcqZQDzAGpL6kA0gDRHROzrEUpK64DwF2Bj6qDwBGEB +9gBqS+pANaA1QUVK68DwBGBj6gDxCWEC8ABqS+pANIA0Q0RK60DxF2Bj6sDxGGGK6wDzEmBj7IDz +CGEE8ABqS+pAMkAyburg8xIiyfcbakvqQDJAMgBrYPMQSmDaB9PJ9xtoC+gAMAAwEPAAagD0QDIQ +82hALvAZSkDbEPACaAD0ADAAHJtA/2lj8wBIEBDJ9xttq+2gNaA1f01ATUClLOoEWg9gJ/GQmAAc +9QkAZRDwAmwA9IA0ivQQTAAcalgAZeYiEPACawD0YDPr9U6jD2v/bGzqAnILYRDwAm0A9KA16/VN +pYzqbOoBckD0AGAAHJZAAGUAbRDwAmwA9IA0AvAITMVnABx2OeVnGRcHlArwAFylYQBqQNsH0gFq +cPNkQUvqQNucFxDwAm0A9KA1DPAAamPzAE1L6mKdQDJAMv9KTOti3YIXoPBMRErrAPQXYGPqOWGg +8EJESusg9A1gY+rg8AJhR0QhSkrrQPQRYGPqwPEdYUdEEkpu6n/3BirJ9xtqS+pAMkAyAGtg8xBK +YNoAGBInh2dZF3DzREHgmgLwAGpAMkAy/0pM7+PuX/cNYArwAGpL6kAyQDJN73DzSEHAmsDfQhcA +8gBqS+pANsA2R0YLSkrrwPMXYGPqwPABYaDwT0RK6yD0FWBj6mDxGGGg8E1Ebupg9AkioPBORG7q +P/cDKh/3AGriNEzsTO+CNAAYO13iNcn3G2tr62AzYDNg8xRLQMMRFwHwAGpL6kA1oDVHRQ9KSuvA +8xpgY+qg8BlhAfQAakvqQDJAMkrrAPQGYGPq4PETYQH1AGpL6kAyQDJu6v/2ESof9wBq7OpCMAH3 +AGviMhDwAm0A9KA1bOpj8wBNQjYo8dvFIPMGJqPzUK0Q8ABra+sQ8ABsbeqj81DNHvAAakAyTO// +akzoAPXiMUzuABw8DrBnkGcAHDgNsWfJ9xtqS+pAMkAyYPMQSgBrYNq6Fh/3AGviMmzqQjLs6wbS +YjeA8wgiAXIBbAFgAGwAHPBCCdfJ9xtqS+pAMkAyCZdw8yRCwJkC8ABoADCHZ69AAByDRQnXCZev +QAAcrEWHZ0DZkRag8EVESutg8wZgY+oA8Q1hoPBDRG7qQPECIqDwRERu6n/2HyoQ8AJrAPRgM2Pz +AEv/9x9qJ/FE23QWR0YTSkrrgPAWYGPqAPEbYUdGEUpu6uDzBSJHRhJKbup/9gIqABybQABlyfcb +ahDwAmsA9GAzS+pj8wBLQDIj9GqjQDJg8xRKYNoAHJZAAGVLFkdESuuA8wNgY+oA8QxhR0UQSm7q +wPMRIkdFEUpu6j/2GioAHCsgAGU2FgH3AGpL6kA2wDZCRkrrP/YNYGPqgPEEYUdEAUpu6uDxASJD +Z87qP/YBKv9qAUpAMkAygEqASkzvEPACbAD0gDTiM2PzAEyj83rMyfcbbIvsgDSANJDwRERgypDw +qkQA9ABqQM2Q8KhEoGpAzcn3Gm2r7aA1BG6Q8EZEoDXAykdFc0rAwv/3H2pM63QzyEPITrDzQETA +2mDw3M1A8GSsAPIBakvqbOpA8ETMQPBkrADyAGpt6kDwRMzZFQ/3QEBM7+I3h2f/9x9trOwBdAbU +oPAYYAJUIPMTYQaSA3Lg8RlgyfcbahDwAmsA9GAzS+pj8wBLQDIj9GSrQDJg8xRKYNq1FUdGCUpu +6uDyFiJHRgpKbuq/9QsqABybQAnXEPACawD0YDMAamPzAEsj9ErD/2oBSkAyQDIJl4BKgEpM7+A0 +gjQAHKMxgjQAHJZAAGWOFaDwQERu6oDwGyKg8EFEbuqf9QQq4jQf9wBqTOwAGBEigjR8FaDwRkRu +6sDyGyKg8EdEbup/9RIqH/cAauIzTO/iNkzrAXZiNaDxF2GsMqniSDIQ8AJsAPSANKniyfcba2Pz +AExIMmvrieJgMwT1QJpgM2DzFEtA21EVR0UISm7qcSJHRQlKbupf9QgqH/cAakzvSu/f9gNgEPAC +awD0YDNj8wBLAGon8UTbOBVHRA1KbuppIkdEEEpu6j/1DyrJ9xtsi+yANIA0YPOoRGCd//cfamDz +BExM6x/3AGpM7+AybepA3WCk/2ps6kBrbepAxBUVEPACagD0QDJj8wBKI/RCqv/3H21w82RBrOpA +2wYVAUpu6qDwDSJHRQ5Kbur/9B0qAByuHwBl+RQP90BA7OpCNy3nwJtw80RBwNrAm+4UAfcAakzv +4jIBcgFsB2ACcgJsBGADcgNsAWAAbAAYkl0AZdwUyfcbakvqQDJAMkDxFkr/a2DKAWoQ8AJrAPRg +M+v0UMPLFA/3QEDs6t/0BiIQ8AJrAPRgM2PzAEsA80SbqWeIZ6zqjeoA80TbH/cAbOIyjOpCMgDz +XMOM7/tKAPNdw+IyAPNew/tKAPNfw6YUREZu6m0iQ2eu6p/0HyrJ9xtqS+pAM2AzcPNEQ+CaAvAA +akAyQDL/Skzv/2oBSkAy4+qf9AtgCvAAakvqQDJAMk3vwJ9w80hDwNqAFEFEbupeIkJEbup/9Bkq +H/cAa+IybOpCMuzrBtJiNyDyDCIBcgFsAWAAbAAc8EIJ1wmXAvAAaAAwr0AAHKxFh2f/SEzoyfcb +akvqQDJAMmDzFEoA2lUUyfcbahDwAmsA9GAzS+pj8wBLQDLE93yrQDJg8xRKYNpEFB/3AGrs6kI3 +h2cEJwF3AWwBYABsABzwQgBlNhQf9wBrR2ds6kIyBtLiMmzqQjYHXj/0CmAQ8AJrAPRgM8gyHfcU +S2niQJoA6gBlD/dAQOzqQjfJ9xtqS+pAMkAycPNkQsCbSefA2sCawNsOFB/3AGrs6kIy/3JxYcn3 +G2pL6kAyQDJg8wRKYKqIZ23sgMoQ8AJsAPSANAbwAGpj8wBMS+rg8mScQDJAMv9KTOvg8mTcH/cA +akzvGfQAd//zBWEQ8AJsAPSANAbwAGpj8wBMS+rg8mScQDJAMv9KTOsC8ABqQDJAMk3r4PJk3N/z +DRAQ8AJrAPRgM8n3G2pj8wBLS+oj9GarQDJAMv/3H2xg8xRKjOtg2r/zGBCj81Ct7/cfa4ZnbOrb +FAJ2J2GsMqniSDIQ8AJsAPSANKniyfcba2PzAExIMmvrieJgMwT1RJpgM2DzFEtA25/zFxCqKsn3 +G2tr62AzYDNg8wRLgKv/agJKS+qM6kDLixcDdp/zBWGsMqniSDKp4hDwAmsA9GAzyfcbbEgyaPAI +S4vsaeKANECagDRg8xRMQNx/8w4Q6/VNpQFtABxLLkzsv/MYEAAYhFyHZ3/zARAAHJtACdcJlw/3 +QED/9x9tTO/iMhDwAmsA9GAzrOpj8wBLI/RLwwAclkAAZV/zCRAP90BATO/iN4dn//cfbazsBtRw +8wRBoJgAGGNeAGXAmAaVEPACbAD0gDQ99xBMABwTWABlP/MNEAAc+h8AZT/zCBAGlHoU4jQf9wBq +TOwAGI9egjQf8x0QAvAAaAAwYG6vQAAcg0UkbODzCGwAHCwfAGUAHJtAAGUkbAAcrEWvQB9uTO4A +HJZACNYAHFsfZGwIlnDzREHAwv/yGxAAGHVdAGX/8hYQD/dAQEzv4jIBa6JnbO0Q8AJsAPSANEY2 +bO7b96jcSjcQ8AJsAPSANE4ybOps78v02cQQ8AJrAPRgMxDwAmwA9IA02/fk3GPzAEsQ8AJsAPSA +NMf1R8Nd9wxMABwTWATS3/IEEAAY7WCHZ7/yHxAAGJJch2e/8hoQABybQAnXEPACawD0YDNj8wBL +I/RKowmXX/QdKgFqI/RKww/3QEBM7+AyQjJCMiP0S8OCZwAcozEG0goVABiUXgBln/IXEN/0DywQ +8AJrAPRgM8n3G2pj8wBLS+oj9GCrQDJAMv/3H2xg8xRKjOvHFgAcm0AAZcn3G2oQ8AJrAPRgM0vq +Y/MAS0AyI/Rro0AyYPMUSmDaHxQAHFwgAGV/8gkQBpUQ8AJrAPRgM8n3G2ywMmPzAEuL7GnigDQg +81WigDRg8xRM5RYGk8n3G2yL7HAyEPACawD0YDNj8wBLaeKANCDzVKKANGDzFEzSFgaU1hUGk8n3 +G2yL7HAyEPACawD0YDNj8wBLaeKANCDzVqqANGDzFEy9FgaVEPACawD0YDPJ9xtssDJj8wBLi+xp +4oA0IPNSqoA0YPMUTKoWBpPJ9xtsi+xwMhDwAmsA9GAzY/MAS2nigDQg81CqgDRg8xRMlxYGlRDw +AmsA9GAzY/MAS7AyyfcbbGnii+wg80yagDSANGDzFExA9kIyghYGk8n3G2yL7HAyEPACawD0YDNj +8wBLaeIg80+igDSANAFrYPMUTGzqbRYAgAM8JbACPBgDQjSwfGMkAABDrAKABTzMXaWMBAACJB4A +ohAFAKIsEABAEAUAAiQDAAIkCACiEAAZBACAEAQAIRBEAMAQAgAjEEQAABECACEQRABAGQIA//9j +JP7/YBQAAAAACADgAwAAAADz/6IQBgACJPL/ohSAEAQAQBEEACMQRACAEAIAIRBEAAAZAgAjGGIA +Qh8ACAAZAwCAEAQAIRBEAMAQAgAjEEQAABECACEQRABCHwAIABkCAACAAzwlsAI8bH1jJBgDQjQA +AEOsAoAFPMxdo4wFAAIkBgBiEAYAYiwMAEAQBgACJAQAAiQOAGIQgBAEAIAQBAAhEEQAgBACAP// +QiT+/0AUAAAAAAgA4AMAAAAA9/9iFAARBAAjEEQAbR8ACEAQAgAhEEQAbR8ACEAQAgD//4UwITAA +ACWwAzwqsAQ8tABjNAEAoiQxAIQ0AABloAAAhaD//0UwEgCgEAEAAyQosAc8jx8ACP//CCQAAIOg +AQBjJP//YzArEKMACQBAFAgAxiT5/2UUISDHAAEAYyT//2MwKxCjAAAAiKD5/0AQCADGJAABoiwT +AEAQIRigAP8ACCQosAc8ox8ACP//CST//0MwAACioAABYiwKAEAQCADGJAEAYiT5/2gUISjHAAAB +AiT//0MwAAFiLAAAqaD4/0AUCADGJAgA4AMAAAAA0P+9JxgAsq8lsBI8//8CJCgAtq8cALOvQgBW +NhQAsa/8dxMkQABRNgAAwqIQALCvAAAzpvxXECQyAAQkLAC/ryQAta9bHwAMIAC0rwAAMKZbHwAM +MgAEJPw3AiQAACKmWx8ADDIABCQAADOmWx8ADDIABCQAADCmWx8ADDIABCQAEAIkAAAiptgARTYA +AKKQoABUNqQAVTZ/AEIwAACioKgAUzYAgAI8/BcDJAAAgK4AAKCuAABirgAAI6YAAKOQAoAQPGAb +ECaqGwSSgP8CJCUYYgBWAVI2/w8CJAAAo6AAAEKmeh8ADAAAAAAcHASOFBwCjhgcA44sAL+PAACC +rhgAso8AAKOuIAC0jwAAZK4kALWPAADAohwAs48oALaPFACxjxAAsI8IAOADMAC9J8j/vScYALCv +EACkJyWwEDw0AL+vMAC2rywAta8oALSvJACzryAAsq+KQAAMHACxr0AABTYAAKKUJPoDJKgAEzYk +EEMAAACipKAAEjakABA2AABVjgAAFo4AAHGOAIAUPPw3AiQAAECuIYg0AgAAAK79AAQkAAB0rgAA +oqR6HwAMAAAAAAAAVa4QAKQnAAAWrgAAca6QQAAMAAAAADQAv48wALaPLAC1jygAtI8kALOPIACy +jxwAsY8YALCPCADgAzgAvSfI/70nGACwrxAApCclsBA8NAC/rzAAtq8sALWvKAC0ryQAs68gALKv +ikAADBwAsa9AAAU2AACilK//AySoABM2JBBDAAAAoqSgABI2pAAQNgAAVY4AABaOAABxjgCAFDz8 +NwIkAABAriGINAIAAACu/QAEJAAAdK4AAKKkeh8ADAAAAAAAAFWuEACkJwAAFq4AAHGukEAADAAA +AAA0AL+PMAC2jywAtY8oALSPJACzjyAAso8cALGPGACwjwgA4AM4AL0n4P+9JxgAv6+KQAAMEACk +JyWwBTxAAKU0AACilNj9AyQQAKQnJBBDAPw3AyQAAKKkAACjpJBAAAwAAAAAGAC/jwAAAAAIAOAD +IAC9J9D/vSf/AIIwEACkJyQAs68gALKvHACxrxgAsK8hiMAAIYDgAMCQAgAoAL+vikAADP//szAl +sAI8QAJJNPj/ECYhMAAAAQAKJEQCSDSZIAAIAYAHPC4AyhAAAAAAAQACkgAABJICAAOSAwAFkgAS +AgAlIIIAABwDACUggwAhEEYCAC4FAAEAxiQlIIUAJRBHAAYAwywAAAStBAAQJgAAIq0SAGAQAAAA +AOr/wBQAAAAAAAAikgEAI5IEABAmABQCACUQYgIAHgMAJSBDACEQRgIBAMYkJRBHAAYAwywAAASt +AAAirfD/YBQAAAAAkEAADBAApCcoAL+PJACzjyAAso8cALGPGACwjwgA4AMwAL0nAwAikgIAJJIE +ACOSBQAlkosgAAgAEgIA//+EMEKwCDyAEAQAIRBIAAQARqwAAAeRQBgEAAMABiT/AOcwBDBmAAEA +AiQEEGIAJTDHAP//pTAlEEcAAgCgFP8AxzD/AEcwQrACPAAAR6AIAOADAAAAABQAg5ABAAIkCACG +rBgAhawAAISsAwBiEAQAhKxfXAAIDACArAwAgoxfXAAIEACCrMj/vScoALavJbACPAKAFjwsALev +JAC1ryAAtK8cALOvGACyrzAAv68UALGvEACwrxgDVTQBgBc8AoATPAKAFDzQ39ImbIPiJgAAoq7Q +39COm0AADAAAAAD8XHGOAAAAACMAIBIAAAAAlkAADPxcYK4iABISCAyEJhQAA5IBAAIkKgBiEAAA +AAAKAGAUAgACJAwAA44AAAAAKxAjAh0AQBAjEHEADAACrgAAEI73IAAIAAAAAPz/YhQAAAAADAAD +jgAAAAD4/2AQKxAjAvX/QBQjEHEACAACjhgABI4J+EAADAAArgAAEI73IAAIAAAAAJZAAAwAAAAA +CAyEJiEoAAAhMAAAdjkADCE4AADtIAAIbIPiJggAAo4YAASOCfhAAAAAAAAFIQAIDAACrgwAA44A +AAAAKxAjAtr/QBQjEHEACAACjhgABI4J+EAAAAAAABAAA44AAAAADAADrgAAEI73IAAIAAAAANj/ +vScCgAI8wFRCJBgAsK/AgAQAIYACAhwAsa8gAL+vikAADBAApCcAAAKOEACkJwkAUBAhiAAABABD +jCGIQAAAAEKMAAAAAAAAYqwEAEOsAAAxrgQAMa6QQAAMAAAAACEQIAIgAL+PHACxjxgAsI8IAOAD +KAC9J+j/vScBAYIsEACwrxQAv68hgIAAIRgAABAAQBQBAAQkAQICLg0AQBQCAAQkAQgCLgoAQBQD +AAQkARACLgYAQBQAAAAAFAC/jxAAsI8hEGAACADgAxgAvScEAAQkNSEADAAAAAD3/0AQIRhAAAwA +UKwUAL+PEACwjyEQYAAIAOADGAC9J+D/vScYALCvIYCAABwAv6+KQAAMEACkJxAAA44CgAI8wFRC +JMAYAwAhGGIAAABkjAKABjwCgAc8AAAErgQAkKwEAAOuxF3FjBAApCcFAKAQAABwrLBd4ozEXcCs +JRBFALBd4qyQQAAMAAAAABwAv48YALCPCADgAyAAvSfJ9xtra+tgM/9qYDNM7GDxAEus6mnigMIg +6ABl/2qM6hVaDmABa4NnhOoC8ABqQDLu8BBKjOoFKg9qjOoCawEqAGsg6ENnAAD/YwDQEPACagD0 +QDKMMAplieBIMoniaGdj8wBLSDJp4gHRAGsE9WrCBPVrwgT1ZJocbSJnAW//bgIQ/03M7UdnRO1s +6voiBPWqwQBtHV0TYIngSDJoZ4niY/MAS0gyeeIE9USeAWtk7WzqCSoBTf9qTO0dXe1hAZEAkCDo +AWMBkQCQBPWrxiDoAWMAAPtjB9EQ8AJpAPQgMQBqY/MASQhiBtAE0jQQA1RiYAF0bmAE9YiZB2r/ +a4I0hjRM7ARYbOwSYAAYoVywZ8n3G2wE9WCZi+yANIA0TOuA8QRMCDKJ4gT1ZNlg2gAYpSEElMn3 +G2yL7ASTgDSANGDxAEyJ40CiBJJ/SRVJAUogWgTSSGAE9aiZAWuiNJIybOr/a2zq8CLk9HiZ/2qG +NHIzTOt/akzrB2pM7P9qTOwHaKzoAnRM6LJhOFsKYQH2AWpL6qzqAPIAa23qBPVI2aoXFFuoYAH2 +AWpL6qzqAPYAa23q8xcDdJ5hGlucYQH2AWpL6qzqAPQAbI3qBPVI2ZIXMluQYAH2AWpL6qzqAPQA +a23q2xcIlweRBpAAagDvBWMAACDoAGWkZ8n3G2z8Y4vsBtCANKwwoeCANAdigPFARAgwQKKh4BDw +AmoA9EAyY/MASggwQeAE9UiYB2uA8QRMbOpIMoniBPVgmECahWds6gT1RNgAGKUhBNUElQT1iqD/ +agAYkyFM7QeXBpAA7wRjAAD/9x9rjOsA8gBqC2xs6mzsB2sOKgxcC2AQ8AJrAPRgM4gyffcIS2ni +QJoA6gBlB2sg6ENnBmsg6ENnBWsg6ENnBGsg6ENnA2sg6ENnAmsg6ENnAWsg6ENnAGsg6ENnAAAQ +8AJrAPRgM/djY/MASwBqD9EjZxBiDtAE0gXTBtMH0wjSCdIK0gvSDNLk9AhJSJkBa/9sQjJSMmzq +jOqA8BEiyfcbakvqQDIElkAyYPEASknmQKL/a0zsBZIMZVHkwPRKpGzqYZlY6+D0R6T/a2zqYpkS +7QBlAGVY6xLqVeX/90yZo+pA8Q9hq+L/90zZYZlCmchn//fsmVXj//dwmf/3VJlR4//3fJlAmUHj +BZNp5iD1XqL/bszqxWcPJaPq2GcNLkhnB1oEYQxyAmANcgVhrDKr4k4yg+oQYXkmBZJoZ2g0UeQG +kmniRPVmov9qTOtg9UCcROvj6mpgAWhfmXBniGdk7GzqAPEcIgaWleZE9WalBPXspf9uRmfM6wps +7OqE64LqAPENYEFHBPVMxczqjuoCKiT1CcUFlGhnaDKJ4sD1lJpg9UCahDON42niSjf/9+zZBZYn +8USe//cfcsDwG2EAa2HZYtn/93DZ//d02f/3eNn/93zZYNkElAyWC5IBTAqTBNQJlH9Of0p/SxVO +FUoVS39MFUwM1gvSCJYHkgrTBpMJ1ASUf05/Sn9LFU4VShVLf0kgVAjWB9IG0xVJP/cVYRCXD5EO +kADvCWOg8A4loPAOLqQyqeJKMgPqwWAGlkhnAGtR5gT1bMQBa2TqX5lv62zqX9kk9Umk/2yM6gFy +EGAJlhDwAmoA9EAyAG1j8wBKTeaFZ6njAU0dVUT1hsL6YQaTiGcAbonjJPXJwhDwAmoA9EAynfcY +SgCaEPACbwD04DcQ8AJuAPTANgBtXPQAT9zzDE6oMu3iYJsR4sniwPV03ECaAU0dVWD1QNzzYWhn +ICMHlKhn/00E9Uuk/2hC7RhhCJYQ8AJrAPRgM2PzAEtp5gT1i6IE9cSaAW8M7GdnZO1GZ2zqbuoA +8QMi/02C7fZgiGcQ8AJuAPTANogyY/MATsniwPWUmmD1QJqEM43jaeJKNxDwAmoA9EAyy/RGov9r +bOoicsDwF2GIZxN0P/cNYAeWAWtk7GT1RJ7/9+zZbepk9UTeBZYn8USe//cfcj/3BWAElf9qiGcA +GJMhTO0eFwBr//ds2bAWH/cYJgWUaGdoMoniwPVUmkPvThdIZxxa//YXYAaUTeQk9Umj/2wBclNg +DJYQ8AJqAPRAMgBtY/MASk3mhWep4wFNHVVE9YbC+mEGk4hnAG6J4wFsBPXMwiT1ycJkZ0hnZOpf +mW/rbOpoZ1/ZTiMg8EKhqGcBTaLq/2gXYQqTEPACbAD0gDRj8wBMieME9YqiBPXEmgFvDOxnZ2Tt +Rmds6m7qbyIBTaLs92AQ8AJqAPRAMsv0RqIicr/2B2FIZ+5K/2ts6gJav/YAYBhuDmWdFshnGF4/ +YUT1RqNM7AVcA2ABSkT1RsMGk4hnAG6J4wFsBPXMwiT1ycJkZ0hnZOpfmW/rbOpoZ1/Zsisg8EKh +pGf/aK0iC5QQ8AJuAPTANmPzAE7J5AT1iqLlZwT1xJoM7GdnZO1GZ2zqbuoJIgFNouyWYWdnZO1G +Z2zqbur3KgztDWWNF0hnBVoFYET1RqNM7ANcvRdE9UajTOwEXLgXB5RIZwFrZOpk9UScbepk9UTc +UBYM7Q1lkRcM7Q1l/Rb8YxDwAmwA9IA0BdEGYgTQY/MATIfwWJyH8H2kZeKH8FScQ+ng8ARgBGcM +EBDwAmgA9AAwY/MASIfwVJgQSUPpwPAWYIfwXaD/9x9tLO0QSofwXcDv9x5qS+pAMkAyEPACbAD0 +gDSq8hRMTe0AHPRUEG5G97iYH2tA9KI0bOyMMoniSDKJ4kgyGeIE9UieAWtCMlIybOr/a2zqyCLJ +9xtra+tgM2AzYPEAS2nkQKL/a/9vTOsLZUb3dJg/aID1YjIM6gVSTO8BYQRvwPdiMg4q5PRUngRv +AUrk9FTeEPACagD0QDJj8wBKRve4mqIyUjIfa2zqCFJSYBDwAm0A9KA1Y/MATUb3VJ0M6ghnDupG +KnQnAXcFYcT0XJ4BSsT0XN4CdwVh5PRAngFK5PRA3gN3BWHk9ESeAUrk9ETeBHcFYeT0SJ4BSuT0 +SN4Q8AJoAPQAMKhnY/MASAnl5PR4ngD1RKL/bXIzrOpD601h5PRMnghnEPACawD0YDMBSuT0TN4I +MmPzAEsJ4mni6eKg82iirOvE9FSeaeLE9FTeEPACawD0YDNj8wBLCPBUmz/3HiIFdD/3G2FG91Sb +wPdCMj/3FSIAahDwAmwA9IA0EPACaAD0ADAI8FTbnfccTGPzAEgAHBNYEEmH8FSYQ+k/9wphBpcF +kQSQAO8EY8T0WJ4BSsT0WN6GF+T0UJ6oZxDwAmgA9AAwAUrk9FDeqDKp4mPzAEgJ4uniIPR5ov9q +TOuxF+BjAGo+Yj3RPND8Yx3SYmcdlAQFB2iUMqniHtBg2h6UBEr/TABUHtT5YB2VAU0DXR3V7mHJ +9xtqS+pAMSAxwPJEQR3TYNpBmQH3AGsB9IRBQjJs6kIyABz6WzPSAfSIQQAc+lsx0p1ncEwAHIpA +MtIdlBBtpO0AHKxF/02dZ3BMAByQQB/SABxbH2RsABzwQgFsnWcAHIpAcEwdlBBtpO0AHKxF/02d +Z3BMAByQQCDSABxbH2RsABzwQh2U4faAQQAc+lsAZdH2jEEAHPpbIdJx9oBBABz6WyLScfaEQQAc ++lsj0nH2iEEAHPpbJNJx9oxBABz6WyXSgfaAQQAc+lsm0oH2hEEAHPpbJ9KB9ohBABz6WyjSgfaM +QQAc+lsp0tH2gEEAHPpbKtLR9oRBABz6WyvS0faIQQAc+lss0i3S5/cOakAyQDKiZ+H2gEHy8htN +ABzdWzbSNpXR9oxB8vIbTQAc3VsAZTaVcfaAQfLyG00AHN1bAGU2lXH2hEHy8htNABzdWwBlNpVx +9ohB8vIbTQAc3VsAZTaVcfaMQfLyG00AHN1bAGU2lYH2gEHy8htNABzdWwBlNpWB9oRB8vIbTQAc +3VsAZTaVgfaIQfLyG00AHN1bAGU2lYH2jEHy8htNABzdWwBlNpXR9oBB8vIbTQAc3VsAZTaV0faE +QfLyG00AHN1bAGU2ldH2iEHy8htNABzdWwBlM5MBah2QTutD61hnOdIP9wBqS+pAMhDwAEpD0gD1 +AGpL6kAyQDIe0DfSEWcB8ABqS+pAMgBrQDId0zjSM5Rg8RMkOZXg8QwtofaMQAAc+lsAZQXwAGtr +62AzYDNM6wFbWGeR9oRAABz6WzXS4PMfa2AzYDNs6kIyQjKx9oRAPdMAHPpbLtI9lIzqQjJCMpH2 +jEAAHPpbL9I9lbH2jECs6kIyQjIAHPpbMNI9ky6UTOtiMiDxAHRCMqDyFWAvlSDxAHWg8hBgMJMg +c6DyDGAgcgFroPIIYC6UgHSg8gJgL5WAdYDyHmAwlODzAHSA8hlg4PMAcgFqgPIUYDWVAyUCIyD0 +GSodlQFNCl0d1ZdhHpIBSgNaHtKKYQSQIPQJKAyRAykUkv9sKyKQZwAYoV6xZwNaB2AFlAAYoV4N +lQNaAGweYRSTkGejZwAYoV5A0wNaB2AFlAAYoV4VlQNaAGwPYUCVABihXpFnA1pA8h5gDZQAGKFe +FZUDWgFsQPIWYP90QPIXYAQFlDQQ8AJpAPQgMbHkY/MASWCcQ5kA9ABo4PMfbwvo7OsM6m3qYZwC +8ABuy+7s68A24PMfTmAzaDPM6uf3EG1t6qvtYpygNaA1/03s6wD1YDOs6m3qQ9ljnESZ7OsM6m3q +ZJzM6uzrYDNoM23qZZys6uzrAPVgM23qRNlGnBDwAmsA9GAzY/MAS0rJR5xLyUSbgPdCMgFywPIe +Ycn3G2pL6kAxIDHh9oBBABzdWyGV0faMQQAc3VsilXH2gEEAHN1bI5Vx9oRBABzdWySVcfaIQQAc +3VsllXH2jEEAHN1bJpWB9oBBABzdWyeVgfaEQQAc3VsolYH2iEEAHN1bKZWB9oxBABzdWyqV0faA +QQAc3VsrldH2hEEAHN1bLJWB9ohBABzdWy2VH5YQbaTt/00AHINFAGwAHFsfZGwAHPBCAWwglhBt +pO3/TQAcg0UAbAAcWx9kbAAc8EIAbBBtpO0ebAAcrEX/TQFuImdN7hBtA2pL6qTtTO7/TQAcg0Ue +bAAcLB8DbBBtA2rRZ6TtHmz/TQAcg0VN7gRjPpc9kTyQAO8gY6BtoDWgNQH0hEAq9BBNABzdWwBl +CG2gNaA1f00B9IhAABzdW2VNj/cAbavtoDUh9ohAABzdW6A1APIUbaA1oDVB9oBAQPEITQAc3VsA +ZQ3wFm2gNaA1QfaEQKD0Ak0AHN1bAGVB9oxAxfARbQAc3VsAZQDyFG2gNaA1YfaAQEDxDU0AHN1b +AGUF8BZtoDWgNWH2hECh8BpNABzdWwBlYfaMQMXwEW0AHN1bAGU3lUH2iEAAHN1bAU04lUH2iEAA +HN1bAU0AHCwfA2ygbaA1oDUB9IRAKvQTTQAc3VsAZQH0iEAAHN1b5G0h9ohAABzdWzOVOZUf9hQl +IfCAQQAc+lsAZf9tAU2s6kIyNNICIgFqNNKgNaA1IfCAQTrVAPEATQAc3VsAZTqVIfCIQQDxAE0A +HN1bAGWgbaA1oDUB9IRBKvQQTQAc3VsAZQhtoDWgNX9NAfSIQQAc3VtlTUOTIfaIQQAc3VtgNTqV +MfaAQQ/0AE0AHN1bAGU6lTH2hEEJ8ABNABzdWwBlAvABbaA1oDUx9ohBO9Ub9B9NABzdWwBlO5Ux +9oxBEfQfTQAc3VsAZQDyFG2gNaA1QfaAQQDxAk0AHN1bAGUN8BZtoDWgNUH2hEHA9AdNABzdWwBl +QfaMQcXwEW0AHN1bAGVh9oxBxfARbQAc3VsAZTqVUfaAQQ/0AE0AHN1bAGU6lVH2hEEJ8ABNABzd +WwBlO5VR9ohBO/QDTQAc3VsAZTuVUfaMQTH0A00AHN1bAGUA8hRtoDWgNWH2gEEA8QJNABzdWwBl +BfAWbaA1oDVh9oRBAfUHTQAc3VsAZUH2iEEAHN1bN5VB9ohBABzdWziVABwsHwNsAPIAakAyQDKi +Z0H2jEHF8BFNABzdWzzSPJVh9oxBxfARTQAc3VsAZUH2iEEAHN1bN5VB9ohBABzdWziVABwsHwNs +AfSEQQAc3VsxlQH0iEEAHN1bMpUh9ohBABzdWwBtNJMf9R4rIfCAQQAc3Vs6lSHwiEEAHN1bOpUT +FQBqahUAa1YV/2z/dL/1CWHJ9xtsi+yANIA0QdSB9hRMABz6WwBl4PMfa2AxIDEs6kIyEPACbAD0 +gDRj8wBMQjJs6mOcAPQAbavtrOtN62PcQZTg8x9ogfYcTAAc+lsAZSzqEPACbAD0gDQQbWPzAExC +MqvtY5xCMqA1DOqgNeDzH01AMqzrSDJN62PcQZSh9gRMABz6WwBlLOpCMkIyDOrn9xBsEPACaAD0 +ADBj8wBIi+xjmIA0gDT/TAD1QDKM603rY9hBlKH2DEwAHPpbAGUs6mSYQjIA9ABo4PMfbQvoQjKs +6gzrTesQ8AJqAPRAMmPzAEpk2kGU4PMfaKH2FEwAHPpbAGUs6kIyEPACbAD0gDQQbWPzAEzg8x9r +QjKr7WzqoDVknKA14PMfTUAyrOtIMk3rZNxBlKH2HEwAHPpbAGUQ8AJsAPSANOf3EG1j8wBMLOqr +7WScQjKgNUIyoDX/TQzqrOsA9UAyTetk3EGUEPACaAD0ADBj8wBIwfYETAAc+lsAZSzqQjJCMkrI +QZTB9gxMABz6WwBlTOkiMhDwAmsA9GAzQjJj8wBLS8hEm4D3QjIBcj/1AmDJ9xtqS+pAMSAxgfSA +QQAc+lsAZYJnEPACaAD0ADBAakvqY/MASEAyw5hAMozq4PMfa4D1QjXM6wDyAGps6gQiAPQAakvq +Teu46+DzH2gS6kIzDOvCMODzH2oKMEzoAPIAagzqBCIA9ABqS+pN6Ljo4PMfbRLqQjA/akvqrOhA +Mj9tQtVAMgztH/QASqA1TOygNY3tgfSAQQAc3Vtt7ZH0hEEAHPpbAGUC8ABrYDNgM/9LwPMAbGzq +jOiA9QAzomeR9IRBABzdW23tgfSIQQAc+lsAZRDwAm0A9KA1vfcQTYJnQJ2M6oD1QjUQ8AJqAPRA +MmPzAEoEmuDzH2oCM2ozTOsA8gBqbOoEIgD0AGpL6k3ruOsA9QIwEupCM+DzH2pM6EzrAPIAagzq +BCIA9ABqS+pN6Ljo4PMfbRLqQjCs6D9qQpVL6kAyDO1AMh/0AEpC1aA1TOygNY3tgfSIQQAc3Vtt +7ZH0jEEAHPpbAGUQ8AJrAPRgM733FEugm8DzAGyM6EztgPUAMpH0jEEAHN1bTe1YFAyR3/MZEB6T +BAR0MpHiPtSR9oRAABz6WwBl4PMfa2AzYDM+lWzqQjJCMj/TkfaMQAAc+ltA3T+TPpRs6kIyQjJB +3KH2hEAAHPpbAGU/lT6TofaMQKzqQjJCMgAc+ltC2z+UPpWM6kIyQjKx9oRAABz6W0PdP5M+lGzq +QjJCMkTcsfaMQAAc+lsAZT+VPpPB9oRArOpCMkIyABz6W0XbP5Q+lYzqQjJCMsH2jEAAHPpbRt0/ +kz6UTOtiMkIyR9x/8w4QAAD7YwfRDPAAahDwAmkA9CAxY/MASQhiCtQG0EvqYplAMkAy/0pM68n3 +G2wE8ABqQDKL7EAygDRN64A0YtkE1IH2FEwAHPpbAGXg8x9rYDAAMAzqQjJCMmzqY5kA9ABsi+yM +603rY9kElIH2HEwAHPpbAGUM6kIyEGzg8x9rQjKL7GzqgDRjmYA04PMfTEAySDKM603rY9kElKH2 +BEwAHPpbAGUM6kIy5/cQbODzH2tCMovsbOqANGOZgDT/TAD1QDKM603rY9kElKH2DEwAHPpbAGUM +6kIy4PMfa0IybOpkmQD0AGyL7IzrTetk2QSUofYUTAAc+lsAZQzqQjIQbODzH2tCMovsbOqANGSZ +gDTg8x9MQDJIMozrTetk2QSUofYcTAAc+lsAZQzqQjLn9xBs4PMfa0Iyi+xs6oA0ZJmANP9MAPVA +MozrTetk2QSUwfYETAAc+lsAZQzqQjJCMkrJBJTB9gxMABz6WwBlTOj/agFKQDJAMgqTgEoCMIBK +AjBs6gvJFCIf9wBqCpRM62IzwPJjwYIzTOtiM8DyZ8EAGApfAGUIlweRBpAA7wVjEmrA8kPBwPJH +wQAYCl8AZQiXB5EGkADvBWPJ9xtq+2NL6gbQQDAH0QhiADBA8EygA2lM6RDwAmoA9EAyYmcE0mPz +AEvD80GjLuoaIgUp4PJmo/9qTOsaIwSSyfcXbIvsY/MASgTSw/Mhwsn3G2pL6kAyQDJ2moA0gDRg +3FeaQdwIlweRBpAAagDvBWNR9IBAABzwWxxtUfSIQAAc8FscbdsX+WMK0Mn3G2gL6AAwADAQ8AJq +APRAMgvRofWCQCJnY/MASQxiABz9WwbSwPJYyaH1hEAAHP1bAGXA8lrJofWGQAAc/VsAZcDyXMmh +9YhAABz9WwBlgmfA8nqpwPJeycDyWKlp4sDyfKlp4lHkBNQh8o1AABwAXABlAPZANQD2ozVAav9r +Te1s7SHyjUAAHPBbBdNR8otAABwAXABlQDJR8oxA4PJEyQAcAFwAZeDyZKlh9IRAdeIEk//3H2rg +8qTJTO1p5eDyQNn/9x9qABzmW0ztQ6n/9x9rbOoQUgVg4PJAmR9aoPAeYQBqwPJUwcDyVaEFkwFK +TOsDU6DwC2DA8lXBBpQAahFrY/MATEPM4PJEzECcbOoBcoDwE2Hg8kScA2sA90IybOqA8Asqyfcb +akvqQDJAMkDwTKJM6wFzoPAEYAaUY/MATODyRqSg8AsqQJwBa1YybOqg8AUiPmrA8lDEHGrA8lHE +yfcbakvqQDJAMkDwbKL/amzqA2ts6mEiZvdMnP/3H3JcYODyQJzg8wlaAPEDYcDycqQA9mAyAPZD +Mv5K//ccUgRqS+oBYU5DwPJSxAaWf2tj8wBOZvdMnsDyjqZSMmzqp0LA8lKmA03/a0vlAPZANUNn +APajNYzqourg8AxgAPaANQD2ozUGkmPzAEoG0uDyQJoE9xFawPABYTJVoPAeYDJtyfcbakvqQDJA +MiH0EEpEa8n3G2gL6GDCADD/aqzqADCiZ1H0gEAAHPBbCNIIklH0iEAAHPBbomcAGAhhAGUMlwuR +CpAAagDvB2MDasDyVcFAmQhrbepA2U8XAGrA8lXBwPJUoQWTAUpM6wNTFGEDasDyVMFAmQlra+ts +6kDZPBfg8mak/2pM61/3FisBakvq4PJGxFEXwPJUwS4XBpD/bWPzAEjg8kagqurGYcn3G2yL7IA0 +gDRB9BBMABwAXAnVCZUA9kAxAPYjMX9qrOlM6eDyYJjA8kio//cfbEPrOGHA8kqojOpD6wdhwPJM +qIzqQ+tpYAFJrOkGk2PzAEvA8lCjI+oyYCJnBpNj8wBLBtPg8kCbBPcRWh1hMmnJ9xtqS+pAMkAy +IfQQSkRryfcbaAvoADAAMFH0gECxZ2DCABzwWwBlUfSIQAAc8FuxZ3QX/0nRFzpZ4mHJ9xtqS+pA +MkAyIfQQSkhr4RfA8nGj/2pM62PpyWAjZ8cXOlVf9wBhyfcbakvqQDJAMiH0EEpIaz8XgPEQWh/3 +CGDA8nKkAPZgMgD2QzICSg1SDGr/9htgQkP5FsDyT6ZM62LtH/cSYAD2QDUNFwJJlhf7YwbQAvAA +aAAwr0D/8BBuFWwIYgAcg0UH0QAcWx9kbBpsRvAWbgAcg0WvQAAcWx9kbBDwAmoA9EAyBNJj80Ca +AWtOMmzqCiIQ8AJrAPRgM2PzAEsA80ejAXIcYQSSY/MgmgFqLjFM6QkpEPACawD0YDNj8wBLAPNH +o1oqBJMIlweRBpBj8wBLBNMEagDzRMMA7wVjyfcbbIvsgDEk8gJoIDEAMAH2iEEk8gJtABzdWwAw +AfaAQSTyokAAHN1bAGUB9oRBJPKiQAAc3VsAZRH2gEEk8qJAABzdWwBlEfaEQSTyokAAHN1bAGUR +9ohBJPKiQAAc3VsAZRH2jEEk8qJAABzdWwBlEPACagD0QDIBa2PzAEoA82fCBJMIlweRBpBj8wBL +BNMEagDzRMMA7wVjyfcbaAvoAPO0mwAwADAB9oBAABzdWwBlEPACagD0QDJj8wBKAPO0mgH2hEAA +HN1bAGUQ8AJrAPRgM2PzAEsA87ibAfaIQAAc3VsAZRDwAmoA9EAyY/MASgDztJoR9oBAABzdWwBl +EPACawD0YDNj8wBLAPO0mxH2hEAAHN1bAGUQ8AJqAPRAMmPzAEoA87SaEfaIQAAc3VsAZRDwAmsA +9GAzY/MASwDztJsR9oxAABzdWwBlEPACagD0QDJj8wBKAPMnwgSTCJcHkQaQY/MASwTTBGoA80TD +AO8FY/tjBtAC8ABoADCvQP/wEG4VbAhiAByDRQfRABxbH2RsGmxG8BZuAByDRa9AABxbH2RsEPAC +agD0QDIF0mPzQJoBa04ybOoKIhDwAmsA9GAzY/MASwDzR6MBch1hBZJj8yCaAWouMUzpCSkQ8AJr +APRgM2PzAEsA80ejXCoFkgiXB5Fj8wBKBdIFkwaQAWoA80TDAO8FY8n3G2yL7IAxJPICaCAxADAB +9ohBJPICbQAc3VsAMAH2gEEk8qJAABzdWwBlAfaEQSTyokAAHN1bAGUR9oBBJPKiQAAc3VsAZRH2 +hEEk8qJAABzdWwBlEfaIQSTyokAAHN1bAGUR9oxBJPKiQAAc3VsAZRDwAmoA9EAyAWtj8wBKAPNn +wgWSCJcHkWPzAEoF0gWTBpABagDzRMMA7wVjyfcbaALwEGoL6EAyQDIAMKJnADAB9oBAAvAQTQAc +3VsE0gSVAfaEQALwEE0AHN1bAGUB9ohAAvAQbQAc3VsAZQSVEfaAQALwEE0AHN1bAGUElRH2hEAC +8BBNABzdWwBlBJUR9ohAAvAQTQAc3VsAZQSVEfaMQALwEE0AHN1bAGUQ8AJrAPRgM2PzAEsA8yfD +BZIIlweRY/MASgXSBZMGkAFqAPNEwwDvBWMAAPxjBdEQ8AJpAPQgMQZiBNBj8wBJAPPMmQLwAGgA +MK9AAByDRRVsABxbH2RsAPPQmRpsAByDRa9AABxbH2RsAPNEoQ4qyfcbbIvsgDSANAH2AEwAHPpb +AGXg8myZbuo2Isn3G2gL6ODyqJkAMAAwAfaIQAAc3VsAZeDyrJkB9oBAABzdWwBl4PKwmQH2hEAA +HN1bAGXg8rSZEfaAQAAc3VsAZeDyuJkR9oRAABzdWwBl4PK8mRH2iEAAHN1bAGUA86CZEfaMQAAc +3VsAZRDwAmoA9EAyBpcFkQSQY/MASgBrAPNkwgJrAPNnwgDvBGMAAPxjBdEQ8AJpAPQgMQZiBNBj +8wBJAPPMmQLwAGgAMK9AAByDRRVsABxbH2RsAPPQmRpsAByDRa9AABxbH2RsAPNEoQNyW2Dg8qyZ +yfcbakvqQDAAMAH2gEAAHN1bAGXg8rCZAfaEQAAc3VsAZeDytJkR9oBAABzdWwBl4PK4mRH2hEAA +HN1bAGXg8ryZEfaIQAAc3VsAZQDzoJkR9oxAABzdWwBlAPNImeDyaJlV4x/3AGqs6gf3AVoWYAH2 +iEAAHN1bAGUQ8AJqAPRAMgaXBZEEkGPzAEoDawDzZMICawDzZ8IA7wRj/2oBSkvqQDLg8B9KTO0H +9wBqTe3fF8n3G2yL7IA0gDQB9gBMABz6WwBl4PKsmarqmWEQ8AJqAPRAMgaXBZEEkGPzAEoDawDz +ZMICawDzZ8IA7wRjAAAQ8AJrAPRgM2PzQJsQa/tjbeoQ8AJrAPRgM2PzQNvJ9xtqS+oH0UAxIDFR +9IBBCGIAHABcBtAA9kAyAPZDMlH0gEEabQAc8FsE0vHwiEEAHABcAGUEkwD2QDIA9kMySeMIQppI +v/cbUAlhEPACawD0YDNj8wBLQ6sBSkPLBJX/alH0gEEAHPBbTO0Q8AJrAPRgM2PzQJsRa2vrbOoQ +8AJrAPRgM2PzQNsL7f9qkfSCQQAc8FtM7QiXB5EGkABqAO8FYwAA+WMQ8AJrAPRgM2PzAEsMYgvR +CtBm90ybUjIF0gWUf2pM7AXUAPNEowbSQJuEa2zqgHIqYQaTAXMCYARzG2EC8ABoAPIAbgAwwDav +QPPwFE4AHINFFWwAHFsfZGz/bgFOwDYabEbwFk4AHINFr0AAHFsfZGwQ8AJrAPRgM2PzAEsBakvq +APNEw8n3G2pL6kAwADBA8GygA2ps6goiEPACbAD0gDRj80CcAWteMmzqfCIQ8AJsAPSANGPzAEwA +80Sc//cfa0IybOoWKsn3G2pL6kAyQDKA8QRKQJoNclhhRmoA81zEQWoA813EQGoA817EO2oA81/E +EPACaQD0IDFj8wBJ5PS4mcn3G2pL6kAw/26yNQAwzO1h9IBAABzwWwjWYJmEagiWbOqEcith5PRY +mf/3H3ImYHYyAWts6iIiQPBMoANrzOps6hwiBpJq6qDwE2AEUqDwG2DA8BgiAXIRYQDzXKEFk8zq +Q+vA8AtgAPNfoQWUzOqD6qDwGmEAGJYpAGUMlwuRCpAAagDvB2NKagDzXMRFagDzXcRGagDzXsRA +agDzX8SnFwH2gEAAHPpbAGUOKhH2gEAAHPpbAGUn9x9rYDNgMyf3H0tu6n/3ECKdZwAcikAQTBDw +AmkA9CAxAfaIQGPzAEkAHPpbAGXg8kjZAfaAQAAc+lsAZeDyTNkB9oRAABz6WwBl4PJQ2RH2gEAA +HPpbAGXg8lTZEfaEQAAc+lsAZeDyWNkR9ohAABz6WwBl4PJc2RH2jEAAHPpbAGUA80DZEPACagD0 +QDLL9Eai/2ts6iJyAmCSchphAfCNQAAcAFwAZQ9rTOsPam7q/2yM6ghboUIMYaA0gDMA9qAybeqN +6q3qrewA81TZAPOY2Z1nAByQQBBMEPACawD0YDNj80CbgGsQ8AJsAPSANG3qY/NA3PwWIPNAoQWT +zOpD61/3G2AAGNIpAGVaFwaTBHMSYP9zX/cUYQDzXqEFlMzqQ+wkYQDzXKHM6kPsCmAAGB4pAGVF +FwDzXaEFlMzqg+r2YAAYmygAZTsXAPNeoQWTzOpD6+xgIPNBoQWUzOqD6j/3C2EAGNIpAGUqFyDz +QaEFk8zqY+r2YCAX+2MQ8AJuAPTANgfRJmcG0AhiY/MASWb3jJl/apIwTOjg8kahDyrJ9xtqS+pA +NaA1QPBMpf9rbOoDa2zqAyL/9x90BmEIlweRBpAAagDvBWMB8IBFBNUAHABcBdYBa2zqBJUFliwi +S1gGYcDyU6H/bIzqaup0YUhA4Er/a2zqHloHYIZnY/MATMDyU6Rs6kMqI1jYYGZnY/MAS8DyU6MC +ctFgyfcbbIvsgDQCaoA0wPJTw4H0B0wAHPBbAG3DF0tYBmHA8lOh/2yM6gFyQGFIQOBK/2ts6h5a +B2CGZ2PzAEzA8lOkbOolKiNYrGBmZ2PzAEvA8lOjAnKlYMn3G2yL7IA0AmqANMDyU8Mh9BBMABzw +W0JtlxcAasDyU8TJ9xtsi+yANIA0gfQHTAAc8FsgbYkXAGrA8lPEyfcbbIvsgDSANCH0EEwAHPBb +RG17FzH0gEXA8nPBABzwW0NtcxeB9IdFwPJzwQAc8FsQbWsXAGXo/70nEAC/ryRjAAwhOAAAEAC/ +jwAAAAAIAOADGAC9J9j/vScYALCvAYACPCWwEDwUrkIkHACxrxgDETYQAKQnAAAiriAAv6+KQAAM +MAMQNiCAAjwlsAU8AAACrgGAAjwVrkQkMwOjNAAAJK4AAGKQAAAAAEAAQjD7/0AQMAOiNAAARowP +AAM8//9jNCQwwwBAEQYAIxBGAIAQAgAhEEYArw8FPMAQAgAAoKU0GwCiAAIAQBQAAAAADQAHAAKA +AzxgG2MkwjAGABAApCdUQWasEigAAJBAAAxYQWWsIAC/jxwAsY8YALCPCADgAygAvSfA/70nLAC1 +ryAAsq8hqIAAAoASPBAApCc4AL6vMAC2rzwAv680ALevKAC0ryQAs68cALGvGACwr4pAAAxEAKWv +7F1CkiHwAADFAEAQIbAAAAKAAjxgG0MksBtilAAAAAAAAUIwvgBAEAAAAAAEPmKMAAAAALoAQBQC +gBc8Dl7ikgAAAAAGAEAQAoACPA5e4pIAAAAA//9CJA5e4qICgAI8AoADPPJdQKAUXmCsAoADPAde +YpD9/wMkQrATPCQQQwACgAM8B15ioAAAY5Lv/wIkAwBkNiQYYgBAAAIkAABjogAAgqACgAQ89F2C +lCAAo5b//0IwCgBDEAKAFDwlsAI8lABCNPRdg6QAAEOk9F2DlAAAAAD//2MwgBoDAPhdg64lsAQ8 +hACCNAAAUIyAAIQ0AACCjCEYAAD4XYaOAIgQACGAAAAlgAICJYgjAiEgAAJ9KwAMISggAvhdiI4C +gAo8/F1DlSNIAgEhIDABISgAACsQkAD//2MwISixAIAaAwAhKKIAITgAACtAgwAjKKcAIyCDACMo +qAACgAM8GF5krBxeZaz8XUKVAAAAAP//QjCAEgIAKxBJAJcAQBAAAAAA/F1ClQAAZJL7/wMk//9C +MIASAgAkIIMAI0giAQAAZKIBAAYkBAAgEQEABCSAEAkAIRBJAIAwAgC5IAAMISgAAEKwAjwiAAMk +AwBCNAAAQ6BEAKKPBQAFJCQApCYAAEeMFACmJ/8/5zCrGgAM3P/nJCwAQBAhKEAA7F1CkgIAAyT/ +AEIwgwBDEAKABDwCAKKQAAAAAAgAQBQAAAAABACjkAAAAAABAGIwBABAEAKAAjwBABYkC15WoAQA +o5AUAKePAAAAAAQA4igWAEAU/gBmMAKAAjxgG0MkTDpklMAQBgAqEIIAEABAFAKAAzwhEMcA/f9C +JMAQAgAqEEQACgBAFMIQBAAjMEYAIRimAAUAYpAHAIQwAQADJAcQggABAEIwC/BiAAKAAzwHXmKQ +7/8DJCEgwAIkEEMAAoADPAdeYqDsXUOSAoACPODkQiT/AGMwgBgDACEYYgAAAGaMAAAAAAn4wAAh +KMADkEAADBAApCc8AL+POAC+jzQAt48wALaPLAC1jygAtI8kALOPIACyjxwAsY8YALCPCADgA0AA +vSfsXUKSAAAAAO//QBQCgAM8YBtwJLAbApYAAAAAAAFCMOn/QBAFAAUkRACijyQApCYAAEeMFACm +J/8/5zCrGgAM3P/nJOD/QBAhKEAAFACnjwQAQpAEAOMo2/9gFP4ARjBMOgSWwBAGACoQggDW/0AU +IRDHAP3/QiTAEAIAKhBEANH/QBTCEAQAIzBGACEYpgAFAGKQBwCEMAcQggABAEIwyf9AEAAAAAAO +UQAMISAAAIMsAAgAAAAADl7ikgAAAAAFAEAUAAAAAA5e4pIAAAAAAQBCJA5e4qIAAGKS+/8DJAEA +BiQkEEMAAABiojIsAAgAAAAAAwCikAKABzwJXuKgAgCjkCEwgAAKXoOgCl6CkAAAAAAGAEAUAAAA +AAle4pAAAAAACl7CoEwsAAgAAAAACl6CkAAAAAAKXsKgTCwACAAAAAABAAMkAoACPA1eQ6DQBwQk +AoACPAKAAzzcXUSsDF5goAgA4AMAAAAA2P+9JxwAsa8YALCvIAC/rwQAgowCAAMkIYCAAAIXAgAD +AEIwBgBDEAKAETwgAL+PHACxjxgAsI8IAOADKAC9J+xdIpIAAAAA+P9AEBAApCeKQAAMAAAAAOxd +I5ICgAI8tORCJP8AYzCAGAMAIRhiAAAAZowAAASOBAAFjgn4wAAAAAAAAoACPO5dQ5AMAAIk/wBj +MAUAYhAQAKQnkEAADAAAAAD3LAAIAAAAAAKAAjwGXkOQAAAAAPj/YBACgAU8DF6ikAAAAAABAEIk +DF6ioJBAAAwAAAAA9ywACAAAAAAqsAQ8KACFNAIAgpQEAIQkBQBAFCsYpAD7/2AQAQACJAgA4AMA +AAAACADgAyEQAAAlsAM8vgBjNAAAYpQIAOADAQBCLOj/vScQAL+vJC0ADAAAAAACgAM8GQBAEJhU +ZCSYVGKMAAAAABUARBQCgAI8DV5DkAEAAiT/AGMwEABiEAKAAzztXWKQAAAAAA8AQjAFAEIoCgBA +EAEABCQCgAI8ZFlDjAAAAAAFAGAUIRCAABAAv48AAAAACADgAxgAvScQAL+PISAAACEQgAAIAOAD +GAC9J+j/vScQAL+vJC0ADAAAAAAsAEAQAoACPJhUQ4yYVEIkKABiFAKAAzwFXmKQAQAEJP8AQjAj +AEQQAoADPO1dYpAAAAAADwBCMAMAQigdAEAQAoADPAdeYpAAAAAABABCMBgAQBQAAAAAB15ikAAA +AAAQAEIwEwBAFAKAAzwNXmKQAAAAAP8AQjAOAEQQAoACPA5eQ5AAAAAACgBgFAKAAjxgG0IkBD5D +jAAAAAAGAGAUIRgAADw6QowAAAAAAgBAFAEAAyQhGAAAEAC/jyEQYAAIAOADGAC9J+j/vScQAL+v +MC0ADAAAAAACgAM8DgBAEJBUZSSQVGKMAoAEPIhUhiQJAEUUAQADJIhUgowAAAAABQBGFCEQYAAQ +AL+PAAAAAAgA4AMYAL0nEAC/jyEYAAAhEGAACADgAxgAvSfY/70nGACwr/8AkDAQAKQnIACyryQA +v68cALGvikAADAKAEjwPAAASAAAAADxeQ5IBAAIkBAwEJP8AYzAqAGIQgAEQPJBAAAwQAKQnJAC/ +jyAAso8cALGPGACwjwgA4AMoAL0nPF5DkgIAAiQhKAAA/wBjMPP/YhRECAQkA1wADH/+EDwwXAAM +BAwEJP0ARTAaXAAMBAwEJDBcAAwEDQQk/QBFMBpcAAwEDQQkJlwADHAOBCT//xA2JChQAANcAAxw +DgQkJlwADIwOBCQkKFAAA1wADIwOBCQBAAIkPF5CorktAAgAAAAAMFwADAAAAAACAEI0/wBFMBpc +AAwEDAQkMFwADAQNBCQCAEI0/wBFMBpcAAwEDQQkJlwADHAOBCQlKFAAA1wADHAOBCQmXAAMjA4E +JCUoUAADXAAMjA4EJAMABTxZAaU0A1wADEQIBCQCAAIkPF5CorktAAgAAAAAJbACPEIARjT8NwMk +QABCNAAAQ6QDCAQkAwAFJAAAwKAaXAAIAAAAAOD/vScYALKvFACxrxwAv68QALCvAoACPOxdQ5D8 +VxIkCwBgEPx3ESQCgAI8xlxDkAAAAAACAGMwKgBgFCEgAAAhMAAAAAIFPMFDAAwACAQkJbADPCEA +ZTQAAKKQGABmNEAAcDQBAEI0QgBjNAAAoqD//wIkAADAoGQABCQAAGKgAAASplsfAAwAAAAAAAAR +plsfAAwKAAQkISgAABpcAAwDCAQkWx8ADAoABCT8NwIkAAACplsfAAwKAAQkAAARplsfAAwKAAQk +AAASphwAv48YALKPFACxjxAAsI8IAOADIAC9J6gtAAwAAAAAITAAAAACBTzBQwAMAAgEJB8uAAgl +sAM8uP+9JywAs68gALCvAoATPP8AkDAYAKQnMAC0rygAsq8kALGvQAC/rzwAt684ALavNAC1r4pA +AAz/ALIw7l1ikg8AETIPAEIwEwBRECGgAAAEAAIyQABAFAAAAADuXWKSDAADJA8AQjCPAEMQCAAC +Mu5dYpIEAAMkDwBCMNIBQxAAAAAA7l1ikgIAAyQPAEIwmwBDEAYAAjICgBA87V0Dku5dYpIPAGMw +DwBCMCoQQwAcAEAUAoASPO1dApIAAAAAQABCMBcAQBACgAI8wlxCkAAAAAACAEMwUgBgFAQAQjAQ +AEAQAAAAAO5dQ5ICgAY8FOXFkA8AYzAlsAI8JRhlAN0CQjQAAEOg7V0EkoD/AiS//wMkJiiiACQg +gwAU5cWg7V0EopBAAAwYAKQnQAC/jzwAt484ALaPNAC1jzAAtI8sALOPKACyjyQAsY8gALCPCADg +A0gAvSfuXWKSAAAAAAQAQjBMAEAQAAAAAO5dYpIAAAAACABCMAMAQBAIAAIyGwBAEAKAAzzuXWKS +AAAAAAgAQjAMAEAUCAACMgoAQBAAAAAACABAEgKAAzwQN2KUAAAAAAABQjADAEAQAAAAAA5RAAwh +IAAA7l1ikvD/AyQkEEMA7l1iou5dY5IAAAAAJRgjAu5dY6JyLgAIAoAQPBA3YpQAAAAAAAFCMPL/ +QBACgAI8DV5DkAAAAACi/2AUAQAEJA5RAAwAAAAAvS4ACAAAAABTIQAMJAAEJHYBQBAhiEAAAoAC +POxdRZDuXUSS7V0Ckr//AyQPAIQwJBBDAO1dAqIQAKWjEQCkowgAJJYCgAI8EAClJyUgggAgAIQk +whsADAEABiQEAAMkFwACJAwAI64UACKuFwoADCEgIAKULgAIAAAAAAAuAAwAAAAApi4ACAAAAABx +/0AUAAAAADUtAAwAAAAAd/9AEAAAAADuXWKS8P8DJCQQQwDuXWKiAoADPO5dYpIQN2SUBABCNAAB +hDDuXWKiYf+AEAAAAAAOUQAMAQAEJGcuAAgAAAAAZf9AFAAAAACPLQAMAAAAAGH/QBAAAAAA7l1i +kvD/AyRBsAQ8JBBDAO5dYqLuXWOSCACFNIIAAiQBAGM0AoAXPO5dY6IAAICsAACipEKwBDxgG+Im +sBtFlAAAg5C+/wIkAwCGNCQYYgAAAaUwkP8CJAAAg6AAAMKgOACgECWwBjwlsAQ8hACCNAAARoyA +AIQ0AACCjAKACzwUXmSNADgGACEwAAAloMIAIRgAAAKACjwlqOMAISgAABxeQo0hIJQAKxiUACEo +tQAhKKMAKxCiACQBQBQAAAAAHF5CjQAAAAAQAUUQAQAFJGAb4iZYQUOMQrAHPAAA5pAYAGUA+/8C +JCQwwgAAAOagZ0YGPM+sxjQBAAQkISgAABIYAACCGgMAQBADACEQQwDAEAIAIRBDAIAQAgAZAEYA +EDAAACMQRgBCEAIAITDCAAIzBgABAAIkuSAADAowRgAlsAY88gLDNIj/AiQAAGKgEQDHNAAA4pAI +AMU0YBvkJgEAQjQAAOKgAACjlLAbgpT//2QwEACENAAApKT7/4QwAACkpAABQjACAIQ0AACkpAQA +QBBCsAI8IgADJAMAQjQAAEOg//eEMAAApKQoAMQ0AACDlO/+AiT+/wgkJBhiAAAAg6QAAIKUJgDF +NAKAAzwkEEgAAACCpMJcZJAAAKKUBACEMAAkQjQAAKKkCQCAEAAAAAAAAKKUAAAAACQQSAAAAKKk +AADjkP3/AiQkGGIAAADjoABoAkAACEIw/f9AEAAAAAAlsBI8EQBDNgAAYpAAAAAAAgBCNAAAYqAA +AAAAAAAAAAAAAAAAAAAAAAAAACYARDYAAIKUAAAAAAEAQjQAAIKkAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAIOU/9sCJCgARTYkGGIAAACDpAAAopQAAAAAAQBCNAAAoqQAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAopQAAAAAEAFCNAAAoqQIAFE2AAAjlmAb9iawG8KW +//9wMAAYEDYAADCmAAFCMP3/EDIAADCmBQBAEEKwAjwAAEOQ+/8EJCQYZAAAAEOgBAAQNlsfAAwy +AAQkAAAwpiIAAiTyAkM27/8QMgAAMKbIAAQkAABioFsfAAwAAAAAsBvClgAAAAAAAUIwQQBAEEKw +BjyEAEI2AABEjIAARjYAAMKMACgEACEYAAAhIAAAJTCCACU4owBYQcOOIyjUAIASBQAbAEMAAgBg +FAAAAAANAAcAAoALPBReY40SEAAAIxBFACEQQwAUXmKtFF5jjUKwAjwDAEI0WBtjJBReY60AAEOQ +AAAAACAAYzAgAGAUAAAAABReYo0CgAo8HF5EjSFARgArKAYBIUhnACFIJQErICQBWQCAFAAAAAAc +XkKNAAAAAEcASRABAAUkQrACPAAAQ5D7/wQkAQAGJCQYZAAAAEOgBACgEAEABCSAEAUAIRBFAIAw +AgC5IAAMISgAAEKwAjwiAAMkAwBCNAAAQ6BCsAY8AADCkGAb5SbQG6iM3BunlEGwAzxBAEI0CABk +NAAAwqAAAGisAACHpO5dY5Lw/wIk3BunpCQYYgDuXWOi7l1iktAbqKwCAEI07l1ionIuAAgCgBA8 +WS0ADAAAAAAx/kAQAAAAAAouAAwAAAAA7l1ikvD/AyQkEEMA7l1iou5dY5IAAAAAAgBjNO5dY6Js +LgAIAAAAAJmZAzwlsAI8l5ljNBgDQjQAAEOslC4ACAAAAAAYXkKNAAAAACsQggAMAEAUAAAAABhe +Qo1FLwAIAQAFJBheQo0AAAAAKxACAQoAQBQAAAAAGF5CjRYwAAgBAAUkGF5CjRxeQ40UXmSNIxBU +AEUvAAgjKEQAGF5CjRxeQ40UXmSNIxBGABYwAAgjKEQAAoACPOxdQ5AAAAAABwBgEAKAAjzuXUOQ +BAAEJA8AYzAEAGMoAwBgFAEABSQIAOADAAAAAEsuAAgAAAAAAYACPCWwAzzg/70n/MFCJBgDYzQQ +AKQnAABirBgAv6+KQAAMAAAAAAKABDwMXoKQAAAAAAsAQBABAAUkAoACPNAHAyQMXoCgEACkJ5BA +AAzcXUOsGAC/jyEQAAAIAOADIAC9JwKAAzwBAAQkAoACPA9eRKACgAI8DV5goO1dRJBLLgAM/wCE +MJBAAAwQAKQnGAC/jyEQAAAIAOADIAC9J0IRBQAPAEYw6P+9JwkAwygUAL+vFABgEBAAsK+CFgUA +AQBCMBQAQBAAwAI8JBCiAEMAQBTCFQQAAQBCMFAAQBACgAM8DOVjJCEYwwACgAQ8CF6FkAAAYpAA +AAAAJBBFAEcAQBAAAAAAFAC/jxAAsI8IAOADGAC9JyQQogAeAEAQwhUEAAKABjwHXsKQ/f8DJEKw +BDwkEEMAAoADPAdewqALXmCgAACCkO//AyQDAIU0JBBDAEAAAyQAAIKgAACjoAdewpAAAAAABwBC +MOb/QBQCgAI8BV5AoAKAAzztXWSQFAC/jxAAsI8BAAUk/wCEMEsuAAgYAL0nAQBCMCUAQBACgAM8 +DOVjJCEYwwACgAQ8CF6FkAAAYpAAAAAAJBBFAOf/QBQCgAY8B17CkP7/AyQkEEMAB17CoNcwAAgA +AAAAQrAHPAAA45Dv/wIkAwDwNCQYYgBAAAIkAADjoAIABCQAAAKiISgAALkgAAwA8AY0RAACJAAA +AqLBMAAIAAAAABQAv48QALCPAQAEJOFRAAgYAL0nAoAGPAdewpD+/wMkJBBDAAdewqDXMAAIAAAA +AIIWBQDo/70nAQBCMBQAv68OAEAQEACwrwDAAjwkEKIANwBAFAKAAjwGXkOQAgACJP8AYzBEAGIQ +AQAEJBQAv48QALCP4VEACBgAvScAwAI8JBCiAA4AQBQCgAY8B17CkP7/AyQkEEMAB17CoAdewpAA +AAAABwBCMBgAQBACgAI8FAC/jxAAsI8IAOADGAC9JwdewpD9/wMkQrAEPCQQQwACgAM8B17CoAte +YKAAAIKQ7/8DJAMAhTQkEEMAQAADJAAAgqAAAKOgB17CkAAAAAAHAEIw6v9AFAKAAjwFXkCgAoAD +PO1dZJAUAL+PEACwjwEABST/AIQwSy4ACBgAvSdCsAc8AADjkO//AiQDAPA0JBhiAEAAAiQAAOOg +AgAEJAAAAqIhKAAAuSAADADwBjREAAIkAAACohQAv48QALCPCADgAxgAvSfiLAAMAAAAABQAv48Q +ALCPDAAEJAEABSRLLgAIGAC9JwGAAjwlsAM86P+9J7TFQiQYA2M0EACwrwAAYqwCgBA87V0CkhQA +v68PAEIwAwBCKAUAQBABAAUkWS0ADAAAAAAEAEAQAQAFJO1dBJJLLgAM/wCEMAKABDxgG4Qk4BuD +lNwbhZQUAL+PEACwjwIAYzBBsAI8JRhlAAgAQjQYAL0nAABDpAgA4APcG4Ok4P+9JyWwAjwBgAM8 +GACyrxQAsa8QALCvHAC/rxgDUjRAxnEkAoAQPAgUBCYhKAAAITAAACE4AAAAAFGudjkADAAAAACb +MQAICBQEJuD/vScYALCv//+QMBwAv6+KQAAMEACkJwKABjxgG80kKhyikQAAAAAhAEAQKrACPCWw +Azw4AmQ0gP8CJAAAgqA0Amo00gFlNNYBZjTaAWc03gFjNAAAqJQAAMmUAADrlAAAbJQAAESVsP4C +Jv//UDAoHKSlAACgpBAApCcgHKilAADApCIcqaUAAOCkJByrpQAAYKQAAFClkEAADCYcrKUcAL+P +GACwjwgA4AMgAL0nCgBFNGMAAyT//wQ0AACikAAAAAAJAEAQZAACJP//QiT//0Iw/v9AFP//QiT/ +/2Ik//9DMPX/ZBQAAAAAYBvCJCgcSJQmHEeUIBxJlCIcSpQkHEuUJbADPDgCbDQ0AmI00gFkNNYB +ZTTaAWY03gFjNAAASKQAAImkAACqpBAApCcAAMukAABnpAAAgKGQQAAMAAAAABwAv48YALCPCADg +AyAAvSfQ/70nKAC0rywAv68kALOvIACyrxwAsa8YALCv//8UJAKAEzxBsAI8YBtjJgQAQjQAAEWM +1BtkjNAbZowCgAI88FxHkCWwCDywAwI1JZCFAAAAUqwAAEasAQACJIkD4hDUG3KsYBtkJtAbgowA +AAAAJBBSAAEAQjAOAEAQYBtnJiWwEDywAwI2AQAFJAAARawEAAs21BuDjAAAaY1AAAI8AQBjOCQQ +IgEmAUAQ1BuDrGAbZybQG+KMAAAAACQQUgAEAEIwFABAEGAbcSYlsAM8sANkNAQAAiQAAIKs1Bvi +jMQ45oz8AGM0rBvklAAAZYwEAEI4IUjEAAYAqRDUG+KsAoADPLBdYowAAAAACABCNLBdYqxgG3Em +0BsijgAAAAAkEFIACABCMAoAQBAAAAAAsBsilgAAAAAEAEIwXQNAFAKAAjzUGyKOAAAAAAgAQjjU +GyKuYBtwJtAbAo4AAAAAJCBSAAAIgzAGAGAQABCCMNQbAo4AAAAAAAhCONQbAq4AEIIwBQNAFAAA +AABgG3Am0BsDjgAAAAAkEHIAACBCMPcCQBQAAAAAJBByAACAQjC5AUAUAQADPGAbcCbQGwKOAAAA +ACQQUgAkEFQAJBBDAPEBQBQAAAAA0BsCjgIAAzwkEFIAJBBDACgCQBQAAAAAYBtwJtAbAo4EAAM8 +JBBSACQQVAAkEEMAYgJAFAAAAABgG3Am0BsCjggAAzwkEFIAJBBDAJsCQBQAAAAAYBtwJtAbAo4Q +AAM8JBBSACQQVAAkEEMAWgFAFAAAAABgG3Am0BsCjiAAAzwkEFIAJBBDABgBQBQAAAAAYBtwJtAb +Ao5AAAM8JBBSACQQVAAkEEMA1gBAFAAAAABgG2Um0BuijAAEAzwkEFIAJBBDAD0AQBBgG2YmKrAC +PCwAQzQAAGmM/wACJP8AJDEpA4IQAIAiMfkCQBQAgAI8AP8CPCQQIgELAEAQ/wACJKw3opAgsAM8 +ABICACEQQwAMAEmMJbADPLADYzQAAGms/wAkMf8AAiQbAIIQYBtwJv8AIzF8OAWOIBACPAAaAwAh +GGIAITBgABA4A64KAAQkrDcJogABByQeAQAMEACgr9AbBY4CgAY8sF3EjAAEAjwnEAIAJCiiACWw +AjwAgIQ0sANCNEGwAzwAAESsAABlrLBdxKzQGwWuYBtlJtQbpIwABAM8JbACPCYggwCwA0I0AABE +rNQbpKxgG2Ym0BvHjAAIBDwkKPIAJBCkAAgAQBCAAAg81BvDjCWwAjywA0I0JhhkAAAARKzUG8Os +gAAIPCQQqAAhAEAQAAAAANQbw4wlsAk8sAMqNSqwAjwAAEOtNgBCNAAAQ5AjsAQ8/x8CPMAYAwDw +B2Mw9DjFjCEYZAD//0I0JBhiAM4CZRD4OMOsAoAFPLBdo4wnIAgAJCDkAAAQYzRBsAI8AABDrQAA +RKywXaOs0BvErGAbYibUG0OMgAAEPCYYZADUG0OsYBtmJtAbw4wAAQU8JCByACQQhQAGAEAQJbAC +PNQbw4ywA0I0JhhlAAAARazUG8OsAAIFPCQQhQAGAEAQJbACPNQbw4ywA0I0JhhlAAAARazUG8Os +ABAFPCQQhQAMAEAQYBtjJrAbw5QAAAAABABiMAIAQBAACGI0sBvCpNQbwowAAAAAJhBFANQbwqxg +G2Mm0BtijAAgBTwkEFIAJBBFAAsAQBAAAAAAsBtklAAAAAAEAIIwAgBAEP/3gjCwG2Kk1BtijAAA +AAAmEEUA1BtirCwAv48oALSPJACzjyAAso8cALGPGACwjwgA4AMwAL0nIL0CPOwCAzZNAAc28QII +NggABiR4AkI0AABFpAAA4KAAAAahAABgrAAAYoz/AAQ8AADgoP8ASTAlSCQBAAAGofICBTYAAGSs +CgAKNgAAaayA/wMkAACgoAAAQ6EAAGKNgAADPCQQQwACAEAQhP8CJAAAQqEsHwAMAQAEJAIAAjYA +AEOU/78EJCQYZAAAAEOkJTIACGAbZyZwMAAMAAAAACWwAjwqsAY8sANCNAAAVKwoAMM0AABpjP8A +BST/ACQxbQOFECW9AjwAgCIxWQJAEAD/AjwAgAI8AABirP8AAiQhAIIQ/wAjMWAbcCZMOAWOIBAC +PAAaAwAhGGIAITBgAJg3CaLgNwOuBgAEJIAAByQeAQAMEACgrwKACTzAXSeRAoAIPLBdBY3QGwaO +YAACPAIA5zQnEAIAJDDCAAAIpTQAJgcAJbACPCUghQCAA0I0QbADPAAARKwAAGassF0FrcBdJ6HQ +GwauYBtiJtQbQ4xAAAQ8JhhkAJoyAAjUG0OscDAADAAAAAAqsAU8JACjNAAAaYz/AAYk/wAkMUgD +hhAlsAI8AIAiMWQCQBAA/wI8AIACPAAAYqz/AAIkJQCCEGAbcCb/ACMxTDgFjiAQAjwAGgMAIRhi +ACEwYACUNwmi4DcDrgYABCSAAAckHgEADBAAoK8CgAo8wF1HkQKACTywXSWN0BsGjmAAAjwEAOc0 +JxACACQwwgAACKU0JbADPEAAAjwAJgcAJqCCArADaDQlIIUAgANjNEGwAjwAAGSsAABGrLBdJa3A +XUeh0BsGrgAAFK1gG2Im1BtDjCAABDwmGGQAkjIACNQbQ6xwMAAMAAAAACWwBTywA6I0KrAHPAAA +VKwgAOM0AABpjP8ABiT/ACQxBwOGEJADojQAgCIxBQJAEAD/AjwAgAI8AABirP8AAiQhAIIQYBtw +Jv8AIzFAOAWOIBACPAAaAwAhGGIAITBgAJw3CaLUNwOuBQAEJIAAByQeAQAMEACgrwKACTzAXSeR +AoAIPLBdBY3QGwaOGAACPAEA5zQnEAIAJDDCAAAEpTQAJgcAJbACPCUghQCAA0I0QbADPAAARKwA +AGassF0FrcBdJ6HQGwauYBtiJtQbQ4wQAAQ8JhhkAIsyAAjUG0OscDAADAAAAAAqsAU8DACjNAAA +aYz/AAYk/wAkMcYChhAAgCIxVAJAEAD/AjwAgAI8AABirP8AAiQkAIIQYBtwJv8AIzEoOAWOIBAC +PAAaAwAhGGIAITBgAIA3CaK8NwOuAwAEJIAAByQeAQAMEACgrwKACjzAXUeRAoAJPLBdJY3QGwaO +AQAIPID/AiQlOOIAAIADNQABpTQnGAMAACYHACWwAjwkMMMAJSCFAIADQjRBsAM8AABErCegCAAA +AGassF0lrcBdR6HQGwauYBtjJtQbYowAAAAAAIBCONQbYqxgG3Am0BsCjgEAAzwkEFIAJBBUACQQ +QwAR/kAQAAAAAHAwAAwAAAAAKrAFPBAAozQAAGmM/wAGJP8AJDF8AoYQJbACPACAIjHQAUAQAIAC +PAAAYqz/AAIkIgCCEGAbcCb/ACMxKDgFjiAQAjwAGgMAIRhiACEwYACENwmivDcDrgMABCSAAAck +HgEADBAAoK8CgAk8wF0nkQKACDywXQWN0BsGjgEAAjwAgEI0QADnNCcQAgAkMMIAAAGlNAAmBwAl +sAI8JSCFAIADQjRBsAM8AABErAAAZqywXQWtwF0nodAbBq5gG2Im1BtDjAEABDxgG3AmJhhkANQb +Q6zQGwKOAgADPCQQUgAkEEMA2/1AEAAAAABwMAAMAAAAACqwBTwUAKM0AABpjP8ABiT/ACQxZAKG +ECWwAjwAgCIx+gFAEAD/AjwAgAI8AABirP8AAiQlAIIQYBtwJv8AIzE0OAWOIBACPAAaAwAhGGIA +ITBgAIg3CaLINwOuBAAEJIAAByQeAQAMEACgrwKACjzAXUeRAoAJPLBdJY3QGwaOBgACPCAA5zQn +EAIAJDDCAAACpTQlsAM8BAACPAAmBwAmoIICsANoNCUghQCAA2M0QbACPAAAZKwAAEassF0lrcBd +R6HQGwauAAAUrWAbYibUG0OMAgAEPGAbcCYmGGQA1BtDrNAbAo4EAAM8JBBSACQQVAAkEEMAof1A +EAAAAABwMAAMAAAAACWwAzywA2I0KrAHPAAAVKwYAOU0AACpjP8ABiT/ACQxFgKGEAQAAiQAgCIx +1gFAEAD/AjwAgAI8AACirP8AAiQhAIIQYBtwJv8AIzE0OAWOIBACPAAaAwAhGGIAITBgAIw3CaLI +NwOuBAAEJIAAByQeAQAMEACgrwKACTzAXSeRAoAIPLBdBY3QGwaOBgACPBAA5zQnEAIAJDDCAAAC +pTQAJgcAJbACPCUghQCAA0I0QbADPAAARKwAAGassF0FrcBdJ6HQGwauYBtiJtQbQ4wEAAQ8YBtw +JiYYZADUG0Os0BsCjggAAzwkEFIAJBBDAGj9QBAAAAAAcDAADAAAAAAqsAU8HACjNAAAaYz/AAYk +/wAkMd0BhhAlsAI8AIAiMTMBQBAA/wI8AIACPAAAYqz/AAIkJQCCEGAbcCb/ACMxQDgFjiAQAjwA +GgMAIRhiACEwYACQNwmi1DcDrgUABCSAAAckHgEADBAAoK8CgAo8wF1HkQKACTywXSWN0BsGjhgA +AjwIAOc0JxACACQwwgAABKU0JbADPBAAAjwAJgcAJqCCArADaDQlIIUAgANjNEGwAjwAAGSsAABG +rLBdJa3AXUeh0BsGrgAAFK1gG2Im1BtDjAgABDwmGGQAgzIACNQbQ6xwMAAMAAAAANQbAo7QGwOO +ACBCOGIyAAjUGwKucDAADAAAAAAqsAI8CABDNAAAaYz/AAIk/wAkMSwAghAAgCIxNAFAFACAAjwA +/wI8JBAiAQsAQBD/AAIkqDcCkiCwAzwAEgIAIRBDAAwASYwlsAM8sANjNAAAaaz/ACQx/wACJBoA +ghBgG3Am/wAjMXA4BY4gEAI8ABoDACEYYgAhMGAABDgDrgEABCSoNwmigAAHJB4BAAwQAKCv0BsF +jgKABjywXcSM/8cCJCQoogAlsAI8EACENIADQjRBsAM8AABErAAAZaywXcSs0BsFrmAbYybUG2KM +AAAAAAAQQjhbMgAI1BtirFYBAjUAAEOUAAAAAHT8YBAAAAAAflgADAcABCQSMgAIYBtkJgAAYqy4 +MgAI/wACJOQdJJZYOCaWAQCEJAAZBAAlMMIA8P9jMCAAxSQCEgMA5B0kphcAoqAWAKOgDADEjADw +Ajz//0I0/w9jMAAcAwAkIIIAJSCDAAwAxKxYOCWOAQAQJAEABCQxEAY8AAEHJB4BAAwQALCvWwEA +DAEABCQqsAI8AQBCNAIAAyQAAFCgAABDoNQbIo4AAAAACABCOE0yAAjUGyKu0AMjNYAAAiQAAGKs +CTMACGAbYiYlsAI8AQADJJADQjQAAEOs1TIACGAbZSYkECIBqf1AEP8AAiRHAMY0AADCkAAAAAD/ +AEQwDgCFEGAbYiaYNwSiAADCkP8AgzD/AEQwBwCDECE4AAIhKMAAAACikCEYgAD9/2IU/wBEMJg3 +46BgG2ImmDdDkCCwAjwAGgMAIRhiAAwAaYwlsAI8sANCNP8AJDEAAEmsgTMACP8AAiQkECIB/f1A +EP8AAiRFAOU0AACikAAAAAD/AEQwDgCGEGAbYiacNwSiAACikP8AgzD/AEQwCACDEGAbYiYhMAAC +AACikCEYgAD9/2IU/wBEMJw3w6BgG2ImnDdDkCCwAjwAGgMAIRhiAAwAaYwlsAI8sANCNP8AJDEA +AEms9jMACP8AAiQkECIBnv1AEP8AAiRGAKU0AACikAAAAAD/AEQwDgCGEGAbYiaUNwSiAACikP8A +gzD/AEQwCACDEGAbYiYhMAACAACikCEYgAD9/2IU/wBEMJQ3w6BgG2ImlDdDkCCwAjwAGgMAIRhi +AAwAaYwlsAI8sANCNP8AJDEAAEmsuDMACP8AAiQA/wI8JBAiATD+QBD/AAIkQQClNAAAopAAAAAA +/wBEMA4AhhBgG2ImhDcEogAAopD/AIMw/wBEMAgAgxBgG2ImITAAAgAAopAhGIAA/f9iFP8ARDCE +N8OgYBtiJoQ3Q5AgsAI8ABoDACEYYgAMAGmMJbACPLADQjT/ACQxAABJrGw0AAj/AAIkJBAiAc/+ +QBD/AAIkRAClNAAAopAAAAAA/wBEMA4AhhBgG2ImkDcEogAAopD/AIMw/wBEMAgAgxBgG2ImITAA +AgAAopAhGIAA/f9iFP8ARDCQN8OgYBtiJpA3Q5AgsAI8ABoDACEYYgAMAGmMJbACPLADQjT/ACQx +AABJrCw1AAj/AAIkJBAiAa79QBD/AAIkQAClNAAAopAAAAAA/wBEMA4AhhBgG2ImgDcEogAAopD/ +AIMw/wBEMAgAgxBgG2ImITAAAgAAopAhGIAA/f9iFP8ARDCAN8OgYBtiJoA3Q5AgsAI8ABoDACEY +YgAMAGmMJbACPLADQjT/ACQxAABJrCw0AAj/AAIkAABirHg1AAj/AAIkJBAiAQj+QBD/AAIkQgCl +NAAAopAAAAAA/wBEMA4AhhBgG2ImiDcEogAAopD/AIMw/wBEMAgAgxBgG2ImITAAAgAAopAhGIAA +/f9iFP8ARDCIN8OgYBtiJog3Q5AgsAI8ABoDACEYYgAMAGmMJbACPLADQjT/ACQxAABJrKo0AAj/ +AAIkJBAiASz+QBD/AAIkQwDlNAAAopAAAAAA/wBEMA4AhhBgG2ImjDcEogAAopD/AIMw/wBEMAgA +gxBgG2ImITAAAgAAopAhGIAA/f9iFP8ARDCMN8OgYBtiJow3Q5AgsAI8ABoDACEYYgAMAGmMJbAC +PLADQjT/ACQxAABJrO80AAj/AAIkBgADJJADQjQAAEOskDQACGAbYiYBAAMkkANCNAAAQ6ykMwAI +YBtiJiWwAjwHAAMkkANCNAAAQ6xgG2Mm1BtijAAAAAAAgEI4VjQACNQbYqwAAECsGTQACGAbYiYC +AAMkkANCNAAAQ6zfMwAIYBtiJpADYzQAAGKsEjUACGAbYiYDAAMkkANCNAAAQ6xTNQAIYBtiJgUA +AySQA0I0AABDrNE0AAhgG2Im4P+9JxwAv68YALKvFACxrxAAsK8lsAw8AYACPBgDgzUw3EIkAoAS +PEGwCzwAAGKsYBtKJgoAYjUAAESU3htDldwbSZUlMGQA///QMCQQCQICAEIwwgBAEMADgzUCAAIk +AABirAKACDywXQSN3AKCNQAAR5D9/wMkAIACPCQYIwElIIIAAgDGOAgAZTUCgAI87V1HoLBdBK3e +G0alIUhgAAAAo6TcG0OlJDgJAgQA4jAKAEAQCADiMN4bQ5UMAGQ1wAOFNQQAYzgEAAIkAACGkAAA +oqzeG0OlCADiMAgAQBAQAOIw3htClcADhDUIAAMkCABCOAAAg6zeG0KlEADiMAgAQBAgAOIw3htC +lcADhDUQAAMkEABCOAAAg6zeG0KlIADiMAgAQBCAAOIw3htClcADhDUgAAMkIABCOAAAg6zeG0Kl *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 06:55:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A824679; Mon, 29 Jul 2013 06:55:29 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 769E92170; Mon, 29 Jul 2013 06:55:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T6tTIO077396; Mon, 29 Jul 2013 06:55:29 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T6tSGL077393; Mon, 29 Jul 2013 06:55:28 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307290655.r6T6tSGL077393@svn.freebsd.org> From: Rui Paulo Date: Mon, 29 Jul 2013 06:55:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253760 - in head/sys/modules/usb/rsufw: . rsurtl8712fw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 06:55:29 -0000 Author: rpaulo Date: Mon Jul 29 06:55:28 2013 New Revision: 253760 URL: http://svnweb.freebsd.org/changeset/base/253760 Log: Firmware module for the upcoming rsu(4) driver. Added: head/sys/modules/usb/rsufw/ head/sys/modules/usb/rsufw/Makefile (contents, props changed) head/sys/modules/usb/rsufw/Makefile.inc (contents, props changed) head/sys/modules/usb/rsufw/rsurtl8712fw/ head/sys/modules/usb/rsufw/rsurtl8712fw/Makefile (contents, props changed) Added: head/sys/modules/usb/rsufw/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/rsufw/Makefile Mon Jul 29 06:55:28 2013 (r253760) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR= rsurtl8712fw + +.include Added: head/sys/modules/usb/rsufw/Makefile.inc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/rsufw/Makefile.inc Mon Jul 29 06:55:28 2013 (r253760) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# +# Common rules for building firmware. Note this gets auto-included +# by the subdir Makefile's as a consequence of included bsd.kmod.mk. + +_FIRM= ${IMG}.fw + +CLEANFILES+= ${_FIRM} + +FIRMWS= ${_FIRM}:${KMOD}:120 + +FIRMWARE_LICENSE= realtek + +#${_FIRM}: ${.CURDIR}/../../../../contrib/dev/rsu/${_FIRM}.uu +# uudecode -p $? > ${.TARGET} +${_FIRM}: ${.CURDIR}/${_FIRM}.uu + uudecode -p $? > ${.TARGET} Added: head/sys/modules/usb/rsufw/rsurtl8712fw/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/usb/rsufw/rsurtl8712fw/Makefile Mon Jul 29 06:55:28 2013 (r253760) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +KMOD= rsu-rtl8712fw +IMG= rsu-rtl8712fw + +.include From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 06:57:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DB59C7D5; Mon, 29 Jul 2013 06:57:45 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C8A1D2183; Mon, 29 Jul 2013 06:57:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T6vjtp077658; Mon, 29 Jul 2013 06:57:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T6vjGD077657; Mon, 29 Jul 2013 06:57:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307290657.r6T6vjGD077657@svn.freebsd.org> From: Rui Paulo Date: Mon, 29 Jul 2013 06:57:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253761 - head/sys/modules/usb/rsufw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 06:57:45 -0000 Author: rpaulo Date: Mon Jul 29 06:57:45 2013 New Revision: 253761 URL: http://svnweb.freebsd.org/changeset/base/253761 Log: Fix a debugging hack that snuck in. Modified: head/sys/modules/usb/rsufw/Makefile.inc Modified: head/sys/modules/usb/rsufw/Makefile.inc ============================================================================== --- head/sys/modules/usb/rsufw/Makefile.inc Mon Jul 29 06:55:28 2013 (r253760) +++ head/sys/modules/usb/rsufw/Makefile.inc Mon Jul 29 06:57:45 2013 (r253761) @@ -11,7 +11,5 @@ FIRMWS= ${_FIRM}:${KMOD}:120 FIRMWARE_LICENSE= realtek -#${_FIRM}: ${.CURDIR}/../../../../contrib/dev/rsu/${_FIRM}.uu -# uudecode -p $? > ${.TARGET} -${_FIRM}: ${.CURDIR}/${_FIRM}.uu +${_FIRM}: ${.CURDIR}/../../../../contrib/dev/rsu/${_FIRM}.uu uudecode -p $? > ${.TARGET} From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 07:05:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F213DA81; Mon, 29 Jul 2013 07:05:18 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (50-196-151-174-static.hfc.comcastbusiness.net [50.196.151.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEF7021C6; Mon, 29 Jul 2013 07:05:18 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.7/8.14.2) with ESMTP id r6T75HBB020967; Mon, 29 Jul 2013 00:05:17 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.7/8.14.2/Submit) id r6T75HaW020966; Mon, 29 Jul 2013 00:05:17 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Mon, 29 Jul 2013 00:05:17 -0700 From: David Schultz To: David Chisnall Subject: Re: svn commit: r253215 - head/lib/msun/src Message-ID: <20130729070517.GA3192@zim.MIT.EDU> References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307111741.r6BHf5gQ060844@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 07:05:19 -0000 On Thu, Jul 11, 2013, David Chisnall wrote: > +static __inline int > +__inline_isnan(double __x) > +{ > + > + return (__x != __x); > +} > + > +static __inline int > +__inline_isnanf(float __x) > +{ > + > + return (__x != __x); > +} > + > +static __inline int > +__inline_isnanl(long double __x) > +{ > + > + return (__x != __x); > +} This has already been covered at greater length, but I believe this part is incorrect. Relational operators can raise an invalid exception when one of the arguments is a NaN -- even a quiet NaN. Raising an exception is optional in C99 (7.12.14) and required in IEEE-754... in practice, it tends to be platform- and compiler- specific. That is the whole reason the is* macros are defined by the standard in the first place, and also why we didn't use the trivial implementation above. The is* macros are required to not raise an exception. P.S. It would be great if clang implemented the FENV_ACCESS pragma and provided an intrinsic that produced a fast inline isnan() when the pragma is off, and the full, correct one when the pragma is on. From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 08:07:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 13DB1AFE; Mon, 29 Jul 2013 08:07:36 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01575242C; Mon, 29 Jul 2013 08:07:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T87ZKw098944; Mon, 29 Jul 2013 08:07:35 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T87Ztx098940; Mon, 29 Jul 2013 08:07:35 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201307290807.r6T87Ztx098940@svn.freebsd.org> From: Olivier Houchard Date: Mon, 29 Jul 2013 08:07:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253762 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 08:07:36 -0000 Author: cognet Date: Mon Jul 29 08:07:35 2013 New Revision: 253762 URL: http://svnweb.freebsd.org/changeset/base/253762 Log: Define KDB_STOPPEDPCB, so that we can access the backtraces of threads running on other cores. Modified: head/sys/arm/include/kdb.h head/sys/arm/include/smp.h Modified: head/sys/arm/include/kdb.h ============================================================================== --- head/sys/arm/include/kdb.h Mon Jul 29 06:57:45 2013 (r253761) +++ head/sys/arm/include/kdb.h Mon Jul 29 08:07:35 2013 (r253762) @@ -33,6 +33,8 @@ #include #include +#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid] + static __inline void kdb_cpu_clear_singlestep(void) { Modified: head/sys/arm/include/smp.h ============================================================================== --- head/sys/arm/include/smp.h Mon Jul 29 06:57:45 2013 (r253761) +++ head/sys/arm/include/smp.h Mon Jul 29 08:07:35 2013 (r253762) @@ -32,4 +32,7 @@ void platform_mp_init_secondary(void); void platform_ipi_send(cpuset_t cpus, u_int ipi); +/* global data in mp_machdep.c */ +extern struct pcb stoppcbs[]; + #endif /* !_MACHINE_SMP_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 08:32:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 89E4975C; Mon, 29 Jul 2013 08:32:14 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 77A2826E7; Mon, 29 Jul 2013 08:32:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6T8WEpG007488; Mon, 29 Jul 2013 08:32:14 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6T8WEYB007487; Mon, 29 Jul 2013 08:32:14 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201307290832.r6T8WEYB007487@svn.freebsd.org> From: David Chisnall Date: Mon, 29 Jul 2013 08:32:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253764 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 08:32:14 -0000 Author: theraven Date: Mon Jul 29 08:32:13 2013 New Revision: 253764 URL: http://svnweb.freebsd.org/changeset/base/253764 Log: Reenable the isnan(double) / isinf(double) declarations when targeting C89 + SUSv2 mode. Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Mon Jul 29 08:08:43 2013 (r253763) +++ head/lib/msun/src/math.h Mon Jul 29 08:32:13 2013 (r253764) @@ -209,6 +209,21 @@ __inline_isnanl(__const long double __x) return (__x != __x); } +/* + * Version 2 of the Single UNIX Specification (UNIX98) defined isnan() and + * isinf() as functions taking double. C99, and the subsequent POSIX revisions + * (SUSv3, POSIX.1-2001, define it as a macro that accepts any real floating + * point type. If we are targeting SUSv2 and C99 or C11 (or C++11) then we + * expose the newer definition, assuming that the language spec takes + * precedence over the operating system interface spec. + */ +#if __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 && __ISO_C_VISIBLE < 1999 +#undef isinf +#undef isnan +int isinf(double); +int isnan(double); +#endif + double acos(double); double asin(double); double atan(double); From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 11:00:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8F925C28; Mon, 29 Jul 2013 11:00:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 8BA3B2D17; Mon, 29 Jul 2013 11:00:10 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id BBF0ED41EBD; Mon, 29 Jul 2013 20:59:59 +1000 (EST) Date: Mon, 29 Jul 2013 20:59:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall Subject: Re: svn commit: r253764 - head/lib/msun/src In-Reply-To: <201307290832.r6T8WEYB007487@svn.freebsd.org> Message-ID: <20130729201847.K1146@besplex.bde.org> References: <201307290832.r6T8WEYB007487@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=NDY59GnS80oA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=6I5d2MoRAAAA:8 a=od-9X6DuggoViU2ME3QA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 11:00:12 -0000 On Mon, 29 Jul 2013, David Chisnall wrote: > Author: theraven > Date: Mon Jul 29 08:32:13 2013 > New Revision: 253764 > URL: http://svnweb.freebsd.org/changeset/base/253764 > > Log: > Reenable the isnan(double) / isinf(double) declarations when targeting C89 + SUSv2 mode. This isn't reenabling. but breaks the isnan() and isinf() macros by #undefing them. > Modified: > head/lib/msun/src/math.h > > Modified: head/lib/msun/src/math.h > ============================================================================== > --- head/lib/msun/src/math.h Mon Jul 29 08:08:43 2013 (r253763) > +++ head/lib/msun/src/math.h Mon Jul 29 08:32:13 2013 (r253764) > @@ -209,6 +209,21 @@ __inline_isnanl(__const long double __x) > return (__x != __x); > } > > +/* > + * Version 2 of the Single UNIX Specification (UNIX98) defined isnan() and > + * isinf() as functions taking double. C99, and the subsequent POSIX revisions > + * (SUSv3, POSIX.1-2001, define it as a macro that accepts any real floating > + * point type. If we are targeting SUSv2 and C99 or C11 (or C++11) then we > + * expose the newer definition, assuming that the language spec takes > + * precedence over the operating system interface spec. > + */ > +#if __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 && __ISO_C_VISIBLE < 1999 > +#undef isinf > +#undef isnan > +int isinf(double); > +int isnan(double); > +#endif > + Old versions declared these functions by temporarily hiding the macro definitions using parentheses, and also sorted the declarations differently (into the __BSD_VISIBLE || __ISO_C_VISIBLE >= 1999 || __XSI_VISIBLE section. The __ISO_C_VISIBLE part of that ifdef is not quite broken for these functions, since although they aren't in C99, I think only non-conforming code can use them as functions). If the above ifdef is correct, then it is still unsorted. Other ifdefs for fine-grained XSI ifdefs are sorted later, in ascending order on __XSI_VISIBLE. The others are written with slightly unclear nested conditions for __XSI_VISIBLE: @ #if __BSD_VISIBLE || __XSI_VISIBLE Boolean conditions. You obfuscate the boolean condition __XSI_VISIBLE by writing it as __XSI_VISIBLE > 0. @ double j0(double); @ double j1(double); @ double jn(int, double); @ double y0(double); @ double y1(double); @ double yn(int, double); @ @ #if __XSI_VISIBLE <= 500 || __BSD_VISIBLE Now the same boolean condition for the __BSD_VISIBLE part (obfuscated by writing the conditions in the opposite order), but a further restriction for the __XSI_VISIBLE part. __XSI_VISIBLE <= 500 by itself would be broken since it would be satisfied by __XSI_VISIBLE == 0 which means non-XSI. @ double gamma(double); @ #endif @ @ #if __XSI_VISIBLE <= 600 || __BSD_VISIBLE As above, for a later XSI. You obfuscate the version tests further using '<' instead of '<='. '< 600' does make more sense than '<= 500', since if 5 and 6 represent major releases then API changes should occur at 600 not at 501. @ double scalb(double, double); @ #endif @ #endif /* __BSD_VISIBLE || __XSI_VISIBLE */ > double acos(double); > double asin(double); > double atan(double); > Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:00:39 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F032ED6E; Mon, 29 Jul 2013 12:00:39 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AEED52240; Mon, 29 Jul 2013 12:00:39 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6TC0aDU072732 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 29 Jul 2013 12:00:37 GMT (envelope-from theraven@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_A9DD75D9-C81A-40E6-B5DB-5715E779E80E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253764 - head/lib/msun/src From: David Chisnall In-Reply-To: <20130729201847.K1146@besplex.bde.org> Date: Mon, 29 Jul 2013 13:00:31 +0100 Message-Id: <4F2196BB-1873-458B-8C4F-9D7A351A4426@FreeBSD.org> References: <201307290832.r6T8WEYB007487@svn.freebsd.org> <20130729201847.K1146@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:00:40 -0000 --Apple-Mail=_A9DD75D9-C81A-40E6-B5DB-5715E779E80E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Bruce, It's very difficult within this verbiage to work out what you believe = the correct code should look like. Please either provide a patch or = commit the fix yourself. David On 29 Jul 2013, at 11:59, Bruce Evans wrote: > On Mon, 29 Jul 2013, David Chisnall wrote: >=20 >> Author: theraven >> Date: Mon Jul 29 08:32:13 2013 >> New Revision: 253764 >> URL: http://svnweb.freebsd.org/changeset/base/253764 >>=20 >> Log: >> Reenable the isnan(double) / isinf(double) declarations when = targeting C89 + SUSv2 mode. >=20 > This isn't reenabling. but breaks the isnan() and isinf() macros by > #undefing them. >=20 >> Modified: >> head/lib/msun/src/math.h >>=20 >> Modified: head/lib/msun/src/math.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/msun/src/math.h Mon Jul 29 08:08:43 2013 = (r253763) >> +++ head/lib/msun/src/math.h Mon Jul 29 08:32:13 2013 = (r253764) >> @@ -209,6 +209,21 @@ __inline_isnanl(__const long double __x) >> return (__x !=3D __x); >> } >>=20 >> +/* >> + * Version 2 of the Single UNIX Specification (UNIX98) defined = isnan() and >> + * isinf() as functions taking double. C99, and the subsequent = POSIX revisions >> + * (SUSv3, POSIX.1-2001, define it as a macro that accepts any real = floating >> + * point type. If we are targeting SUSv2 and C99 or C11 (or C++11) = then we >> + * expose the newer definition, assuming that the language spec = takes >> + * precedence over the operating system interface spec. >> + */ >> +#if __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600 && __ISO_C_VISIBLE < = 1999 >> +#undef isinf >> +#undef isnan >> +int isinf(double); >> +int isnan(double); >> +#endif >> + >=20 > Old versions declared these functions by temporarily hiding the macro > definitions using parentheses, and also sorted the declarations = differently > (into the __BSD_VISIBLE || __ISO_C_VISIBLE >=3D 1999 || __XSI_VISIBLE > section. The __ISO_C_VISIBLE part of that ifdef is not quite broken = for > these functions, since although they aren't in C99, I think only > non-conforming code can use them as functions). If the above ifdef is > correct, then it is still unsorted. Other ifdefs for fine-grained > XSI ifdefs are sorted later, in ascending order on __XSI_VISIBLE. > The others are written with slightly unclear nested conditions for > __XSI_VISIBLE: >=20 > @ #if __BSD_VISIBLE || __XSI_VISIBLE >=20 > Boolean conditions. You obfuscate the boolean condition __XSI_VISIBLE > by writing it as __XSI_VISIBLE > 0. >=20 > @ double j0(double); > @ double j1(double); > @ double jn(int, double); > @ double y0(double); > @ double y1(double); > @ double yn(int, double); > @ @ #if __XSI_VISIBLE <=3D 500 || __BSD_VISIBLE >=20 > Now the same boolean condition for the __BSD_VISIBLE part (obfuscated = by > writing the conditions in the opposite order), but a further = restriction > for the __XSI_VISIBLE part. __XSI_VISIBLE <=3D 500 by itself would be > broken since it would be satisfied by __XSI_VISIBLE =3D=3D 0 which = means > non-XSI. >=20 > @ double gamma(double); > @ #endif > @ @ #if __XSI_VISIBLE <=3D 600 || __BSD_VISIBLE >=20 > As above, for a later XSI. >=20 > You obfuscate the version tests further using '<' instead of '<=3D'. = '< 600' > does make more sense than '<=3D 500', since if 5 and 6 represent major > releases then API changes should occur at 600 not at 501. >=20 > @ double scalb(double, double); > @ #endif > @ #endif /* __BSD_VISIBLE || __XSI_VISIBLE */ >=20 >> double acos(double); >> double asin(double); >> double atan(double); >>=20 >=20 > Bruce --Apple-Mail=_A9DD75D9-C81A-40E6-B5DB-5715E779E80E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJR9llgAAoJEKx65DEEsqId7jkQAKSBPCUQFKIlzXUIrQek4gQ4 hTbMjSvmQ5mP0bCJjx5vHekhf830cjcwCuithA2SVAhnzkw+rIyTW0w96COcYw+K 0nvluGSxA9/veuOp+IqZfMFpau6pIsdtzuJdVYHrJMkG+03DyjqChhky8pdo/wmA QaevlALltc9N+fM2CvA5ANMCkfEo2j7gTN3xA5rqVNks2mzc2b4KMn6k/t99m3PY VcYojPWFmOvl1inXjZORD0maN1nmCsrcG2GWPPjjjExRsxSenZKW8P1w2415osW4 Ex/mcb459EfocAVlkfn3EA/0aeZvPIdNbLUZEsdcrQsVM5yBE4vzR1dXk49nwo3P rwDDH9GKi34f4UdrVcuYJzyYR9EpJvyLoluqghGY6SrlerBiTR061dVIrG+jXP5a dj27VHUc923+FIu26URnCAQR+eBaho6kNPT7WVvJb4il41lVfImx6Aj4TayGM0v1 PKWkjvJB38wn7UCfWJgmfIJQ2U/2saIADZVrmk65nQpxr64JZdz8hykEUawNxOof +0kN6DBVySGsIYV39HfsEjKnMPRdDPUI778kdK869cdYQcC8O0+3FdHaG7x2gDAq j65s9n+D1uY9AemwCOidOKFwdQflfify8erJILtlOFVxclCIGFq4hPQ4zPeqF7je XcLsmUJ1dwwcAj0Pqn5R =i2RF -----END PGP SIGNATURE----- --Apple-Mail=_A9DD75D9-C81A-40E6-B5DB-5715E779E80E-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:31:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 88D84740; Mon, 29 Jul 2013 12:31:33 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com [IPv6:2607:f8b0:400c:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 10E4523BF; Mon, 29 Jul 2013 12:31:32 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id e13so1063595vbg.17 for ; Mon, 29 Jul 2013 05:31:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=W1EA7LQ577lPfC3vk7SP14DxcqJlyN1YSW4aPzGhuvk=; b=bm9d4Tfa7EWHeVBXDje4EMV72chL228W083j4CAUKEQ5v1SOpNrJe8KOcs3l37Qq7i 3NChJcVtdvsOqzIJFwoLl9bS4jFLcD+BI8WLjfPcGFaL/jKv7hAJnUFdQdwqZxwq5ad7 wOCSzHBAJUHth5Zm34bWQGhjOytvS2M06OkWEZgJ7cXyPTIINYyZwqmxgLkEJbCicqTt XBCryWOacVDaHExly7oDU9dCq7r+ogbjhjxuhg2oAHwjXUbXnKKAddnIfMeIfLf6Igtv mF8gZXQSSb85oEdDb78ldmo8CVWaWfjQpJCj9GDuudjh9/WMyeN4mRvMR8SL45LCedWY lVlA== X-Received: by 10.58.29.111 with SMTP id j15mr25726754veh.76.1375101092073; Mon, 29 Jul 2013 05:31:32 -0700 (PDT) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.58.145.101 with HTTP; Mon, 29 Jul 2013 05:31:12 -0700 (PDT) In-Reply-To: <201307091008.r69A8DcY044114@svn.freebsd.org> References: <201307091008.r69A8DcY044114@svn.freebsd.org> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 29 Jul 2013 14:31:12 +0200 X-Google-Sender-Auth: NpKz9L98IobP0FBJW0i7_3JOn6s Message-ID: Subject: Re: svn commit: r253088 - in head: sys/netipsec usr.bin/netstat To: "Andrey V. Elsukov" Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head , svn-src-all , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:31:33 -0000 On Tue, Jul 9, 2013 at 12:08 PM, Andrey V. Elsukov wrote: > Author: ae > Date: Tue Jul 9 10:08:13 2013 > New Revision: 253088 > URL: http://svnweb.freebsd.org/changeset/base/253088 > > Log: > Migrate structs ahstat, espstat, ipcompstat, ipipstat, pfkeystat, > ipsec4stat, ipsec6stat to PCPU counters. Hi Andrey, Can these changes prevent to compile /usr/src/tools/tools/crypto ? I've got these errors now: ipsecstats.c:103:2: error: use of undeclared identifier 'uintmax_t' AHSTAT(ahs.ahs_input, "input packets processed"); ipsecstats.c:104:2: error: use of undeclared identifier 'uintmax_t' AHSTAT(ahs.ahs_output, "output packets processed"); Regards, Olivier From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:33:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D4BCD899; Mon, 29 Jul 2013 12:33:04 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C279E23D5; Mon, 29 Jul 2013 12:33:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TCX4lA078419; Mon, 29 Jul 2013 12:33:04 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TCX481078418; Mon, 29 Jul 2013 12:33:04 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201307291233.r6TCX481078418@svn.freebsd.org> From: David Chisnall Date: Mon, 29 Jul 2013 12:33:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253766 - head/lib/msun/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:33:04 -0000 Author: theraven Date: Mon Jul 29 12:33:03 2013 New Revision: 253766 URL: http://svnweb.freebsd.org/changeset/base/253766 Log: Restore the longer form of the _Generic. The short form does not work in C++. Modified: head/lib/msun/src/math.h Modified: head/lib/msun/src/math.h ============================================================================== --- head/lib/msun/src/math.h Mon Jul 29 10:14:17 2013 (r253765) +++ head/lib/msun/src/math.h Mon Jul 29 12:33:03 2013 (r253766) @@ -83,10 +83,19 @@ extern const union __nan_un { #if (__STDC_VERSION__ >= 201112L && defined(__clang__)) || \ __has_extension(c_generic_selections) -#define __fp_type_select(x, f, d, ld) _Generic((0,(x)), \ +#define __fp_type_select(x, f, d, ld) _Generic((x), \ float: f(x), \ double: d(x), \ - long double: ld(x)) + long double: ld(x), \ + volatile float: f(x), \ + volatile double: d(x), \ + volatile long double: ld(x), \ + volatile const float: f(x), \ + volatile const double: d(x), \ + volatile const long double: ld(x), \ + const float: f(x), \ + const double: d(x), \ + const long double: ld(x)) #elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus) #define __fp_type_select(x, f, d, ld) __builtin_choose_expr( \ __builtin_types_compatible_p(__typeof(x), long double), ld(x), \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:47:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2BCEEDD5 for ; Mon, 29 Jul 2013 12:47:34 +0000 (UTC) (envelope-from zbb@semihalf.com) Received: from mail-ea0-f180.google.com (mail-ea0-f180.google.com [209.85.215.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1A4A2482 for ; Mon, 29 Jul 2013 12:47:33 +0000 (UTC) Received: by mail-ea0-f180.google.com with SMTP id h10so382155eaj.11 for ; Mon, 29 Jul 2013 05:47:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:organization:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=H2ux+V2TYGwWTc+YNLg3CiBBrHuad/7a2W6twaU5La8=; b=eoZCtPIdoBJKOCbZf5UEAw9a6ktqUHXcP8VyUp5yhU2Hul07b/96XfkekskISQh8DS LLSox/G3icpWFLDGeGyJPsXtFvKa238F+fuZ3ATrwawpdvtWFm5uI2uosEBZdGw6XYuj c22DrCLAIoQj+aMEqS4Jl3mRmYn2LGwFB5VtN4scKW4MO8jzaerEKayiLXqCI80DPRTx dowL47AbWng++mY04PyiqfBeCCkXJFjpl8UM4ZXkO8EY0or03Ei6k/KbrpqYB5+qvI9n chPsaOOF0BMKgJ0zyPbQPkeGGKJAiw21HdQY43KWTn5+hmvtJcNMLhFBw3uIh/MmSaBr C6uA== X-Received: by 10.15.73.197 with SMTP id h45mr58869395eey.146.1375102046070; Mon, 29 Jul 2013 05:47:26 -0700 (PDT) Received: from [10.0.2.117] (cardhu.semihalf.com. [213.17.239.108]) by mx.google.com with ESMTPSA id i43sm26929646eeg.10.2013.07.29.05.47.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 05:47:25 -0700 (PDT) Message-ID: <51F66459.7000500@semihalf.com> Date: Mon, 29 Jul 2013 14:47:21 +0200 From: Zbyszek Bodek Organization: Semihalf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Olivier Houchard Subject: Re: svn commit: r253762 - head/sys/arm/include References: <201307290807.r6T87Ztx098940@svn.freebsd.org> In-Reply-To: <201307290807.r6T87Ztx098940@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQk/17gsShHqwJj9uyx830dAsjx6yWYwjq2NHmCpMQGSbwd/k2hSajyciLofKyK6IHwYfwIC Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:47:34 -0000 On 29.07.2013 10:07, Olivier Houchard wrote: > Author: cognet > Date: Mon Jul 29 08:07:35 2013 > New Revision: 253762 > URL: http://svnweb.freebsd.org/changeset/base/253762 > > Log: > Define KDB_STOPPEDPCB, so that we can access the backtraces of threads running > on other cores. > > Modified: > head/sys/arm/include/kdb.h > head/sys/arm/include/smp.h > > Modified: head/sys/arm/include/kdb.h > ============================================================================== > --- head/sys/arm/include/kdb.h Mon Jul 29 06:57:45 2013 (r253761) > +++ head/sys/arm/include/kdb.h Mon Jul 29 08:07:35 2013 (r253762) > @@ -33,6 +33,8 @@ > #include > #include > > +#define KDB_STOPPEDPCB(pc) &stoppcbs[pc->pc_cpuid] > + > static __inline void > kdb_cpu_clear_singlestep(void) > { > > Modified: head/sys/arm/include/smp.h > ============================================================================== > --- head/sys/arm/include/smp.h Mon Jul 29 06:57:45 2013 (r253761) > +++ head/sys/arm/include/smp.h Mon Jul 29 08:07:35 2013 (r253762) > @@ -32,4 +32,7 @@ void platform_mp_init_secondary(void); > > void platform_ipi_send(cpuset_t cpus, u_int ipi); > > +/* global data in mp_machdep.c */ > +extern struct pcb stoppcbs[]; > + > #endif /* !_MACHINE_SMP_H_ */ Hello Olivier, This commit breaks kernel build for ARM. I believe, you should have added: #include to: sys/arm/include/smp.h Best regards Zbyszek Bodek From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:49:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D5A97F10; Mon, 29 Jul 2013 12:49:32 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C2B362496; Mon, 29 Jul 2013 12:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TCnW2t082061; Mon, 29 Jul 2013 12:49:32 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TCnW41082060; Mon, 29 Jul 2013 12:49:32 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201307291249.r6TCnW41082060@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 29 Jul 2013 12:49:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253767 - head/tools/tools/crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:49:32 -0000 Author: ae Date: Mon Jul 29 12:49:32 2013 New Revision: 253767 URL: http://svnweb.freebsd.org/changeset/base/253767 Log: Include stdint.h to fix build. Pointed by: Olivier Cochard-Labbé Modified: head/tools/tools/crypto/ipsecstats.c Modified: head/tools/tools/crypto/ipsecstats.c ============================================================================== --- head/tools/tools/crypto/ipsecstats.c Mon Jul 29 12:33:03 2013 (r253766) +++ head/tools/tools/crypto/ipsecstats.c Mon Jul 29 12:49:32 2013 (r253767) @@ -25,11 +25,12 @@ * * $FreeBSD$ */ -#include #include #include #include #include +#include +#include struct alg { int a; From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:55:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 30B0615C; Mon, 29 Jul 2013 12:55:38 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DF9A24DA; Mon, 29 Jul 2013 12:55:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TCtbFj084520; Mon, 29 Jul 2013 12:55:37 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TCtbfB084519; Mon, 29 Jul 2013 12:55:37 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201307291255.r6TCtbfB084519@svn.freebsd.org> From: Olivier Houchard Date: Mon, 29 Jul 2013 12:55:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253768 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:55:38 -0000 Author: cognet Date: Mon Jul 29 12:55:37 2013 New Revision: 253768 URL: http://svnweb.freebsd.org/changeset/base/253768 Log: Explicitely include , so that we get the definition of struct pcb. Submitted by: Zbyszek Bodek Pointy hat to: cognet Modified: head/sys/arm/include/smp.h Modified: head/sys/arm/include/smp.h ============================================================================== --- head/sys/arm/include/smp.h Mon Jul 29 12:49:32 2013 (r253767) +++ head/sys/arm/include/smp.h Mon Jul 29 12:55:37 2013 (r253768) @@ -4,6 +4,7 @@ #define _MACHINE_SMP_H_ #include +#include #define IPI_AST 0 #define IPI_PREEMPT 2 From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 12:56:18 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32D1629F; Mon, 29 Jul 2013 12:56:18 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0BC0624E2; Mon, 29 Jul 2013 12:56:17 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6TCuFOk072989 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 29 Jul 2013 12:56:16 GMT (envelope-from theraven@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_3C6D5381-7307-4D22-BA89-D60C029038E4"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253215 - head/lib/msun/src From: David Chisnall In-Reply-To: <20130729070517.GA3192@zim.MIT.EDU> Date: Mon, 29 Jul 2013 13:56:16 +0100 Message-Id: <00F2B647-8D25-45FB-B852-5214AC27AD26@FreeBSD.org> References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> <20130729070517.GA3192@zim.MIT.EDU> To: David Schultz X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 12:56:18 -0000 --Apple-Mail=_3C6D5381-7307-4D22-BA89-D60C029038E4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Jul 2013, at 08:05, David Schultz wrote: > On Thu, Jul 11, 2013, David Chisnall wrote: >> +static __inline int >> +__inline_isnan(double __x) >> +{ >> + >> + return (__x !=3D __x); >> +} >> + >> +static __inline int >> +__inline_isnanf(float __x) >> +{ >> + >> + return (__x !=3D __x); >> +} >> + >> +static __inline int >> +__inline_isnanl(long double __x) >> +{ >> + >> + return (__x !=3D __x); >> +} >=20 > This has already been covered at greater length, but I believe > this part is incorrect. Relational operators can raise an invalid > exception when one of the arguments is a NaN -- even a quiet NaN. > Raising an exception is optional in C99 (7.12.14) and required in > IEEE-754... in practice, it tends to be platform- and compiler- > specific. >=20 > That is the whole reason the is* macros are defined by the > standard in the first place, and also why we didn't use the > trivial implementation above. The is* macros are required to not > raise an exception. What would you suggest replacing them with? Note that currently LLVM iR = doesn't provide any way of distinguishing the !=3D comparison from = something that is guaranteed not to raise an exception. I don't know = how this works in GIMPLE, althouhg I'd imagine that, since gcc has a = working Fortran front end, there is some better support for it. > P.S. It would be great if clang implemented the FENV_ACCESS pragma > and provided an intrinsic that produced a fast inline isnan() when > the pragma is off, and the full, correct one when the pragma is on. I almost agree, but C is a really terrible language for mathematical = work and I'd prefer that people just used Fortran instead of trying to = force C to be Fortran. In particular, take a look in the C11 spec for = the semantics of this: _Atomic(double) x =3D ...; x +=3D 1; It's quite astonishingly horrible. We don't implement it correctly in = clang, and I hope never to have to. =20 David --Apple-Mail=_3C6D5381-7307-4D22-BA89-D60C029038E4 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJR9mZwAAoJEKx65DEEsqIdTlwQAM+U1r4cObj7aUCDAUcmf9zk qxr6CvWiaEljzmu+juaJ39Lc2acHoRAmtZuL7qria99EuM2P/efSEOe2fdBF48C/ wMmj9+P1CWrLp6YNsg3zcC4X6D4OgYQ7XftwHwvIbKDUj4UxYreLiE6KXSBibtDJ CD+HlT6GsXd2XopmsgkemgXufp20O18UR4WixR4LxXiNYa4KoIrXSIJdlXpIVKTY Z9W4AaPMkfou8+L8bH9mtMNTBjwXWDLoNQFzWUyh08zcHLvmp6czOsv/3quUSJMB mq6l6e3HrWhvimWF4QXx1kl/+B8Z0b2WPwXag6byXqm+SunxYlLwI2gL0efiR8Xu blX+H2N1hFPljRPJH8+Nfv+ZIuYEjrVULSgkz18FRXpA98IjsWCPyX5uzZ5jZHAq vcGXgBcSJ9asxKbf2Hsb6RYDQ18gHFZAxI73oBRjiu2lwtBVqFqr+h5SXfGyZE2E rMA3ne5CiV7pT6WemhZSGZb1IcChaF/La6JyYbsorEuDwrc/Dwuy660T9xuh6MQk fS4CgmckHKz1A0RC5kdRCvU272dOlzXrh5Ch7twZIP+OGPAtZf00KEb7HnQ7n+EU SW0x4+Ri7R9KghjfaXIF82HeX1bLMHX3t0RcCOvkaJDrvYgVs3v0pFZj07yh1zwO vZXO/HmsK4N8iuuIiDvP =8mBa -----END PGP SIGNATURE----- --Apple-Mail=_3C6D5381-7307-4D22-BA89-D60C029038E4-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 13:17:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A933677A; Mon, 29 Jul 2013 13:17:18 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 964A425BA; Mon, 29 Jul 2013 13:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TDHIpb091065; Mon, 29 Jul 2013 13:17:18 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TDHIOx091064; Mon, 29 Jul 2013 13:17:18 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201307291317.r6TDHIOx091064@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 29 Jul 2013 13:17:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253769 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 13:17:18 -0000 Author: ae Date: Mon Jul 29 13:17:18 2013 New Revision: 253769 URL: http://svnweb.freebsd.org/changeset/base/253769 Log: Fix a possible NULL-pointer dereference on the pfsync(4) reconfiguration. Reported by: Eugene M. Zheganin Modified: head/sys/netpfil/pf/if_pfsync.c Modified: head/sys/netpfil/pf/if_pfsync.c ============================================================================== --- head/sys/netpfil/pf/if_pfsync.c Mon Jul 29 12:55:37 2013 (r253768) +++ head/sys/netpfil/pf/if_pfsync.c Mon Jul 29 13:17:18 2013 (r253769) @@ -1324,7 +1324,10 @@ pfsyncioctl(struct ifnet *ifp, u_long cm else if ((sifp = ifunit_ref(pfsyncr.pfsyncr_syncdev)) == NULL) return (EINVAL); - if (pfsyncr.pfsyncr_syncpeer.s_addr == 0 && sifp != NULL) + if (sifp != NULL && ( + pfsyncr.pfsyncr_syncpeer.s_addr == 0 || + pfsyncr.pfsyncr_syncpeer.s_addr == + htonl(INADDR_PFSYNC_GROUP))) mship = malloc((sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_PFSYNC, M_WAITOK | M_ZERO); From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 13:30:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAC129C0; Mon, 29 Jul 2013 13:30:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 742F62633; Mon, 29 Jul 2013 13:30:20 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 6464DD44035; Mon, 29 Jul 2013 23:30:15 +1000 (EST) Date: Mon, 29 Jul 2013 23:30:14 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Schultz Subject: Re: svn commit: r253215 - head/lib/msun/src In-Reply-To: <20130729070517.GA3192@zim.MIT.EDU> Message-ID: <20130729210519.G1146@besplex.bde.org> References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> <20130729070517.GA3192@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Yos2GeoX c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=hIML2bcmzLYA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=BKZECA6cT18e-IigmXQA:9 a=YIYcuchHDKjwy6PG:21 a=OZ92-9CpP4R_YQa2:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 13:30:20 -0000 On Mon, 29 Jul 2013, David Schultz wrote: > On Thu, Jul 11, 2013, David Chisnall wrote: >> +static __inline int >> +__inline_isnan(double __x) >> +{ >> + >> + return (__x != __x); >> +} >> + >> +static __inline int >> +__inline_isnanf(float __x) >> +{ >> + >> + return (__x != __x); >> +} >> + >> +static __inline int >> +__inline_isnanl(long double __x) >> +{ >> + >> + return (__x != __x); >> +} > > This has already been covered at greater length, but I believe > this part is incorrect. The correctness of this part has always been covered at greater length :-). We use simple "!=" tests because there is no way to get correct behaviour and the simple test is more correct than most, including the extern function implementation, and faster than all. Even greater length follows :-). > Relational operators can raise an invalid > exception when one of the arguments is a NaN -- even a quiet NaN. > Raising an exception is optional in C99 (7.12.14) and required in > IEEE-754... in practice, it tends to be platform- and compiler- > specific. IEEE-754-2008 actually requires the '=' and '!=' comparisions (with that spelling (or with the alternative spellins '?<>', or 'NOT=' for '!=')) to _not_ generate an exception for quiet NaNs. It has an unordered-signaling and and unordered-quiet variant for all comparisions. The equality and inequality signaling comparisions are so unusual that IEEE-754-2008 doesn't even give normal spellings for their abbreviations in its tables. The tables in IEEE-854-1987 seem to be better, and give these as '<>' and 'NOT<>'. Howver, for inequality predicates like '<', it is the unordered-signaling variants that have the normal spelling, with unordered-quiet '<' having the special spelling '?<'. I first thought that the 2 types of comparisons were new in 2008, but now see that they were in the IEEE-854-1987 with only a small difference in emphasis. The unordered-quiet variants are intended to be used in code that takes into account the possibility of NaNs. That is almost no code. I had misremembered this (signaling for the usual case) as being a design error, because real hardware like i387 and SSE has limited support for signaling. Actually, i387 and SSE have full support for both cases (FCOM and COM give the signaling behaviour, and FUCOM and UCOM give the quiet behaviour). The only documentation that I can find now that says that FCOM should never be used is where I probably learned it from in _The 8086/386 Architecture_ by Morse et al. This says: Since the 8087 was introduced, the floating-point standard specified that comparisons involving quiet NaNs should return a result of \"unordered,\" with no exception raised. Since the FUCOM instruction raises the invalid exception, in this case it fails to meet the standard. So the _unordered comparison_ instructuctions FUCOM, FUCOMP, and FUCOMPP were added to the 387. [...] [Recommendation to use FCOM in simple programs and let the exception handler deal with NaN results. Use FUCOM if we want to handle NaNs and the unordered condtion ourselves.] But the standard actually requires both, at least in 1987 when Morse's book was published. C99 requires the signaling variants, except possiblly for the equality predicates. For inequality, islessgreater() gives IEEE quiet inequality '?<>' or !'=' except it is underspecified for NaNs. You can't get IEEE quiet equality by inverting this since it must not be inverted for NaNs. You can build quiet IEEE equality and using this and isunordered(), but the logic for this is complicated and it would be hard for compilers to turn it back into direct IEEE quiet unordered equality comparisons. C99 clarifies the intended behaviour in footnote 194, but footnotes are not part of the standard: %%% 194IEC 60559 requires that the built-in relational operators raise the invalid exception if the operands compare unordered, as an error indicator for programs written without consideration of NaNs; the result in these cases is false. %%% So '=' and '!=' should always give 'false' for NaNs, and the macros should have the same behaviour. x86 C compilers understand none of this. They seem to have started avoiding using FCOM since before Morse's book came out, and now always generate FUCOM/UCOM. So they always give unordered comparisons. So the support for "simple" programs is broken by default, and there is no way to get it (no flag for stricter IEEE conformance?), and the C comparison macros are useless in unportable x86 code since they generate the same unordered comparison instructions as direct comparisons. More usefully, the implemenation can be unportable, so it can depend on these bugs in . Using the x != x comparision without an ifdef is perhaps too x86-specific, but the other arches are likely to be even more broken no one cares about them. I just tested the following program on amd64, ia64 and sparc64. It fails to raise invalid for the comparision of NaNs on all of them: #include #include #include double z; int main(void) { z = z / z; printf("%d\n", fetestexcept(FE_INVALID)); feclearexcept(FE_INVALID); if (z >= z) printf("equal\n"); printf("%d\n", fetestexcept(FE_INVALID)); return (0); } > That is the whole reason the is* macros are defined by the > standard in the first place, and also why we didn't use the > trivial implementation above. The is* macros are required to not > raise an exception. > > P.S. It would be great if clang implemented the FENV_ACCESS pragma > and provided an intrinsic that produced a fast inline isnan() when > the pragma is off, and the full, correct one when the pragma is on. Not really great, since the ifdefs to actually use this would be messy. It would take an especially unportable pragma to switch between quiet (technically broken) and signaling comparisons, and and this pragma would be especially useless on x86 since both types of comparisons are supported directly in hardware so there are no efficiency advantages from using the technically broken one. Anwyay, FENV_ACCESS is irrelevant, since the fast inline isnan() is independent of it. The fast inline isnan() already exists as __builtin_isnan() for clang and as plain isnan() or __builtin_isnan() for gcc-4+. But ifdefs for this would be too messy. Exceptions for comparing NaNs are more interesting if trapping of the invalid exception is enabled. Otherwise, they no difference except for non-simple programs that are aware enough of NaNs to test for the invalid exception at least once. Even non-simple programs shouldn't be handling NaNs so tenderly as to avoid subsequent exceptions for them, as they were apparently expected to do in Morse's book. I think exceptions for comparison are actually most useful for the non-simple programs. Simple programs would raise invalid when they generate a NaN and never re-raise it, and only notice if it is trapped. Non-simple programs might clear the invalid exception occasionally and prefer it to be raised by comparisons later, instead of ensuring that NaNs don't propagate. And if they look at their data too much so as to weed out NaNs, then exceptions for comparisons are useful for detecting cases that the weeding missed. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 13:44:44 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6D60F128; Mon, 29 Jul 2013 13:44:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 2E2872713; Mon, 29 Jul 2013 13:44:43 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1AF181042AA5; Mon, 29 Jul 2013 23:44:33 +1000 (EST) Date: Mon, 29 Jul 2013 23:44:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Chisnall Subject: Re: svn commit: r253764 - head/lib/msun/src In-Reply-To: <4F2196BB-1873-458B-8C4F-9D7A351A4426@FreeBSD.org> Message-ID: <20130729234308.F1849@besplex.bde.org> References: <201307290832.r6T8WEYB007487@svn.freebsd.org> <20130729201847.K1146@besplex.bde.org> <4F2196BB-1873-458B-8C4F-9D7A351A4426@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=Yos2GeoX c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=NDY59GnS80oA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=Aet6fyW9sl8A:10 a=WebfsrAntwGwR68oyvcA:9 a=CjuIK1q_8ugA:10 a=HHqgmuRSYmYA:10 a=4YanEqnAHxEA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 13:44:44 -0000 On Mon, 29 Jul 2013, David Chisnall wrote: > Bruce, > > It's very difficult within this verbiage to work out what you believe the correct code should look like. Please either provide a patch or commit the fix yourself. I prefer to give details. [Context lost to top posting.] Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 13:46:07 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04DA2305; Mon, 29 Jul 2013 13:46:07 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A93BF272F; Mon, 29 Jul 2013 13:46:06 +0000 (UTC) Received: from c120.sec.cl.cam.ac.uk (c120.sec.cl.cam.ac.uk [128.232.18.120]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r6TDjv3a073243 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 29 Jul 2013 13:45:58 GMT (envelope-from theraven@FreeBSD.org) Content-Type: multipart/signed; boundary="Apple-Mail=_F1978DEC-A26E-433F-AD7E-2987A955B02D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253764 - head/lib/msun/src From: David Chisnall In-Reply-To: <20130729234308.F1849@besplex.bde.org> Date: Mon, 29 Jul 2013 14:45:58 +0100 Message-Id: <5234F779-E9BA-4909-ACE7-9D0DDB4760B2@FreeBSD.org> References: <201307290832.r6T8WEYB007487@svn.freebsd.org> <20130729201847.K1146@besplex.bde.org> <4F2196BB-1873-458B-8C4F-9D7A351A4426@FreeBSD.org> <20130729234308.F1849@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 13:46:07 -0000 --Apple-Mail=_F1978DEC-A26E-433F-AD7E-2987A955B02D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 29 Jul 2013, at 14:44, Bruce Evans wrote: >> It's very difficult within this verbiage to work out what you believe = the correct code should look like. Please either provide a patch or = commit the fix yourself. >=20 > I prefer to give details. Details are useful when they serve to expand on a point. They are not = useful when they are provided as a substitute for a concise explanation. David --Apple-Mail=_F1978DEC-A26E-433F-AD7E-2987A955B02D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.18 (Darwin) Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJR9nIWAAoJEKx65DEEsqId5RUQALiDgwu9ENDTAldBK8fjT0yz v2y1q82UJPZhAIVXq3tEShIGHylsYojZ+2z2ZIz3wQzGn4M+8aZUlaUXYHvvQSw9 SwmPI0B3f716XfZjj/MhjgmwRJLMyMMiHxOZkOzxTuRMtfz/tbHl7+LrcA6OOLGE UegsrPVMq42UfPeY0oVOsdpLAOB9lnRZZZ4Lt5zij0fL37SRgn+/eUJrsUILo8dJ tjDYHqxWz37N3MahHrJys51BKG/y6qKTBAQlh6hDL6LSsgrKO2IP0jhPLhnecBXR Kic55LhStdoFFx3qONx5RjHYsuSPCp8w7634o+Zr7wTUx3ajBHFNr6+XR/+X4MXM wKFmeQzKtYzyp1eytIoizmcT6HNbM8AtcRk9knXvnygRN4YtUNvzktk8ES6m9sAv VGygiRVZwxY/uutULzHnKH3ibyzsDZdsNanoQtT2mdV+N7/OzXvVFQPb0MLA02mj hL5obrOlYD+5ChUGjBWRLTGf0VwJos9WpadSBp893HPlZupqqn6N1abtLcADWC2d VxdGPCxYQpMdYO5+S+Yhy3cG6B8pJwB8noFy2NrWbPnQJ3bspQNI55frnyDxd7jx rLQoF0qQ5Jb2oPK0pdwDdVxtUVyAos2en+OnQeGcGsR4/C3MzKCE55EhN5hYm9lZ q1bkTMb/SXRuDzsbHPXC =LgZU -----END PGP SIGNATURE----- --Apple-Mail=_F1978DEC-A26E-433F-AD7E-2987A955B02D-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 16:56:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73C6E571; Mon, 29 Jul 2013 16:56:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5FBF02235; Mon, 29 Jul 2013 16:56:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TGudKa056477; Mon, 29 Jul 2013 16:56:39 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TGudju056475; Mon, 29 Jul 2013 16:56:39 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307291656.r6TGudju056475@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Jul 2013 16:56:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253772 - in head/sys/cddl/dev/dtrace: amd64 i386 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 16:56:39 -0000 Author: avg Date: Mon Jul 29 16:56:38 2013 New Revision: 253772 URL: http://svnweb.freebsd.org/changeset/base/253772 Log: dtrace disassembler: take the latest/last CDDL code from OpenSolaris OpenSolaris version is: 13108:33bb8a0301ab 6762020 Disassembly support for Intel Advanced Vector Extensions (AVX) This corresponds to Illumos-gate (github) version ab47273fedff893c8ae22ec39ffc666d4fa6fc8b MFC after: 3 weeks Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c head/sys/cddl/dev/dtrace/amd64/dis_tables.h head/sys/cddl/dev/dtrace/i386/dis_tables.c head/sys/cddl/dev/dtrace/i386/dis_tables.h Modified: head/sys/cddl/dev/dtrace/amd64/dis_tables.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 29 16:03:45 2013 (r253771) +++ head/sys/cddl/dev/dtrace/amd64/dis_tables.c Mon Jul 29 16:56:38 2013 (r253772) @@ -1,4 +1,5 @@ /* + * * CDDL HEADER START * * The contents of this file are subject to the terms of the @@ -17,21 +18,22 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END - * - * $FreeBSD$ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + */ + +/* + * Copyright (c) 2010, Intel Corporation. + * All rights reserved. */ /* Copyright (c) 1988 AT&T */ /* All Rights Reserved */ - -#if defined(sun) -#pragma ident "@(#)dis_tables.c 1.11 06/03/02 SMI" -#endif +/* + * $FreeBSD$ + */ #include "dis_tables.h" @@ -66,16 +68,16 @@ extern size_t strlcat(char *, const char #endif -#define TERM NULL /* used to indicate that the 'indirect' */ +#define TERM 0 /* used to indicate that the 'indirect' */ /* field terminates - no pointer. */ /* Used to decode instructions. */ typedef struct instable { - const struct instable *it_indirect; /* for decode op codes */ + struct instable *it_indirect; /* for decode op codes */ uchar_t it_adrmode; #ifdef DIS_TEXT char it_name[NCPS]; - uint_t it_suffix:1; /* mneu + "w", "l", or "d" */ + uint_t it_suffix:1; /* mnem + "w", "l", or "d" */ #endif #ifdef DIS_MEM uint_t it_size:16; @@ -106,6 +108,7 @@ enum { MO, /* memory only (no registers) */ PREF, SWAPGS, + MONITOR_MWAIT, R, RA, SEG, @@ -152,8 +155,10 @@ enum { CWD, /* so data16 can be evaluated for cwd and variants */ RET, /* single immediate 16-bit operand */ MOVZ, /* for movs and movz, with different size operands */ + CRC32, /* for crc32, with different size operands */ XADDB, /* for xaddb */ MOVSXZ, /* AMD64 mov sign extend 32 to 64 bit instruction */ + MOVBE, /* movbe instruction */ /* * MMX/SIMD addressing modes. @@ -166,6 +171,7 @@ enum { MMOS, /* Prefixable MMX/SIMD-Int mm -> mm/mem */ MMOMS, /* Prefixable MMX/SIMD-Int mm -> mem */ MMOPM, /* MMX/SIMD-Int mm/mem -> mm,imm8 */ + MMOPM_66o, /* MMX/SIMD-Int 0x66 optional mm/mem -> mm,imm8 */ MMOPRM, /* Prefixable MMX/SIMD-Int r32/mem -> mm,imm8 */ MMOSH, /* Prefixable MMX mm,imm8 */ MM, /* MMX/SIMD-Int mm/mem -> mm */ @@ -180,12 +186,19 @@ enum { XMMOM, /* Prefixable SIMD xmm -> mem */ XMMOMS, /* Prefixable SIMD mem -> xmm */ XMM, /* SIMD xmm/mem -> xmm */ + XMM_66r, /* SIMD 0x66 prefix required xmm/mem -> xmm */ + XMM_66o, /* SIMD 0x66 prefix optional xmm/mem -> xmm */ XMMXIMPL, /* SIMD xmm -> xmm (mem) */ XMM3P, /* SIMD xmm -> r32,imm8 */ + XMM3PM_66r, /* SIMD 0x66 prefix required xmm -> r32/mem,imm8 */ XMMP, /* SIMD xmm/mem w/to xmm,imm8 */ + XMMP_66o, /* SIMD 0x66 prefix optional xmm/mem w/to xmm,imm8 */ + XMMP_66r, /* SIMD 0x66 prefix required xmm/mem w/to xmm,imm8 */ XMMPRM, /* SIMD r32/mem -> xmm,imm8 */ + XMMPRM_66r, /* SIMD 0x66 prefix required r32/mem -> xmm,imm8 */ XMMS, /* SIMD xmm -> xmm/mem */ XMMM, /* SIMD mem -> xmm */ + XMMM_66r, /* SIMD 0x66 prefix required mem -> xmm */ XMMMS, /* SIMD xmm -> mem */ XMM3MX, /* SIMD r32/mem -> xmm */ XMM3MXS, /* SIMD xmm -> r32/mem */ @@ -195,10 +208,35 @@ enum { XMMXMM, /* SIMD xmm/mem -> mm */ XMMMX, /* SIMD mm -> xmm */ XMMXM, /* SIMD xmm -> mm */ + XMMX2I, /* SIMD xmm -> xmm, imm, imm */ + XMM2I, /* SIMD xmm, imm, imm */ XMMFENCE, /* SIMD lfence or mfence */ - XMMSFNC /* SIMD sfence (none or mem) */ + XMMSFNC, /* SIMD sfence (none or mem) */ + XGETBV_XSETBV, + VEX_NONE, /* VEX no operand */ + VEX_MO, /* VEX mod_rm -> implicit reg */ + VEX_RMrX, /* VEX VEX.vvvv, mod_rm -> mod_reg */ + VEX_RRX, /* VEX VEX.vvvv, mod_reg -> mod_rm */ + VEX_RMRX, /* VEX VEX.vvvv, mod_rm, imm8[7:4] -> mod_reg */ + VEX_MX, /* VEX mod_rm -> mod_reg */ + VEX_MXI, /* VEX mod_rm, imm8 -> mod_reg */ + VEX_XXI, /* VEX mod_rm, imm8 -> VEX.vvvv */ + VEX_MR, /* VEX mod_rm -> mod_reg */ + VEX_RRI, /* VEX mod_reg, mod_rm -> implicit(eflags/r32) */ + VEX_RX, /* VEX mod_reg -> mod_rm */ + VEX_RR, /* VEX mod_rm -> mod_reg */ + VEX_RRi, /* VEX mod_rm, imm8 -> mod_reg */ + VEX_RM, /* VEX mod_reg -> mod_rm */ + VEX_RRM, /* VEX VEX.vvvv, mod_reg -> mod_rm */ + VEX_RMX /* VEX VEX.vvvv, mod_rm -> mod_reg */ }; +/* + * VEX prefixes + */ +#define VEX_2bytes 0xC5 /* the first byte of two-byte form */ +#define VEX_3bytes 0xC4 /* the first byte of three-byte form */ + #define FILL 0x90 /* Fill byte used for alignment (nop) */ /* @@ -221,6 +259,7 @@ enum { #define MODE_SIGNED 2 /* sign extended immediate */ #define MODE_IMPLIED 3 /* constant value implied from opcode */ #define MODE_OFFSET 4 /* offset part of an address */ +#define MODE_RIPREL 5 /* like IPREL, but from %rip (amd64) */ /* * The letters used in these macros are: @@ -236,8 +275,8 @@ enum { */ #if defined(DIS_TEXT) && defined(DIS_MEM) -#define IND(table) {table, 0, "", 0, 0, 0, 0, 0, 0} -#define INDx(table) {table, 0, "", 0, 0, 1, 0, 0, 0} +#define IND(table) {(instable_t *)table, 0, "", 0, 0, 0, 0, 0, 0} +#define INDx(table) {(instable_t *)table, 0, "", 0, 0, 1, 0, 0, 0} #define TNS(name, amode) {TERM, amode, name, 0, 0, 0, 0, 0, 0} #define TNSu(name, amode) {TERM, amode, name, 0, 0, 0, 0, 1, 0} #define TNSx(name, amode) {TERM, amode, name, 0, 0, 1, 0, 0, 0} @@ -254,8 +293,8 @@ enum { #define TSZy(name, amode, sz) {TERM, amode, name, 1, sz, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, "", 0, 0, 0, 0, 0} #elif defined(DIS_TEXT) -#define IND(table) {table, 0, "", 0, 0, 0, 0, 0} -#define INDx(table) {table, 0, "", 0, 1, 0, 0, 0} +#define IND(table) {(instable_t *)table, 0, "", 0, 0, 0, 0, 0} +#define INDx(table) {(instable_t *)table, 0, "", 0, 1, 0, 0, 0} #define TNS(name, amode) {TERM, amode, name, 0, 0, 0, 0, 0} #define TNSu(name, amode) {TERM, amode, name, 0, 0, 0, 1, 0} #define TNSx(name, amode) {TERM, amode, name, 0, 1, 0, 0, 0} @@ -272,8 +311,8 @@ enum { #define TSZy(name, amode, sz) {TERM, amode, name, 1, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, "", 0, 0, 0, 0, 0} #elif defined(DIS_MEM) -#define IND(table) {table, 0, 0, 0, 0, 0, 0} -#define INDx(table) {table, 0, 0, 1, 0, 0, 0} +#define IND(table) {(instable_t *)table, 0, 0, 0, 0, 0, 0} +#define INDx(table) {(instable_t *)table, 0, 0, 1, 0, 0, 0} #define TNS(name, amode) {TERM, amode, 0, 0, 0, 0, 0} #define TNSu(name, amode) {TERM, amode, 0, 0, 0, 1, 0} #define TNSy(name, amode) {TERM, amode, 0, 0, 1, 0, 0} @@ -290,8 +329,8 @@ enum { #define TSZy(name, amode, sz) {TERM, amode, sz, 0, 1, 0, 0} #define INVALID {TERM, UNKNOWN, 0, 0, 0, 0, 0} #else -#define IND(table) {table[0], 0, 0, 0, 0, 0} -#define INDx(table) {table[0], 0, 1, 0, 0, 0} +#define IND(table) {(instable_t *)table, 0, 0, 0, 0, 0} +#define INDx(table) {(instable_t *)table, 0, 1, 0, 0, 0} #define TNS(name, amode) {TERM, amode, 0, 0, 0, 0} #define TNSu(name, amode) {TERM, amode, 0, 0, 1, 0} #define TNSy(name, amode) {TERM, amode, 0, 1, 0, 0} @@ -406,6 +445,11 @@ const char *const dis_XMMREG[16] = { "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15" }; +const char *const dis_YMMREG[16] = { + "%ymm0", "%ymm1", "%ymm2", "%ymm3", "%ymm4", "%ymm5", "%ymm6", "%ymm7", + "%ymm8", "%ymm9", "%ymm10", "%ymm11", "%ymm12", "%ymm13", "%ymm14", "%ymm15" +}; + const char *const dis_SEGREG[16] = { "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "", "", "%es", "%cs", "%ss", "%ds", "%fs", "%gs", "", "" @@ -418,13 +462,15 @@ const char *const dis_PREDSUFFIX[8] = { "eq", "lt", "le", "unord", "neq", "nlt", "nle", "ord" }; - +const char *const dis_AVXvgrp7[3][8] = { + /*0 1 2 3 4 5 6 7*/ +/*71*/ {"", "", "vpsrlw", "", "vpsraw", "", "vpsllw", ""}, +/*72*/ {"", "", "vpsrld", "", "vpsrad", "", "vpslld", ""}, +/*73*/ {"", "", "vpsrlq", "vpsrldq", "", "", "vpsllq", "vpslldq"} +}; #endif /* DIS_TEXT */ - - - /* * "decode table" for 64 bit mode MOVSXD instruction (opcode 0x63) */ @@ -450,7 +496,7 @@ const instable_t dis_op0F00[8] = { */ const instable_t dis_op0F01[8] = { -/* [0] */ TNSZ("sgdt",MO,6), TNSZ("sidt",MO,6), TNSZ("lgdt",MO,6), TNSZ("lidt",MO,6), +/* [0] */ TNSZ("sgdt",MO,6), TNSZ("sidt",MONITOR_MWAIT,6), TNSZ("lgdt",XGETBV_XSETBV,6), TNSZ("lidt",MO,6), /* [4] */ TNSZ("smsw",M,2), INVALID, TNSZ("lmsw",M,2), TNS("invlpg",SWAPGS), }; @@ -468,7 +514,7 @@ const instable_t dis_op0F18[8] = { */ const instable_t dis_op0FAE[8] = { /* [0] */ TNSZ("fxsave",M,512), TNSZ("fxrstor",M,512), TNS("ldmxcsr",M), TNS("stmxcsr",M), -/* [4] */ INVALID, TNS("lfence",XMMFENCE), TNS("mfence",XMMFENCE), TNS("sfence",XMMSFNC), +/* [4] */ TNSZ("xsave",M,512), TNS("lfence",XMMFENCE), TNS("mfence",XMMFENCE), TNS("sfence",XMMSFNC), }; /* @@ -587,7 +633,7 @@ const instable_t dis_opSIMDdata16[256] = /* [70] */ TNSZ("pshufd",XMMP,16), INVALID, INVALID, INVALID, /* [74] */ TNSZ("pcmpeqb",XMM,16), TNSZ("pcmpeqw",XMM,16), TNSZ("pcmpeqd",XMM,16), INVALID, -/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ TNSZ("extrq",XMM2I,16), TNSZ("extrq",XMM,16), INVALID, INVALID, /* [7C] */ INVALID, INVALID, TNSZ("movd",XMM3MXS,4), TNSZ("movdqa",XMMS,16), /* [80] */ INVALID, INVALID, INVALID, INVALID, @@ -631,6 +677,88 @@ const instable_t dis_opSIMDdata16[256] = /* [FC] */ TNSZ("paddb",XMM,16), TNSZ("paddw",XMM,16), TNSZ("paddd",XMM,16), INVALID, }; +const instable_t dis_opAVX660F[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ TNSZ("vmovupd",VEX_MX,16), TNSZ("vmovupd",VEX_RX,16), TNSZ("vmovlpd",VEX_RMrX,8), TNSZ("vmovlpd",VEX_RM,8), +/* [14] */ TNSZ("vunpcklpd",VEX_RMrX,16),TNSZ("vunpckhpd",VEX_RMrX,16),TNSZ("vmovhpd",VEX_RMrX,8), TNSZ("vmovhpd",VEX_RM,8), +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ TNSZ("vmovapd",VEX_MX,16), TNSZ("vmovapd",VEX_RX,16), INVALID, TNSZ("vmovntpd",VEX_RM,16), +/* [2C] */ INVALID, INVALID, TNSZ("vucomisd",VEX_MX,8),TNSZ("vcomisd",VEX_MX,8), + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ TNS("vmovmskpd",VEX_MR), TNSZ("vsqrtpd",VEX_MX,16), INVALID, INVALID, +/* [54] */ TNSZ("vandpd",VEX_RMrX,16), TNSZ("vandnpd",VEX_RMrX,16), TNSZ("vorpd",VEX_RMrX,16), TNSZ("vxorpd",VEX_RMrX,16), +/* [58] */ TNSZ("vaddpd",VEX_RMrX,16), TNSZ("vmulpd",VEX_RMrX,16), TNSZ("vcvtpd2ps",VEX_MX,16),TNSZ("vcvtps2dq",VEX_MX,16), +/* [5C] */ TNSZ("vsubpd",VEX_RMrX,16), TNSZ("vminpd",VEX_RMrX,16), TNSZ("vdivpd",VEX_RMrX,16), TNSZ("vmaxpd",VEX_RMrX,16), + +/* [60] */ TNSZ("vpunpcklbw",VEX_RMrX,16),TNSZ("vpunpcklwd",VEX_RMrX,16),TNSZ("vpunpckldq",VEX_RMrX,16),TNSZ("vpacksswb",VEX_RMrX,16), +/* [64] */ TNSZ("vpcmpgtb",VEX_RMrX,16), TNSZ("vpcmpgtw",VEX_RMrX,16), TNSZ("vpcmpgtd",VEX_RMrX,16), TNSZ("vpackuswb",VEX_RMrX,16), +/* [68] */ TNSZ("vpunpckhbw",VEX_RMrX,16),TNSZ("vpunpckhwd",VEX_RMrX,16),TNSZ("vpunpckhdq",VEX_RMrX,16),TNSZ("vpackssdw",VEX_RMrX,16), +/* [6C] */ TNSZ("vpunpcklqdq",VEX_RMrX,16),TNSZ("vpunpckhqdq",VEX_RMrX,16),TNSZ("vmovd",VEX_MX,4),TNSZ("vmovdqa",VEX_MX,16), + +/* [70] */ TNSZ("vpshufd",VEX_MXI,16), TNSZ("vgrp71",VEX_XXI,16), TNSZ("vgrp72",VEX_XXI,16), TNSZ("vgrp73",VEX_XXI,16), +/* [74] */ TNSZ("vpcmpeqb",VEX_RMrX,16), TNSZ("vpcmpeqw",VEX_RMrX,16), TNSZ("vpcmpeqd",VEX_RMrX,16), INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ TNSZ("vhaddpd",VEX_RMrX,16), TNSZ("vhsubpd",VEX_RMrX,16), TNSZ("vmovd",VEX_RR,4), TNSZ("vmovdqa",VEX_RX,16), + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, TNSZ("vcmppd",VEX_RMRX,16), INVALID, +/* [C4] */ TNSZ("vpinsrw",VEX_RMRX,2),TNS("vpextrw",VEX_MR), TNSZ("vshufpd",VEX_RMRX,16), INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ TNSZ("vaddsubpd",VEX_RMrX,16),TNSZ("vpsrlw",VEX_RMrX,16), TNSZ("vpsrld",VEX_RMrX,16), TNSZ("vpsrlq",VEX_RMrX,16), +/* [D4] */ TNSZ("vpaddq",VEX_RMrX,16), TNSZ("vpmullw",VEX_RMrX,16), TNSZ("vmovq",VEX_RX,8), TNS("vpmovmskb",VEX_MR), +/* [D8] */ TNSZ("vpsubusb",VEX_RMrX,16), TNSZ("vpsubusw",VEX_RMrX,16), TNSZ("vpminub",VEX_RMrX,16), TNSZ("vpand",VEX_RMrX,16), +/* [DC] */ TNSZ("vpaddusb",VEX_RMrX,16), TNSZ("vpaddusw",VEX_RMrX,16), TNSZ("vpmaxub",VEX_RMrX,16), TNSZ("vpandn",VEX_RMrX,16), + +/* [E0] */ TNSZ("vpavgb",VEX_RMrX,16), TNSZ("vpsraw",VEX_RMrX,16), TNSZ("vpsrad",VEX_RMrX,16), TNSZ("vpavgw",VEX_RMrX,16), +/* [E4] */ TNSZ("vpmulhuw",VEX_RMrX,16), TNSZ("vpmulhw",VEX_RMrX,16), TNSZ("vcvttpd2dq",VEX_MX,16),TNSZ("vmovntdq",VEX_RM,16), +/* [E8] */ TNSZ("vpsubsb",VEX_RMrX,16), TNSZ("vpsubsw",VEX_RMrX,16), TNSZ("vpminsw",VEX_RMrX,16), TNSZ("vpor",VEX_RMrX,16), +/* [EC] */ TNSZ("vpaddsb",VEX_RMrX,16), TNSZ("vpaddsw",VEX_RMrX,16), TNSZ("vpmaxsw",VEX_RMrX,16), TNSZ("vpxor",VEX_RMrX,16), + +/* [F0] */ INVALID, TNSZ("vpsllw",VEX_RMrX,16), TNSZ("vpslld",VEX_RMrX,16), TNSZ("vpsllq",VEX_RMrX,16), +/* [F4] */ TNSZ("vpmuludq",VEX_RMrX,16), TNSZ("vpmaddwd",VEX_RMrX,16), TNSZ("vpsadbw",VEX_RMrX,16), TNS("vmaskmovdqu",VEX_MX), +/* [F8] */ TNSZ("vpsubb",VEX_RMrX,16), TNSZ("vpsubw",VEX_RMrX,16), TNSZ("vpsubd",VEX_RMrX,16), TNSZ("vpsubq",VEX_RMrX,16), +/* [FC] */ TNSZ("vpaddb",VEX_RMrX,16), TNSZ("vpaddw",VEX_RMrX,16), TNSZ("vpaddd",VEX_RMrX,16), INVALID, +}; + /* * Decode table for SIMD instructions with the repnz (0xf2) prefix. */ @@ -645,32 +773,538 @@ const instable_t dis_opSIMDrepnz[256] = /* [18] */ INVALID, INVALID, INVALID, INVALID, /* [1C] */ INVALID, INVALID, INVALID, INVALID, -/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, TNSZ("cvtsi2sd",XMM3MX,4),TNSZ("movntsd",XMMMS,8), +/* [2C] */ TNSZ("cvttsd2si",XMMXM3,8),TNSZ("cvtsd2si",XMMXM3,8),INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, TNSZ("sqrtsd",XMM,8), INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ TNSZ("addsd",XMM,8), TNSZ("mulsd",XMM,8), TNSZ("cvtsd2ss",XMM,8), INVALID, +/* [5C] */ TNSZ("subsd",XMM,8), TNSZ("minsd",XMM,8), TNSZ("divsd",XMM,8), TNSZ("maxsd",XMM,8), + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ TNSZ("pshuflw",XMMP,16),INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ TNSZ("insertq",XMMX2I,16),TNSZ("insertq",XMM,8),INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, TNSZ("cmpsd",XMMP,8), INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, TNS("movdq2q",XMMXM), INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, TNSZ("cvtpd2dq",XMM,16),INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_opAVXF20F[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ TNSZ("vmovsd",VEX_RMrX,8), TNSZ("vmovsd",VEX_RRX,8), TNSZ("vmovddup",VEX_MX,8), INVALID, +/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, TNSZ("vcvtsi2sd",VEX_RMrX,4),INVALID, +/* [2C] */ TNSZ("vcvttsd2si",VEX_MR,8),TNSZ("vcvtsd2si",VEX_MR,8),INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, TNSZ("vsqrtsd",VEX_RMrX,8), INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ TNSZ("vaddsd",VEX_RMrX,8), TNSZ("vmulsd",VEX_RMrX,8), TNSZ("vcvtsd2ss",VEX_RMrX,8), INVALID, +/* [5C] */ TNSZ("vsubsd",VEX_RMrX,8), TNSZ("vminsd",VEX_RMrX,8), TNSZ("vdivsd",VEX_RMrX,8), TNSZ("vmaxsd",VEX_RMrX,8), + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ TNSZ("vpshuflw",VEX_MXI,16),INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ TNSZ("vhaddps",VEX_RMrX,8), TNSZ("vhsubps",VEX_RMrX,8), INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, TNSZ("vcmpsd",VEX_RMRX,8), INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ TNSZ("vaddsubps",VEX_RMrX,8), INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, TNSZ("vcvtpd2dq",VEX_MX,16),INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ TNSZ("vlddqu",VEX_MX,16), INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +/* + * Decode table for SIMD instructions with the repz (0xf3) prefix. + */ +const instable_t dis_opSIMDrepz[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ TNSZ("movss",XMM,4), TNSZ("movss",XMMS,4), INVALID, INVALID, +/* [14] */ INVALID, INVALID, INVALID, INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, TNSZ("cvtsi2ss",XMM3MX,4),TNSZ("movntss",XMMMS,4), +/* [2C] */ TNSZ("cvttss2si",XMMXM3,4),TNSZ("cvtss2si",XMMXM3,4),INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, TNSZ("sqrtss",XMM,4), TNSZ("rsqrtss",XMM,4), TNSZ("rcpss",XMM,4), +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ TNSZ("addss",XMM,4), TNSZ("mulss",XMM,4), TNSZ("cvtss2sd",XMM,4), TNSZ("cvttps2dq",XMM,16), +/* [5C] */ TNSZ("subss",XMM,4), TNSZ("minss",XMM,4), TNSZ("divss",XMM,4), TNSZ("maxss",XMM,4), + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, TNSZ("movdqu",XMM,16), + +/* [70] */ TNSZ("pshufhw",XMMP,16),INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, TNSZ("movq",XMM,8), TNSZ("movdqu",XMMS,16), + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ TS("popcnt",MRw), INVALID, INVALID, INVALID, +/* [BC] */ INVALID, TS("lzcnt",MRw), INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, TNSZ("cmpss",XMMP,4), INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, TNS("movq2dq",XMMMX), INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, TNSZ("cvtdq2pd",XMM,8), INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_opAVXF30F[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ TNSZ("vmovss",VEX_RMrX,4), TNSZ("vmovss",VEX_RRX,4), TNSZ("vmovsldup",VEX_MX,4), INVALID, +/* [14] */ INVALID, INVALID, TNSZ("vmovshdup",VEX_MX,4), INVALID, +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [24] */ INVALID, INVALID, INVALID, INVALID, +/* [28] */ INVALID, INVALID, TNSZ("vcvtsi2ss",VEX_RMrX,4),INVALID, +/* [2C] */ TNSZ("vcvttss2si",VEX_MR,4),TNSZ("vcvtss2si",VEX_MR,4),INVALID, INVALID, + +/* [30] */ INVALID, INVALID, INVALID, INVALID, +/* [34] */ INVALID, INVALID, INVALID, INVALID, +/* [38] */ INVALID, INVALID, INVALID, INVALID, +/* [3C] */ INVALID, INVALID, INVALID, INVALID, + +/* [40] */ INVALID, INVALID, INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, TNSZ("vsqrtss",VEX_RMrX,4), TNSZ("vrsqrtss",VEX_RMrX,4), TNSZ("vrcpss",VEX_RMrX,4), +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ TNSZ("vaddss",VEX_RMrX,4), TNSZ("vmulss",VEX_RMrX,4), TNSZ("vcvtss2sd",VEX_RMrX,4), TNSZ("vcvttps2dq",VEX_MX,16), +/* [5C] */ TNSZ("vsubss",VEX_RMrX,4), TNSZ("vminss",VEX_RMrX,4), TNSZ("vdivss",VEX_RMrX,4), TNSZ("vmaxss",VEX_RMrX,4), + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, TNSZ("vmovdqu",VEX_MX,16), + +/* [70] */ TNSZ("vpshufhw",VEX_MXI,16),INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, TNSZ("vmovq",VEX_MX,8), TNSZ("vmovdqu",VEX_RX,16), + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, TNSZ("vcmpss",VEX_RMRX,4), INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, INVALID, + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, TNSZ("vcvtdq2pd",VEX_MX,8), INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, + +/* [F0] */ INVALID, INVALID, INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; +/* + * The following two tables are used to encode crc32 and movbe + * since they share the same opcodes. + */ +const instable_t dis_op0F38F0[2] = { +/* [00] */ TNS("crc32b",CRC32), + TS("movbe",MOVBE), +}; + +const instable_t dis_op0F38F1[2] = { +/* [00] */ TS("crc32",CRC32), + TS("movbe",MOVBE), +}; + +const instable_t dis_op0F38[256] = { +/* [00] */ TNSZ("pshufb",XMM_66o,16),TNSZ("phaddw",XMM_66o,16),TNSZ("phaddd",XMM_66o,16),TNSZ("phaddsw",XMM_66o,16), +/* [04] */ TNSZ("pmaddubsw",XMM_66o,16),TNSZ("phsubw",XMM_66o,16), TNSZ("phsubd",XMM_66o,16),TNSZ("phsubsw",XMM_66o,16), +/* [08] */ TNSZ("psignb",XMM_66o,16),TNSZ("psignw",XMM_66o,16),TNSZ("psignd",XMM_66o,16),TNSZ("pmulhrsw",XMM_66o,16), +/* [0C] */ INVALID, INVALID, INVALID, INVALID, + +/* [10] */ TNSZ("pblendvb",XMM_66r,16),INVALID, INVALID, INVALID, +/* [14] */ TNSZ("blendvps",XMM_66r,16),TNSZ("blendvpd",XMM_66r,16),INVALID, TNSZ("ptest",XMM_66r,16), +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ TNSZ("pabsb",XMM_66o,16),TNSZ("pabsw",XMM_66o,16),TNSZ("pabsd",XMM_66o,16),INVALID, + +/* [20] */ TNSZ("pmovsxbw",XMM_66r,16),TNSZ("pmovsxbd",XMM_66r,16),TNSZ("pmovsxbq",XMM_66r,16),TNSZ("pmovsxwd",XMM_66r,16), +/* [24] */ TNSZ("pmovsxwq",XMM_66r,16),TNSZ("pmovsxdq",XMM_66r,16),INVALID, INVALID, +/* [28] */ TNSZ("pmuldq",XMM_66r,16),TNSZ("pcmpeqq",XMM_66r,16),TNSZ("movntdqa",XMMM_66r,16),TNSZ("packusdw",XMM_66r,16), +/* [2C] */ INVALID, INVALID, INVALID, INVALID, + +/* [30] */ TNSZ("pmovzxbw",XMM_66r,16),TNSZ("pmovzxbd",XMM_66r,16),TNSZ("pmovzxbq",XMM_66r,16),TNSZ("pmovzxwd",XMM_66r,16), +/* [34] */ TNSZ("pmovzxwq",XMM_66r,16),TNSZ("pmovzxdq",XMM_66r,16),INVALID, TNSZ("pcmpgtq",XMM_66r,16), +/* [38] */ TNSZ("pminsb",XMM_66r,16),TNSZ("pminsd",XMM_66r,16),TNSZ("pminuw",XMM_66r,16),TNSZ("pminud",XMM_66r,16), +/* [3C] */ TNSZ("pmaxsb",XMM_66r,16),TNSZ("pmaxsd",XMM_66r,16),TNSZ("pmaxuw",XMM_66r,16),TNSZ("pmaxud",XMM_66r,16), + +/* [40] */ TNSZ("pmulld",XMM_66r,16),TNSZ("phminposuw",XMM_66r,16),INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, INVALID, INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ INVALID, INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, INVALID, INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, TNSZ("aesimc",XMM_66r,16), +/* [DC] */ TNSZ("aesenc",XMM_66r,16),TNSZ("aesenclast",XMM_66r,16),TNSZ("aesdec",XMM_66r,16),TNSZ("aesdeclast",XMM_66r,16), + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, +/* [F0] */ IND(dis_op0F38F0), IND(dis_op0F38F1), INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_opAVX660F38[256] = { +/* [00] */ TNSZ("vpshufb",VEX_RMrX,16),TNSZ("vphaddw",VEX_RMrX,16),TNSZ("vphaddd",VEX_RMrX,16),TNSZ("vphaddsw",VEX_RMrX,16), +/* [04] */ TNSZ("vpmaddubsw",VEX_RMrX,16),TNSZ("vphsubw",VEX_RMrX,16), TNSZ("vphsubd",VEX_RMrX,16),TNSZ("vphsubsw",VEX_RMrX,16), +/* [08] */ TNSZ("vpsignb",VEX_RMrX,16),TNSZ("vpsignw",VEX_RMrX,16),TNSZ("vpsignd",VEX_RMrX,16),TNSZ("vpmulhrsw",VEX_RMrX,16), +/* [0C] */ TNSZ("vpermilps",VEX_RMrX,8),TNSZ("vpermilpd",VEX_RMrX,16),TNSZ("vtestps",VEX_RRI,8), TNSZ("vtestpd",VEX_RRI,16), + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ INVALID, INVALID, INVALID, TNSZ("vptest",VEX_RRI,16), +/* [18] */ TNSZ("vbroadcastss",VEX_MX,4),TNSZ("vbroadcastsd",VEX_MX,8),TNSZ("vbroadcastf128",VEX_MX,16),INVALID, +/* [1C] */ TNSZ("vpabsb",VEX_MX,16),TNSZ("vpabsw",VEX_MX,16),TNSZ("vpabsd",VEX_MX,16),INVALID, + +/* [20] */ TNSZ("vpmovsxbw",VEX_MX,16),TNSZ("vpmovsxbd",VEX_MX,16),TNSZ("vpmovsxbq",VEX_MX,16),TNSZ("vpmovsxwd",VEX_MX,16), +/* [24] */ TNSZ("vpmovsxwq",VEX_MX,16),TNSZ("vpmovsxdq",VEX_MX,16),INVALID, INVALID, +/* [28] */ TNSZ("vpmuldq",VEX_RMrX,16),TNSZ("vpcmpeqq",VEX_RMrX,16),TNSZ("vmovntdqa",VEX_MX,16),TNSZ("vpackusdw",VEX_RMrX,16), +/* [2C] */ TNSZ("vmaskmovps",VEX_RMrX,8),TNSZ("vmaskmovpd",VEX_RMrX,16),TNSZ("vmaskmovps",VEX_RRM,8),TNSZ("vmaskmovpd",VEX_RRM,16), + +/* [30] */ TNSZ("vpmovzxbw",VEX_MX,16),TNSZ("vpmovzxbd",VEX_MX,16),TNSZ("vpmovzxbq",VEX_MX,16),TNSZ("vpmovzxwd",VEX_MX,16), +/* [34] */ TNSZ("vpmovzxwq",VEX_MX,16),TNSZ("vpmovzxdq",VEX_MX,16),INVALID, TNSZ("vpcmpgtq",VEX_RMrX,16), +/* [38] */ TNSZ("vpminsb",VEX_RMrX,16),TNSZ("vpminsd",VEX_RMrX,16),TNSZ("vpminuw",VEX_RMrX,16),TNSZ("vpminud",VEX_RMrX,16), +/* [3C] */ TNSZ("vpmaxsb",VEX_RMrX,16),TNSZ("vpmaxsd",VEX_RMrX,16),TNSZ("vpmaxuw",VEX_RMrX,16),TNSZ("vpmaxud",VEX_RMrX,16), + +/* [40] */ TNSZ("vpmulld",VEX_RMrX,16),TNSZ("vphminposuw",VEX_MX,16),INVALID, INVALID, +/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, INVALID, INVALID, +/* [4C] */ INVALID, INVALID, INVALID, INVALID, + +/* [50] */ INVALID, INVALID, INVALID, INVALID, +/* [54] */ INVALID, INVALID, INVALID, INVALID, +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, + +/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [64] */ INVALID, INVALID, INVALID, INVALID, +/* [68] */ INVALID, INVALID, INVALID, INVALID, +/* [6C] */ INVALID, INVALID, INVALID, INVALID, + +/* [70] */ INVALID, INVALID, INVALID, INVALID, +/* [74] */ INVALID, INVALID, INVALID, INVALID, +/* [78] */ INVALID, INVALID, INVALID, INVALID, +/* [7C] */ INVALID, INVALID, INVALID, INVALID, + +/* [80] */ INVALID, INVALID, INVALID, INVALID, +/* [84] */ INVALID, INVALID, INVALID, INVALID, +/* [88] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ INVALID, INVALID, INVALID, INVALID, + +/* [90] */ INVALID, INVALID, INVALID, INVALID, +/* [94] */ INVALID, INVALID, INVALID, INVALID, +/* [98] */ INVALID, INVALID, INVALID, INVALID, +/* [9C] */ INVALID, INVALID, INVALID, INVALID, + +/* [A0] */ INVALID, INVALID, INVALID, INVALID, +/* [A4] */ INVALID, INVALID, INVALID, INVALID, +/* [A8] */ INVALID, INVALID, INVALID, INVALID, +/* [AC] */ INVALID, INVALID, INVALID, INVALID, + +/* [B0] */ INVALID, INVALID, INVALID, INVALID, +/* [B4] */ INVALID, INVALID, INVALID, INVALID, +/* [B8] */ INVALID, INVALID, INVALID, INVALID, +/* [BC] */ INVALID, INVALID, INVALID, INVALID, + +/* [C0] */ INVALID, INVALID, INVALID, INVALID, +/* [C4] */ INVALID, INVALID, INVALID, INVALID, +/* [C8] */ INVALID, INVALID, INVALID, INVALID, +/* [CC] */ INVALID, INVALID, INVALID, INVALID, + +/* [D0] */ INVALID, INVALID, INVALID, INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, +/* [D8] */ INVALID, INVALID, INVALID, TNSZ("vaesimc",VEX_MX,16), +/* [DC] */ TNSZ("vaesenc",VEX_RMrX,16),TNSZ("vaesenclast",VEX_RMrX,16),TNSZ("vaesdec",VEX_RMrX,16),TNSZ("vaesdeclast",VEX_RMrX,16), + +/* [E0] */ INVALID, INVALID, INVALID, INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, +/* [E8] */ INVALID, INVALID, INVALID, INVALID, +/* [EC] */ INVALID, INVALID, INVALID, INVALID, +/* [F0] */ IND(dis_op0F38F0), IND(dis_op0F38F1), INVALID, INVALID, +/* [F4] */ INVALID, INVALID, INVALID, INVALID, +/* [F8] */ INVALID, INVALID, INVALID, INVALID, +/* [FC] */ INVALID, INVALID, INVALID, INVALID, +}; + +const instable_t dis_op0F3A[256] = { +/* [00] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ INVALID, INVALID, INVALID, INVALID, +/* [08] */ TNSZ("roundps",XMMP_66r,16),TNSZ("roundpd",XMMP_66r,16),TNSZ("roundss",XMMP_66r,16),TNSZ("roundsd",XMMP_66r,16), +/* [0C] */ TNSZ("blendps",XMMP_66r,16),TNSZ("blendpd",XMMP_66r,16),TNSZ("pblendw",XMMP_66r,16),TNSZ("palignr",XMMP_66o,16), + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ TNSZ("pextrb",XMM3PM_66r,8),TNSZ("pextrw",XMM3PM_66r,16),TSZ("pextr",XMM3PM_66r,16),TNSZ("extractps",XMM3PM_66r,16), +/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [1C] */ INVALID, INVALID, INVALID, INVALID, + +/* [20] */ TNSZ("pinsrb",XMMPRM_66r,8),TNSZ("insertps",XMMP_66r,16),TSZ("pinsr",XMMPRM_66r,16),INVALID, /* [24] */ INVALID, INVALID, INVALID, INVALID, -/* [28] */ INVALID, INVALID, TNSZ("cvtsi2sd",XMM3MX,4),INVALID, -/* [2C] */ TNSZ("cvttsd2si",XMMXM3,8),TNSZ("cvtsd2si",XMMXM3,8),INVALID, INVALID, +/* [28] */ INVALID, INVALID, INVALID, INVALID, +/* [2C] */ INVALID, INVALID, INVALID, INVALID, /* [30] */ INVALID, INVALID, INVALID, INVALID, /* [34] */ INVALID, INVALID, INVALID, INVALID, /* [38] */ INVALID, INVALID, INVALID, INVALID, /* [3C] */ INVALID, INVALID, INVALID, INVALID, -/* [40] */ INVALID, INVALID, INVALID, INVALID, -/* [44] */ INVALID, INVALID, INVALID, INVALID, +/* [40] */ TNSZ("dpps",XMMP_66r,16),TNSZ("dppd",XMMP_66r,16),TNSZ("mpsadbw",XMMP_66r,16),INVALID, +/* [44] */ TNSZ("pclmulqdq",XMMP_66r,16),INVALID, INVALID, INVALID, /* [48] */ INVALID, INVALID, INVALID, INVALID, /* [4C] */ INVALID, INVALID, INVALID, INVALID, -/* [50] */ INVALID, TNSZ("sqrtsd",XMM,8), INVALID, INVALID, +/* [50] */ INVALID, INVALID, INVALID, INVALID, /* [54] */ INVALID, INVALID, INVALID, INVALID, -/* [58] */ TNSZ("addsd",XMM,8), TNSZ("mulsd",XMM,8), TNSZ("cvtsd2ss",XMM,8), INVALID, -/* [5C] */ TNSZ("subsd",XMM,8), TNSZ("minsd",XMM,8), TNSZ("divsd",XMM,8), TNSZ("maxsd",XMM,8), +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, -/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [60] */ TNSZ("pcmpestrm",XMMP_66r,16),TNSZ("pcmpestri",XMMP_66r,16),TNSZ("pcmpistrm",XMMP_66r,16),TNSZ("pcmpistri",XMMP_66r,16), /* [64] */ INVALID, INVALID, INVALID, INVALID, /* [68] */ INVALID, INVALID, INVALID, INVALID, /* [6C] */ INVALID, INVALID, INVALID, INVALID, -/* [70] */ TNSZ("pshuflw",XMMP,16),INVALID, INVALID, INVALID, +/* [70] */ INVALID, INVALID, INVALID, INVALID, /* [74] */ INVALID, INVALID, INVALID, INVALID, /* [78] */ INVALID, INVALID, INVALID, INVALID, /* [7C] */ INVALID, INVALID, INVALID, INVALID, @@ -678,7 +1312,7 @@ const instable_t dis_opSIMDrepnz[256] = /* [80] */ INVALID, INVALID, INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, /* [88] */ INVALID, INVALID, INVALID, INVALID, -/* [0C] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ INVALID, INVALID, INVALID, INVALID, /* [90] */ INVALID, INVALID, INVALID, INVALID, /* [94] */ INVALID, INVALID, INVALID, INVALID, @@ -695,18 +1329,18 @@ const instable_t dis_opSIMDrepnz[256] = /* [B8] */ INVALID, INVALID, INVALID, INVALID, /* [BC] */ INVALID, INVALID, INVALID, INVALID, -/* [C0] */ INVALID, INVALID, TNSZ("cmpsd",XMMP,8), INVALID, +/* [C0] */ INVALID, INVALID, INVALID, INVALID, /* [C4] */ INVALID, INVALID, INVALID, INVALID, /* [C8] */ INVALID, INVALID, INVALID, INVALID, /* [CC] */ INVALID, INVALID, INVALID, INVALID, /* [D0] */ INVALID, INVALID, INVALID, INVALID, -/* [D4] */ INVALID, INVALID, TNS("movdq2q",XMMXM), INVALID, +/* [D4] */ INVALID, INVALID, INVALID, INVALID, /* [D8] */ INVALID, INVALID, INVALID, INVALID, -/* [DC] */ INVALID, INVALID, INVALID, INVALID, +/* [DC] */ INVALID, INVALID, INVALID, TNSZ("aeskeygenassist",XMMP_66r,16), /* [E0] */ INVALID, INVALID, INVALID, INVALID, -/* [E4] */ INVALID, INVALID, TNSZ("cvtpd2dq",XMM,16),INVALID, +/* [E4] */ INVALID, INVALID, INVALID, INVALID, /* [E8] */ INVALID, INVALID, INVALID, INVALID, /* [EC] */ INVALID, INVALID, INVALID, INVALID, @@ -716,54 +1350,51 @@ const instable_t dis_opSIMDrepnz[256] = /* [FC] */ INVALID, INVALID, INVALID, INVALID, }; -/* - * Decode table for SIMD instructions with the repz (0xf3) prefix. - */ -const instable_t dis_opSIMDrepz[256] = { +const instable_t dis_opAVX660F3A[256] = { /* [00] */ INVALID, INVALID, INVALID, INVALID, -/* [04] */ INVALID, INVALID, INVALID, INVALID, -/* [08] */ INVALID, INVALID, INVALID, INVALID, -/* [0C] */ INVALID, INVALID, INVALID, INVALID, - -/* [10] */ TNSZ("movss",XMM,4), TNSZ("movss",XMMS,4), INVALID, INVALID, -/* [14] */ INVALID, INVALID, INVALID, INVALID, -/* [18] */ INVALID, INVALID, INVALID, INVALID, +/* [04] */ TNSZ("vpermilps",VEX_MXI,8),TNSZ("vpermilpd",VEX_MXI,16),TNSZ("vperm2f128",VEX_RMRX,16),INVALID, +/* [08] */ TNSZ("vroundps",VEX_MXI,16),TNSZ("vroundpd",VEX_MXI,16),TNSZ("vroundss",VEX_RMRX,16),TNSZ("vroundsd",VEX_RMRX,16), +/* [0C] */ TNSZ("vblendps",VEX_RMRX,16),TNSZ("vblendpd",VEX_RMRX,16),TNSZ("vpblendw",VEX_RMRX,16),TNSZ("vpalignr",VEX_RMRX,16), + +/* [10] */ INVALID, INVALID, INVALID, INVALID, +/* [14] */ TNSZ("vpextrb",VEX_RRi,8),TNSZ("vpextrw",VEX_RRi,16),TNSZ("vpextrd",VEX_RRi,16),TNSZ("vextractps",VEX_RM,16), +/* [18] */ TNSZ("vinsertf128",VEX_RMRX,16),TNSZ("vextractf128",VEX_RX,16),INVALID, INVALID, /* [1C] */ INVALID, INVALID, INVALID, INVALID, -/* [20] */ INVALID, INVALID, INVALID, INVALID, +/* [20] */ TNSZ("vpinsrb",VEX_RMRX,8),TNSZ("vinsertps",VEX_RMRX,16),TNSZ("vpinsrd",VEX_RMRX,16),INVALID, /* [24] */ INVALID, INVALID, INVALID, INVALID, -/* [28] */ INVALID, INVALID, TNSZ("cvtsi2ss",XMM3MX,4),INVALID, -/* [2C] */ TNSZ("cvttss2si",XMMXM3,4),TNSZ("cvtss2si",XMMXM3,4),INVALID, INVALID, +/* [28] */ INVALID, INVALID, INVALID, INVALID, +/* [2C] */ INVALID, INVALID, INVALID, INVALID, /* [30] */ INVALID, INVALID, INVALID, INVALID, /* [34] */ INVALID, INVALID, INVALID, INVALID, /* [38] */ INVALID, INVALID, INVALID, INVALID, /* [3C] */ INVALID, INVALID, INVALID, INVALID, -/* [40] */ INVALID, INVALID, INVALID, INVALID, -/* [44] */ INVALID, INVALID, INVALID, INVALID, -/* [48] */ INVALID, INVALID, INVALID, INVALID, -/* [4C] */ INVALID, INVALID, INVALID, INVALID, +/* [40] */ TNSZ("vdpps",VEX_RMRX,16),TNSZ("vdppd",VEX_RMRX,16),TNSZ("vmpsadbw",VEX_RMRX,16),INVALID, +/* [44] */ TNSZ("vpclmulqdq",VEX_RMRX,16),INVALID, INVALID, INVALID, +/* [48] */ INVALID, INVALID, TNSZ("vblendvps",VEX_RMRX,8), TNSZ("vblendvpd",VEX_RMRX,16), +/* [4C] */ TNSZ("vpblendvb",VEX_RMRX,16),INVALID, INVALID, INVALID, -/* [50] */ INVALID, TNSZ("sqrtss",XMM,4), TNSZ("rsqrtss",XMM,4), TNSZ("rcpss",XMM,4), +/* [50] */ INVALID, INVALID, INVALID, INVALID, /* [54] */ INVALID, INVALID, INVALID, INVALID, -/* [58] */ TNSZ("addss",XMM,4), TNSZ("mulss",XMM,4), TNSZ("cvtss2sd",XMM,4), TNSZ("cvttps2dq",XMM,16), -/* [5C] */ TNSZ("subss",XMM,4), TNSZ("minss",XMM,4), TNSZ("divss",XMM,4), TNSZ("maxss",XMM,4), +/* [58] */ INVALID, INVALID, INVALID, INVALID, +/* [5C] */ INVALID, INVALID, INVALID, INVALID, -/* [60] */ INVALID, INVALID, INVALID, INVALID, +/* [60] */ TNSZ("vpcmpestrm",VEX_MXI,16),TNSZ("vpcmpestri",VEX_MXI,16),TNSZ("vpcmpistrm",VEX_MXI,16),TNSZ("vpcmpistri",VEX_MXI,16), /* [64] */ INVALID, INVALID, INVALID, INVALID, /* [68] */ INVALID, INVALID, INVALID, INVALID, -/* [6C] */ INVALID, INVALID, INVALID, TNSZ("movdqu",XMM,16), +/* [6C] */ INVALID, INVALID, INVALID, INVALID, -/* [70] */ TNSZ("pshufhw",XMMP,16),INVALID, INVALID, INVALID, +/* [70] */ INVALID, INVALID, INVALID, INVALID, /* [74] */ INVALID, INVALID, INVALID, INVALID, /* [78] */ INVALID, INVALID, INVALID, INVALID, -/* [7C] */ INVALID, INVALID, TNSZ("movq",XMM,8), TNSZ("movdqu",XMMS,16), +/* [7C] */ INVALID, INVALID, INVALID, INVALID, /* [80] */ INVALID, INVALID, INVALID, INVALID, /* [84] */ INVALID, INVALID, INVALID, INVALID, /* [88] */ INVALID, INVALID, INVALID, INVALID, -/* [0C] */ INVALID, INVALID, INVALID, INVALID, +/* [8C] */ INVALID, INVALID, INVALID, INVALID, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 17:03:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD9DAB57; Mon, 29 Jul 2013 17:03:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBC6622C8; Mon, 29 Jul 2013 17:03:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TH3gpM059319; Mon, 29 Jul 2013 17:03:42 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TH3g6m059318; Mon, 29 Jul 2013 17:03:42 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201307291703.r6TH3g6m059318@svn.freebsd.org> From: Andriy Gapon Date: Mon, 29 Jul 2013 17:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253773 - head/sys/modules/dtrace/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 17:03:42 -0000 Author: avg Date: Mon Jul 29 17:03:42 2013 New Revision: 253773 URL: http://svnweb.freebsd.org/changeset/base/253773 Log: [fixup] add Makefile changes that should have been committed in r253772 MFC after: 3 weeks X-MFC with: r253772 Modified: head/sys/modules/dtrace/dtrace/Makefile Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Mon Jul 29 16:56:38 2013 (r253772) +++ head/sys/modules/dtrace/dtrace/Makefile Mon Jul 29 17:03:42 2013 (r253773) @@ -49,3 +49,6 @@ EXPORT_SYMS= dtrace_register \ dtrace_asm.o: assym.s .include + +CWARNFLAGS+= -Wno-parentheses +CWARNFLAGS+= -Wno-uninitialized From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 18:44:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 452A3D80; Mon, 29 Jul 2013 18:44:53 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 237CC2820; Mon, 29 Jul 2013 18:44:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TIiqnt088998; Mon, 29 Jul 2013 18:44:52 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TIiqDU088997; Mon, 29 Jul 2013 18:44:52 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201307291844.r6TIiqDU088997@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Jul 2013 18:44:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253774 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 18:44:53 -0000 Author: jhb Date: Mon Jul 29 18:44:52 2013 New Revision: 253774 URL: http://svnweb.freebsd.org/changeset/base/253774 Log: Various fixes to the mlxen(4) driver: - Remove an incorrect assertion that can trigger when downing an interface. - Stop the interface during detach to avoid panics when unloading the driver. - A few locking fixes to be more consistent with other FreeBSD drivers: - Protect if_drv_flags with the driver lock, not atomic ops - Hold the driver lock when adjusting multicast state. - Hold the driver lock while adjusting if_capenable. PR: kern/180791 [1,2] Submitted by: Shakar Klein @ Mellanox [1,2] MFC after: 3 days Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Jul 29 17:03:42 2013 (r253773) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Jul 29 18:44:52 2013 (r253774) @@ -495,11 +495,6 @@ static void mlx4_en_do_get_stats(struct queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY); } - if (mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port]) { - panic("mlx4_en_do_get_stats: Unexpected mac removed for %d\n", - priv->port); - mdev->mac_removed[MLX4_MAX_PORTS + 1 - priv->port] = 0; - } mutex_unlock(&mdev->state_lock); } @@ -688,8 +683,8 @@ int mlx4_en_start_port(struct net_device mlx4_en_set_multicast(dev); /* Enable the queues. */ - atomic_clear_int(&dev->if_drv_flags, IFF_DRV_OACTIVE); - atomic_set_int(&dev->if_drv_flags, IFF_DRV_RUNNING); + dev->if_drv_flags &= ~IFF_DRV_OACTIVE; + dev->if_drv_flags |= IFF_DRV_RUNNING; callout_reset(&priv->watchdog_timer, MLX4_EN_WATCHDOG_TIMEOUT, mlx4_en_watchdog_timeout, priv); @@ -761,7 +756,7 @@ void mlx4_en_stop_port(struct net_device callout_stop(&priv->watchdog_timer); - atomic_clear_int(&dev->if_drv_flags, IFF_DRV_RUNNING); + dev->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE); } static void mlx4_en_restart(struct work_struct *work) @@ -802,19 +797,30 @@ mlx4_en_init(void *arg) { struct mlx4_en_priv *priv; struct mlx4_en_dev *mdev; + + priv = arg; + mdev = priv->mdev; + mutex_lock(&mdev->state_lock); + mlx4_en_init_locked(priv); + mutex_unlock(&mdev->state_lock); +} + +static void +mlx4_en_init_locked(struct mlx4_en_priv *priv) +{ + + struct mlx4_en_dev *mdev; struct ifnet *dev; int i; - priv = arg; dev = priv->dev; mdev = priv->mdev; - mutex_lock(&mdev->state_lock); if (dev->if_drv_flags & IFF_DRV_RUNNING) mlx4_en_stop_port(dev); if (!mdev->device_up) { en_err(priv, "Cannot open - device down/disabled\n"); - goto out; + return; } /* Reset HW statistics and performance counters */ @@ -835,9 +841,6 @@ mlx4_en_init(void *arg) mlx4_en_set_default_moderation(priv); if (mlx4_en_start_port(dev)) en_err(priv, "Failed starting port:%d\n", priv->port); - -out: - mutex_unlock(&mdev->state_lock); } void mlx4_en_free_resources(struct mlx4_en_priv *priv) @@ -927,9 +930,14 @@ void mlx4_en_destroy_netdev(struct net_d if (priv->sysctl) sysctl_ctx_free(&priv->conf_ctx); + mutex_lock(&mdev->state_lock); + mlx4_en_stop_port(dev); + mutex_unlock(&mdev->state_lock); + cancel_delayed_work(&priv->stats_task); /* flush any pending task for this netdev */ flush_workqueue(mdev->workqueue); + callout_drain(&priv->watchdog_timer); /* Detach the netdev so tasks would not attempt to access it */ mutex_lock(&mdev->state_lock); @@ -1091,31 +1099,32 @@ static int mlx4_en_ioctl(struct ifnet *d error = -mlx4_en_change_mtu(dev, ifr->ifr_mtu); break; case SIOCSIFFLAGS: + mutex_lock(&mdev->state_lock); if (dev->if_flags & IFF_UP) { - if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) { - mutex_lock(&mdev->state_lock); + if ((dev->if_drv_flags & IFF_DRV_RUNNING) == 0) mlx4_en_start_port(dev); - mutex_unlock(&mdev->state_lock); - } else + else mlx4_en_set_multicast(dev); } else { - mutex_lock(&mdev->state_lock); if (dev->if_drv_flags & IFF_DRV_RUNNING) { mlx4_en_stop_port(dev); if_link_state_change(dev, LINK_STATE_DOWN); } - mutex_unlock(&mdev->state_lock); } + mutex_unlock(&mdev->state_lock); break; case SIOCADDMULTI: case SIOCDELMULTI: + mutex_lock(&mdev->state_lock); mlx4_en_set_multicast(dev); + mutex_unlock(&mdev->state_lock); break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: error = ifmedia_ioctl(dev, ifr, &priv->media, command); break; case SIOCSIFCAP: + mutex_lock(&mdev->state_lock); mask = ifr->ifr_reqcap ^ dev->if_capenable; if (mask & IFCAP_HWCSUM) dev->if_capenable ^= IFCAP_HWCSUM; @@ -1130,7 +1139,8 @@ static int mlx4_en_ioctl(struct ifnet *d if (mask & IFCAP_WOL_MAGIC) dev->if_capenable ^= IFCAP_WOL_MAGIC; if (dev->if_drv_flags & IFF_DRV_RUNNING) - mlx4_en_init(priv); + mlx4_en_init_locked(priv); + mutex_unlock(&mdev->state_lock); VLAN_CAPABILITIES(dev); break; default: From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 18:48:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B757DFFE; Mon, 29 Jul 2013 18:48:51 +0000 (UTC) (envelope-from zont@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A55432855; Mon, 29 Jul 2013 18:48:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TImpOt089996; Mon, 29 Jul 2013 18:48:51 GMT (envelope-from zont@svn.freebsd.org) Received: (from zont@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TImpmO089995; Mon, 29 Jul 2013 18:48:51 GMT (envelope-from zont@svn.freebsd.org) Message-Id: <201307291848.r6TImpmO089995@svn.freebsd.org> From: Andrey Zonov Date: Mon, 29 Jul 2013 18:48:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253775 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 18:48:51 -0000 Author: zont Date: Mon Jul 29 18:48:51 2013 New Revision: 253775 URL: http://svnweb.freebsd.org/changeset/base/253775 Log: Unbreak sysctl ABI changes introduced in r253662 Requested by: bde Modified: head/sys/vm/vm_param.h Modified: head/sys/vm/vm_param.h ============================================================================== --- head/sys/vm/vm_param.h Mon Jul 29 18:44:52 2013 (r253774) +++ head/sys/vm/vm_param.h Mon Jul 29 18:48:51 2013 (r253775) @@ -82,8 +82,9 @@ #define VM_V_CACHE_MIN 7 /* cnt.v_cache_min */ #define VM_V_CACHE_MAX 8 /* cnt.v_cache_max */ #define VM_V_PAGEOUT_FREE_MIN 9 /* cnt.v_pageout_free_min */ -#define VM_SWAPPING_ENABLED 10 /* swapping enabled */ -#define VM_MAXID 11 /* number of valid vm ids */ +#define VM_OBSOLETE_10 10 /* pageout algorithm */ +#define VM_SWAPPING_ENABLED 11 /* swapping enabled */ +#define VM_MAXID 12 /* number of valid vm ids */ #define CTL_VM_NAMES { \ { 0, 0 }, \ @@ -96,6 +97,7 @@ { "v_cache_min", CTLTYPE_UINT }, \ { "v_cache_max", CTLTYPE_UINT }, \ { "v_pageout_free_min", CTLTYPE_UINT}, \ + { "obsolete_pageout_algorithm", CTLTYPE_INT}, \ { "swap_enabled", CTLTYPE_INT},\ } From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 19:14:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B909979; Mon, 29 Jul 2013 19:14:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6BC29E2; Mon, 29 Jul 2013 19:14:37 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A2CBBB948; Mon, 29 Jul 2013 15:14:35 -0400 (EDT) From: John Baldwin To: Sean Bruno Subject: Re: svn commit: r253708 - head/sys/dev/ipmi Date: Mon, 29 Jul 2013 10:54:55 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201307271632.r6RGWYF8046749@svn.freebsd.org> In-Reply-To: <201307271632.r6RGWYF8046749@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201307291054.55820.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 29 Jul 2013 15:14:35 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 19:14:37 -0000 On Saturday, July 27, 2013 12:32:34 pm Sean Bruno wrote: > Author: sbruno > Date: Sat Jul 27 16:32:34 2013 > New Revision: 253708 > URL: http://svnweb.freebsd.org/changeset/base/253708 > > Log: > At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller > no longer have the parent in the device tree. This causes the identify > function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface They never had a common parent, even in 6.x and 7.x. > Move the check for ipmi_attached out of the ipmi_isa_attach function and into > the ipmi_isa_identify function. Remove the check of the device tree for > ipmi devices attached. > > This probing appears to make Broadcom management firmware on Dell machines > crash and emit NMI EISA warnings at various times requiring power cycles > of the machines to restore. This makes no sense. All you are doing is skipping ipmi_smbios_identify() which just looks at the SMBIOS table in RAM. It doesn't try to probe the BMC at all (no register accesses, etc.). If just reading a table in memory causes side effects, then running dmidecode in userland should be hosing your machines as well. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 19:17:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 04FFBB8F; Mon, 29 Jul 2013 19:17:12 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CA61A2A06; Mon, 29 Jul 2013 19:17:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TJHBBo099127; Mon, 29 Jul 2013 19:17:11 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TJHBAl099126; Mon, 29 Jul 2013 19:17:11 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201307291917.r6TJHBAl099126@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 29 Jul 2013 19:17:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253776 - stable/9/sys/dev/cxgbe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 19:17:12 -0000 Author: np Date: Mon Jul 29 19:17:11 2013 New Revision: 253776 URL: http://svnweb.freebsd.org/changeset/base/253776 Log: MFC r253217,253699 r253217: Attach to the 4x10G T540-CR card. r253699: Expand the list of devices claimed by cxgbe(4). Approved by: re (kib) Modified: stable/9/sys/dev/cxgbe/t4_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 29 18:48:51 2013 (r253775) +++ stable/9/sys/dev/cxgbe/t4_main.c Mon Jul 29 19:17:11 2013 (r253776) @@ -447,26 +447,27 @@ struct { }, t5_pciids[] = { {0xb000, "Chelsio Terminator 5 FPGA"}, {0x5400, "Chelsio T580-dbg"}, - {0x5401, "Chelsio T520-CR"}, - {0x5407, "Chelsio T520-SO"}, - {0x5408, "Chelsio T520-CX"}, + {0x5401, "Chelsio T520-CR"}, /* 2 x 10G */ + {0x5402, "Chelsio T522-CR"}, /* 2 x 10G, 2 X 1G */ + {0x5403, "Chelsio T540-CR"}, /* 4 x 10G */ + {0x5407, "Chelsio T520-SO"}, /* 2 x 10G, nomem */ + {0x5409, "Chelsio T520-BT"}, /* 2 x 10GBaseT */ + {0x540a, "Chelsio T504-BT"}, /* 4 x 1G */ + {0x540d, "Chelsio T580-CR"}, /* 2 x 40G */ + {0x540e, "Chelsio T540-LP-CR"}, /* 4 x 10G */ {0x5410, "Chelsio T580-LP-CR"}, /* 2 x 40G */ - {0x5411, "Chelsio T520-LL-CR"}, + {0x5411, "Chelsio T520-LL-CR"}, /* 2 x 10G */ + {0x5412, "Chelsio T560-CR"}, /* 1 x 40G, 2 x 10G */ + {0x5414, "Chelsio T580-LP-SO-CR"}, /* 2 x 40G, nomem */ #ifdef notyet - {0x5402, "Chelsio T522-CR"}, - {0x5403, "Chelsio T540-CR"}, {0x5404, "Chelsio T520-BCH"}, {0x5405, "Chelsio T540-BCH"}, {0x5406, "Chelsio T540-CH"}, - {0x5409, "Chelsio T520-BT"}, - {0x540a, "Chelsio T504-BT"}, + {0x5408, "Chelsio T520-CX"}, {0x540b, "Chelsio B520-SR"}, {0x540c, "Chelsio B504-BT"}, - {0x540d, "Chelsio T580-CR"}, - {0x540e, "Chelsio T540-LP-CR"}, {0x540f, "Chelsio Amsterdam"}, - {0x5412, "Chelsio T560-CR"}, - {0x5413, "Chelsio T580-CR"}, + {0x5413, "Chelsio T580-CHR"}, #endif }; From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 19:21:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E031EC2; Mon, 29 Jul 2013 19:21:55 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5ABE42A65; Mon, 29 Jul 2013 19:21:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TJLtC5001700; Mon, 29 Jul 2013 19:21:55 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TJLtxB001699; Mon, 29 Jul 2013 19:21:55 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201307291921.r6TJLtxB001699@svn.freebsd.org> From: Navdeep Parhar Date: Mon, 29 Jul 2013 19:21:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253777 - stable/9/sys/dev/cxgbe/firmware X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 19:21:55 -0000 Author: np Date: Mon Jul 29 19:21:54 2013 New Revision: 253777 URL: http://svnweb.freebsd.org/changeset/base/253777 Log: MFC r253407: Specify a timeout for the PL block. Approved by: re (kib) Modified: stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt ============================================================================== --- stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Jul 29 19:17:11 2013 (r253776) +++ stable/9/sys/dev/cxgbe/firmware/t5fw_cfg.txt Mon Jul 29 19:21:54 2013 (r253777) @@ -12,6 +12,9 @@ rss_glb_config_mode = basicvirtual rss_glb_config_options = tnlmapen, hashtoeplitz, tnlalllkp + # PL_TIMEOUT register + pl_timeout_value = 200 # the timeout value in units of us + sge_timer_value = 1, 5, 10, 50, 100, 200 # usecs # TP_SHIFT_CNT @@ -145,7 +148,7 @@ [fini] version = 0x1 - checksum = 0xb2417251 + checksum = 0x93f11b53 # # $FreeBSD$ # From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 19:50:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5095B8FC; Mon, 29 Jul 2013 19:50:31 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3EE202BFE; Mon, 29 Jul 2013 19:50:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TJoVZB010114; Mon, 29 Jul 2013 19:50:31 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TJoVFF010113; Mon, 29 Jul 2013 19:50:31 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307291950.r6TJoVFF010113@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 19:50:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r253778 - releng/8.3/sys/conf X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 19:50:31 -0000 Author: delphij Date: Mon Jul 29 19:50:30 2013 New Revision: 253778 URL: http://svnweb.freebsd.org/changeset/base/253778 Log: Bump patchlevel which was not bumped in r253694. Pointy hat to: delphij Approved by: so Modified: releng/8.3/sys/conf/newvers.sh Modified: releng/8.3/sys/conf/newvers.sh ============================================================================== --- releng/8.3/sys/conf/newvers.sh Mon Jul 29 19:21:54 2013 (r253777) +++ releng/8.3/sys/conf/newvers.sh Mon Jul 29 19:50:30 2013 (r253778) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.3" -BRANCH="RELEASE-p8" +BRANCH="RELEASE-p9" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 19:59:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05030BF9 for ; Mon, 29 Jul 2013 19:59:23 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm34-vm8.bullet.mail.bf1.yahoo.com (nm34-vm8.bullet.mail.bf1.yahoo.com [72.30.239.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 938812C7B for ; Mon, 29 Jul 2013 19:59:22 +0000 (UTC) Received: from [98.139.215.141] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 19:59:14 -0000 Received: from [98.139.211.197] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 19:59:14 -0000 Received: from [127.0.0.1] by smtp206.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 19:59:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1375127954; bh=Ei04UKTl5robTQH1c4uGq+lkVTq02I2FYjcxOTHacyw=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=mc2SSH4ZwHnvoJj+S+B4R8FhLqS4PXzfBZbslsX90lTOMbttvb8XLe9ZTqit33h8kz4H26KNNOFXK0IYPZu39habUhHyd7F8zWk3yd3r3rGyfrwYveVUTBASkdMsDIe1Ty+wtVOMOqfAzJzd2dOyu0XDHlV/MlwoAUfxXTTAbq0= X-Yahoo-Newman-Id: 289926.19393.bm@smtp206.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: IFwfFjUVM1n3J_ckwAWF2w6oDhazsUXNl7w7ZvlKX26HNzO QB_VPqOyGIKabh0YoM6cmwL3aL1hMMwGpK6B1vPIQYrwtJfHoUFJW9mLkZed rbjwm7XvdwrbUUe4rTFsBWrPGM6mhVWLJmlzDMoAUUW9E56s_wCsh7ThDvii 6RSd7bOnR7Ru8at99lLyzs1.JyDEQvcUz9TSaBAU_J390ZFINnknPDO5XaCL Wo88FzgGcFRUfHvGpWFqu8ozUoMyec4vWDGhiTAPr9yW.JVM5SZF9PPtQFdQ v8W2zlZ2x4Sb9p3CDDw3Nd5BkmsjNVdVCDkzXBRroY.RaMOKPXtwe8aIfZZL Yknez2svyh45zFknfYvseqK.bDQx.BpknT7L_nj6eR_kZLFov0BygkX0J4v8 ZQ4YNRIyM.JqNFbxooYCqKJa0kObWMjQ_beZ_WN7WG0kYlwmXy.ZmMDXMaec t3VgiNnSeiLzPV5sxkFeEdg6byw_IVuMNjLJeGDslFQ4KHjQpnA0arJGehOM Ogzs86YIImwr8fz4PTBTebKMfkSeruoc6za4E36OtgnjHOtHzERdzLXEI4jp QVIDy.ajFh0lh4RolxH5l3cun6o1pqR5KKksdaQivetQiHWSCIMg2q3Zx2Pl Dxt99rlQ- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp206.mail.bf1.yahoo.com with SMTP; 29 Jul 2013 12:59:14 -0700 PDT Subject: Re: svn commit: r253708 - head/sys/dev/ipmi From: Sean Bruno To: John Baldwin In-Reply-To: <201307291054.55820.jhb@freebsd.org> References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291054.55820.jhb@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-7uuXqBiFI4LiVSghNd9R" Date: Mon, 29 Jul 2013 12:59:12 -0700 Message-ID: <1375127952.1479.32.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, Sean Bruno , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 19:59:23 -0000 --=-7uuXqBiFI4LiVSghNd9R Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mon, 2013-07-29 at 10:54 -0400, John Baldwin wrote: > On Saturday, July 27, 2013 12:32:34 pm Sean Bruno wrote: > > Author: sbruno > > Date: Sat Jul 27 16:32:34 2013 > > New Revision: 253708 > > URL: http://svnweb.freebsd.org/changeset/base/253708 > >=20 > > Log: > > At some point after stable/7 the ACPI and ISA interfaces to the IPMI = controller > > no longer have the parent in the device tree. This causes the identi= fy > > function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI i= nterface >=20 > They never had a common parent, even in 6.x and 7.x. >=20 The identify function in isa_ipmi.c shows that there is already an ipmi(4) device attached (ACPI) version and aborts on 7.x. in 9.x and higher (not testing on 8.x) the identify function does not see an attached ipmi interface and attempts to create /dev/ipmi1 Am I just confused on the bus relationship here? We've gone over this a couple of times in different emails on different lists. I've just never sat down and walked through the code. If you see a better way to keep ipmi(4) from erroneously attaching to the ISA interface, let me know. > > Move the check for ipmi_attached out of the ipmi_isa_attach function = and into > > the ipmi_isa_identify function. Remove the check of the device tree = for > > ipmi devices attached. > > =20 > > This probing appears to make Broadcom management firmware on Dell mac= hines > > crash and emit NMI EISA warnings at various times requiring power cyc= les > > of the machines to restore. >=20 > This makes no sense. All you are doing is skipping ipmi_smbios_identify(= ) > which just looks at the SMBIOS table in RAM. It doesn't try to probe the > BMC at all (no register accesses, etc.). If just reading a table in memo= ry > causes side effects, then running dmidecode in userland should be hosing = your > machines as well. >=20 Probably right. I'm not exactly sure what is making the Broadcom firmware fall over and die. But when I see the console emitting "NMI EISA" error messages, this ususally requires a full reboot as the network interface has crashed. Hopefully, I can dig up more "fact" soon as testing continues. Sean --=-7uuXqBiFI4LiVSghNd9R Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJR9smMAAoJEBkJRdwI6BaHSqMH/164tPPSI0guiuAeB9W44gGj o7R6Ti9+EOP1SeDZW5wcMUFPg5VO1WvZ6oYh0e5vxp125ydr2MxkelXhx6lSpKli W9F289GSFhq7MV4I3+YCY3wJ+9yDLrqaba2e2DOw7PBdH4FYwzf8ICN+3JsTxTvV S8YGWWjM/qapZYXKLgBokdif96/HT7saj2NHAE0cl61I4WUTXxY2gSChwAEPMDcV ai+cHOPZAtkHjK1hzS6E6QkeyZi3rkEIxPD4M4x3aX11KEN+3VZqeo0/WM5Ognn1 B7sZsmvRBhPJVxXbKp0M9rzu0m0evmQ2l5v2n7uJjAHp5qd7bTWLiHjnYl0lamI= =Q9AM -----END PGP SIGNATURE----- --=-7uuXqBiFI4LiVSghNd9R-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:26:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 021C8FFE; Mon, 29 Jul 2013 20:26:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E045D2E6D; Mon, 29 Jul 2013 20:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKQY1U021800; Mon, 29 Jul 2013 20:26:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKQXig021785; Mon, 29 Jul 2013 20:26:33 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292026.r6TKQXig021785@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:26:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253780 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:26:35 -0000 Author: delphij Date: Mon Jul 29 20:26:33 2013 New Revision: 253780 URL: http://svnweb.freebsd.org/changeset/base/253780 Log: Update vendor-sys/illumos/dist to illumos-gate 14088:3ca4e9e72fe7: Illumos ZFS issues: 3875 panic in zfs_root() after failed rollback Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Mon Jul 29 20:26:33 2013 (r253780) @@ -517,6 +517,38 @@ dmu_objset_rele(objset_t *os, void *tag) dsl_pool_rele(dp, tag); } +/* + * When we are called, os MUST refer to an objset associated with a dataset + * that is owned by 'tag'; that is, is held and long held by 'tag' and ds_owner + * == tag. We will then release and reacquire ownership of the dataset while + * holding the pool config_rwlock to avoid intervening namespace or ownership + * changes may occur. + * + * This exists solely to accommodate zfs_ioc_userspace_upgrade()'s desire to + * release the hold on its dataset and acquire a new one on the dataset of the + * same name so that it can be partially torn down and reconstructed. + */ +void +dmu_objset_refresh_ownership(objset_t *os, void *tag) +{ + dsl_pool_t *dp; + dsl_dataset_t *ds, *newds; + char name[MAXNAMELEN]; + + ds = os->os_dsl_dataset; + VERIFY3P(ds, !=, NULL); + VERIFY3P(ds->ds_owner, ==, tag); + VERIFY(dsl_dataset_long_held(ds)); + + dsl_dataset_name(ds, name); + dp = dmu_objset_pool(os); + dsl_pool_config_enter(dp, FTAG); + dmu_objset_disown(os, tag); + VERIFY0(dsl_dataset_own(dp, name, tag, &newds)); + VERIFY3P(newds, ==, os->os_dsl_dataset); + dsl_pool_config_exit(dp, FTAG); +} + void dmu_objset_disown(objset_t *os, void *tag) { Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:33 2013 (r253780) @@ -1547,7 +1547,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * if (error != 0) return (error); error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, - origin_head, drc->drc_force); + origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { dsl_dataset_rele(origin_head, FTAG); return (error); @@ -1599,6 +1599,9 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); + + if (drc->drc_owner != NULL) + VERIFY3P(origin_head->ds_owner, ==, drc->drc_owner); } else { dsl_dataset_t *ds = drc->drc_ds; @@ -1698,8 +1701,10 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc) } int -dmu_recv_end(dmu_recv_cookie_t *drc) +dmu_recv_end(dmu_recv_cookie_t *drc, void *owner) { + drc->drc_owner = owner; + if (drc->drc_newfs) return (dmu_recv_new_end(drc)); else Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:33 2013 (r253780) @@ -1675,16 +1675,52 @@ dsl_dataset_rename_snapshot(const char * dsl_dataset_rename_snapshot_sync, &ddrsa, 1)); } +/* + * If we're doing an ownership handoff, we need to make sure that there is + * only one long hold on the dataset. We're not allowed to change anything here + * so we don't permanently release the long hold or regular hold here. We want + * to do this only when syncing to avoid the dataset unexpectedly going away + * when we release the long hold. + */ +static int +dsl_dataset_handoff_check(dsl_dataset_t *ds, void *owner, dmu_tx_t *tx) +{ + boolean_t held; + + if (!dmu_tx_is_syncing(tx)) + return (0); + + if (owner != NULL) { + VERIFY3P(ds->ds_owner, ==, owner); + dsl_dataset_long_rele(ds, owner); + } + + held = dsl_dataset_long_held(ds); + + if (owner != NULL) + dsl_dataset_long_hold(ds, owner); + + if (held) + return (SET_ERROR(EBUSY)); + + return (0); +} + +typedef struct dsl_dataset_rollback_arg { + const char *ddra_fsname; + void *ddra_owner; +} dsl_dataset_rollback_arg_t; + static int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds; int64_t unused_refres_delta; int error; - error = dsl_dataset_hold(dp, fsname, FTAG, &ds); + error = dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds); if (error != 0) return (error); @@ -1700,9 +1736,10 @@ dsl_dataset_rollback_check(void *arg, dm return (SET_ERROR(EINVAL)); } - if (dsl_dataset_long_held(ds)) { + error = dsl_dataset_handoff_check(ds, ddra->ddra_owner, tx); + if (error != 0) { dsl_dataset_rele(ds, FTAG); - return (SET_ERROR(EBUSY)); + return (error); } /* @@ -1739,12 +1776,12 @@ dsl_dataset_rollback_check(void *arg, dm static void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds, *clone; uint64_t cloneobj; - VERIFY0(dsl_dataset_hold(dp, fsname, FTAG, &ds)); + VERIFY0(dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds)); cloneobj = dsl_dataset_create_sync(ds->ds_dir, "%rollback", ds->ds_prev, DS_CREATE_FLAG_NODIRTY, kcred, tx); @@ -1760,11 +1797,26 @@ dsl_dataset_rollback_sync(void *arg, dmu dsl_dataset_rele(ds, FTAG); } +/* + * If owner != NULL: + * + * - The existing dataset MUST be owned by the specified owner at entry + * - Upon return, dataset will still be held by the same owner, whether we + * succeed or not. + * + * This mode is required any time the existing filesystem is mounted. See + * notes above zfs_suspend_fs() for further details. + */ int -dsl_dataset_rollback(const char *fsname) +dsl_dataset_rollback(const char *fsname, void *owner) { + dsl_dataset_rollback_arg_t ddra; + + ddra.ddra_fsname = fsname; + ddra.ddra_owner = owner; + return (dsl_sync_task(fsname, dsl_dataset_rollback_check, - dsl_dataset_rollback_sync, (void *)fsname, 1)); + dsl_dataset_rollback_sync, (void *)&ddra, 1)); } struct promotenode { @@ -2282,7 +2334,7 @@ dsl_dataset_promote(const char *name, ch int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force) + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx) { int64_t unused_refres_delta; @@ -2311,7 +2363,7 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ - if (dsl_dataset_long_held(origin_head)) + if (dsl_dataset_handoff_check(origin_head, owner, tx)) return (SET_ERROR(EBUSY)); /* check amount of any unconsumed refreservation */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h Mon Jul 29 20:26:33 2013 (r253780) @@ -136,6 +136,7 @@ struct objset { int dmu_objset_hold(const char *name, void *tag, objset_t **osp); int dmu_objset_own(const char *name, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); +void dmu_objset_refresh_ownership(objset_t *os, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:26:33 2013 (r253780) @@ -55,12 +55,13 @@ typedef struct dmu_recv_cookie { struct avl_tree *drc_guid_to_ds_map; zio_cksum_t drc_cksum; uint64_t drc_newsnapobj; + void *drc_owner; } dmu_recv_cookie_t; int dmu_recv_begin(char *tofs, char *tosnap, struct drr_begin *drrb, boolean_t force, char *origin, dmu_recv_cookie_t *drc); int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp, int cleanup_fd, uint64_t *action_handlep); -int dmu_recv_end(dmu_recv_cookie_t *drc); +int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); #endif /* _DMU_SEND_H */ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:33 2013 (r253780) @@ -247,7 +247,7 @@ void dsl_dataset_long_rele(dsl_dataset_t boolean_t dsl_dataset_long_held(dsl_dataset_t *ds); int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force); + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx); void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, @@ -264,7 +264,7 @@ int dsl_dataset_snap_lookup(dsl_dataset_ int dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx); void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds, zprop_source_t source, uint64_t value, dmu_tx_t *tx); -int dsl_dataset_rollback(const char *fsname); +int dsl_dataset_rollback(const char *fsname, void *owner); #ifdef ZFS_DEBUG #define dprintf_ds(ds, fmt, ...) do { \ Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_ioctl.c Mon Jul 29 20:26:33 2013 (r253780) @@ -3509,13 +3509,13 @@ zfs_ioc_rollback(zfs_cmd_t *zc) if (error == 0) { int resume_err; - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, zfsvfs); resume_err = zfs_resume_fs(zfsvfs, zc->zc_name); error = error ? error : resume_err; } VFS_RELE(zfsvfs->z_vfs); } else { - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, NULL); } return (error); } @@ -4035,13 +4035,13 @@ zfs_ioc_recv(zfs_cmd_t *zc) * If the suspend fails, then the recv_end will * likely also fail, and clean up after itself. */ - end_err = dmu_recv_end(&drc); + end_err = dmu_recv_end(&drc, zfsvfs); if (error == 0) error = zfs_resume_fs(zfsvfs, tofs); error = error ? error : end_err; VFS_RELE(zfsvfs->z_vfs); } else { - error = dmu_recv_end(&drc); + error = dmu_recv_end(&drc, NULL); } } @@ -4522,8 +4522,11 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset_phys_t). Suspend/resume the fs will do that. */ error = zfs_suspend_fs(zfsvfs); - if (error == 0) + if (error == 0) { + dmu_objset_refresh_ownership(zfsvfs->z_os, + zfsvfs); error = zfs_resume_fs(zfsvfs, zc->zc_name); + } } if (error == 0) error = dmu_objset_userspace_upgrade(zfsvfs->z_os); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Mon Jul 29 20:26:27 2013 (r253779) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vfsops.c Mon Jul 29 20:26:33 2013 (r253780) @@ -2044,7 +2044,9 @@ zfs_vget(vfs_t *vfsp, vnode_t **vpp, fid * Block out VOPs and close zfsvfs_t::z_os * * Note, if successful, then we return with the 'z_teardown_lock' and - * 'z_teardown_inactive_lock' write held. + * 'z_teardown_inactive_lock' write held. We leave ownership of the underlying + * dataset and objset intact so that they can be atomically handed off during + * a subsequent rollback or recv operation and the resume thereafter. */ int zfs_suspend_fs(zfsvfs_t *zfsvfs) @@ -2053,71 +2055,76 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs) if ((error = zfsvfs_teardown(zfsvfs, B_FALSE)) != 0) return (error); - dmu_objset_disown(zfsvfs->z_os, zfsvfs); return (0); } /* - * Reopen zfsvfs_t::z_os and release VOPs. + * Rebuild SA and release VOPs. Note that ownership of the underlying dataset + * is an invariant across any of the operations that can be performed while the + * filesystem was suspended. Whether it succeeded or failed, the preconditions + * are the same: the relevant objset and associated dataset are owned by + * zfsvfs, held, and long held on entry. */ int zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname) { int err; + znode_t *zp; + uint64_t sa_obj = 0; ASSERT(RRW_WRITE_HELD(&zfsvfs->z_teardown_lock)); ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); - err = dmu_objset_own(osname, DMU_OST_ZFS, B_FALSE, zfsvfs, - &zfsvfs->z_os); - if (err) { - zfsvfs->z_os = NULL; - } else { - znode_t *zp; - uint64_t sa_obj = 0; + /* + * We already own this, so just hold and rele it to update the + * objset_t, as the one we had before may have been evicted. + */ + VERIFY0(dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os)); + VERIFY3P(zfsvfs->z_os->os_dsl_dataset->ds_owner, ==, zfsvfs); + VERIFY(dsl_dataset_long_held(zfsvfs->z_os->os_dsl_dataset)); + dmu_objset_rele(zfsvfs->z_os, zfsvfs); - /* - * Make sure version hasn't changed - */ + /* + * Make sure version hasn't changed + */ - err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, - &zfsvfs->z_version); + err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, + &zfsvfs->z_version); - if (err) - goto bail; + if (err) + goto bail; - err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, - ZFS_SA_ATTRS, 8, 1, &sa_obj); + err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, + ZFS_SA_ATTRS, 8, 1, &sa_obj); - if (err && zfsvfs->z_version >= ZPL_VERSION_SA) - goto bail; + if (err && zfsvfs->z_version >= ZPL_VERSION_SA) + goto bail; - if ((err = sa_setup(zfsvfs->z_os, sa_obj, - zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) - goto bail; + if ((err = sa_setup(zfsvfs->z_os, sa_obj, + zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) + goto bail; - if (zfsvfs->z_version >= ZPL_VERSION_SA) - sa_register_update_callback(zfsvfs->z_os, - zfs_sa_upgrade); + if (zfsvfs->z_version >= ZPL_VERSION_SA) + sa_register_update_callback(zfsvfs->z_os, + zfs_sa_upgrade); - VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); + VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); - zfs_set_fuid_feature(zfsvfs); + zfs_set_fuid_feature(zfsvfs); - /* - * Attempt to re-establish all the active znodes with - * their dbufs. If a zfs_rezget() fails, then we'll let - * any potential callers discover that via ZFS_ENTER_VERIFY_VP - * when they try to use their znode. - */ - mutex_enter(&zfsvfs->z_znodes_lock); - for (zp = list_head(&zfsvfs->z_all_znodes); zp; - zp = list_next(&zfsvfs->z_all_znodes, zp)) { - (void) zfs_rezget(zp); - } - mutex_exit(&zfsvfs->z_znodes_lock); + /* + * Attempt to re-establish all the active znodes with + * their dbufs. If a zfs_rezget() fails, then we'll let + * any potential callers discover that via ZFS_ENTER_VERIFY_VP + * when they try to use their znode. + */ + mutex_enter(&zfsvfs->z_znodes_lock); + for (zp = list_head(&zfsvfs->z_all_znodes); zp; + zp = list_next(&zfsvfs->z_all_znodes, zp)) { + (void) zfs_rezget(zp); } + mutex_exit(&zfsvfs->z_znodes_lock); bail: /* release the VOPs */ @@ -2126,8 +2133,8 @@ bail: if (err) { /* - * Since we couldn't reopen zfsvfs::z_os, or - * setup the sa framework force unmount this file system. + * Since we couldn't setup the sa framework, try to force + * unmount this file system. */ if (vn_vfswlock(zfsvfs->z_vfs->vfs_vnodecovered) == 0) (void) dounmount(zfsvfs->z_vfs, MS_FORCE, CRED()); From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:26:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 47881FFF; Mon, 29 Jul 2013 20:26:38 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 31C1A2E6E; Mon, 29 Jul 2013 20:26:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKQcpa021825; Mon, 29 Jul 2013 20:26:38 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKQRRb021717; Mon, 29 Jul 2013 20:26:27 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201307292026.r6TKQRRb021717@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 29 Jul 2013 20:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:26:38 -0000 Author: obrien Date: Mon Jul 29 20:26:27 2013 New Revision: 253779 URL: http://svnweb.freebsd.org/changeset/base/253779 Log: Decouple yarrow from random(4) device. * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. * random(4) device doesn't really depend on rijndael-*. Yarrow, however, does. * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurmesh@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien Modified: head/UPDATING head/share/man/man4/random.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/AC100 head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ARNDALE head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/LN2410SBC head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RPI-B head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/ZEDBOARD head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/i386/conf/XEN head/sys/ia64/conf/GENERIC head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/AR933X_BASE head/sys/mips/conf/BERI_TEMPLATE head/sys/mips/conf/DIR-825 head/sys/mips/conf/GXEMUL head/sys/mips/conf/OCTEON1 head/sys/mips/conf/PB92 head/sys/mips/conf/RT305X head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.SWARM head/sys/mips/conf/std.XLP head/sys/modules/Makefile head/sys/modules/random/Makefile head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/WII head/sys/sparc64/conf/GENERIC head/tools/tools/sysdoc/sysdoc.sh head/tools/tools/sysdoc/tunables.mdoc Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 29 19:50:30 2013 (r253778) +++ head/UPDATING Mon Jul 29 20:26:27 2013 (r253779) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130729: + random(4) and actual RNG implementations (aka, adaptors) have been + further decoupled. If you are running a custom kernel, you may + need to explicitly enable at least one RNG adaptor in your kernel + config. For example, to use Yarrow, add "options YARROW_RNG" to + your kernel config. For hardware backed RNGs, use either + "RDRAND_RNG" or "PADLOCK_RNG" options. + If you use random.ko via 'random_load="YES"' in /boot/loader.conf + instead of "device random", you will need to change that to + 'yarrow_rng_load="YES"', 'rdrand_rng_load="YES"', or + 'padlock_rng_load="YES"'. random.ko will be loaded automatically + as a dependency module. + 20130726: Behavior of devfs rules path matching has been changed. Pattern is now always matched against fully qualified devfs Modified: head/share/man/man4/random.4 ============================================================================== --- head/share/man/man4/random.4 Mon Jul 29 19:50:30 2013 (r253778) +++ head/share/man/man4/random.4 Mon Jul 29 20:26:27 2013 (r253779) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 7, 2012 +.Dd July 29, 2013 .Dt RANDOM 4 .Os .Sh NAME @@ -43,6 +43,13 @@ The device will probe for certain hardware entropy sources, and use these in preference to the fallback, which is a generator implemented in software. +If the kernel environment MIB's +.Va hw.nehemiah_rng_enable +or +.Va hw.ivy_rng_enable +are set to +.Dq Li 0 , +the associated hardware entropy source will be ignored. .Pp If the device is using the software generator, @@ -74,6 +81,7 @@ device, use the command line: .Pp which results in something like: .Bd -literal -offset indent +kern.random.adaptors: yarrow kern.random.sys.seeded: 1 kern.random.sys.harvest.ethernet: 1 kern.random.sys.harvest.point_to_point: 1 @@ -89,7 +97,9 @@ kern.random.yarrow.slowoverthresh: 2 (These would not be seen if a hardware generator is present.) .Pp -All settings are read/write. +Other than +.Dl kern.random.adaptors +all settings are read/write. .Pp The .Va kern.random.sys.seeded Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/amd64/conf/GENERIC Mon Jul 29 20:26:27 2013 (r253779) @@ -295,6 +295,7 @@ device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG options RDRAND_RNG # Intel Bull Mountain RNG +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/arm/conf/AC100 ============================================================================== --- head/sys/arm/conf/AC100 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/AC100 Mon Jul 29 20:26:27 2013 (r253779) @@ -61,6 +61,7 @@ options MUTEX_DEBUG # Pseudo devices device random +options YARROW_RNG # Yarrow software RNG device pty device loop device md Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/ARMADAXP Mon Jul 29 20:26:27 2013 (r253779) @@ -61,6 +61,7 @@ options KDB_TRACE # Pseudo devices device random +options YARROW_RNG # Yarrow software RNG device pty device loop device md Modified: head/sys/arm/conf/ARNDALE ============================================================================== --- head/sys/arm/conf/ARNDALE Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/ARNDALE Mon Jul 29 20:26:27 2013 (r253779) @@ -88,6 +88,7 @@ options ROOTDEVNAME=\"ufs:/dev/da0\" device loop device random +options YARROW_RNG # Yarrow software RNG device pty device md device gpio Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/ATMEL Mon Jul 29 20:26:27 2013 (r253779) @@ -134,6 +134,7 @@ device geom_map # GEOM partition mappin # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/AVILA Mon Jul 29 20:26:27 2013 (r253779) @@ -107,6 +107,7 @@ device if_bridge device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # Wireless NIC cards device wlan # 802.11 support Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/BEAGLEBONE Mon Jul 29 20:26:27 2013 (r253779) @@ -90,6 +90,7 @@ device pty device snp device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # I2C support device iicbus Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/BWCT Mon Jul 29 20:26:27 2013 (r253779) @@ -68,6 +68,7 @@ options NO_FFS_SNAPSHOT options NO_SWAPPING device loop device random +options YARROW_RNG # Yarrow software RNG device ether device vlan device uart Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/CAMBRIA Mon Jul 29 20:26:27 2013 (r253779) @@ -110,6 +110,7 @@ device if_bridge device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # Wireless NIC cards device wlan # 802.11 support Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/CNS11XXNAS Mon Jul 29 20:26:27 2013 (r253779) @@ -102,6 +102,7 @@ device loop device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG #options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/CRB Mon Jul 29 20:26:27 2013 (r253779) @@ -105,6 +105,7 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG device iopwdog options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/CUBIEBOARD Mon Jul 29 20:26:27 2013 (r253779) @@ -92,6 +92,7 @@ device pty device snp device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # I2C support #device iicbus @@ -130,4 +131,3 @@ device miibus options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts - Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/DB-78XXX Mon Jul 29 20:26:27 2013 (r253779) @@ -55,6 +55,7 @@ device pci device loop device md device random +options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/DB-88F5XXX Mon Jul 29 20:26:27 2013 (r253779) @@ -54,6 +54,7 @@ device pci device md device loop device random +options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/DB-88F6XXX Mon Jul 29 20:26:27 2013 (r253779) @@ -55,6 +55,7 @@ device pci device loop device md device random +options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/DOCKSTAR Mon Jul 29 20:26:27 2013 (r253779) @@ -46,6 +46,7 @@ options KDB # Pseudo devices device md device random +options YARROW_RNG # Yarrow software RNG device loop # Serial ports Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/DREAMPLUG-1001 Mon Jul 29 20:26:27 2013 (r253779) @@ -62,6 +62,7 @@ device loop #Network loopback device md #Memory/malloc disk device pty #BSD-style compatibility pseudo ttys device random #Entropy device +options YARROW_RNG # Yarrow software RNG device tun #Packet tunnel. device ether #Required for all ethernet devices device vlan #802.1Q VLAN support Modified: head/sys/arm/conf/EA3250 ============================================================================== --- head/sys/arm/conf/EA3250 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/EA3250 Mon Jul 29 20:26:27 2013 (r253779) @@ -54,6 +54,7 @@ device loop device md device pty device random +options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/EB9200 ============================================================================== --- head/sys/arm/conf/EB9200 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/EB9200 Mon Jul 29 20:26:27 2013 (r253779) @@ -60,6 +60,7 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random +options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/EFIKA_MX Mon Jul 29 20:26:27 2013 (r253779) @@ -96,6 +96,7 @@ device bpf # Berkeley packet filter # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/EP80219 Mon Jul 29 20:26:27 2013 (r253779) @@ -101,6 +101,7 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG options ARM_USE_SMALL_ALLOC # Floppy drives Modified: head/sys/arm/conf/ETHERNUT5 ============================================================================== --- head/sys/arm/conf/ETHERNUT5 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/ETHERNUT5 Mon Jul 29 20:26:27 2013 (r253779) @@ -126,6 +126,7 @@ device geom_map # GEOM partition mappin # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/GUMSTIX Mon Jul 29 20:26:27 2013 (r253779) @@ -88,3 +88,4 @@ options DDB #Enable the kernel debugg device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/HL200 Mon Jul 29 20:26:27 2013 (r253779) @@ -65,6 +65,7 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random +options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/HL201 Mon Jul 29 20:26:27 2013 (r253779) @@ -67,6 +67,7 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random +options YARROW_RNG # Yarrow software RNG device loop device ether device uart @@ -129,4 +130,3 @@ device pass # Passthrough device (dire #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" - Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/IQ31244 Mon Jul 29 20:26:27 2013 (r253779) @@ -106,6 +106,7 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG options ARM_USE_SMALL_ALLOC # Floppy drives Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/KB920X Mon Jul 29 20:26:27 2013 (r253779) @@ -66,6 +66,7 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random +options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/LN2410SBC ============================================================================== --- head/sys/arm/conf/LN2410SBC Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/LN2410SBC Mon Jul 29 20:26:27 2013 (r253779) @@ -62,6 +62,7 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random +options YARROW_RNG # Yarrow software RNG device loop device ether @@ -83,4 +84,3 @@ device ohci device umass device scbus # SCSI bus (required for da) device da # Direct Access (disks) - Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/NSLU Mon Jul 29 20:26:27 2013 (r253779) @@ -105,6 +105,7 @@ device loop device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG #options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/PANDABOARD Mon Jul 29 20:26:27 2013 (r253779) @@ -110,6 +110,7 @@ device md #options MD_ROOT_SIZE=7560 device random # Entropy device +options YARROW_RNG # Yarrow software RNG # USB support device usb Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/QILA9G20 Mon Jul 29 20:26:27 2013 (r253779) @@ -77,6 +77,7 @@ options NO_SWAPPING #options DIAGNOSTIC device random +options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/RPI-B Mon Jul 29 20:26:27 2013 (r253779) @@ -86,6 +86,7 @@ options INVARIANT_SUPPORT #Extra sanity device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # USB support device usb Modified: head/sys/arm/conf/SAM9260EK ============================================================================== --- head/sys/arm/conf/SAM9260EK Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/SAM9260EK Mon Jul 29 20:26:27 2013 (r253779) @@ -134,6 +134,7 @@ device mmcsd # MMC/SD memory card # Pseudo devices. device loop # Network loopback device random # Entropy device +options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/SAM9G20EK Mon Jul 29 20:26:27 2013 (r253779) @@ -76,6 +76,7 @@ options NO_SWAPPING #options DIAGNOSTIC device random +options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/SAM9X25EK Mon Jul 29 20:26:27 2013 (r253779) @@ -77,6 +77,7 @@ options NO_SWAPPING #options DIAGNOSTIC device random +options YARROW_RNG # Yarrow software RNG device pty device loop device bpf @@ -150,4 +151,3 @@ device miibus #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm - Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/SHEEVAPLUG Mon Jul 29 20:26:27 2013 (r253779) @@ -45,6 +45,7 @@ options KDB # Pseudo devices device random +options YARROW_RNG # Yarrow software RNG device loop # Serial ports Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/SN9G45 Mon Jul 29 20:26:27 2013 (r253779) @@ -76,6 +76,7 @@ options NO_SWAPPING #options DIAGNOSTIC device random +options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/TS7800 Mon Jul 29 20:26:27 2013 (r253779) @@ -48,6 +48,7 @@ device pci device md device loop device random +options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/VERSATILEPB Mon Jul 29 20:26:27 2013 (r253779) @@ -94,6 +94,7 @@ options INVARIANT_SUPPORT #Extra sanity device md device random # Entropy device +options YARROW_RNG # Yarrow software RNG # Flattened Device Tree options FDT Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/arm/conf/ZEDBOARD Mon Jul 29 20:26:27 2013 (r253779) @@ -66,6 +66,7 @@ options KDB device loop device random +options YARROW_RNG # Yarrow software RNG device ether device if_cgem # Zynq-7000 gig ethernet device device mii Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/conf/NOTES Mon Jul 29 20:26:27 2013 (r253779) @@ -1132,6 +1132,9 @@ options VFS_AIO # Cryptographically secure random number generator; /dev/random device random +# Yarrow software RNG adapter for random +options YARROW_RNG + # The system memory devices; /dev/mem, /dev/kmem device mem Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/conf/files Mon Jul 29 20:26:27 2013 (r253779) @@ -540,8 +540,8 @@ crypto/des/des_ecb.c optional crypto | crypto/des/des_setkey.c optional crypto | ipsec | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \ - ipsec | random | wlan_ccmp -crypto/rijndael/rijndael-api-fst.c optional geom_bde | random + ipsec | yarrow_rng | wlan_ccmp +crypto/rijndael/rijndael-api-fst.c optional geom_bde | yarrow_rng crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp crypto/sha1.c optional carp | crypto | ipsec | \ netgraph_mppc_encryption | sctp @@ -2030,11 +2030,12 @@ rt2860.fw optional rt2860fw | ralfw \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/harvest.c standard -dev/random/hash.c optional random +dev/random/hash.c optional yarrow_rng dev/random/probe.c optional random +dev/random/random_adaptors.c standard dev/random/randomdev.c optional random -dev/random/randomdev_soft.c optional random -dev/random/yarrow.c optional random +dev/random/randomdev_soft.c optional yarrow_rng +dev/random/yarrow.c optional yarrow_rng dev/rc/rc.c optional rc dev/re/if_re.c optional re dev/rndtest/rndtest.c optional rndtest Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/conf/options Mon Jul 29 20:26:27 2013 (r253779) @@ -905,3 +905,6 @@ RACCT opt_global.h # Resource Limits RCTL opt_global.h + +# Software random number generators for random(4) +YARROW_RNG opt_dontuse.h Modified: head/sys/dev/random/ivy.c ============================================================================== --- head/sys/dev/random/ivy.c Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/ivy.c Mon Jul 29 20:26:27 2013 (r253779) @@ -28,16 +28,19 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cpu.h" - -#ifdef RDRAND_RNG - #include #include +#include #include +#include #include #include #include + +#include +#include + +#include #include #define RETRY_COUNT 10 @@ -46,7 +49,7 @@ static void random_ivy_init(void); static void random_ivy_deinit(void); static int random_ivy_read(void *, int); -struct random_systat random_ivy = { +struct random_adaptor random_ivy = { .ident = "Hardware, Intel IvyBridge+ RNG", .init = random_ivy_init, .deinit = random_ivy_deinit, @@ -114,4 +117,32 @@ random_ivy_read(void *buf, int c) return (c - count); } +static int +rdrand_modevent(module_t mod, int type, void *unused) +{ + + switch (type) { + case MOD_LOAD: + if (cpu_feature2 & CPUID2_RDRAND) { + random_adaptor_register("rdrand", &random_ivy); + EVENTHANDLER_INVOKE(random_adaptor_attach, &random_ivy); + return (0); + } else { +#ifndef KLD_MODULE + if (bootverbose) #endif + printf( + "%s: RDRAND feature is not present on this CPU\n", + random_ivy.ident); +#ifdef KLD_MODULE + return (ENXIO); +#else + return (0); +#endif + } + } + + return (EINVAL); +} + +RANDOM_ADAPTOR_MODULE(random_rdrand, rdrand_modevent, 1); Modified: head/sys/dev/random/nehemiah.c ============================================================================== --- head/sys/dev/random/nehemiah.c Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/nehemiah.c Mon Jul 29 20:26:27 2013 (r253779) @@ -28,19 +28,20 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_cpu.h" - -#ifdef PADLOCK_RNG - #include #include #include #include +#include #include #include +#include #include +#include +#include +#include #include #define RANDOM_BLOCK_SIZE 256 @@ -50,7 +51,7 @@ static void random_nehemiah_init(void); static void random_nehemiah_deinit(void); static int random_nehemiah_read(void *, int); -struct random_systat random_nehemiah = { +struct random_adaptor random_nehemiah = { .ident = "Hardware, VIA Nehemiah", .init = random_nehemiah_init, .deinit = random_nehemiah_deinit, @@ -208,4 +209,33 @@ random_nehemiah_read(void *buf, int c) return (c); } +static int +nehemiah_modevent(module_t mod, int type, void *unused) +{ + + switch (type) { + case MOD_LOAD: + if (via_feature_rng & VIA_HAS_RNG) { + random_adaptor_register("nehemiah", &random_nehemiah); + EVENTHANDLER_INVOKE(random_adaptor_attach, + &random_nehemiah); + return (0); + } else { +#ifndef KLD_MODULE + if (bootverbose) #endif + printf( + "%s: VIA RNG feature is not present on this CPU\n", + random_nehemiah.ident); +#ifdef KLD_MODULE + return (ENXIO); +#else + return (0); +#endif + } + } + + return (EINVAL); +} + +RANDOM_ADAPTOR_MODULE(nehemiah, nehemiah_modevent, 1); Modified: head/sys/dev/random/probe.c ============================================================================== --- head/sys/dev/random/probe.c Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/probe.c Mon Jul 29 20:26:27 2013 (r253779) @@ -28,66 +28,35 @@ #include __FBSDID("$FreeBSD$"); -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#if defined(__amd64__) || defined(__i386__) #include "opt_cpu.h" #endif -#include #include #include #include -#include -#include #include -#include - -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) -#include -#include -#include -#include -#endif +#include #include -#include - -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) -#ifdef PADLOCK_RNG -extern struct random_systat random_nehemiah; -#endif -#ifdef RDRAND_RNG -extern struct random_systat random_ivy; -#endif -#endif void -random_ident_hardware(struct random_systat **systat) +random_ident_hardware(struct random_adaptor **adaptor) { + struct random_adaptor *tmp; + int enable; - /* Set default to software */ - *systat = &random_yarrow; + /* Set default to software (yarrow) */ + *adaptor = random_adaptor_get("yarrow"); /* Then go looking for hardware */ -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) -#ifdef PADLOCK_RNG - if (via_feature_rng & VIA_HAS_RNG) { - int enable; - - enable = 1; - TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); - if (enable) - *systat = &random_nehemiah; - } -#endif -#ifdef RDRAND_RNG - if (cpu_feature2 & CPUID2_RDRAND) { - int enable; - - enable = 1; - TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); - if (enable) - *systat = &random_ivy; - } -#endif -#endif + enable = 1; + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); + if (enable && (tmp = random_adaptor_get("nehemiah"))) + *adaptor = tmp; + + enable = 1; + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); + if (enable && (tmp = random_adaptor_get("rdrand"))) + *adaptor = tmp; } Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/randomdev.c Mon Jul 29 20:26:27 2013 (r253779) @@ -70,12 +70,15 @@ static struct cdevsw random_cdevsw = { .d_name = "random", }; -struct random_systat *random_systat; +static struct random_adaptor *random_adaptor; +static eventhandler_tag attach_tag; +static int random_inited; + /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *random_dev; -/* Used to fake out unused random calls in random_systat */ +/* Used to fake out unused random calls in random_adaptor */ void random_null_func(void) { @@ -88,8 +91,8 @@ random_close(struct cdev *dev __unused, { if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) == 0) && (securelevel_gt(td->td_ucred, 0) == 0)) { - (*random_systat->reseed)(); - random_systat->seeded = 1; + (*random_adaptor->reseed)(); + random_adaptor->seeded = 1; arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ } @@ -104,8 +107,8 @@ random_read(struct cdev *dev __unused, s void *random_buf; /* Blocking logic */ - if (!random_systat->seeded) - error = (*random_systat->block)(flag); + if (!random_adaptor->seeded) + error = (*random_adaptor->block)(flag); /* The actual read */ if (!error) { @@ -114,7 +117,7 @@ random_read(struct cdev *dev __unused, s while (uio->uio_resid > 0 && !error) { c = MIN(uio->uio_resid, PAGE_SIZE); - c = (*random_systat->read)(random_buf, c); + c = (*random_adaptor->read)(random_buf, c); error = uiomove(random_buf, c, uio); } @@ -139,7 +142,7 @@ random_write(struct cdev *dev __unused, error = uiomove(random_buf, c, uio); if (error) break; - (*random_systat->write)(random_buf, c); + (*random_adaptor->write)(random_buf, c); } free(random_buf, M_TEMP); @@ -172,14 +175,37 @@ random_poll(struct cdev *dev __unused, i int revents = 0; if (events & (POLLIN | POLLRDNORM)) { - if (random_systat->seeded) + if (random_adaptor->seeded) revents = events & (POLLIN | POLLRDNORM); else - revents = (*random_systat->poll) (events,td); + revents = (*random_adaptor->poll) (events,td); } return (revents); } +static void +random_initialize(void *p, struct random_adaptor *s) +{ + if (random_inited) { + printf("random: <%s> already initialized\n", + random_adaptor->ident); + return; + } + + random_adaptor = s; + + (s->init)(); + + printf("random: <%s> initialized\n", s->ident); + + random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw, + RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); + make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ + + /* mark random(4) as initialized, to avoid being called again */ + random_inited = 1; +} + /* ARGSUSED */ static int random_modevent(module_t mod __unused, int type, void *data __unused) @@ -188,23 +214,29 @@ random_modevent(module_t mod __unused, i switch (type) { case MOD_LOAD: - random_ident_hardware(&random_systat); - (*random_systat->init)(); + random_ident_hardware(&random_adaptor); - if (bootverbose) - printf("random: \n", - random_systat->ident); - - random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw, - RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); - make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ + if (random_adaptor == NULL) { + printf( + "random: No random adaptor attached, postponing initialization\n"); + attach_tag = EVENTHANDLER_REGISTER(random_adaptor_attach, + random_initialize, NULL, EVENTHANDLER_PRI_ANY); + } else { + random_initialize(NULL, random_adaptor); + } break; case MOD_UNLOAD: - (*random_systat->deinit)(); - - destroy_dev(random_dev); + if (random_adaptor != NULL) { + (*random_adaptor->deinit)(); + destroy_dev(random_dev); + } + /* Unregister the event handler */ + if (attach_tag != NULL) { + EVENTHANDLER_DEREGISTER(random_adaptor_attach, + attach_tag); + } break; Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/randomdev.h Mon Jul 29 20:26:27 2013 (r253779) @@ -38,7 +38,7 @@ typedef void random_write_func_t(void *, typedef int random_poll_func_t(int, struct thread *); typedef void random_reseed_func_t(void); -struct random_systat { +struct random_adaptor { struct selinfo rsel; const char *ident; int seeded; @@ -51,7 +51,5 @@ struct random_systat { random_reseed_func_t *reseed; }; -extern struct random_systat *random_systat; - -extern void random_ident_hardware(struct random_systat **); +extern void random_ident_hardware(struct random_adaptor **); extern void random_null_func(void); Modified: head/sys/dev/random/randomdev_soft.c ============================================================================== --- head/sys/dev/random/randomdev_soft.c Mon Jul 29 19:50:30 2013 (r253778) +++ head/sys/dev/random/randomdev_soft.c Mon Jul 29 20:26:27 2013 (r253779) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -50,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -63,7 +65,7 @@ static int random_yarrow_poll(int event, static int random_yarrow_block(int flag); static void random_yarrow_flush_reseed(void); -struct random_systat random_yarrow = { +struct random_adaptor random_yarrow = { .ident = "Software, Yarrow", .init = random_yarrow_init, .deinit = random_yarrow_deinit, @@ -103,7 +105,7 @@ static int random_kthread_control = 0; static struct proc *random_kthread_proc; /* List for the dynamic sysctls */ -struct sysctl_ctx_list random_clist; +static struct sysctl_ctx_list random_clist; /* ARGSUSED */ static int @@ -120,25 +122,20 @@ random_yarrow_init(void) { int error, i; struct harvest *np; - struct sysctl_oid *random_o, *random_sys_o, *random_sys_harvest_o; + struct sysctl_oid *random_sys_o, *random_sys_harvest_o; enum esource e; - random_o = SYSCTL_ADD_NODE(&random_clist, - SYSCTL_STATIC_CHILDREN(_kern), - OID_AUTO, "random", CTLFLAG_RW, 0, - "Software Random Number Generator"); - - random_yarrow_init_alg(&random_clist, random_o); + random_yarrow_init_alg(&random_clist); random_sys_o = SYSCTL_ADD_NODE(&random_clist, - SYSCTL_CHILDREN(random_o), + SYSCTL_STATIC_CHILDREN(_kern_random), OID_AUTO, "sys", CTLFLAG_RW, 0, "Entropy Device Parameters"); SYSCTL_ADD_PROC(&random_clist, SYSCTL_CHILDREN(random_sys_o), OID_AUTO, "seeded", CTLTYPE_INT | CTLFLAG_RW, - &random_systat->seeded, 1, random_check_boolean, "I", + &random_yarrow.seeded, 1, random_check_boolean, "I", "Seeded State"); random_sys_harvest_o = SYSCTL_ADD_NODE(&random_clist, @@ -362,10 +359,10 @@ random_yarrow_write(void *buf, int count void random_yarrow_unblock(void) { - if (!random_systat->seeded) { - random_systat->seeded = 1; - selwakeuppri(&random_systat->rsel, PUSER); - wakeup(random_systat); + if (!random_yarrow.seeded) { + random_yarrow.seeded = 1; + selwakeuppri(&random_yarrow.rsel, PUSER); + wakeup(&random_yarrow); } (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, ARC4_ENTR_HAVE); @@ -377,10 +374,10 @@ random_yarrow_poll(int events, struct th *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:28:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0F9F430D; Mon, 29 Jul 2013 20:28:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A31A2E8A; Mon, 29 Jul 2013 20:28:11 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 47A52B926; Mon, 29 Jul 2013 16:28:09 -0400 (EDT) From: John Baldwin To: sbruno@freebsd.org Subject: Re: svn commit: r253708 - head/sys/dev/ipmi Date: Mon, 29 Jul 2013 16:17:39 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291054.55820.jhb@freebsd.org> <1375127952.1479.32.camel@localhost> In-Reply-To: <1375127952.1479.32.camel@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307291617.39898.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 29 Jul 2013 16:28:09 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:28:12 -0000 On Monday, July 29, 2013 3:59:12 pm Sean Bruno wrote: > On Mon, 2013-07-29 at 10:54 -0400, John Baldwin wrote: > > On Saturday, July 27, 2013 12:32:34 pm Sean Bruno wrote: > > > Author: sbruno > > > Date: Sat Jul 27 16:32:34 2013 > > > New Revision: 253708 > > > URL: http://svnweb.freebsd.org/changeset/base/253708 > > > > > > Log: > > > At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller > > > no longer have the parent in the device tree. This causes the identify > > > function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface > > > > They never had a common parent, even in 6.x and 7.x. > > > The identify function in isa_ipmi.c shows that there is already an > ipmi(4) device attached (ACPI) version and aborts on 7.x. in 9.x and > higher (not testing on 8.x) the identify function does not see an > attached ipmi interface and attempts to create /dev/ipmi1 The identify function in 7.x has no such check: static void ipmi_isa_identify(driver_t *driver, device_t parent) { struct ipmi_get_info info; uint32_t devid; if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE && device_find_child(parent, "ipmi", -1) == NULL) { /* * XXX: Hack alert. On some broken systems, the IPMI * interface is described via SMBIOS, but the actual * IO resource is in a PCI device BAR, so we have to let * the PCI device attach ipmi instead. In that case don't * create an isa ipmi device. For now we hardcode the list * of bus, device, function tuples. */ devid = pci_cfgregread(0, 4, 2, PCIR_DEVVENDOR, 4); if (devid != 0xffffffff && ipmi_pci_match(devid & 0xffff, devid >> 16) != NULL) return; BUS_ADD_CHILD(parent, 0, "ipmi", -1); } } The only check in 7 was the one you just moved in ipmi_isa_attach(): static int ipmi_isa_attach(device_t dev) { struct ipmi_softc *sc = device_get_softc(dev); struct ipmi_get_info info; const char *mode; int count, error, i, type; /* * Pull info out of the SMBIOS table. If that doesn't work, use * hints to enumerate a device. */ if (!ipmi_smbios_identify(&info) && !ipmi_hint_identify(dev, &info)) return (ENXIO); /* * Give other drivers precedence. Unfortunately, this doesn't * work if we have an SMBIOS table that duplicates a PCI device * that's later on the bus than the PCI-ISA bridge. */ if (ipmi_attached) return (EBUSY); ... } > Am I just confused on the bus relationship here? > > We've gone over this a couple of times in different emails on different > lists. I've just never sat down and walked through the code. If you > see a better way to keep ipmi(4) from erroneously attaching to the ISA > interface, let me know. I haven't seen any mention of this problem before. I've seen threads about the watchdog issue (trying to set watchdog on shutdown which wants to use threads, etc.), but not this. Also, can you provide the console messages without this patch? The previous check in ipmi_isa_attach() is long before we touch the BMC or ever get around to creating /dev/ipmi1. (Just because you see ipmi1: in dmesg doesn't mean it's created /dev/ipmi1.) > > > Move the check for ipmi_attached out of the ipmi_isa_attach function and into > > > the ipmi_isa_identify function. Remove the check of the device tree for > > > ipmi devices attached. > > > > > > This probing appears to make Broadcom management firmware on Dell machines > > > crash and emit NMI EISA warnings at various times requiring power cycles > > > of the machines to restore. > > > > This makes no sense. All you are doing is skipping ipmi_smbios_identify() > > which just looks at the SMBIOS table in RAM. It doesn't try to probe the > > BMC at all (no register accesses, etc.). If just reading a table in memory > > causes side effects, then running dmidecode in userland should be hosing your > > machines as well. > > > > Probably right. I'm not exactly sure what is making the Broadcom > firmware fall over and die. But when I see the console emitting "NMI > EISA" error messages, this ususally requires a full reboot as the > network interface has crashed. Hopefully, I can dig up more "fact" soon > as testing continues. I'd rather be sure this is the right fix, and if it isn't I'd prefer to revert this as I don't think it is actually fixing anything. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:28:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 044F844C for ; Mon, 29 Jul 2013 20:28:27 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm11-vm2.bullet.mail.ne1.yahoo.com (nm11-vm2.bullet.mail.ne1.yahoo.com [98.138.90.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95C722E94 for ; Mon, 29 Jul 2013 20:28:26 +0000 (UTC) Received: from [98.138.101.129] by nm11.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jul 2013 20:21:30 -0000 Received: from [98.138.226.31] by tm17.bullet.mail.ne1.yahoo.com with NNFMP; 29 Jul 2013 20:21:29 -0000 Received: from [127.0.0.1] by smtp202.mail.ne1.yahoo.com with NNFMP; 29 Jul 2013 20:21:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1375129289; bh=wrUqVHpNhwax5jGl1rmjD0P7cg9++7qZUy5oxtPcKDg=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=h6whPBfi4AWmFxpWZeInxQEH4eVoepHD/q6z+kSuC0ov5IBpBtA6HsFgXncJV9pfip4AIOC47bYtbWijfXb/O6yA+ETvAWDQaLdKKFu2Kcxp+cNqFXRQYdjEvdbTMrL3t6opQ+Q8BoKq7ZVmPH+pbRuO1Csm2cATLhqSqmiGJpI= X-Yahoo-Newman-Id: 768711.75058.bm@smtp202.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: ewJnRo0VM1lOgOJdPAkvpLLHhpjYZLllH0z0_R0jcwR13iN mUQT2yZ5kRcmxY_MFW3jdQr4mXnyBFGRJ_Kb8QF2ldqP3k1FhtG_zwLS5Q24 hp2.mBhGrDpt_ubEd2U767R3VB5h5slm7xnw8YefWhvz._ADqpsyOsDyRCke 1N33AFDwgpBp4Y.o34ssYQiYC3teqnPrOqotDu8fddd61ORwNAvKQ.J2tLYt pxK3WnH3qSr5Vcla9fRKCDcYPn8U3I517xcZsFyA2MLddwS_zjgHmAt1zrBu tDJEV9BXKUZnUHQoiuYL5NHvTTe1_O_ih_VsUO44cgsiS7jLWgD1vV2UEiTa eA7DvicvSAKGCs1tLkG8ZLcQq59lRH2Ft8aTXEGrD6eM455PWVJTkSJ7yOUQ KYamtXqqRO9Gmi3EUXCaIRBdH2SO9XcywPxxE6DG1zXAZHD7p9Ve0hZXmK0K 3ktrGIoWkmUiHKIHb00YbhSX4BnoQB4Y8ykYtnTdNs4.WPLl8VGYgXTDnH2p WumiWKg907kpVJcmGH7aIrPSKb_rteoOkpdzEv8SFq8uPmqIBtC64.UV9Xmq PZpx47P5.obaZ1GudLmM6f4_dugZ6p9PamDxV74MeYUblx6An7h2_XYpeO.D kIb3l5wk- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp202.mail.ne1.yahoo.com with SMTP; 29 Jul 2013 13:21:29 -0700 PDT Subject: Re: svn commit: r253708 - head/sys/dev/ipmi From: Sean Bruno To: sbruno@freebsd.org In-Reply-To: <1375127952.1479.32.camel@localhost> References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291054.55820.jhb@freebsd.org> <1375127952.1479.32.camel@localhost> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-VDU4fb1zgiUJhY+rY5fu" Date: Mon, 29 Jul 2013 13:21:28 -0700 Message-ID: <1375129288.1479.36.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:28:27 -0000 --=-VDU4fb1zgiUJhY+rY5fu Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Mon, 2013-07-29 at 12:59 -0700, Sean Bruno wrote: > On Mon, 2013-07-29 at 10:54 -0400, John Baldwin wrote: > > On Saturday, July 27, 2013 12:32:34 pm Sean Bruno wrote: > > > Author: sbruno > > > Date: Sat Jul 27 16:32:34 2013 > > > New Revision: 253708 > > > URL: http://svnweb.freebsd.org/changeset/base/253708 > > >=20 > > > Log: > > > At some point after stable/7 the ACPI and ISA interfaces to the IPM= I controller > > > no longer have the parent in the device tree. This causes the iden= tify > > > function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI= interface > >=20 > > They never had a common parent, even in 6.x and 7.x. > >=20 > The identify function in isa_ipmi.c shows that there is already an > ipmi(4) device attached (ACPI) version and aborts on 7.x. in 9.x and > higher (not testing on 8.x) the identify function does not see an > attached ipmi interface and attempts to create /dev/ipmi1 >=20 > Am I just confused on the bus relationship here? >=20 > We've gone over this a couple of times in different emails on different > lists. I've just never sat down and walked through the code. If you > see a better way to keep ipmi(4) from erroneously attaching to the ISA > interface, let me know. Or ... ya know, I could just be 100% wrong? stable/7 attaches to an /dev/ipmi1 as well on these Dell R410 units. *sigh* http://people.freebsd.org/~sbruno/ipmi_sean_is_wrong.txt so, the modification I made does resolve the "ipmi1" thing alltogether and is correct (AFAIK), but should be applied to all revisions, not just 9/head. Or, am I wrong again? :-) Sean --=-VDU4fb1zgiUJhY+rY5fu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJR9s7IAAoJEBkJRdwI6BaHWbAH/Ra9Myclh3FUQde7XrcZcb16 yHtKbi8lOTKNriSxcS68K7XVBKqieVwGVXbwlhOuGbwyXbZd+Fu26P79D8Hutzio 33MucMX8PFTOKMOqr8dO3Ii/howf+gtopVXRJA2BiB4fFIA5f3Pnep7M+aUJPFSZ 8DQp071X3TmOezRLqRE404SD2dFf3tuQaWFNo7oEPKAdinrHa0HiXtXPz72sB7Dp 0C+l32Gng++kcHPZKbI69g9Rp7Fg2nbvFA6pBYDpFnwMulO9NvOUbRWsdkToxj1s R3seGx+lDiFvQeKzlG7SyyEe77XbC04Umahci9PF15hhVKwYMU6tOgsFtgbd2pw= =ldSc -----END PGP SIGNATURE----- --=-VDU4fb1zgiUJhY+rY5fu-- From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:31:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B2D8793; Mon, 29 Jul 2013 20:31:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DBEC2F03; Mon, 29 Jul 2013 20:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKVi5T024262; Mon, 29 Jul 2013 20:31:44 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKViaH024257; Mon, 29 Jul 2013 20:31:44 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292031.r6TKViaH024257@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253781 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zfs vendor/illumos/dist/lib/... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:31:45 -0000 Author: delphij Date: Mon Jul 29 20:31:44 2013 New Revision: 253781 URL: http://svnweb.freebsd.org/changeset/base/253781 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Mon Jul 29 20:31:44 2013 (r253781) @@ -3461,6 +3461,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Mon Jul 29 20:31:44 2013 (r253781) @@ -1843,6 +1843,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3325,13 +3329,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:31:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C43D794; Mon, 29 Jul 2013 20:31:46 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1517C2F04; Mon, 29 Jul 2013 20:31:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKVjCD024274; Mon, 29 Jul 2013 20:31:45 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKVjGO024267; Mon, 29 Jul 2013 20:31:45 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292031.r6TKVjGO024267@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253781 - vendor-sys/illumos/dist/common/zfs vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/zfs vendor/illumos/dist/lib/... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:31:46 -0000 Author: delphij Date: Mon Jul 29 20:31:44 2013 New Revision: 253781 URL: http://svnweb.freebsd.org/changeset/base/253781 Log: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/lib/libzfs/common/libzfs_dataset.c Modified: vendor-sys/illumos/dist/common/zfs/zfs_prop.c ============================================================================== --- vendor-sys/illumos/dist/common/zfs/zfs_prop.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/common/zfs/zfs_prop.c Mon Jul 29 20:31:44 2013 (r253781) @@ -395,6 +395,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE"); zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); + zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:31:44 2013 (r253781) @@ -1553,7 +1553,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1561,7 +1561,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); } return (error); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:31:44 2013 (r253781) @@ -947,7 +947,7 @@ typedef struct dsl_dataset_snapshot_arg int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx) + dmu_tx_t *tx, boolean_t recv) { int error; uint64_t value; @@ -973,6 +973,18 @@ dsl_dataset_snapshot_check_impl(dsl_data if (error != ENOENT) return (error); + /* + * We don't allow taking snapshots of inconsistent datasets, such as + * those into which we are currently receiving. However, if we are + * creating this snapshot as part of a receive, this check will be + * executed atomically with respect to the completion of the receive + * itself but prior to the clearing of DS_FLAG_INCONSISTENT; in this + * case we ignore this, knowing it will be fixed up for us shortly in + * dmu_recv_end_sync(). + */ + if (!recv && DS_IS_INCONSISTENT(ds)) + return (SET_ERROR(EBUSY)); + error = dsl_dataset_snapshot_reserve_space(ds, tx); if (error != 0) return (error); @@ -1009,7 +1021,7 @@ dsl_dataset_snapshot_check(void *arg, dm error = dsl_dataset_hold(dp, dsname, FTAG, &ds); if (error == 0) { error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx); + atp + 1, tx, B_FALSE); dsl_dataset_rele(ds, FTAG); } @@ -1262,7 +1274,8 @@ dsl_dataset_snapshot_tmp_check(void *arg if (error != 0) return (error); - error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, tx); + error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, + tx, B_FALSE); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:26:33 2013 (r253780) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:31:44 2013 (r253781) @@ -251,7 +251,7 @@ int dsl_dataset_clone_swap_check_impl(ds void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx); + dmu_tx_t *tx, boolean_t recv); void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx); From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:33:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07C389FA; Mon, 29 Jul 2013 20:33:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E69572F1A; Mon, 29 Jul 2013 20:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKXoue024586; Mon, 29 Jul 2013 20:33:50 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKXnSi024581; Mon, 29 Jul 2013 20:33:49 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292033.r6TKXnSi024581@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:33:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253782 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:33:51 -0000 Author: delphij Date: Mon Jul 29 20:33:49 2013 New Revision: 253782 URL: http://svnweb.freebsd.org/changeset/base/253782 Log: Update vendor-sys/illumos/dist to illumos-gate 14094:8a2884391fc2: Illumos ZFS issues: 3888 zfs recv -F should destroy any snapshots created since the incremental source Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:33:49 2013 (r253782) @@ -654,6 +654,7 @@ typedef struct dmu_recv_begin_arg { const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; + uint64_t drba_snapobj; } dmu_recv_begin_arg_t; static int @@ -664,11 +665,6 @@ recv_begin_check_existing_impl(dmu_recv_ int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; - /* must not have any changes since most recent snapshot */ - if (!drba->drba_cookie->drc_force && - dsl_dataset_modified_since_lastsnap(ds)) - return (SET_ERROR(ETXTBSY)); - /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, @@ -684,41 +680,47 @@ recv_begin_check_existing_impl(dmu_recv_ return (error == 0 ? EEXIST : error); if (fromguid != 0) { - /* if incremental, most recent snapshot must match fromguid */ - if (ds->ds_prev == NULL) + dsl_dataset_t *snap; + uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + + /* Find snapshot in this dir that matches fromguid. */ + while (obj != 0) { + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (SET_ERROR(ENODEV)); + if (snap->ds_dir != ds->ds_dir) { + dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ENODEV)); + } + if (snap->ds_phys->ds_guid == fromguid) + break; + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + } + if (obj == 0) return (SET_ERROR(ENODEV)); - /* - * most recent snapshot must match fromguid, or there are no - * changes since the fromguid one - */ - if (ds->ds_prev->ds_phys->ds_guid != fromguid) { - uint64_t birth = ds->ds_prev->ds_phys->ds_bp.blk_birth; - uint64_t obj = ds->ds_prev->ds_phys->ds_prev_snap_obj; - while (obj != 0) { - dsl_dataset_t *snap; - error = dsl_dataset_hold_obj(dp, obj, FTAG, - &snap); - if (error != 0) - return (SET_ERROR(ENODEV)); - if (snap->ds_phys->ds_creation_txg < birth) { - dsl_dataset_rele(snap, FTAG); - return (SET_ERROR(ENODEV)); - } - if (snap->ds_phys->ds_guid == fromguid) { - dsl_dataset_rele(snap, FTAG); - break; /* it's ok */ - } - obj = snap->ds_phys->ds_prev_snap_obj; + if (drba->drba_cookie->drc_force) { + drba->drba_snapobj = obj; + } else { + /* + * If we are not forcing, there must be no + * changes since fromsnap. + */ + if (dsl_dataset_modified_since_snap(ds, snap)) { dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ETXTBSY)); } - if (obj == 0) - return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_prev->ds_object; } + + dsl_dataset_rele(snap, FTAG); } else { /* if full, most recent snapshot must be $ORIGIN */ if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_phys->ds_prev_snap_obj; } return (0); @@ -827,8 +829,14 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t error = dsl_dataset_hold(dp, tofs, FTAG, &ds); if (error == 0) { /* create temporary clone */ + dsl_dataset_t *snap = NULL; + if (drba->drba_snapobj != 0) { + VERIFY0(dsl_dataset_hold_obj(dp, + drba->drba_snapobj, FTAG, &snap)); + } dsobj = dsl_dataset_create_sync(ds->ds_dir, recv_clone_name, - ds->ds_prev, crflags, drba->drba_cred, tx); + snap, crflags, drba->drba_cred, tx); + dsl_dataset_rele(snap, FTAG); dsl_dataset_rele(ds, FTAG); } else { dsl_dir_t *dd; @@ -1546,6 +1554,32 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head); if (error != 0) return (error); + if (drc->drc_force) { + /* + * We will destroy any snapshots in tofs (i.e. before + * origin_head) that are after the origin (which is + * the snap before drc_ds, because drc_ds can not + * have any snaps of its own). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (error); + if (snap->ds_dir != origin_head->ds_dir) + error = SET_ERROR(EINVAL); + if (error == 0) { + error = dsl_destroy_snapshot_check_impl( + snap, B_FALSE); + } + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + if (error != 0) + return (error); + } + } error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { @@ -1580,6 +1614,27 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t VERIFY0(dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head)); + + if (drc->drc_force) { + /* + * Destroy any snapshots of drc_tofs (origin_head) + * after the origin (the snap before drc_ds). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, + &snap)); + ASSERT3P(snap->ds_dir, ==, origin_head->ds_dir); + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_destroy_snapshot_sync_impl(snap, + B_FALSE, tx); + dsl_dataset_rele(snap, FTAG); + } + } + VERIFY3P(drc->drc_ds->ds_prev, ==, + origin_head->ds_prev); + dsl_dataset_clone_swap_sync_impl(drc->drc_ds, origin_head, tx); dsl_dataset_snapshot_sync_impl(origin_head, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Mon Jul 29 20:33:49 2013 (r253782) @@ -1533,16 +1533,16 @@ dsl_dataset_space(dsl_dataset_t *ds, } boolean_t -dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds) +dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; ASSERT(dsl_pool_config_held(dp)); - if (ds->ds_prev == NULL) + if (snap == NULL) return (B_FALSE); if (ds->ds_phys->ds_bp.blk_birth > - ds->ds_prev->ds_phys->ds_creation_txg) { - objset_t *os, *os_prev; + snap->ds_phys->ds_creation_txg) { + objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was * reset in the head. Don't count that as being @@ -1550,10 +1550,10 @@ dsl_dataset_modified_since_lastsnap(dsl_ */ if (dmu_objset_from_ds(ds, &os) != 0) return (B_TRUE); - if (dmu_objset_from_ds(ds->ds_prev, &os_prev) != 0) + if (dmu_objset_from_ds(snap, &os_snap) != 0) return (B_TRUE); return (bcmp(&os->os_phys->os_meta_dnode, - &os_prev->os_phys->os_meta_dnode, + &os_snap->os_phys->os_meta_dnode, sizeof (os->os_phys->os_meta_dnode)) != 0); } return (B_FALSE); @@ -2356,15 +2356,14 @@ dsl_dataset_clone_swap_check_impl(dsl_da dsl_dataset_is_snapshot(origin_head)) return (SET_ERROR(EINVAL)); - /* the branch point should be just before them */ - if (clone->ds_prev != origin_head->ds_prev) + /* if we are not forcing, the branch point should be just before them */ + if (!force && clone->ds_prev != origin_head->ds_prev) return (SET_ERROR(EINVAL)); /* clone should be the clone (unless they are unrelated) */ if (clone->ds_prev != NULL && clone->ds_prev != clone->ds_dir->dd_pool->dp_origin_snap && - origin_head->ds_object != - clone->ds_prev->ds_phys->ds_next_snap_obj) + origin_head->ds_dir != clone->ds_prev->ds_dir) return (SET_ERROR(EINVAL)); /* the clone should be a child of the origin */ @@ -2372,7 +2371,8 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(EINVAL)); /* origin_head shouldn't be modified unless 'force' */ - if (!force && dsl_dataset_modified_since_lastsnap(origin_head)) + if (!force && + dsl_dataset_modified_since_snap(origin_head, origin_head->ds_prev)) return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ @@ -2409,6 +2409,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat ASSERT(clone->ds_reserved == 0); ASSERT(origin_head->ds_quota == 0 || clone->ds_phys->ds_unique_bytes <= origin_head->ds_quota); + ASSERT3P(clone->ds_prev, ==, origin_head->ds_prev); dmu_buf_will_dirty(clone->ds_dbuf, tx); dmu_buf_will_dirty(origin_head->ds_dbuf, tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c Mon Jul 29 20:33:49 2013 (r253782) @@ -46,10 +46,7 @@ typedef struct dmu_snapshots_destroy_arg nvlist_t *dsda_errlist; } dmu_snapshots_destroy_arg_t; -/* - * ds must be owned. - */ -static int +int dsl_destroy_snapshot_check_impl(dsl_dataset_t *ds, boolean_t defer) { if (!dsl_dataset_is_snapshot(ds)) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h Mon Jul 29 20:33:49 2013 (r253782) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -206,7 +206,8 @@ void dsl_dataset_set_blkptr(dsl_dataset_ spa_t *dsl_dataset_get_spa(dsl_dataset_t *ds); -boolean_t dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds); +boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, + dsl_dataset_t *snap); void dsl_dataset_sync(dsl_dataset_t *os, zio_t *zio, dmu_tx_t *tx); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Mon Jul 29 20:31:44 2013 (r253781) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_destroy.h Mon Jul 29 20:33:49 2013 (r253782) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -35,15 +35,16 @@ struct nvlist; struct dsl_dataset; struct dmu_tx; -int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer, - struct nvlist *errlist); -int dsl_destroy_snapshot(const char *name, boolean_t defer); -int dsl_destroy_head(const char *name); -int dsl_destroy_head_check_impl(struct dsl_dataset *ds, int expected_holds); -void dsl_destroy_head_sync_impl(struct dsl_dataset *ds, struct dmu_tx *tx); -int dsl_destroy_inconsistent(const char *dsname, void *arg); -void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *ds, - boolean_t defer, struct dmu_tx *tx); +int dsl_destroy_snapshots_nvl(struct nvlist *, boolean_t, + struct nvlist *); +int dsl_destroy_snapshot(const char *, boolean_t); +int dsl_destroy_head(const char *); +int dsl_destroy_head_check_impl(struct dsl_dataset *, int); +void dsl_destroy_head_sync_impl(struct dsl_dataset *, struct dmu_tx *); +int dsl_destroy_inconsistent(const char *, void *); +int dsl_destroy_snapshot_check_impl(struct dsl_dataset *, boolean_t); +void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *, + boolean_t, struct dmu_tx *); #ifdef __cplusplus } From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:35:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 19E9BCCD; Mon, 29 Jul 2013 20:35:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EA7962F2E; Mon, 29 Jul 2013 20:35:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKZDgh024805; Mon, 29 Jul 2013 20:35:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKZCH0024800; Mon, 29 Jul 2013 20:35:12 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292035.r6TKZCH0024800@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253783 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:35:14 -0000 Author: delphij Date: Mon Jul 29 20:35:12 2013 New Revision: 253783 URL: http://svnweb.freebsd.org/changeset/base/253783 Log: Update vendor-sys/illumos/dist to illumos-gate 14095:277fa158020c: Illumos ZFS issues: 3834 incremental replication of 'holey' file systems is slow Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Mon Jul 29 20:35:12 2013 (r253783) @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -796,9 +797,12 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) /* * Evict (if its unreferenced) or clear (if its referenced) any level-0 * data blocks in the free range, so that any future readers will find - * empty blocks. Also, if we happen accross any level-1 dbufs in the + * empty blocks. Also, if we happen across any level-1 dbufs in the * range that have not already been marked dirty, mark them dirty so * they stay in memory. + * + * This is a no-op if the dataset is in the middle of an incremental + * receive; see comment below for details. */ void dbuf_free_range(dnode_t *dn, uint64_t start, uint64_t end, dmu_tx_t *tx) @@ -814,6 +818,20 @@ dbuf_free_range(dnode_t *dn, uint64_t st last_l1 = end >> epbs; } dprintf_dnode(dn, "start=%llu end=%llu\n", start, end); + + if (dmu_objset_is_receiving(dn->dn_objset)) { + /* + * When processing a free record from a zfs receive, + * there should have been no previous modifications to the + * data in this range. Therefore there should be no dbufs + * in the range. Searching dn_dbufs for these non-existent + * dbufs can be very expensive, so simply ignore this. + */ + VERIFY3P(dbuf_find(dn, 0, start), ==, NULL); + VERIFY3P(dbuf_find(dn, 0, end), ==, NULL); + return; + } + mutex_enter(&dn->dn_dbufs_mtx); for (db = list_head(&dn->dn_dbufs); db; db = db_next) { db_next = list_next(&dn->dn_dbufs, db); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Mon Jul 29 20:35:12 2013 (r253783) @@ -80,6 +80,32 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o { struct drr_free *drrf = &(dsp->dsa_drr->drr_u.drr_free); + /* + * When we receive a free record, dbuf_free_range() assumes + * that the receiving system doesn't have any dbufs in the range + * being freed. This is always true because there is a one-record + * constraint: we only send one WRITE record for any given + * object+offset. We know that the one-record constraint is + * true because we always send data in increasing order by + * object,offset. + * + * If the increasing-order constraint ever changes, we should find + * another way to assert that the one-record constraint is still + * satisfied. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + + /* + * If we are doing a non-incremental send, then there can't + * be any data in the dataset we're receiving into. Therefore + * a free record would simply be a no-op. Save space by not + * sending it to begin with. + */ + if (!dsp->dsa_incremental) + return (0); + if (length != -1ULL && offset + length < offset) length = -1ULL; @@ -146,6 +172,15 @@ dump_data(dmu_sendarg_t *dsp, dmu_object { struct drr_write *drrw = &(dsp->dsa_drr->drr_u.drr_write); + /* + * We send data in increasing object, offset order. + * See comment in dump_free() for details. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + dsp->dsa_last_data_object = object; + dsp->dsa_last_data_offset = offset + blksz - 1; /* * If there is any kind of pending aggregation (currently either @@ -213,6 +248,10 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin { struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects); + /* See comment in dump_free(). */ + if (!dsp->dsa_incremental) + return (0); + /* * If there is a pending op, but it's not PENDING_FREEOBJECTS, * push it out, since free block aggregation can only be done for @@ -289,9 +328,9 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t if (dump_bytes(dsp, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) return (SET_ERROR(EINTR)); - /* free anything past the end of the file */ + /* Free anything past the end of the file. */ if (dump_free(dsp, object, (dnp->dn_maxblkid + 1) * - (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL)) + (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL) != 0) return (SET_ERROR(EINTR)); if (dsp->dsa_err != 0) return (SET_ERROR(EINTR)); @@ -474,6 +513,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_toguid = ds->ds_phys->ds_guid; ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); dsp->dsa_pending_op = PENDING_NONE; + dsp->dsa_incremental = (fromtxg != 0); mutex_enter(&ds->ds_sendstream_lock); list_insert_head(&ds->ds_sendstreams, dsp); @@ -1765,3 +1805,13 @@ dmu_recv_end(dmu_recv_cookie_t *drc, voi else return (dmu_recv_existing_end(drc)); } + +/* + * Return TRUE if this objset is currently being received into. + */ +boolean_t +dmu_objset_is_receiving(objset_t *os) +{ + return (os->os_dsl_dataset != NULL && + os->os_dsl_dataset->ds_owner == dmu_recv_tag); +} Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_tx.c Mon Jul 29 20:35:12 2013 (r253783) @@ -587,8 +587,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t { dmu_tx_hold_t *txh; dnode_t *dn; - uint64_t start, end, i; - int err, shift; + int err; zio_t *zio; ASSERT(tx->tx_txg == 0); @@ -599,34 +598,48 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t return; dn = txh->txh_dnode; - /* first block */ - if (off != 0) - dmu_tx_count_write(txh, off, 1); - /* last block */ - if (len != DMU_OBJECT_END) - dmu_tx_count_write(txh, off+len, 1); - - dmu_tx_count_dnode(txh); - if (off >= (dn->dn_maxblkid+1) * dn->dn_datablksz) return; if (len == DMU_OBJECT_END) len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; + dmu_tx_count_dnode(txh); + /* - * For i/o error checking, read the first and last level-0 - * blocks, and all the level-1 blocks. The above count_write's - * have already taken care of the level-0 blocks. + * For i/o error checking, we read the first and last level-0 + * blocks if they are not aligned, and all the level-1 blocks. + * + * Note: dbuf_free_range() assumes that we have not instantiated + * any level-0 dbufs that will be completely freed. Therefore we must + * exercise care to not read or count the first and last blocks + * if they are blocksize-aligned. + */ + if (dn->dn_datablkshift == 0) { + dmu_tx_count_write(txh, off, len); + } else { + /* first block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off, 1); + /* last block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off + len, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off+len, 1); + } + + /* + * Check level-1 blocks. */ if (dn->dn_nlevels > 1) { - shift = dn->dn_datablkshift + dn->dn_indblkshift - + int shift = dn->dn_datablkshift + dn->dn_indblkshift - SPA_BLKPTRSHIFT; - start = off >> shift; - end = dn->dn_datablkshift ? ((off+len) >> shift) : 0; + uint64_t start = off >> shift; + uint64_t end = (off + len) >> shift; + + ASSERT(dn->dn_datablkshift != 0); + ASSERT(dn->dn_indblkshift != 0); zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); - for (i = start; i <= end; i++) { + for (uint64_t i = start; i <= end; i++) { uint64_t ibyte = i << shift; err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0); i = ibyte >> shift; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_impl.h Mon Jul 29 20:35:12 2013 (r253783) @@ -21,7 +21,10 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + */ +/* * Copyright (c) 2012, Joyent, Inc. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_DMU_IMPL_H @@ -290,6 +293,9 @@ typedef struct dmu_sendarg { uint64_t dsa_toguid; int dsa_err; dmu_pendop_t dsa_pending_op; + boolean_t dsa_incremental; + uint64_t dsa_last_data_object; + uint64_t dsa_last_data_offset; } dmu_sendarg_t; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:33:49 2013 (r253782) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_send.h Mon Jul 29 20:35:12 2013 (r253783) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -63,5 +63,6 @@ int dmu_recv_begin(char *tofs, char *tos int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp, int cleanup_fd, uint64_t *action_handlep); int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); +boolean_t dmu_objset_is_receiving(objset_t *os); #endif /* _DMU_SEND_H */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:36:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B82DDE1B; Mon, 29 Jul 2013 20:36:27 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4E842F41; Mon, 29 Jul 2013 20:36:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKaRui024964; Mon, 29 Jul 2013 20:36:27 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKaR2t024963; Mon, 29 Jul 2013 20:36:27 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307292036.r6TKaR2t024963@svn.freebsd.org> From: Xin LI Date: Mon, 29 Jul 2013 20:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253784 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:36:27 -0000 Author: delphij Date: Mon Jul 29 20:36:27 2013 New Revision: 253784 URL: http://svnweb.freebsd.org/changeset/base/253784 Log: Update vendor/illumos/dist to illumos-gate 14096:12d3631da129: Illumos ZFS issues: 3909 "zfs send -D" does not work Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Mon Jul 29 20:35:12 2013 (r253783) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_sendrecv.c Mon Jul 29 20:36:27 2013 (r253784) @@ -1566,8 +1566,8 @@ zfs_send(zfs_handle_t *zhp, const char * if (tid != 0) { if (err != 0) (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } if (sdd.cleanup_fd != -1) { @@ -1603,8 +1603,8 @@ err_out: VERIFY(0 == close(sdd.cleanup_fd)); if (tid != 0) { (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } return (err); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:38:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5F782F80; Mon, 29 Jul 2013 20:38:51 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB73D2F65; Mon, 29 Jul 2013 20:38:50 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.7/8.14.7/ALCHEMY.FRANKEN.DE) with ESMTP id r6TKcm56085758; Mon, 29 Jul 2013 22:38:48 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.7/8.14.7/Submit) id r6TKcmYX085757; Mon, 29 Jul 2013 22:38:48 +0200 (CEST) (envelope-from marius) Date: Mon, 29 Jul 2013 22:38:48 +0200 From: Marius Strobl To: Edward Tomasz Napierala , ken@freebsd.org Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf Message-ID: <20130729203848.GG948@alchemy.franken.de> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304121625.r3CGP3Dv068400@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:38:51 -0000 On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Apr 12 16:25:03 2013 > New Revision: 249410 > URL: http://svnweb.freebsd.org/changeset/base/249410 > > Log: > Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' > and kern.cam.ctl.disable tunable; those were introduced as a workaround > to make it possible to boot GENERIC on low memory machines. > > With ctl(4) being built as a module and automatically loaded by ctladm(8), > this makes CTL work out of the box. > Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in order to reduce the default memory footprint there? Marius From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:48:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7A9524F4; Mon, 29 Jul 2013 20:48:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 679502FFB; Mon, 29 Jul 2013 20:48:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKmBWc028094; Mon, 29 Jul 2013 20:48:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKmBau028093; Mon, 29 Jul 2013 20:48:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201307292048.r6TKmBau028093@svn.freebsd.org> From: John Baldwin Date: Mon, 29 Jul 2013 20:48:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253785 - head/sys/ofed/drivers/net/mlx4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:48:11 -0000 Author: jhb Date: Mon Jul 29 20:48:10 2013 New Revision: 253785 URL: http://svnweb.freebsd.org/changeset/base/253785 Log: Add a missing prototype. Pointy hat: me Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c Modified: head/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Jul 29 20:36:27 2013 (r253784) +++ head/sys/ofed/drivers/net/mlx4/en_netdev.c Mon Jul 29 20:48:10 2013 (r253785) @@ -43,6 +43,7 @@ #include #include +static void mlx4_en_init_locked(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_vlan_rx_add_vid(void *arg, struct net_device *dev, u16 vid) From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 20:58:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 28E14B46; Mon, 29 Jul 2013 20:58:11 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 07CDC2079; Mon, 29 Jul 2013 20:58:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TKwAek031202; Mon, 29 Jul 2013 20:58:10 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TKwA56031193; Mon, 29 Jul 2013 20:58:10 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201307292058.r6TKwA56031193@svn.freebsd.org> From: "David E. O'Brien" Date: Mon, 29 Jul 2013 20:58:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 20:58:11 -0000 Author: obrien Date: Mon Jul 29 20:58:09 2013 New Revision: 253786 URL: http://svnweb.freebsd.org/changeset/base/253786 Log: Decouple yarrow from random(4) device. * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. * random(4) device doesn't really depend on rijndael-*. Yarrow, however, does. * Add random_adaptors.[ch] which is basically a store of random_adaptor's. random_adaptor is basically an adapter that plugs in to random(4). random_adaptor can only be plugged in to random(4) very early in bootup. Unplugging random_adaptor from random(4) is not supported, and is probably a bad idea anyway, due to potential loss of entropy pools. We currently have 3 random_adaptors: + yarrow + rdrand (ivy.c) + nehemeiah * Remove platform dependent logic from probe.c, and move it into corresponding registration routines of each random_adaptor provider. probe.c doesn't do anything other than picking a specific random_adaptor from a list of registered ones. * If the kernel doesn't have any random_adaptor adapters present then the creation of /dev/random is postponed until next random_adaptor is kldload'ed. * Fix randomdev_soft.c to refer to its own random_adaptor, instead of a system wide one. Submitted by: arthurmesh@gmail.com, obrien Obtained from: Juniper Networks Reviewed by: obrien Added: head/sys/dev/random/random_adaptors.c (contents, props changed) head/sys/dev/random/random_adaptors.h (contents, props changed) head/sys/modules/padlock_rng/ head/sys/modules/padlock_rng/Makefile (contents, props changed) head/sys/modules/rdrand_rng/ head/sys/modules/rdrand_rng/Makefile (contents, props changed) head/sys/modules/yarrow_rng/ head/sys/modules/yarrow_rng/Makefile (contents, props changed) Added: head/sys/dev/random/random_adaptors.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/random_adaptors.c Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,141 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +LIST_HEAD(adaptors_head, random_adaptors); +static struct adaptors_head adaptors = LIST_HEAD_INITIALIZER(adaptors); +static struct sx adaptors_lock; /* need a sleepable lock */ + +/* List for the dynamic sysctls */ +static struct sysctl_ctx_list random_clist; + +MALLOC_DEFINE(M_RANDOM_ADAPTORS, "random_adaptors", "Random adaptors buffers"); + +int +random_adaptor_register(const char *name, struct random_adaptor *rsp) +{ + struct random_adaptors *rpp; + + KASSERT(name != NULL && rsp != NULL, ("invalid input to %s", __func__)); + + rpp = malloc(sizeof(struct random_adaptors), M_RANDOM_ADAPTORS, M_WAITOK); + rpp->name = name; + rpp->rsp = rsp; + + sx_xlock(&adaptors_lock); + LIST_INSERT_HEAD(&adaptors, rpp, entries); + sx_xunlock(&adaptors_lock); + + return (0); +} + +struct random_adaptor * +random_adaptor_get(const char *name) +{ + struct random_adaptors *rpp; + struct random_adaptor *rsp; + + rsp = NULL; + + sx_slock(&adaptors_lock); + + LIST_FOREACH(rpp, &adaptors, entries) + if (strcmp(rpp->name, name) == 0) + rsp = rpp->rsp; + + sx_sunlock(&adaptors_lock); + + return (rsp); +} + +static void +random_adaptors_deinit(void *unused) +{ + + sx_destroy(&adaptors_lock); + sysctl_ctx_free(&random_clist); +} + +#define NO_ADAPTORS "" +static int +random_sysctl_adaptors_handler(SYSCTL_HANDLER_ARGS) +{ + struct random_adaptors *rpp; + int error; + + error = 0; + + sx_slock(&adaptors_lock); + + if (LIST_EMPTY(&adaptors)) + error = SYSCTL_OUT(req, NO_ADAPTORS, strlen(NO_ADAPTORS)); + + LIST_FOREACH(rpp, &adaptors, entries) { + error = SYSCTL_OUT(req, " ", 1); + if (!error) + error = SYSCTL_OUT(req, rpp->name, strlen(rpp->name)); + if (error) + break; + } + + sx_sunlock(&adaptors_lock); + + return (error); +} + +static void +random_adaptors_init(void *unused) +{ + + SYSCTL_PROC(_kern_random, OID_AUTO, adaptors, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, 0, random_sysctl_adaptors_handler, "", + "Random Number Generator adaptors"); + + sx_init(&adaptors_lock, "random_adaptors"); +} + +SYSCTL_NODE(_kern, OID_AUTO, random, CTLFLAG_RW, 0, "Random Number Generator"); + +SYSINIT(random_adaptors, SI_SUB_DRIVERS, SI_ORDER_FIRST, random_adaptors_init, + NULL); +SYSUNINIT(random_adaptors, SI_SUB_DRIVERS, SI_ORDER_FIRST, + random_adaptors_deinit, NULL); Added: head/sys/dev/random/random_adaptors.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/random/random_adaptors.h Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2013 Arthur Mesh + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __RANDOM_ADAPTORS_H__ +#define __RANDOM_ADAPTORS_H__ + +#include + +struct random_adaptors { + LIST_ENTRY(random_adaptors) entries; /* list of providesr */ + const char *name; /* name of random adaptor */ + struct random_adaptor *rsp; +}; + +struct random_adaptor *random_adaptor_get(const char *); +int random_adaptor_register(const char *, struct random_adaptor *); + +/* + * random_adaptor's should be registered prior to + * random module (SI_SUB_DRIVERS/SI_ORDER_MIDDLE) + */ +#define RANDOM_ADAPTOR_MODULE(name, modevent, ver) \ + static moduledata_t name##_mod = { \ + #name, \ + modevent, \ + 0 \ + }; \ + DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, \ + SI_ORDER_SECOND); \ + MODULE_VERSION(name, ver); \ + MODULE_DEPEND(name, random, 1, 1, 1); + +typedef void (*random_adaptor_attach_hook)(void *, struct random_adaptor *); +EVENTHANDLER_DECLARE(random_adaptor_attach, random_adaptor_attach_hook); + +/* kern.random sysctls */ +#ifdef SYSCTL_DECL /* from sysctl.h */ +SYSCTL_DECL(_kern_random); +#endif /* SYSCTL_DECL */ + +#endif /* __RANDOM_ADAPTORS_H__ */ Added: head/sys/modules/padlock_rng/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/padlock_rng/Makefile Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/random + +KMOD= padlock_rng + +SRCS+= \ + nehemiah.c + +.include Added: head/sys/modules/rdrand_rng/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/rdrand_rng/Makefile Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/random + +KMOD= rdrand_rng + +SRCS+= \ + ivy.c + +.include Added: head/sys/modules/yarrow_rng/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/yarrow_rng/Makefile Mon Jul 29 20:58:09 2013 (r253786) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/random +.PATH: ${.CURDIR}/../../crypto/rijndael + +KMOD= yarrow_rng + +SRCS+= \ + hash.c \ + randomdev_soft.c \ + rijndael-alg-fst.c \ + rijndael-api-fst.c \ + yarrow.c + +SRCS+= bus_if.h device_if.h + +CFLAGS+= -I${.CURDIR}/../.. + +.include From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 21:23:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D91C49B; Mon, 29 Jul 2013 21:23:14 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCCE92192; Mon, 29 Jul 2013 21:23:13 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 96FAAB94A; Mon, 29 Jul 2013 17:23:12 -0400 (EDT) From: John Baldwin To: sbruno@freebsd.org Subject: Re: svn commit: r253708 - head/sys/dev/ipmi Date: Mon, 29 Jul 2013 17:22:26 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <1375127952.1479.32.camel@localhost> <1375129288.1479.36.camel@localhost> In-Reply-To: <1375129288.1479.36.camel@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307291722.27017.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 29 Jul 2013 17:23:12 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 21:23:14 -0000 On Monday, July 29, 2013 4:21:28 pm Sean Bruno wrote: > On Mon, 2013-07-29 at 12:59 -0700, Sean Bruno wrote: > > On Mon, 2013-07-29 at 10:54 -0400, John Baldwin wrote: > > > On Saturday, July 27, 2013 12:32:34 pm Sean Bruno wrote: > > > > Author: sbruno > > > > Date: Sat Jul 27 16:32:34 2013 > > > > New Revision: 253708 > > > > URL: http://svnweb.freebsd.org/changeset/base/253708 > > > > > > > > Log: > > > > At some point after stable/7 the ACPI and ISA interfaces to the IPMI controller > > > > no longer have the parent in the device tree. This causes the identify > > > > function in ipmi_isa.c to attempt to probe and poke at the ISA IPMI interface > > > > > > They never had a common parent, even in 6.x and 7.x. > > > > > The identify function in isa_ipmi.c shows that there is already an > > ipmi(4) device attached (ACPI) version and aborts on 7.x. in 9.x and > > higher (not testing on 8.x) the identify function does not see an > > attached ipmi interface and attempts to create /dev/ipmi1 > > > > Am I just confused on the bus relationship here? > > > > We've gone over this a couple of times in different emails on different > > lists. I've just never sat down and walked through the code. If you > > see a better way to keep ipmi(4) from erroneously attaching to the ISA > > interface, let me know. > > > Or ... ya know, I could just be 100% wrong? > > stable/7 attaches to an /dev/ipmi1 as well on these Dell R410 units. > *sigh* > > http://people.freebsd.org/~sbruno/ipmi_sean_is_wrong.txt It doesn't attach. Read the second line here: ipmi1: on isa0 device_attach: ipmi1 attach returned 16 Do you have an actual /dev/ipmi1 file if you login to this machine and look in /dev? > so, the modification I made does resolve the "ipmi1" thing alltogether > and is correct (AFAIK), but should be applied to all revisions, not just > 9/head. > > Or, am I wrong again? :-) The change you made is purely cosmetic. It just moves the check slightly earlier to hide the message. If you want to hide the message, put the ipmi_attached check in the ipmi_isa_probe() routine (the other frontend look in probe(), not attach()). However, that is purely a comsetic issue that should just remove the two printfs, it should not have _any_ affect on getting NMI's from your bce(4) adapter. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 21:32:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ABE009F5; Mon, 29 Jul 2013 21:32:57 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9936C221B; Mon, 29 Jul 2013 21:32:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TLWvcm043145; Mon, 29 Jul 2013 21:32:57 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TLWvdu043144; Mon, 29 Jul 2013 21:32:57 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201307292132.r6TLWvdu043144@svn.freebsd.org> From: Olivier Houchard Date: Mon, 29 Jul 2013 21:32:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253787 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 21:32:57 -0000 Author: cognet Date: Mon Jul 29 21:32:57 2013 New Revision: 253787 URL: http://svnweb.freebsd.org/changeset/base/253787 Log: Remove useless cache operations. Modified: head/sys/arm/arm/busdma_machdep-v6.c Modified: head/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- head/sys/arm/arm/busdma_machdep-v6.c Mon Jul 29 20:58:09 2013 (r253786) +++ head/sys/arm/arm/busdma_machdep-v6.c Mon Jul 29 21:32:57 2013 (r253787) @@ -1197,11 +1197,6 @@ _bus_dmamap_sync(bus_dma_tag_t dmat, bus } if (op & BUS_DMASYNC_POSTREAD) { - cpu_dcache_inv_range((vm_offset_t)bpage->vaddr, - bpage->datacount); - l2cache_inv_range((vm_offset_t)bpage->vaddr, - (vm_offset_t)bpage->busaddr, - bpage->datacount); while (bpage != NULL) { vm_offset_t startv; vm_paddr_t startp; From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 21:37:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D213D14 for ; Mon, 29 Jul 2013 21:37:56 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com [209.85.217.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D45FC225E for ; Mon, 29 Jul 2013 21:37:55 +0000 (UTC) Received: by mail-lb0-f170.google.com with SMTP id r10so357043lbi.29 for ; Mon, 29 Jul 2013 14:37:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=93g7xk0lFkvKywjtNawzIQa5JBHuMIg4gSmMwHgVcOI=; b=QkhAkFrlZKaO41VqwOJicWXlYLONsCTN44xordsl50GeuUZnIXUFG2d5SgU94i6vnW sO4D/nR23TyBPk+YT2ZwjkapGjRnL5pzzYNLhQmmTlqJkNs8rvhZWbs1ZHAigy4BqB00 Nfk1UTncZ4rRFWhiHm42okhWmRYJPBgd9uk0qqovailf0McYUeaqEtEBLomNwe1Z5ZCc zhfX1r0IrJY/HKjD5uzaYkdKunGVk3PEEmj7YxEnWp34XUlw2gNjcjWg8G+y5FuwaypF Gdorq16ZqwFZF4s3h18nQS6+rdp6hjn2LafF7HcQddSKwFrmdKWeyX17EDWpFJZg5gNx +DRw== X-Received: by 10.112.168.137 with SMTP id zw9mr5587326lbb.93.1375133868140; Mon, 29 Jul 2013 14:37:48 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id 8sm6860147lbq.4.2013.07.29.14.37.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Jul 2013 14:37:47 -0700 (PDT) Message-ID: <51F6E0AB.3010001@freebsd.org> Date: Tue, 30 Jul 2013 01:37:47 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: "David E. O'Brien" Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> In-Reply-To: <201307292058.r6TKwA56031193@svn.freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmvuLXguxMmzXfWQJ2xlty4tRoV2S23u5QIW/QVCKNO9YKBuURz+yUr3L/u9B0tQf4Zgw5X Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 21:37:56 -0000 On 30.07.2013 0:58, David E. O'Brien wrote: > Author: obrien > Date: Mon Jul 29 20:58:09 2013 > New Revision: 253786 > URL: http://svnweb.freebsd.org/changeset/base/253786 > > Log: > Decouple yarrow from random(4) device. > > * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. > The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. ... > We currently have 3 random_adaptors: > + yarrow > + rdrand (ivy.c) > + nehemeiah After this commit we again have a problem with badly initialized arc4 (for rdrand and nehemiah cases, when yarrow isn't loaded), because only yarrow have reinit code. -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 21:45:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F123CF11; Mon, 29 Jul 2013 21:45:39 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CEE0322BD; Mon, 29 Jul 2013 21:45:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6TLjd8i046476; Mon, 29 Jul 2013 21:45:39 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6TLjdQQ046475; Mon, 29 Jul 2013 21:45:39 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201307292145.r6TLjdQQ046475@svn.freebsd.org> From: Olivier Houchard Date: Mon, 29 Jul 2013 21:45:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253788 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 21:45:40 -0000 Author: cognet Date: Mon Jul 29 21:45:39 2013 New Revision: 253788 URL: http://svnweb.freebsd.org/changeset/base/253788 Log: The errata 727915 requires a different workaround for r2p0, we have to explicitely clean/invalidate every cache line using way/set operations. Modified: head/sys/arm/arm/pl310.c Modified: head/sys/arm/arm/pl310.c ============================================================================== --- head/sys/arm/arm/pl310.c Mon Jul 29 21:32:57 2013 (r253787) +++ head/sys/arm/arm/pl310.c Mon Jul 29 21:45:39 2013 (r253788) @@ -79,6 +79,8 @@ static const uint32_t g_l2cache_line_siz static const uint32_t g_l2cache_align_mask = (32 - 1); static uint32_t g_l2cache_size; +static uint32_t g_way_size; +static uint32_t g_ways_assoc; static struct pl310_softc *pl310_softc; @@ -146,16 +148,29 @@ pl310_wbinv_all(void) PL310_LOCK(pl310_softc); #ifdef PL310_ERRATA_727915 - if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r2p0 || - pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) + if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r2p0) { + int i, j; + + for (i = 0; i < g_ways_assoc; i++) { + for (j = 0; j < g_way_size / g_l2cache_line_size; j++) { + pl310_write4(pl310_softc, + PL310_CLEAN_INV_LINE_IDX, + (i << 28 | j << 5)); + } + } + pl310_cache_sync(); + PL310_UNLOCK(pl310_softc); + return; + + } + if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) platform_pl310_write_debug(pl310_softc, 3); #endif pl310_write4(pl310_softc, PL310_CLEAN_INV_WAY, g_l2cache_way_mask); pl310_wait_background_op(PL310_CLEAN_INV_WAY, g_l2cache_way_mask); pl310_cache_sync(); #ifdef PL310_ERRATA_727915 - if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r2p0 || - pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) + if (pl310_softc->sc_rtl_revision == CACHE_ID_RELEASE_r3p0) platform_pl310_write_debug(pl310_softc, 0); #endif PL310_UNLOCK(pl310_softc); @@ -278,8 +293,6 @@ pl310_attach(device_t dev) struct pl310_softc *sc = device_get_softc(dev); int rid = 0; uint32_t aux_value; - uint32_t way_size; - uint32_t ways_assoc; uint32_t ctrl_value; uint32_t cache_id; @@ -312,18 +325,18 @@ pl310_attach(device_t dev) (cache_id >> CACHE_ID_PARTNUM_SHIFT) & CACHE_ID_PARTNUM_MASK, (cache_id >> CACHE_ID_RELEASE_SHIFT) & CACHE_ID_RELEASE_MASK); aux_value = pl310_read4(sc, PL310_AUX_CTRL); - way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >> + g_way_size = (aux_value & AUX_CTRL_WAY_SIZE_MASK) >> AUX_CTRL_WAY_SIZE_SHIFT; - way_size = 1 << (way_size + 13); + g_way_size = 1 << (g_way_size + 13); if (aux_value & (1 << AUX_CTRL_ASSOCIATIVITY_SHIFT)) - ways_assoc = 16; + g_ways_assoc = 16; else - ways_assoc = 8; - g_l2cache_way_mask = (1 << ways_assoc) - 1; - g_l2cache_size = way_size * ways_assoc; + g_ways_assoc = 8; + g_l2cache_way_mask = (1 << g_ways_assoc) - 1; + g_l2cache_size = g_way_size * g_ways_assoc; /* Print the information */ device_printf(dev, "L2 Cache: %uKB/%dB %d ways\n", (g_l2cache_size / 1024), - g_l2cache_line_size, ways_assoc); + g_l2cache_line_size, g_ways_assoc); ctrl_value = pl310_read4(sc, PL310_CTRL); From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 22:08:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F35494C9; Mon, 29 Jul 2013 22:08:37 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D21F623A4; Mon, 29 Jul 2013 22:08:37 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.6/8.14.6) with ESMTP id r6TLhF38027286; Mon, 29 Jul 2013 14:43:15 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.6/8.14.6/Submit) id r6TLhFpf027285; Mon, 29 Jul 2013 14:43:15 -0700 (PDT) (envelope-from sgk) Date: Mon, 29 Jul 2013 14:43:15 -0700 From: Steve Kargl To: "David E. O'Brien" Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130729214315.GA27225@troutmask.apl.washington.edu> References: <201307292058.r6TKwA56031193@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307292058.r6TKwA56031193@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 22:08:38 -0000 On Mon, Jul 29, 2013 at 08:58:10PM +0000, David E. O'Brien wrote: > Author: obrien > Date: Mon Jul 29 20:58:09 2013 > New Revision: 253786 > URL: http://svnweb.freebsd.org/changeset/base/253786 > > Log: > > * If the kernel doesn't have any random_adaptor adapters present > then the creation of /dev/random is postponed until next > random_adaptor is kldload'ed. I don't use modules. What is the magic I need to add to my kernel config files? Perhaps, an entry in src/UPDATING is needed. -- steve From owner-svn-src-all@FreeBSD.ORG Mon Jul 29 22:51:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 524B413C for ; Mon, 29 Jul 2013 22:51:04 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm40-vm4.bullet.mail.bf1.yahoo.com (nm40-vm4.bullet.mail.bf1.yahoo.com [72.30.239.212]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E26F6255E for ; Mon, 29 Jul 2013 22:51:03 +0000 (UTC) Received: from [98.139.212.148] by nm40.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 22:51:01 -0000 Received: from [68.142.230.69] by tm5.bullet.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 22:51:01 -0000 Received: from [127.0.0.1] by smtp226.mail.bf1.yahoo.com with NNFMP; 29 Jul 2013 22:51:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1375138261; bh=SgJYAafulbwetzYzVwvbYmqOmu25XCMWnebKRINGFGU=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=fB6C3U+ktX7i3ZNlu1fNQVQnbZHLuVsIx4yTT2eKQEnsgbIOxtPc1U4RbRNfWsdaDsBiTDN26n6LQHMFfG3jM7EIam7LetqtaO7MRE0TbBb37wqBXczr8cPU45Ozx6D4WlFo3sGIIvu0Vx6vx3Tzn46E5+tj/cTKIu+OyjMxhw4= X-Yahoo-Newman-Id: 657691.7138.bm@smtp226.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: n_lkrKoVM1nFr5yVHonbvBZJE2fDoByA6ieteykX9GXazjj xeEwt93m6rKBWIL9UO_TPmxuGFGCAYG1NZoiJ8BDvGoSx6ImgzB6Xzw25HR7 mqzGk01hfGprdF3z_Lr3jJKmpJ3uWLq0NMV3iiAtfSrj8N7mqrtXDr8.KmJf ViMXeN.HjxRRYrVCco9yXHkwQzGrzVAz9hRBD7ml0REPy_Z0WCHUVSMvastn lLoVTxoYP_Sb1rc_jItMMm0QY.MgxkP4EJZ50kQ3Y4sua.9ZAo3Doj4NXaNV jmUw2x7jN3aaUYbBctq79ApBp6eh.c2WhqDH..JihmIiNmQx6pETFogAjWYM K6S..8mjfkpO0ErCHOB5B8unsVYe8eCN7tk.syaQ4o7IYcQx816l3xB4TWZH C2DX_wXu3yYGpM0IjDV_gM0a6ohSON56LHxddPfT1L5be1uJDsPXoljlSk4S yLKxKZgOmEoBrfFr0eVr8Wz2kpCMbQn2Y49xDNtdDPGPU1CYxhVo7oHP67vN PklP2M49rdpBzDtJFMk6jxGIJs8ZnlqF6n.oyNoa8nzdgA1KXUB8E1mqOgk0 fNcurcHWAzdPbijBRlcyXY0zle2eeXq7kNnfCh.v7Hg9zyT3ucpekVP.2keY rq9YkOuoIp8zA4e7iRJah0pFCUT5lbhtcKWRbE07K X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp226.mail.bf1.yahoo.com with SMTP; 29 Jul 2013 22:51:01 +0000 UTC Subject: Re: svn commit: r253708 - head/sys/dev/ipmi From: Sean Bruno To: John Baldwin In-Reply-To: <201307291617.39898.jhb@freebsd.org> References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291054.55820.jhb@freebsd.org> <1375127952.1479.32.camel@localhost> <201307291617.39898.jhb@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-VuE9jZzijLk+qQydoXyk" Date: Mon, 29 Jul 2013 15:50:59 -0700 Message-ID: <1375138259.1479.69.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jul 2013 22:51:04 -0000 --=-VuE9jZzijLk+qQydoXyk Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable [sbruno_comment_blocks =3D=3D 4] >=20 > The identify function in 7.x has no such check: >=20 > static void > ipmi_isa_identify(driver_t *driver, device_t parent) > { > struct ipmi_get_info info; > uint32_t devid; >=20 > if (ipmi_smbios_identify(&info) && info.iface_type !=3D SSIF_MODE && > device_find_child(parent, "ipmi", -1) =3D=3D NULL) { Ok then what is this ^^^^^^^^^ ? Doesn't this mean that if device_find_child() returns a child node that we should abort? Is that not the same as what I'm going on about? >=20 > The only check in 7 was the one you just moved in ipmi_isa_attach(): >=20 > static int > ipmi_isa_attach(device_t dev) > { > struct ipmi_softc *sc =3D device_get_softc(dev); > struct ipmi_get_info info; > const char *mode; > int count, error, i, type; >=20 > /* > * Pull info out of the SMBIOS table. If that doesn't work, use > * hints to enumerate a device. > */ > if (!ipmi_smbios_identify(&info) && > !ipmi_hint_identify(dev, &info)) > return (ENXIO); >=20 > /* > * Give other drivers precedence. Unfortunately, this doesn't > * work if we have an SMBIOS table that duplicates a PCI device > * that's later on the bus than the PCI-ISA bridge. > */ > if (ipmi_attached) > return (EBUSY); > ... > } >=20 > > Am I just confused on the bus relationship here? > >=20 > > We've gone over this a couple of times in different emails on different > > lists. I've just never sat down and walked through the code. If you > > see a better way to keep ipmi(4) from erroneously attaching to the ISA > > interface, let me know. >=20 > I haven't seen any mention of this problem before. I've seen threads abo= ut > the watchdog issue (trying to set watchdog on shutdown which wants to use > threads, etc.), but not this. >=20 http://lists.freebsd.org/pipermail/freebsd-stable/2012-March/067023.html The thread gets broken apart by the mail list software though. Somewhere in there I point at ipmi1 things. But hell if I can find it anymore. > Also, can you provide the console messages without this patch? The previ= ous > check in ipmi_isa_attach() is long before we touch the BMC or ever get > around to creating /dev/ipmi1. (Just because you see ipmi1: in dmesg doe= sn't > mean it's created /dev/ipmi1.) >=20 Definitely does *not* create /dev/ipmi1. > > > > Move the check for ipmi_attached out of the ipmi_isa_attach funct= ion and into > > > > the ipmi_isa_identify function. Remove the check of the device t= ree for > > > > ipmi devices attached. > > > > =20 > > > > This probing appears to make Broadcom management firmware on Dell= machines > > > > crash and emit NMI EISA warnings at various times requiring power= cycles > > > > of the machines to restore. > > >=20 > > > This makes no sense. All you are doing is skipping ipmi_smbios_ident= ify() > > > which just looks at the SMBIOS table in RAM. It doesn't try to probe= the > > > BMC at all (no register accesses, etc.). If just reading a table in = memory > > > causes side effects, then running dmidecode in userland should be hos= ing your > > > machines as well. > > >=20 > >=20 > > Probably right. I'm not exactly sure what is making the Broadcom > > firmware fall over and die. But when I see the console emitting "NMI > > EISA" error messages, this ususally requires a full reboot as the > > network interface has crashed. Hopefully, I can dig up more "fact" soo= n > > as testing continues. >=20 > I'd rather be sure this is the right fix, and if it isn't I'd prefer to > revert this as I don't think it is actually fixing anything. >=20 It definitely does *not* have the effect that I advertised in my commit message. the commit DOES: -- remove any attempt to do anything in ipmi_isa_* functions. -- does not emit any errors on attach failure (which are noisy and distracting). -- make attaching to ipmi0 more "reliable" by blindly raising the timeout value to 6 seconds. (6 seconds is the totally empirical value I came up with in testing that never failed to attach across 100+ reboots). I disagree that it should be reverted. We can argue about it if you wish and I'm open to modifying back to the original code. I don't think I'd agree with removing the error messages on attachment failure though. I view the attachment failures as "sysadmin noise" but they should be there *if* there is a real attach failure. sean --=-VuE9jZzijLk+qQydoXyk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJR9vHTAAoJEBkJRdwI6BaHE/gH/3teJsMzMspVr1kW/WZmVK79 xRWARA5nUZjhyKAKWqSw5zQmZM8JmnW/0EVndHnS9idLkTGshAPWR02+EoUfXO8V wG7l54zLcu/KNM9GFssGgJONsAJciIf2g1Q2k7bLAn2wLH6ucIBMl73ZnAMdymcg U3dGCl/8M3D3TVZUVqzqUSoYhIG5rMu2pLZPqtGz84oqF4/+ln/VHzDG+4vjJm/t hd8yUge88pNyw/2ne61vZtYoyiElF34UNWkMy0Blu7UlleTXwAOibiGj/hqTqFy5 VDFR/IEpI8r/5sPbCYYLFZVAWkLMvc+dS4S15UNt8NP5FdNfadM631WuW8jdO9s= =NcDm -----END PGP SIGNATURE----- --=-VuE9jZzijLk+qQydoXyk-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 02:07:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEA2170; Tue, 30 Jul 2013 02:07:59 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 99A392C6B; Tue, 30 Jul 2013 02:07:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6U27xJf024562; Tue, 30 Jul 2013 02:07:59 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6U27vYR024547; Tue, 30 Jul 2013 02:07:57 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307300207.r6U27vYR024547@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Jul 2013 02:07:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253789 - in head: share/man/man4 sys/conf sys/dev/usb/wlan sys/modules/usb sys/modules/usb/rsu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 02:07:59 -0000 Author: rpaulo Date: Tue Jul 30 02:07:57 2013 New Revision: 253789 URL: http://svnweb.freebsd.org/changeset/base/253789 Log: Import OpenBSD's rsu(4) WLAN driver. Support chipsets are the Realtek RTL8188SU, RTL8191SU, and RTL8192SU. Many thanks to Idwer Vollering for porting/writing the man page and for testing. Reviewed by: adrian, hselasky Obtained from: OpenBSD Tested by: kevlo, Idwer Vollering Added: head/share/man/man4/rsu.4 (contents, props changed) head/share/man/man4/rsufw.4 (contents, props changed) head/sys/dev/usb/wlan/if_rsu.c (contents, props changed) head/sys/dev/usb/wlan/if_rsureg.h (contents, props changed) head/sys/modules/usb/rsu/ head/sys/modules/usb/rsu/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/NOTES head/sys/conf/WITHOUT_SOURCELESS_UCODE head/sys/conf/files head/sys/modules/usb/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jul 29 21:45:39 2013 (r253788) +++ head/share/man/man4/Makefile Tue Jul 30 02:07:57 2013 (r253789) @@ -385,6 +385,8 @@ MAN= aac.4 \ rndtest.4 \ route.4 \ rp.4 \ + rsu.4 \ + rsufw.4 \ rue.4 \ rum.4 \ run.4 \ Added: head/share/man/man4/rsu.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rsu.4 Tue Jul 30 02:07:57 2013 (r253789) @@ -0,0 +1,178 @@ +.\" $OpenBSD: rsu.4,v 1.11 2013/02/14 07:40:42 jmc Exp $ +.\" $FreeBSD$ +.\" +.\" Copyright (c) 2010 Damien Bergamini +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd July 29 2013 +.Dt RSU 4 +.Os +.Sh NAME +.Nm rsu +.Nd Realtek RTL8188SU/RTL8192SU USB IEEE 802.11b/g/n wireless network device +.Sh SYNOPSIS +.\.Cd "rsu* at uhub? port ?" +To compile this driver into the kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ehci" +.Cd "device uhci" +.Cd "device ohci" +.Cd "device usb" +.Cd "device rsu" +.Cd "device wlan" +.Ed +.Pp +Alternatively, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5: +.Bd -literal -offset indent +.Xr if_rsu_load="YES" +.Ed +.Pp +After you have read the license in /usr/share/doc/legal/realtek +you will want to add the following lines to +.Xr loader.conf 5 : +.Bd -literal -offset indent +legal.realtek.license_ack=1 +rsu-rtl8712fw_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver supports USB 2.0 wireless network devices based on Realtek +RTL8188SU, RTL8191SU and RTL8192SU chipsets. +.Pp +The RTL8188SU is a highly integrated 802.11n adapter that combines +a MAC, a 1T1R capable baseband and an RF in a single chip. +It operates in the 2GHz spectrum only. +.Pp +The RTL8191SU is a highly integrated multiple-in, single-out (MISO) +802.11n adapter that combines a MAC, a 1T2R capable baseband and an +RF in a single chip. +It operates in the 2GHz spectrum only. +.Pp +The RTL8192SU is a highly integrated multiple-in, multiple-out (MIMO) +802.11n adapter that combines a MAC, a 2T2R capable baseband and an +RF in a single chip. +It operates in the 2GHz spectrum only. +.Pp +These are the modes the +.Nm +driver can operate in: +.Bl -tag -width "IBSS-masterXX" +.It BSS mode +Also known as +.Em infrastructure +mode, this is used when associating with an access point, through +which all traffic passes. +This mode is the default. +.El +.Pp +The +.Nm +driver can be configured to use +Wired Equivalent Privacy (WEP) or +Wi-Fi Protected Access (WPA-PSK and WPA2-PSK). +WPA is the de facto encryption standard for wireless networks. +It is strongly recommended that WEP +not be used as the sole mechanism +to secure wireless communication, +due to serious weaknesses in it. +.Pp +The +.Nm +driver can be configured at runtime with +.Xr ifconfig 8 +or on boot with +.Xr hostname 1 . +.Sh FILES +The driver needs at least version 1.2 of the following firmware file, +which is loaded when an interface is attached: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It /boot/kernel/rsu-rtl8712fw.ko +.El +.Sh HARDWARE +The following adapters should work: +.Pp +.Bl -tag -width Ds -offset indent -compact +.It ASUS USB-N10 +.It Belkin F7D1101 v1 +.It D-Link DWA-131 A1 +.It EDUP EP-MS150N(W) +.It Hercules HWGUn-54 +.It Hercules HWNUm-300 +.It Planex GW-USNano +.It Sitecom WL-349 v1 +.It Sitecom WL-353 +.It Sweex LW154 +.It TRENDnet TEW-648UB +.It TRENDnet TEW-649UB +.Sh EXAMPLES +Join an existing BSS network (i.e., connect to an access point): +.Bd -literal -offset indent +ifconfig wlan create wlandev rsu0 inet 192.168.0.20 \e + netmask 0xffffff00 +.Ed +.Pp +Join a specific BSS network with network name +.Dq Li my_net : +.Pp +.Dl "ifconfig wlan create wlandev rsu0 ssid my_net up" +.Pp +Join a specific BSS network with 64-bit WEP encryption: +.Bd -literal -offset indent +ifconfig wlan create wlandev rsu0 ssid my_net \e + wepmode on wepkey 0x1234567890 weptxkey 1 up +.Ed +.Sh DIAGNOSTICS +.Bl -diag +.It "%s: failed load firmware of file rsu-rtl8712fw" +For some reason, the driver was unable to read the microcode file from the +filesystem. +The file might be missing or corrupted. +.It "device timeout" +A frame dispatched to the hardware for transmission did not complete in time. +The driver will reset the hardware. +This should not happen. +.El +.Sh SEE ALSO +.Xr arp 8 , +.Xr intro 1 , +.Xr netintro 4 , +.Xr usb 3 , +.Xr hostname 1 , +.Xr ifconfig 8, +.Xr wlan 4 , +.Xr rsufw 4 +.Sh HISTORY +The +.Nm +driver first appeared in +.Ox 4.9 and +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Damien Bergamini Aq damien@openbsd.org +and ported by +.An Rui Paulo Aq rpaulo@freebsd.org . +.Sh CAVEATS +The +.Nm +driver does not support any of the 802.11n capabilities offered by the +adapters. Added: head/share/man/man4/rsufw.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/rsufw.4 Tue Jul 30 02:07:57 2013 (r253789) @@ -0,0 +1,46 @@ +.\" $FreeBSD$ +.\" Copyright (c) 2013 Idwer Vollering +.\" +.\" Permission to use, copy, modify, and distribute this software for any +.\" purpose with or without fee is hereby granted, provided that the above +.\" copyright notice and this permission notice appear in all copies. +.\" +.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +.\" +.Dd July 21, 2013 +.Dt RSUFW 4 +.Os +.Sh NAME +.Nm rsufw +.Nd "Firmware Module for Realtek driver" +.Sh SYNOPSIS +To compile this module into the kernel, place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device rsufw" +.Ed +.Pp +This will include the firmware image, RTL8712, inside the kernel. +.Xr rsu 4 +will load the image into the chip. +.Pp +Alternatively, to load the firmware images as a module at boot time, place +the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +rsu-rtl8712fw_load="YES" +.Ed +.Sh DESCRIPTION +This module provides the firmware for the Realtek RTL8188SU and +RTL8192SU chip based USB WiFi adapters. +Please read Realtek's license, +.Pa /usr/share/license/realtek . +.Sh SEE ALSO +.Xr rsu 4 , +.Xr firmware 9 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Mon Jul 29 21:45:39 2013 (r253788) +++ head/sys/conf/NOTES Tue Jul 30 02:07:57 2013 (r253789) @@ -2739,6 +2739,8 @@ device mos # HSxPA devices from Option N.V device uhso +# Realtek RTL8188SU/RTL8191SU/RTL8192SU wireless driver +device rsu # # Ralink Technology RT2501USB/RT2601USB wireless driver device rum Modified: head/sys/conf/WITHOUT_SOURCELESS_UCODE ============================================================================== --- head/sys/conf/WITHOUT_SOURCELESS_UCODE Mon Jul 29 21:45:39 2013 (r253788) +++ head/sys/conf/WITHOUT_SOURCELESS_UCODE Tue Jul 30 02:07:57 2013 (r253789) @@ -35,8 +35,11 @@ nodevice ds1 nodevice maestro3 # usb +nodevice rsu +nodevice rsufw nodevice rum nodevice uath nodevice zyd nodevice kue +nodevice urtwn nodevice urtwnfw Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Jul 29 21:45:39 2013 (r253788) +++ head/sys/conf/files Tue Jul 30 02:07:57 2013 (r253789) @@ -2312,6 +2312,21 @@ dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # +dev/usb/wlan/if_rsu.c optional rsu +rsu-rtl8712fw.c optional rsu-rtl8712fw | rsufw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk rsu-rtl8712fw.fw:rsu-rtl8712fw:120 -mrsu-rtl8712fw -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "rsu-rtl8712fw.c" +rsu-rtl8712fw.fwo optional rsu-rtl8712fw | rsufw \ + dependency "rsu-rtl8712fw.fw" \ + compile-with "${NORMAL_FWO}" \ + no-implicit-rule \ + clean "rsu-rtl8712fw.fwo" +rsu-rtl8712fw.fw optional rsu-rtl8712.fw | rsufw \ + dependency "$S/contrib/dev/rsu/rsu-rtl8712fw.fw.uu" \ + compile-with "${NORMAL_FW}" \ + no-obj no-implicit-rule \ + clean "rsu-rtl8712fw.fw" dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ Added: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/wlan/if_rsu.c Tue Jul 30 02:07:57 2013 (r253789) @@ -0,0 +1,2479 @@ +/* $OpenBSD: if_rsu.c,v 1.17 2013/04/15 09:23:01 mglocker Exp $ */ + +/*- + * Copyright (c) 2010 Damien Bergamini + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#include +__FBSDID("$FreeBSD$"); + +/* + * Driver for Realtek RTL8188SU/RTL8191SU/RTL8192SU. + * + * TODO: + * o 11n support + * o h/w crypto + * o hostap / ibss / mesh + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include "usbdevs.h" + +#define USB_DEBUG_VAR rsu_debug +#include + +#include + +#ifdef USB_DEBUG +static int rsu_debug = 0; +SYSCTL_NODE(_hw_usb, OID_AUTO, rsu, CTLFLAG_RW, 0, "USB rsu"); +SYSCTL_INT(_hw_usb_rsu, OID_AUTO, debug, CTLFLAG_RW, &rsu_debug, 0, + "Debug level"); +#endif + +static const STRUCT_USB_HOST_ID rsu_devs[] = { +#define RSU_HT_NOT_SUPPORTED 0 +#define RSU_HT_SUPPORTED 1 +#define RSU_DEV_HT(v,p) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, \ + RSU_HT_SUPPORTED) } +#define RSU_DEV(v,p) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, \ + RSU_HT_NOT_SUPPORTED) } + RSU_DEV(ASUS, RTL8192SU), + RSU_DEV(AZUREWAVE, RTL8192SU_4), + RSU_DEV_HT(ACCTON, RTL8192SU), + RSU_DEV_HT(ASUS, USBN10), + RSU_DEV_HT(AZUREWAVE, RTL8192SU_1), + RSU_DEV_HT(AZUREWAVE, RTL8192SU_2), + RSU_DEV_HT(AZUREWAVE, RTL8192SU_3), + RSU_DEV_HT(AZUREWAVE, RTL8192SU_5), + RSU_DEV_HT(BELKIN, RTL8192SU_1), + RSU_DEV_HT(BELKIN, RTL8192SU_2), + RSU_DEV_HT(BELKIN, RTL8192SU_3), + RSU_DEV_HT(CONCEPTRONIC2, RTL8192SU_1), + RSU_DEV_HT(CONCEPTRONIC2, RTL8192SU_2), + RSU_DEV_HT(CONCEPTRONIC2, RTL8192SU_3), + RSU_DEV_HT(COREGA, RTL8192SU), + RSU_DEV_HT(DLINK2, DWA131A1), + RSU_DEV_HT(DLINK2, RTL8192SU_1), + RSU_DEV_HT(DLINK2, RTL8192SU_2), + RSU_DEV_HT(EDIMAX, RTL8192SU_1), + RSU_DEV_HT(EDIMAX, RTL8192SU_2), + RSU_DEV_HT(EDIMAX, RTL8192SU_3), + RSU_DEV_HT(GUILLEMOT, HWGUN54), + RSU_DEV_HT(GUILLEMOT, HWNUM300), + RSU_DEV_HT(HAWKING, RTL8192SU_1), + RSU_DEV_HT(HAWKING, RTL8192SU_2), + RSU_DEV_HT(PLANEX2, GWUSNANO), + RSU_DEV_HT(REALTEK, RTL8171), + RSU_DEV_HT(REALTEK, RTL8172), + RSU_DEV_HT(REALTEK, RTL8173), + RSU_DEV_HT(REALTEK, RTL8174), + RSU_DEV_HT(REALTEK, RTL8192SU), + RSU_DEV_HT(REALTEK, RTL8712), + RSU_DEV_HT(REALTEK, RTL8713), + RSU_DEV_HT(SENAO, RTL8192SU_1), + RSU_DEV_HT(SENAO, RTL8192SU_2), + RSU_DEV_HT(SITECOMEU, WL349V1), + RSU_DEV_HT(SITECOMEU, WL353), + RSU_DEV_HT(SWEEX2, LW154), +#undef RSU_DEV_HT +#undef RSU_DEV +}; + +static device_probe_t rsu_match; +static device_attach_t rsu_attach; +static device_detach_t rsu_detach; +static usb_callback_t rsu_bulk_tx_callback; +static usb_callback_t rsu_bulk_rx_callback; +static usb_error_t rsu_do_request(struct rsu_softc *, + struct usb_device_request *, void *); +static struct ieee80211vap * + rsu_vap_create(struct ieee80211com *, const char name[], + int, enum ieee80211_opmode, int, const uint8_t bssid[], + const uint8_t mac[]); +static void rsu_vap_delete(struct ieee80211vap *); +static void rsu_scan_start(struct ieee80211com *); +static void rsu_scan_end(struct ieee80211com *); +static void rsu_set_channel(struct ieee80211com *); +static void rsu_update_mcast(struct ifnet *); +static int rsu_alloc_rx_list(struct rsu_softc *); +static void rsu_free_rx_list(struct rsu_softc *); +static int rsu_alloc_tx_list(struct rsu_softc *); +static void rsu_free_tx_list(struct rsu_softc *); +static void rsu_free_list(struct rsu_softc *, struct rsu_data [], int); +static struct rsu_data *_rsu_getbuf(struct rsu_softc *); +static struct rsu_data *rsu_getbuf(struct rsu_softc *); +static int rsu_write_region_1(struct rsu_softc *, uint16_t, uint8_t *, + int); +static void rsu_write_1(struct rsu_softc *, uint16_t, uint8_t); +static void rsu_write_2(struct rsu_softc *, uint16_t, uint16_t); +static void rsu_write_4(struct rsu_softc *, uint16_t, uint32_t); +static int rsu_read_region_1(struct rsu_softc *, uint16_t, uint8_t *, + int); +static uint8_t rsu_read_1(struct rsu_softc *, uint16_t); +static uint16_t rsu_read_2(struct rsu_softc *, uint16_t); +static uint32_t rsu_read_4(struct rsu_softc *, uint16_t); +static int rsu_fw_iocmd(struct rsu_softc *, uint32_t); +static uint8_t rsu_efuse_read_1(struct rsu_softc *, uint16_t); +static int rsu_read_rom(struct rsu_softc *); +static int rsu_fw_cmd(struct rsu_softc *, uint8_t, void *, int); +static void rsu_calib_task(void *, int); +static int rsu_newstate(struct ieee80211vap *, enum ieee80211_state, int); +#ifdef notyet +static void rsu_set_key(struct rsu_softc *, const struct ieee80211_key *); +static void rsu_delete_key(struct rsu_softc *, const struct ieee80211_key *); +#endif +static int rsu_site_survey(struct rsu_softc *, struct ieee80211vap *); +static int rsu_join_bss(struct rsu_softc *, struct ieee80211_node *); +static int rsu_disconnect(struct rsu_softc *); +static void rsu_event_survey(struct rsu_softc *, uint8_t *, int); +static void rsu_event_join_bss(struct rsu_softc *, uint8_t *, int); +static void rsu_rx_event(struct rsu_softc *, uint8_t, uint8_t *, int); +static void rsu_rx_multi_event(struct rsu_softc *, uint8_t *, int); +static int8_t rsu_get_rssi(struct rsu_softc *, int, void *); +static struct mbuf * + rsu_rx_frame(struct rsu_softc *, uint8_t *, int, int *); +static struct mbuf * + rsu_rx_multi_frame(struct rsu_softc *, uint8_t *, int, int *); +static struct mbuf * + rsu_rxeof(struct usb_xfer *, struct rsu_data *, int *); +static void rsu_txeof(struct usb_xfer *, struct rsu_data *); +static int rsu_raw_xmit(struct ieee80211_node *, struct mbuf *, + const struct ieee80211_bpf_params *); +static void rsu_init(void *); +static void rsu_init_locked(struct rsu_softc *); +static void rsu_watchdog(void *); +static int rsu_tx_start(struct rsu_softc *, struct ieee80211_node *, + struct mbuf *, struct rsu_data *); +static void rsu_start(struct ifnet *); +static void rsu_start_locked(struct ifnet *); +static int rsu_ioctl(struct ifnet *, u_long, caddr_t); +static void rsu_stop(struct ifnet *, int); +static void rsu_stop_locked(struct ifnet *, int); + +static device_method_t rsu_methods[] = { + DEVMETHOD(device_probe, rsu_match), + DEVMETHOD(device_attach, rsu_attach), + DEVMETHOD(device_detach, rsu_detach), + + DEVMETHOD_END +}; + +static driver_t rsu_driver = { + .name = "rsu", + .methods = rsu_methods, + .size = sizeof(struct rsu_softc) +}; + +static devclass_t rsu_devclass; + +DRIVER_MODULE(rsu, uhub, rsu_driver, rsu_devclass, NULL, 0); +MODULE_DEPEND(rsu, wlan, 1, 1, 1); +MODULE_DEPEND(rsu, usb, 1, 1, 1); +MODULE_DEPEND(rsu, firmware, 1, 1, 1); +MODULE_VERSION(rsu, 1); + +static const struct usb_config rsu_config[RSU_N_TRANSFER] = { + [RSU_BULK_RX] = { + .type = UE_BULK, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_IN, + .bufsize = RSU_RXBUFSZ, + .flags = { + .pipe_bof = 1, + .short_xfer_ok = 1 + }, + .callback = rsu_bulk_rx_callback + }, + [RSU_BULK_TX_BE] = { + .type = UE_BULK, + .endpoint = 0x06, + .direction = UE_DIR_OUT, + .bufsize = RSU_TXBUFSZ, + .flags = { + .ext_buffer = 1, + .pipe_bof = 1, + .force_short_xfer = 1 + }, + .callback = rsu_bulk_tx_callback, + .timeout = RSU_TX_TIMEOUT + }, + [RSU_BULK_TX_BK] = { + .type = UE_BULK, + .endpoint = 0x06, + .direction = UE_DIR_OUT, + .bufsize = RSU_TXBUFSZ, + .flags = { + .ext_buffer = 1, + .pipe_bof = 1, + .force_short_xfer = 1 + }, + .callback = rsu_bulk_tx_callback, + .timeout = RSU_TX_TIMEOUT + }, + [RSU_BULK_TX_VI] = { + .type = UE_BULK, + .endpoint = 0x04, + .direction = UE_DIR_OUT, + .bufsize = RSU_TXBUFSZ, + .flags = { + .ext_buffer = 1, + .pipe_bof = 1, + .force_short_xfer = 1 + }, + .callback = rsu_bulk_tx_callback, + .timeout = RSU_TX_TIMEOUT + }, + [RSU_BULK_TX_VO] = { + .type = UE_BULK, + .endpoint = 0x04, + .direction = UE_DIR_OUT, + .bufsize = RSU_TXBUFSZ, + .flags = { + .ext_buffer = 1, + .pipe_bof = 1, + .force_short_xfer = 1 + }, + .callback = rsu_bulk_tx_callback, + .timeout = RSU_TX_TIMEOUT + }, +}; + +static int +rsu_match(device_t self) +{ + struct usb_attach_arg *uaa = device_get_ivars(self); + + if (uaa->usb_mode != USB_MODE_HOST || + uaa->info.bIfaceIndex != 0 || + uaa->info.bConfigIndex != 0) + return (ENXIO); + + return (usbd_lookup_id_by_uaa(rsu_devs, sizeof(rsu_devs), uaa)); +} + +static int +rsu_attach(device_t self) +{ + struct usb_attach_arg *uaa = device_get_ivars(self); + struct rsu_softc *sc = device_get_softc(self); + struct ifnet *ifp; + struct ieee80211com *ic; + int error; + uint8_t iface_index, bands; + + device_set_usb_desc(self); + sc->sc_udev = uaa->device; + sc->sc_dev = self; + + mtx_init(&sc->sc_mtx, device_get_nameunit(self), MTX_NETWORK_LOCK, + MTX_DEF); + TIMEOUT_TASK_INIT(taskqueue_thread, &sc->calib_task, 0, + rsu_calib_task, sc); + callout_init(&sc->sc_watchdog_ch, 0); + + iface_index = 0; + error = usbd_transfer_setup(uaa->device, &iface_index, sc->sc_xfer, + rsu_config, RSU_N_TRANSFER, sc, &sc->sc_mtx); + if (error) { + device_printf(sc->sc_dev, + "could not allocate USB transfers, err=%s\n", + usbd_errstr(error)); + goto detach; + } + RSU_LOCK(sc); + /* Read chip revision. */ + sc->cut = MS(rsu_read_4(sc, R92S_PMC_FSM), R92S_PMC_FSM_CUT); + if (sc->cut != 3) + sc->cut = (sc->cut >> 1) + 1; + error = rsu_read_rom(sc); + if (error != 0) { + device_printf(self, "could not read ROM\n"); + goto detach; + } + RSU_UNLOCK(sc); + IEEE80211_ADDR_COPY(sc->sc_bssid, &sc->rom[0x12]); + device_printf(self, "MAC/BB RTL8712 cut %d\n", sc->cut); + ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); + if (ifp == NULL) { + device_printf(self, "cannot allocate interface\n"); + goto detach; + } + ic = ifp->if_l2com; + ifp->if_softc = sc; + if_initname(ifp, "rsu", device_get_unit(self)); + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_init = rsu_init; + ifp->if_ioctl = rsu_ioctl; + ifp->if_start = rsu_start; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + ifp->if_capabilities |= IFCAP_RXCSUM; + ifp->if_capenable |= IFCAP_RXCSUM; + ifp->if_hwassist = CSUM_TCP; + + ic->ic_ifp = ifp; + ic->ic_phytype = IEEE80211_T_OFDM; /* Not only, but not used. */ + ic->ic_opmode = IEEE80211_M_STA; /* Default to BSS mode. */ + + /* Set device capabilities. */ + ic->ic_caps = + IEEE80211_C_STA | /* station mode */ + IEEE80211_C_BGSCAN | /* Background scan. */ + IEEE80211_C_SHPREAMBLE | /* Short preamble supported. */ + IEEE80211_C_SHSLOT | /* Short slot time supported. */ + IEEE80211_C_WPA; /* WPA/RSN. */ + +#if 0 + /* Check if HT support is present. */ + if (usb_lookup(rsu_devs_noht, uaa->vendor, uaa->product) == NULL) { + /* Set HT capabilities. */ + ic->ic_htcaps = + IEEE80211_HTCAP_CBW20_40 | + IEEE80211_HTCAP_DSSSCCK40; + /* Set supported HT rates. */ + for (i = 0; i < 2; i++) + ic->ic_sup_mcs[i] = 0xff; + } +#endif + + /* Set supported .11b and .11g rates. */ + bands = 0; + setbit(&bands, IEEE80211_MODE_11B); + setbit(&bands, IEEE80211_MODE_11G); + ieee80211_init_channels(ic, NULL, &bands); + + ieee80211_ifattach(ic, sc->sc_bssid); + ic->ic_raw_xmit = rsu_raw_xmit; + ic->ic_scan_start = rsu_scan_start; + ic->ic_scan_end = rsu_scan_end; + ic->ic_set_channel = rsu_set_channel; + ic->ic_vap_create = rsu_vap_create; + ic->ic_vap_delete = rsu_vap_delete; + ic->ic_update_mcast = rsu_update_mcast; + + ieee80211_radiotap_attach(ic, &sc->sc_txtap.wt_ihdr, + sizeof(sc->sc_txtap), RSU_TX_RADIOTAP_PRESENT, + &sc->sc_rxtap.wr_ihdr, sizeof(sc->sc_rxtap), + RSU_RX_RADIOTAP_PRESENT); + + if (bootverbose) + ieee80211_announce(ic); + + return (0); + +detach: + rsu_detach(self); + return (ENXIO); +} + +static int +rsu_detach(device_t self) +{ + struct rsu_softc *sc = device_get_softc(self); + struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; + + if (!device_is_attached(self)) + return (0); + rsu_stop(ifp, 1); + usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER); + ieee80211_ifdetach(ic); + + callout_drain(&sc->sc_watchdog_ch); + taskqueue_drain_timeout(taskqueue_thread, &sc->calib_task); + + /* Free Tx/Rx buffers. */ + rsu_free_tx_list(sc); + rsu_free_rx_list(sc); + + if_free(ifp); + mtx_destroy(&sc->sc_mtx); + + return (0); +} + +static usb_error_t +rsu_do_request(struct rsu_softc *sc, struct usb_device_request *req, + void *data) +{ + usb_error_t err; + int ntries = 10; + + RSU_ASSERT_LOCKED(sc); + + while (ntries--) { + err = usbd_do_request_flags(sc->sc_udev, &sc->sc_mtx, + req, data, 0, NULL, 250 /* ms */); + if (err == 0 || !device_is_attached(sc->sc_dev)) + break; + DPRINTFN(1, "Control request failed, %s (retrying)\n", + usbd_errstr(err)); + usb_pause_mtx(&sc->sc_mtx, hz / 100); + } + + return (err); +} + +static struct ieee80211vap * +rsu_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], int unit, + enum ieee80211_opmode opmode, int flags, + const uint8_t bssid[IEEE80211_ADDR_LEN], + const uint8_t mac[IEEE80211_ADDR_LEN]) +{ + struct rsu_vap *uvp; + struct ieee80211vap *vap; + + if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */ + return (NULL); + + uvp = (struct rsu_vap *) malloc(sizeof(struct rsu_vap), + M_80211_VAP, M_NOWAIT | M_ZERO); + if (uvp == NULL) + return (NULL); + vap = &uvp->vap; + ieee80211_vap_setup(ic, vap, name, unit, opmode, + flags, bssid, mac); + + /* override state transition machine */ + uvp->newstate = vap->iv_newstate; + vap->iv_newstate = rsu_newstate; + + /* complete setup */ + ieee80211_vap_attach(vap, ieee80211_media_change, + ieee80211_media_status); + ic->ic_opmode = opmode; + + return (vap); +} + +static void +rsu_vap_delete(struct ieee80211vap *vap) +{ + struct rsu_vap *uvp = RSU_VAP(vap); + + ieee80211_vap_detach(vap); + free(uvp, M_80211_VAP); +} + +static void +rsu_scan_start(struct ieee80211com *ic) +{ + int error; + struct ifnet *ifp = ic->ic_ifp; + struct rsu_softc *sc = ifp->if_softc; + + /* Scanning is done by the firmware. */ + RSU_LOCK(sc); + error = rsu_site_survey(sc, TAILQ_FIRST(&ic->ic_vaps)); + RSU_UNLOCK(sc); + if (error != 0) + device_printf(sc->sc_dev, + "could not send site survey command\n"); +} + +static void +rsu_scan_end(struct ieee80211com *ic) +{ + /* Nothing to do here. */ +} + +static void +rsu_set_channel(struct ieee80211com *ic __unused) +{ + /* We are unable to switch channels, yet. */ +} + +static void +rsu_update_mcast(struct ifnet *ifp) +{ + /* XXX do nothing? */ +} + +static int +rsu_alloc_list(struct rsu_softc *sc, struct rsu_data data[], + int ndata, int maxsz) +{ + int i, error; + + for (i = 0; i < ndata; i++) { + struct rsu_data *dp = &data[i]; + dp->sc = sc; + dp->m = NULL; + dp->buf = malloc(maxsz, M_USBDEV, M_NOWAIT); + if (dp->buf == NULL) { + device_printf(sc->sc_dev, + "could not allocate buffer\n"); + error = ENOMEM; + goto fail; + } + dp->ni = NULL; + } + + return (0); +fail: + rsu_free_list(sc, data, ndata); + return (error); +} + +static int +rsu_alloc_rx_list(struct rsu_softc *sc) +{ + int error, i; + + error = rsu_alloc_list(sc, sc->sc_rx, RSU_RX_LIST_COUNT, + RSU_RXBUFSZ); + if (error != 0) + return (error); + + STAILQ_INIT(&sc->sc_rx_active); + STAILQ_INIT(&sc->sc_rx_inactive); + + for (i = 0; i < RSU_RX_LIST_COUNT; i++) + STAILQ_INSERT_HEAD(&sc->sc_rx_inactive, &sc->sc_rx[i], next); + + return (0); +} + +static int +rsu_alloc_tx_list(struct rsu_softc *sc) +{ + int error, i; + + error = rsu_alloc_list(sc, sc->sc_tx, RSU_TX_LIST_COUNT, + RSU_TXBUFSZ); + if (error != 0) + return (error); + + STAILQ_INIT(&sc->sc_tx_active); + STAILQ_INIT(&sc->sc_tx_inactive); + STAILQ_INIT(&sc->sc_tx_pending); + + for (i = 0; i < RSU_TX_LIST_COUNT; i++) { + STAILQ_INSERT_HEAD(&sc->sc_tx_inactive, &sc->sc_tx[i], next); + } + + return (0); +} + +static void +rsu_free_tx_list(struct rsu_softc *sc) +{ + rsu_free_list(sc, sc->sc_tx, RSU_TX_LIST_COUNT); +} + +static void +rsu_free_rx_list(struct rsu_softc *sc) +{ + rsu_free_list(sc, sc->sc_rx, RSU_RX_LIST_COUNT); +} + +static void +rsu_free_list(struct rsu_softc *sc, struct rsu_data data[], int ndata) +{ + int i; + + for (i = 0; i < ndata; i++) { + struct rsu_data *dp = &data[i]; + + if (dp->buf != NULL) { + free(dp->buf, M_USBDEV); + dp->buf = NULL; + } + if (dp->ni != NULL) { + ieee80211_free_node(dp->ni); + dp->ni = NULL; + } + } +} + +static struct rsu_data * +_rsu_getbuf(struct rsu_softc *sc) +{ + struct rsu_data *bf; + + bf = STAILQ_FIRST(&sc->sc_tx_inactive); + if (bf != NULL) + STAILQ_REMOVE_HEAD(&sc->sc_tx_inactive, next); + else + bf = NULL; + if (bf == NULL) + DPRINTF("out of xmit buffers\n"); + return (bf); +} + +static struct rsu_data * +rsu_getbuf(struct rsu_softc *sc) +{ + struct rsu_data *bf; + + RSU_ASSERT_LOCKED(sc); + + bf = _rsu_getbuf(sc); + if (bf == NULL) { + struct ifnet *ifp = sc->sc_ifp; + DPRINTF("stop queue\n"); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + } + return (bf); +} + +static int +rsu_write_region_1(struct rsu_softc *sc, uint16_t addr, uint8_t *buf, + int len) +{ + usb_device_request_t req; + + req.bmRequestType = UT_WRITE_VENDOR_DEVICE; + req.bRequest = R92S_REQ_REGS; + USETW(req.wValue, addr); + USETW(req.wIndex, 0); + USETW(req.wLength, len); + + return (rsu_do_request(sc, &req, buf)); +} + +static void +rsu_write_1(struct rsu_softc *sc, uint16_t addr, uint8_t val) +{ + rsu_write_region_1(sc, addr, &val, 1); +} + +static void +rsu_write_2(struct rsu_softc *sc, uint16_t addr, uint16_t val) +{ + val = htole16(val); + rsu_write_region_1(sc, addr, (uint8_t *)&val, 2); +} + +static void +rsu_write_4(struct rsu_softc *sc, uint16_t addr, uint32_t val) +{ + val = htole32(val); + rsu_write_region_1(sc, addr, (uint8_t *)&val, 4); +} + +static int +rsu_read_region_1(struct rsu_softc *sc, uint16_t addr, uint8_t *buf, + int len) +{ + usb_device_request_t req; + + req.bmRequestType = UT_READ_VENDOR_DEVICE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 02:26:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BDF4A79B; Tue, 30 Jul 2013 02:26:07 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB5732D40; Tue, 30 Jul 2013 02:26:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6U2Q7MT030283; Tue, 30 Jul 2013 02:26:07 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6U2Q7kR030281; Tue, 30 Jul 2013 02:26:07 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307300226.r6U2Q7kR030281@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Jul 2013 02:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253790 - in head/sys/modules: . runfw usb usb/runfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 02:26:07 -0000 Author: rpaulo Date: Tue Jul 30 02:26:06 2013 New Revision: 253790 URL: http://svnweb.freebsd.org/changeset/base/253790 Log: Move runfw to modules/usb. While there, respect MK_SOURCELESS_UCODE. Discussed with: kevlo Added: head/sys/modules/usb/runfw/ - copied from r253789, head/sys/modules/runfw/ Deleted: head/sys/modules/runfw/ Modified: head/sys/modules/Makefile head/sys/modules/usb/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jul 30 02:07:57 2013 (r253789) +++ head/sys/modules/Makefile Tue Jul 30 02:26:06 2013 (r253790) @@ -285,7 +285,6 @@ SUBDIR= \ re \ reiserfs \ rl \ - ${_runfw} \ ${_s3} \ ${_safe} \ ${_sbni} \ @@ -450,7 +449,6 @@ _fxp= fxp _ispfw= ispfw _mwlfw= mwlfw _ralfw= ralfw -_runfw= runfw _sf= sf _sn= sn _ti= ti Modified: head/sys/modules/usb/Makefile ============================================================================== --- head/sys/modules/usb/Makefile Tue Jul 30 02:07:57 2013 (r253789) +++ head/sys/modules/usb/Makefile Tue Jul 30 02:26:06 2013 (r253790) @@ -32,8 +32,9 @@ SUBDIR = usb SUBDIR += ${_dwc_otg} ehci ${_musb} ohci uhci xhci ${_uss820dci} ${_at91dci} \ - ${_atmegadci} ${_avr32dci} rsu rsufw -SUBDIR += ${_rum} run ${_uath} upgt usie ural ${_zyd} ${_urtw} urtwn urtwnfw + ${_atmegadci} ${_avr32dci} ${_rsu} ${_rsufw} +SUBDIR += ${_rum} ${_run} ${_runfw} ${_uath} upgt usie ural ${_zyd} ${_urtw} +SUBDIR += ${_urtwn} ${_urtwnfw} SUBDIR += atp uhid ukbd ums udbp ufm uep SUBDIR += ucom u3g uark ubsa ubser uchcom ucycom ufoma uftdi ugensa uipaq ulpt \ umct umcs umodem umoscom uplcom uslcom uvisor uvscom @@ -54,6 +55,12 @@ _rum= rum _uath= uath _zyd= zyd _kue= kue +_urtwn= urtwn +_urtwnfw= urtwnfw +_run= run +_runfw= runfw +_rsu= rsu +_rsufw= rsufw .endif .if ${MACHINE_CPUARCH} == "amd64" From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 03:45:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 26BA1BDB; Tue, 30 Jul 2013 03:45:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1346F20DE; Tue, 30 Jul 2013 03:45:36 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id f14so1607192wiw.1 for ; Mon, 29 Jul 2013 20:45:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=U3uL3D53mFCdCaEgxl9VynQnE4syM7rOvLl7VLoM55k=; b=yPaPBJe+jx5fUiN7w/cdEF2cgBUDBrmcQxK6szHkuIlB3RpqP7xX5mhsrgDLppesh7 5XZ1tqrIwg7R/hWQgQx9XEaAWYFX1n+2jYX/Tu7nhxrQh6n8NTTD0jD0e3cpkUnVOd/3 xtTxidgrZbp5i2xUO5S168niR4xpkxRwUXF3ZTCwYh9bW0Jhg1Z06W6W3eRmr6yaoV/U 9KKNbfnjAwaoe+wdQv4ilii0594YeTJPCJjoQzzDA/MUopL+f7g1/1I/u1xdNwwk3OeZ GUiMJioV3NWkidRoI5Y/hUi9XhZ5OLhtdmzE/o+NXYGuJWoUf8qDbtYOAHF/auOjUZk5 3kWA== MIME-Version: 1.0 X-Received: by 10.194.201.202 with SMTP id kc10mr5702205wjc.1.1375155935423; Mon, 29 Jul 2013 20:45:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Mon, 29 Jul 2013 20:45:34 -0700 (PDT) In-Reply-To: <20130729203848.GG948@alchemy.franken.de> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> Date: Mon, 29 Jul 2013 20:45:34 -0700 X-Google-Sender-Auth: 7UyrqIHPayyhfvwdcUAOiBGH7HY Message-ID: Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf From: Adrian Chadd To: Marius Strobl Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, ken@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Edward Tomasz Napierala X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 03:45:38 -0000 Yes, that would be nice. -adrian On 29 July 2013 13:38, Marius Strobl wrote: > On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Fri Apr 12 16:25:03 2013 >> New Revision: 249410 >> URL: http://svnweb.freebsd.org/changeset/base/249410 >> >> Log: >> Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' >> and kern.cam.ctl.disable tunable; those were introduced as a workaround >> to make it possible to boot GENERIC on low memory machines. >> >> With ctl(4) being built as a module and automatically loaded by ctladm(8), >> this makes CTL work out of the box. >> > > Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in > order to reduce the default memory footprint there? > > Marius > From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 07:02:31 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1DC0D93B; Tue, 30 Jul 2013 07:02:31 +0000 (UTC) (envelope-from das@FreeBSD.org) Received: from zim.MIT.EDU (50-196-151-174-static.hfc.comcastbusiness.net [50.196.151.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 012FA2702; Tue, 30 Jul 2013 07:02:30 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.7/8.14.2) with ESMTP id r6U72Nc8077397; Tue, 30 Jul 2013 00:02:23 -0700 (PDT) (envelope-from das@FreeBSD.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.7/8.14.2/Submit) id r6U72NAj077396; Tue, 30 Jul 2013 00:02:23 -0700 (PDT) (envelope-from das@FreeBSD.org) Date: Tue, 30 Jul 2013 00:02:23 -0700 From: David Schultz To: David Chisnall Subject: Re: svn commit: r253215 - head/lib/msun/src Message-ID: <20130730070223.GA74642@zim.MIT.EDU> References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> <20130729070517.GA3192@zim.MIT.EDU> <00F2B647-8D25-45FB-B852-5214AC27AD26@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <00F2B647-8D25-45FB-B852-5214AC27AD26@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 07:02:31 -0000 On Mon, Jul 29, 2013, David Chisnall wrote: > On 29 Jul 2013, at 08:05, David Schultz wrote: > > > On Thu, Jul 11, 2013, David Chisnall wrote: > >> +static __inline int > >> +__inline_isnan(double __x) > >> +{ > >> + > >> + return (__x != __x); > >> +} > >> + > >> +static __inline int > >> +__inline_isnanf(float __x) > >> +{ > >> + > >> + return (__x != __x); > >> +} > >> + > >> +static __inline int > >> +__inline_isnanl(long double __x) > >> +{ > >> + > >> + return (__x != __x); > >> +} > > > > This has already been covered at greater length, but I believe > > this part is incorrect. Relational operators can raise an invalid > > exception when one of the arguments is a NaN -- even a quiet NaN. > > Raising an exception is optional in C99 (7.12.14) and required in > > IEEE-754... in practice, it tends to be platform- and compiler- > > specific. > > > > That is the whole reason the is* macros are defined by the > > standard in the first place, and also why we didn't use the > > trivial implementation above. The is* macros are required to not > > raise an exception. > > What would you suggest replacing them with? Note that currently LLVM iR doesn't provide any way of distinguishing the != comparison from something that is guaranteed not to raise an exception. I don't know how this works in GIMPLE, althouhg I'd imagine that, since gcc has a working Fortran front end, there is some better support for it. I'm not sure what the inlines here were supposed to achieve, but I think the ideal implementation would be a compiler intrinsic, with a fallback of the libm functions if there's no working compiler support. As I recall, gcc has a __builtin_isnan() and macros to test whether __builtin_nan() exists. Presumably it wouldn't be too hard to do the same thing in clang. > > P.S. It would be great if clang implemented the FENV_ACCESS pragma > > and provided an intrinsic that produced a fast inline isnan() when > > the pragma is off, and the full, correct one when the pragma is on. > > > I almost agree, but C is a really terrible language for mathematical work and I'd prefer that people just used Fortran instead of trying to force C to be Fortran. Fortran has its own problems and isn't very well supported. But for what it's worth, C++ is actually a good choice for high-performance numerics, IMO, mainly because of operator overloading and generics. I can write a function that looks like actual math, and call it with a float, a double, or even an arbitrary-precision mpfr_t, and it just works. In C, on the other hand, they added all this "type-generic arithmetic" and complex number nonsense that's of very limited interest. In a better language, that functionality could have been implemented as a third-party library instead of as a built-in part of the language. So in that sense, I agree with you that C went too far with trying to compete with Fortran... FENV_ACCESS is more reasonable, though. It basically says that sophisticated users ought to be able to take advantage of the IEEE floating-point features that nearly all hardware FPUs support, without having the compiler mess things up. Meanwhile, there's a second mode for users who don't care, where the optimizer is allowed to make a lot more assumptions. Before C99, compilers tended to have some muddled combination of the two extremes, which is bad for everyone. Unfortunately, only the commercial compilers actually implement FENV_ACCESS these days... > In particular, take a look in the C11 spec for the semantics of this: > > _Atomic(double) x = ...; > x += 1; > > It's quite astonishingly horrible. We don't implement it correctly in clang, and I hope never to have to. I hope it does something horrible to the programmer who thought of the idea of atomic double-precision arithmetic. From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 08:09:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE1CBE55; Tue, 30 Jul 2013 08:09:48 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A25C2B9C; Tue, 30 Jul 2013 08:09:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6U89mtw032355; Tue, 30 Jul 2013 08:09:48 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6U89mGl032354; Tue, 30 Jul 2013 08:09:48 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201307300809.r6U89mGl032354@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 30 Jul 2013 08:09:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253795 - head/sys/modules/usb/runfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 08:09:48 -0000 Author: pluknet Date: Tue Jul 30 08:09:48 2013 New Revision: 253795 URL: http://svnweb.freebsd.org/changeset/base/253795 Log: Fix up paths after r253790. While here, use $? contraction. Reported by: O. Hartmann Modified: head/sys/modules/usb/runfw/Makefile Modified: head/sys/modules/usb/runfw/Makefile ============================================================================== --- head/sys/modules/usb/runfw/Makefile Tue Jul 30 07:03:52 2013 (r253794) +++ head/sys/modules/usb/runfw/Makefile Tue Jul 30 08:09:48 2013 (r253795) @@ -5,7 +5,7 @@ FIRMWS= run.fw:runfw:1 CLEANFILES= run.fw -run.fw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu - uudecode -p ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > ${.TARGET} +run.fw: ${.CURDIR}/../../../contrib/dev/run/rt2870.fw.uu + uudecode -p $? > ${.TARGET} .include From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:12:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1B8D56CA; Tue, 30 Jul 2013 10:12:51 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E28DD2423; Tue, 30 Jul 2013 10:12:50 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 71974BA40; Tue, 30 Jul 2013 10:12:49 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 71974BA40 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Tue, 30 Jul 2013 06:12:47 -0400 From: Glen Barber To: Rui Paulo Subject: Re: svn commit: r253789 - in head: share/man/man4 sys/conf sys/dev/usb/wlan sys/modules/usb sys/modules/usb/rsu Message-ID: <20130730101247.GB2571@glenbarber.us> References: <201307300207.r6U27vYR024547@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i0/AhcQY5QxfSsSZ" Content-Disposition: inline In-Reply-To: <201307300207.r6U27vYR024547@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:12:51 -0000 --i0/AhcQY5QxfSsSZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 30, 2013 at 02:07:57AM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Tue Jul 30 02:07:57 2013 > New Revision: 253789 > URL: http://svnweb.freebsd.org/changeset/base/253789 >=20 > Log: > Import OpenBSD's rsu(4) WLAN driver. > Support chipsets are the Realtek RTL8188SU, RTL8191SU, and RTL8192SU. > =20 > Many thanks to Idwer Vollering for porting/writing the man page and for > testing. > =20 > Reviewed by: adrian, hselasky > Obtained from: OpenBSD > Tested by: kevlo, Idwer Vollering >=20 > Added: > head/share/man/man4/rsu.4 (contents, props changed) > head/share/man/man4/rsufw.4 (contents, props changed) > head/sys/dev/usb/wlan/if_rsu.c (contents, props changed) > head/sys/dev/usb/wlan/if_rsureg.h (contents, props changed) > head/sys/modules/usb/rsu/ > head/sys/modules/usb/rsu/Makefile (contents, props changed) > Modified: > head/share/man/man4/Makefile > head/sys/conf/NOTES > head/sys/conf/WITHOUT_SOURCELESS_UCODE > head/sys/conf/files > head/sys/modules/usb/Makefile >=20 This breaks LINT. cc1: warnings being treated as errors /src/sys/dev/usb/wlan/if_rsu.c: In function 'rsu_load_firmware': /src/sys/dev/usb/wlan/if_rsu.c:2139: warning: cast discards qualifiers =66rom pointer target type *** Error code 1 Glen --i0/AhcQY5QxfSsSZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJR95GfAAoJEFJPDDeguUajr0YH/iDXTVep7kEbsGQxKGcKPSJ7 qAGZNmouPdF/zjDGBbG3oN8xDgelMgb5iXDGE6ubjbKndY7SbwJH+wLHGoqS3GGH KFU8h0HQlummaruazN+v8V9czVvWwTyCwxV+y6lbsgMcw1VTqlVCEHRkZE0zVuHG DJl/YHfWzMXCd/2TVFj/0whIZOqW55ecvFkkcQdXzLJgFJ+5YqJnRyBx4TMdd7is 9yc1eEdfPS14pxEwM4lUQr8YLs9NzLpZtJ9zhUS1xcV21aeLsejCnAvPV/4883yy J24iyQyyu3GyXEvnMaSbx0POnTltcqKFjtsZWmlqkeeyyRdEzP9t5JdYrPPpQQM= =5gD9 -----END PGP SIGNATURE----- --i0/AhcQY5QxfSsSZ-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:22:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 47F08962; Tue, 30 Jul 2013 10:22:09 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 262B9249B; Tue, 30 Jul 2013 10:22:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UAM9hY073049; Tue, 30 Jul 2013 10:22:09 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UAM8xE073047; Tue, 30 Jul 2013 10:22:08 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201307301022.r6UAM8xE073047@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Jul 2013 10:22:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253797 - in stable/9/usr.sbin/makefs: . cd9660 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:22:09 -0000 Author: marius Date: Tue Jul 30 10:22:08 2013 New Revision: 253797 URL: http://svnweb.freebsd.org/changeset/base/253797 Log: MFC: r253707 - Set the System Identifier in the Primary Volume Descriptor to FreeBSD rather than NetBSD. - Correctly set the Expiration Time in the Primary Volume Descriptor; according to ISO 9660 8.4.26.1 unspecified date and time are denoted by the digit 0 in RBP 1 to 16 but the number 0 in RBP 17. [1] - Merge iso9660_rrip.c rev. 1.11 from NetBSD: name_len should be read as unsigned byte. [2] Note: This is according to ISO 9660 9.1.10. - Rock Ridge TF entries should use a length of 5, because after the 4 bytes of generic SUSP header there is one byte of flags. See typedef of ISO_RRIP_TF in iso9660_rrip.h. [1] Submitted by: Thomas Schmitt [1] Approved by: re (kib) Obtained from: NetBSD [2] Modified: stable/9/usr.sbin/makefs/cd9660.c stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/cd9660.c ============================================================================== --- stable/9/usr.sbin/makefs/cd9660.c Tue Jul 30 08:10:15 2013 (r253796) +++ stable/9/usr.sbin/makefs/cd9660.c Tue Jul 30 10:22:08 2013 (r253797) @@ -230,7 +230,7 @@ cd9660_set_defaults(void) memset(diskStructure.primaryDescriptor.abstract_file_id, 0x20,37); memset(diskStructure.primaryDescriptor.bibliographic_file_id, 0x20,37); - strcpy(diskStructure.primaryDescriptor.system_id,"NetBSD"); + strcpy(diskStructure.primaryDescriptor.system_id, "FreeBSD"); cd9660_defaults_set = 1; @@ -681,7 +681,8 @@ cd9660_finalize_PVD(void) cd9660_set_date(diskStructure.primaryDescriptor.expiration_date, now); */ - memset(diskStructure.primaryDescriptor.expiration_date, '0' ,17); + memset(diskStructure.primaryDescriptor.expiration_date, '0', 16); + diskStructure.primaryDescriptor.expiration_date[16] = 0; cd9660_time_8426( (unsigned char *)diskStructure.primaryDescriptor.effective_date, tim); Modified: stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Jul 30 08:10:15 2013 (r253796) +++ stable/9/usr.sbin/makefs/cd9660/iso9660_rrip.c Tue Jul 30 10:22:08 2013 (r253797) @@ -1,4 +1,4 @@ -/* $NetBSD: iso9660_rrip.c,v 1.10 2011/05/29 17:07:58 tsutsui Exp $ */ +/* $NetBSD: iso9660_rrip.c,v 1.11 2012/04/29 13:32:21 joerg Exp $ */ /* * Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan @@ -419,9 +419,9 @@ cd9660_rrip_initialize_node(cd9660node * } else if ((node->node != NULL) && ((strlen(node->node->name) != - (int)node->isoDirRecord->name_len[0]) || + (uint8_t)node->isoDirRecord->name_len[0]) || (memcmp(node->node->name,node->isoDirRecord->name, - (int) node->isoDirRecord->name_len[0]) != 0))) { + (uint8_t)node->isoDirRecord->name_len[0]) != 0))) { cd9660_rrip_NM(node); } @@ -685,7 +685,7 @@ int cd9660node_rrip_tf(struct ISO_SUSP_ATTRIBUTES *p, fsnode *_node) { p->attr.rr_entry.TF.flags[0] = TF_MODIFY | TF_ACCESS | TF_ATTRIBUTES; - p->attr.rr_entry.TF.h.length[0] = 4; + p->attr.rr_entry.TF.h.length[0] = 5; p->attr.rr_entry.TF.h.version[0] = 1; /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:24:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 79FF4AC2; Tue, 30 Jul 2013 10:24:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 66AA324B7; Tue, 30 Jul 2013 10:24:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UAOASu073354; Tue, 30 Jul 2013 10:24:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UAOAAZ073353; Tue, 30 Jul 2013 10:24:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201307301024.r6UAOAAZ073353@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Jul 2013 10:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253798 - stable/9/usr.sbin/makefs/ffs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:24:10 -0000 Author: marius Date: Tue Jul 30 10:24:09 2013 New Revision: 253798 URL: http://svnweb.freebsd.org/changeset/base/253798 Log: MFC: r253675 Ensure that makefs.h is included when using ufs_bswap.h so the FFS_EI macro is picked up when defined. Previously, ffs_subr.c was always built without support for opposite endianess as it doesn't include makefs.h on its own. Approved by: re (kib) Modified: stable/9/usr.sbin/makefs/ffs/ufs_bswap.h Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/ffs/ufs_bswap.h ============================================================================== --- stable/9/usr.sbin/makefs/ffs/ufs_bswap.h Tue Jul 30 10:22:08 2013 (r253797) +++ stable/9/usr.sbin/makefs/ffs/ufs_bswap.h Tue Jul 30 10:24:09 2013 (r253798) @@ -40,6 +40,8 @@ #include +#include "makefs.h" + /* Macros to access UFS flags */ #ifdef FFS_EI #define UFS_MPNEEDSWAP(mp) (VFSTOUFS(mp)->um_flags & UFS_NEEDSWAP) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:37:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 380F1EE5; Tue, 30 Jul 2013 10:37:12 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C05A25B7; Tue, 30 Jul 2013 10:37:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UAbB6L076774; Tue, 30 Jul 2013 10:37:11 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UAbBN8076773; Tue, 30 Jul 2013 10:37:11 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201307301037.r6UAbBN8076773@svn.freebsd.org> From: Marius Strobl Date: Tue, 30 Jul 2013 10:37:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253799 - stable/9/release/sparc64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:37:12 -0000 Author: marius Date: Tue Jul 30 10:37:11 2013 New Revision: 253799 URL: http://svnweb.freebsd.org/changeset/base/253799 Log: MFC: 253676 - Once we have shifted arguments thrice, base-bits-dir is $1 rather than $4. Introduce $BASEBITSDIR for clarity and in order to avoid repeating this mistake in the future. Fixing this ensures that we pick up the newly built boot code and loader native to the target, which is especially relevant when cross-building release images. - It is pointless to specify an endianess for ISO 9660 images so strip that. Approved by: re (kib) Modified: stable/9/release/sparc64/mkisoimages.sh Directory Properties: stable/9/release/ (props changed) Modified: stable/9/release/sparc64/mkisoimages.sh ============================================================================== --- stable/9/release/sparc64/mkisoimages.sh Tue Jul 30 10:24:09 2013 (r253798) +++ stable/9/release/sparc64/mkisoimages.sh Tue Jul 30 10:37:11 2013 (r253799) @@ -32,26 +32,28 @@ case $1 in esac LABEL=`echo $1 | tr '[:lower:]' '[:upper:]'`; shift NAME=$1; shift +BASEBITSDIR=$1 # Create an ISO image publisher="The FreeBSD Project. http://www.FreeBSD.org/" -echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > $1/etc/fstab -makefs -t cd9660 -B be -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $* -rm $1/etc/fstab +echo "/dev/iso9660/$LABEL / cd9660 ro 0 0" > "${BASEBITSDIR}/etc/fstab" +makefs -t cd9660 -o rockridge -o label="$LABEL" -o publisher="$publisher" ${NAME}.tmp $* +rm "${BASEBITSDIR}/etc/fstab" if [ "x$BOPT" != "x-b" ]; then mv ${NAME}.tmp ${NAME} exit 0 fi + TMPIMGDIR=`mktemp -d /tmp/bootfs.XXXXXXXX` || exit 1 BOOTFSDIR="${TMPIMGDIR}/bootfs" BOOTFSIMG="${TMPIMGDIR}/bootfs.img" # Create a boot filesystem mkdir -p "${BOOTFSDIR}/boot" -cp $4/boot/loader "${BOOTFSDIR}/boot" +cp -p "${BASEBITSDIR}/boot/loader" "${BOOTFSDIR}/boot" makefs -t ffs -B be -M 512k "${BOOTFSIMG}" "${BOOTFSDIR}" -dd if=$4/boot/boot1 of="${BOOTFSIMG}" bs=512 conv=notrunc,sync +dd if="${BASEBITSDIR}/boot/boot1" of="${BOOTFSIMG}" bs=512 conv=notrunc,sync # Create a boot ISO image : ${CYLSIZE:=640} From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:56:27 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8335D52C; Tue, 30 Jul 2013 10:56:27 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 0A14627DB; Tue, 30 Jul 2013 10:56:26 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id D03161044E4F; Tue, 30 Jul 2013 20:56:21 +1000 (EST) Date: Tue, 30 Jul 2013 20:56:20 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Sergey Kandaurov Subject: Re: svn commit: r253795 - head/sys/modules/usb/runfw In-Reply-To: <201307300809.r6U89mGl032354@svn.freebsd.org> Message-ID: <20130730195654.R855@besplex.bde.org> References: <201307300809.r6U89mGl032354@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=B2Ei_0QEIiAA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=UBC4NC05g0gA:10 a=NIvoxCZFwdMfKTdpdAAA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:56:27 -0000 On Tue, 30 Jul 2013, Sergey Kandaurov wrote: > Log: > Fix up paths after r253790. > While here, use $? contraction. > > Reported by: O. Hartmann > > Modified: > head/sys/modules/usb/runfw/Makefile > > Modified: head/sys/modules/usb/runfw/Makefile > ============================================================================== > --- head/sys/modules/usb/runfw/Makefile Tue Jul 30 07:03:52 2013 (r253794) > +++ head/sys/modules/usb/runfw/Makefile Tue Jul 30 08:09:48 2013 (r253795) > @@ -5,7 +5,7 @@ FIRMWS= run.fw:runfw:1 > > CLEANFILES= run.fw > > -run.fw: ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > - uudecode -p ${.CURDIR}/../../contrib/dev/run/rt2870.fw.uu > ${.TARGET} > +run.fw: ${.CURDIR}/../../../contrib/dev/run/rt2870.fw.uu > + uudecode -p $? > ${.TARGET} > > .include % MAKE(1) FreeBSD General Commands Manual MAKE(1) % ... % Local variables % Variables that are defined specific to a certain target. The % seven local variables are as follows: % ... % .OODATE The list of sources for this target that were deemed % ... % The shorter forms `@', `!', `<', `%', `?', `>', and `*' are per- % mitted for backward compatibility and are not recommended. The ${.OODATE} is less well known that the others. Actually, it seems to be just logically wrong. I think the well-known ${.ALLSRC} is correct. Whan a single target is built from a set of sources, all the sources are often required (with the main exceptions being cases like the full set including headers but the command only acceptiong non-headers as input files). A subset consisting of only the out of date sources is rarely wanted. But here, as in many simple cases, the full set has size 1, so it is the same as the out-of-date subset unless that is empty. So both ${.OODATE} and ${.ALLSRC} work, but ${.ALLSRC} is more logical. Grepping at other uudecode commands in modules makefiles shows a high density of style bugs and 1 good example for just the uudecode part in 16 files hpt27xx/Makefile: hptrr/Makefile: Null dependency list (so ${.ALLSRC} is null). The source file .named *.o.uu, and is named explicitly, starting with the path prefix. All other source files are in C and are handled normally, with make(1) adding the path prefix after finding them using .PATH. The verbose pathname gives another style bug (line too long). The makefile has many other style bugs. Everything for the .o.uu conversion could be handled automagically by a suffix rule. hptmv/Makefile: Like hpt27xx except the *.o.uu name is in a macro, and the dependency list is not null. It is clearer to have the name in a macro, but the ifdef to define this macro is probably not needed and it handles fewer cases than in hpt27xx (it translates from ${MACHINE_CPUARCH} instead of using ${MACHINE_ARCH}). hptnr/Makefile: Like htp27xx. 1 fewer style bugs since the verbose name is not so long as to give a too-long line. mwlfw/Makefile: Uses $?. Better general style than hpt*, partly because it is simpler. But it doesn't use .PATH, so it has to use full (relative) pathnames involving ${CURDIR}/... in several places. Has to add the generated files to CLEANFILES since these are not handled automatically by putting them in ${OBJS}. A general .fw.uu suffix rule could handle this automagically. nve/Makefile: Uses ${.OODATE} for the %DIKED file, but duplicates the verbose pathname for the .bz2.uu file. Uses .PATH, but now the .uu file is in a subdir of the directory specified by .PATH. The verbose pathname is duplicates this directory pathname and appends the subdir name. Uses more normal for SRCS and other normal things (no += for SRCS...), but still has many style bugs: unsorted SRCS; += for the initialization of OBJS and CLEANFILES; duplicated (object) file in CLEANFILES; use of WERROR. runfw/Makefile: Duplicated a verbose pathname (now uses $?). wpifw/Makefile: Duplicates a verbose pathname. Doesn't even use its .PATH prefix for the source file name in the dependencies for the .fw.uu file. The main component of the pathname is long and cryptic but is quadruplicated. cxgbe/t4_firmware/Makefile: cxgbe/t5_firmware/Makefile: Finally an unbad example. More complicated (to handle more non-firmware files). Uses ${.ALLSRC} for the 1 uudecode rule. Also uses uudecode -o instead of uudecode -p. Still has many style bugs, startting with 'KMOD=' instead of 'KMOD='. No tabs at all except 1 where make syntax requires it (for the uudecode rule). So, actually a bad example for everything except the uudecode rule. ipwfw/ipw_bss/Makefile: ipwfw/ipw_ibss/Makefile: ipwfw/ipw_monitor/Makefile: ipwfw/ipw_iwi_bss/Makefile: ipwfw/ipw_iwi_ibss/Makefile: iwifw/iwi_monitor/Makefile: Duplicates a verbose pathname. Doesnt even use its .PATH prefix... Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 10:58:08 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 117696E0; Tue, 30 Jul 2013 10:58:08 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id C660D2819; Tue, 30 Jul 2013 10:58:07 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id C8E551A57F2; Tue, 30 Jul 2013 20:57:57 +1000 (EST) Date: Tue, 30 Jul 2013 20:57:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Andrey Zonov Subject: Re: svn commit: r253775 - head/sys/vm In-Reply-To: <201307291848.r6TImpmO089995@svn.freebsd.org> Message-ID: <20130730205733.E1146@besplex.bde.org> References: <201307291848.r6TImpmO089995@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=YYGEuWhf c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=kAhaSbcbf9wA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=AptvzqaXglMA:10 a=wi6h4nDNO0xJxvef6T4A:9 a=CjuIK1q_8ugA:10 a=6qO-CaDex5sA:10 a=noiyNWHJMuoA:10 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 10:58:08 -0000 On Mon, 29 Jul 2013, Andrey Zonov wrote: > Log: > Unbreak sysctl ABI changes introduced in r253662 > > Requested by: bde Thanks. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 11:22:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EA7D9D93; Tue, 30 Jul 2013 11:22:16 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [IPv6:2607:fc50:1:2300:1001:1001:1001:face]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AC8842A28; Tue, 30 Jul 2013 11:22:16 +0000 (UTC) Received: from glenbarber.us (nucleus.glenbarber.us [IPv6:2001:470:8:1205:2:2:ff:29]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 6BEE8B073; Tue, 30 Jul 2013 11:22:12 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 6BEE8B073 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Tue, 30 Jul 2013 07:22:10 -0400 From: Glen Barber To: Alfred Perlstein Subject: Re: svn commit: r253719 - in head: sys/conf sys/dev/watchdog sys/libkern sys/sys usr.sbin/watchdogd Message-ID: <20130730112210.GE2571@glenbarber.us> References: <201307272047.r6RKl2vI023259@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="phCU5ROyZO6kBE05" Content-Disposition: inline In-Reply-To: <201307272047.r6RKl2vI023259@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 11:22:17 -0000 --phCU5ROyZO6kBE05 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 27, 2013 at 08:47:02PM +0000, Alfred Perlstein wrote: > Author: alfred > Date: Sat Jul 27 20:47:01 2013 > New Revision: 253719 > URL: http://svnweb.freebsd.org/changeset/base/253719 >=20 > Log: > Fix watchdog pretimeout. > =20 > The original API calls for pow2ns, however the new APIs from > Linux call for seconds. > =20 > We need to be able to convert to/from 2^Nns to seconds in both > userland and kernel to fix this and properly compare units. >=20 > Added: > head/sys/libkern/flsll.c (contents, props changed) > Modified: > head/sys/conf/files > head/sys/dev/watchdog/watchdog.c > head/sys/sys/libkern.h > head/usr.sbin/watchdogd/watchdogd.c >=20 > Modified: head/sys/conf/files > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/files Sat Jul 27 20:15:18 2013 (r253718) > +++ head/sys/conf/files Sat Jul 27 20:47:01 2013 (r253719) > @@ -2976,6 +2976,7 @@ libkern/arc4random.c standard > libkern/bcd.c standard > libkern/bsearch.c standard > libkern/crc32.c standard > +libkern/flsll.c standard > libkern/fnmatch.c standard > libkern/iconv.c optional libiconv > libkern/iconv_converter_if.m optional libiconv >=20 > Modified: head/sys/dev/watchdog/watchdog.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/watchdog/watchdog.c Sat Jul 27 20:15:18 2013 (r253718) > +++ head/sys/dev/watchdog/watchdog.c Sat Jul 27 20:47:01 2013 (r253719) > @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -60,10 +61,56 @@ static int wd_softtimeout_act =3D WD_SOFT_ > =20 > static struct cdev *wd_dev; > static volatile u_int wd_last_u; /* last timeout value set by kern_do= _pat */ > +static u_int wd_last_u_sysctl; /* last timeout value set by kern_do_p= at */ > +static u_int wd_last_u_sysctl_secs; /* wd_last_u in seconds */ > + > +SYSCTL_NODE(_hw, OID_AUTO, watchdog, CTLFLAG_RD, 0, "Main watchdog devic= e"); > +SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u, CTLFLAG_RD, > + &wd_last_u_sysctl, 0, "Watchdog last update time"); > +SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u_secs, CTLFLAG_RD, > + &wd_last_u_sysctl_secs, 0, "Watchdog last update time"); > =20 > static int wd_lastpat_valid =3D 0; > static time_t wd_lastpat =3D 0; /* when the watchdog was last patted */ > =20 > +static void > +pow2ns_to_ts(int pow2ns, struct timespec *ts) > +{ > + uint64_t ns; > + > + ns =3D 1ULL << pow2ns; > + ts->tv_sec =3D ns / 1000000000ULL; > + ts->tv_nsec =3D ns % 1000000000ULL; > +} > + > +static int > +pow2ns_to_ticks(int pow2ns) > +{ > + struct timeval tv; > + struct timespec ts; > + > + pow2ns_to_ts(pow2ns, &ts); > + TIMESPEC_TO_TIMEVAL(&tv, &ts); > + return (tvtohz(&tv)); > +} > + > +static int > +seconds_to_pow2ns(int seconds) > +{ > + uint64_t power; > + uint64_t ns; > + uint64_t shifted; > + > + ns =3D ((uint64_t)seconds) * 1000000000ULL; > + power =3D flsll(ns); > + shifted =3D 1ULL << power; > + if (shifted <=3D ns) { > + power++; > + } > + return (power); > +} > + > + > int > wdog_kern_pat(u_int utim) > { > @@ -86,6 +133,8 @@ wdog_kern_pat(u_int utim) > * This can be zero (to disable the watchdog) > */ > wd_last_u =3D (utim & WD_INTERVAL); > + wd_last_u_sysctl =3D wd_last_u; > + wd_last_u_sysctl_secs =3D pow2ns_to_ticks(wd_last_u) / hz; > } > if ((utim & WD_INTERVAL) =3D=3D WD_TO_NEVER) { > utim =3D 0; > @@ -101,7 +150,7 @@ wdog_kern_pat(u_int utim) > callout_stop(&wd_softtimeo_handle); > } else { > (void) callout_reset(&wd_softtimeo_handle, > - hz*utim, wd_timeout_cb, "soft"); > + pow2ns_to_ticks(utim), wd_timeout_cb, "soft"); > } > error =3D 0; > } else { > @@ -201,10 +250,13 @@ static int > wd_set_pretimeout(int newtimeout, int disableiftoolong) > { > u_int utime; > + struct timespec utime_ts; > + int timeout_ticks; > =20 > utime =3D wdog_kern_last_timeout(); > + pow2ns_to_ts(utime, &utime_ts); > /* do not permit a pre-timeout >=3D than the timeout. */ > - if (newtimeout >=3D utime) { > + if (newtimeout >=3D utime_ts.tv_sec) { > /* > * If 'disableiftoolong' then just fall through > * so as to disable the pre-watchdog > @@ -222,8 +274,22 @@ wd_set_pretimeout(int newtimeout, int di > return 0; > } > =20 > + timeout_ticks =3D pow2ns_to_ticks(utime) - (hz*newtimeout); > +#if 0 > + printf("wd_set_pretimeout: " > + "newtimeout: %d, " > + "utime: %d -> utime_ticks: %d, " > + "hz*newtimeout: %d, " > + "timeout_ticks: %d -> sec: %d\n", > + newtimeout, > + utime, pow2ns_to_ticks(utime), > + hz*newtimeout, > + timeout_ticks, timeout_ticks / hz); > +#endif > + > /* We determined the value is sane, so reset the callout */ > - (void) callout_reset(&wd_pretimeo_handle, hz*(utime - newtimeout), > + (void) callout_reset(&wd_pretimeo_handle, > + timeout_ticks, > wd_timeout_cb, "pre-timeout"); > wd_pretimeout =3D newtimeout; > return 0; > @@ -282,7 +348,7 @@ wd_ioctl(struct cdev *dev __unused, u_lo > break; > case WDIOC_SETTIMEOUT: > u =3D *(u_int *)data; > - error =3D wdog_kern_pat(u); > + error =3D wdog_kern_pat(seconds_to_pow2ns(u)); > break; > case WDIOC_GETTIMEOUT: > u =3D wdog_kern_last_timeout(); >=20 > Added: head/sys/libkern/flsll.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/libkern/flsll.c Sat Jul 27 20:47:01 2013 (r253719) > @@ -0,0 +1,47 @@ > +/*- > + * Copyright (c) 1990, 1993 > + * The Regents of the University of California. All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distributio= n. > + * 4. Neither the name of the University nor the names of its contributo= rs > + * may be used to endorse or promote products derived from this softw= are > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' A= ND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PU= RPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIA= BLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUE= NTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOO= DS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S= TRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY= WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +#include > +__FBSDID("$FreeBSD$"); > + > +/* > + * Find Last Set bit > + */ > +int > +flsll(long long mask) > +{ > + int bit; > + > + if (mask =3D=3D 0) > + return (0); > + for (bit =3D 1; mask !=3D 1; bit++) > + mask =3D (unsigned long long)mask >> 1; > + return (bit); > +} >=20 > Modified: head/sys/sys/libkern.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/libkern.h Sat Jul 27 20:15:18 2013 (r253718) > +++ head/sys/sys/libkern.h Sat Jul 27 20:47:01 2013 (r253719) > @@ -94,6 +94,10 @@ int fls(int); > #ifndef HAVE_INLINE_FLSL > int flsl(long); > #endif > +#ifndef HAVE_INLINE_FLSLL > +int flsll(long long); > +#endif > + > int fnmatch(const char *, const char *, int); > int locc(int, char *, u_int); > void *memchr(const void *s, int c, size_t n); >=20 > Modified: head/usr.sbin/watchdogd/watchdogd.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/watchdogd/watchdogd.c Sat Jul 27 20:15:18 2013 (r253718) > +++ head/usr.sbin/watchdogd/watchdogd.c Sat Jul 27 20:47:01 2013 (r253719) > @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > =20 > #include > @@ -58,19 +59,24 @@ __FBSDID("$FreeBSD$"); > =20 > #include > =20 > +static long fetchtimeout(int opt, const char *longopt, const char *myopt= arg); > static void parseargs(int, char *[]); > +static int seconds_to_pow2ns(int); > static void sighandler(int); > static void watchdog_loop(void); > static int watchdog_init(void); > static int watchdog_onoff(int onoff); > static int watchdog_patpat(u_int timeout); > static void usage(void); > +static int tstotv(struct timeval *tv, struct timespec *ts); > +static int tvtohz(struct timeval *tv); > =20 > static int debugging =3D 0; > static int end_program =3D 0; > static const char *pidfile =3D _PATH_VARRUN "watchdogd.pid"; > static u_int timeout =3D WD_TO_128SEC; > static u_int pretimeout =3D 0; > +static u_int timeout_sec; > static u_int passive =3D 0; > static int is_daemon =3D 0; > static int is_dry_run =3D 0; /* do not arm the watchdog, only > @@ -183,6 +189,59 @@ main(int argc, char *argv[]) > } > } > =20 > +static void > +pow2ns_to_ts(int pow2ns, struct timespec *ts) > +{ > + uint64_t ns; > + > + ns =3D 1ULL << pow2ns; > + ts->tv_sec =3D ns / 1000000000ULL; > + ts->tv_nsec =3D ns % 1000000000ULL; > +} > + > +/* > + * Convert a timeout in seconds to N where 2^N nanoseconds is close to > + * "seconds". > + * > + * The kernel expects the timeouts for watchdogs in "2^N nanosecond form= at". > + */ > +static u_int > +parse_timeout_to_pow2ns(char opt, const char *longopt, const char *myopt= arg) > +{ > + double a; > + u_int rv; > + struct timespec ts; > + struct timeval tv; > + int ticks; > + char shortopt[] =3D "- "; > + > + if (!longopt) > + shortopt[1] =3D opt; > + > + a =3D fetchtimeout(opt, longopt, myoptarg); > + > + if (a =3D=3D 0) > + rv =3D WD_TO_NEVER; > + else > + rv =3D seconds_to_pow2ns(a); > + pow2ns_to_ts(rv, &ts); > + tstotv(&tv, &ts); > + ticks =3D tvtohz(&tv); > + if (debugging) { > + printf("Timeout for %s%s " > + "is 2^%d nanoseconds " > + "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", > + longopt ? "-" : "", longopt ? longopt : shortopt, > + rv, > + myoptarg, ts.tv_sec, ts.tv_nsec, ticks); > + } > + if (ticks <=3D 0) { > + errx(1, "Timeout for %s%s is too small, please choose a higher timeout= =2E", longopt ? "-" : "", longopt ? longopt : shortopt); > + } > + > + return (rv); > +} > + > /* > * Catch signals and begin shutdown process. > */ > @@ -513,6 +572,110 @@ timeout_act_str2int(const char *lopt, co > return rv; > } > =20 > +int > +tstotv(struct timeval *tv, struct timespec *ts) > +{ > + > + tv->tv_sec =3D ts->tv_sec; > + tv->tv_usec =3D ts->tv_nsec / 1000; > + return 0; > +} > + > +/* > + * Convert a timeval to a number of ticks. > + * Mostly copied from the kernel. > + */ > +int > +tvtohz(struct timeval *tv) > +{ > + register unsigned long ticks; > + register long sec, usec; > + int hz; > + size_t hzsize; > + int error; > + int tick; > + > + hzsize =3D sizeof(hz); > + > + error =3D sysctlbyname("kern.hz", &hz, &hzsize, NULL, 0); > + if (error) > + err(1, "sysctlbyname kern.hz"); > + > + tick =3D 1000000 / hz; > + > + /* > + * If the number of usecs in the whole seconds part of the time > + * difference fits in a long, then the total number of usecs will > + * fit in an unsigned long. Compute the total and convert it to > + * ticks, rounding up and adding 1 to allow for the current tick > + * to expire. Rounding also depends on unsigned long arithmetic > + * to avoid overflow. > + * > + * Otherwise, if the number of ticks in the whole seconds part of > + * the time difference fits in a long, then convert the parts to > + * ticks separately and add, using similar rounding methods and > + * overflow avoidance. This method would work in the previous > + * case but it is slightly slower and assumes that hz is integral. > + * > + * Otherwise, round the time difference down to the maximum > + * representable value. > + * > + * If ints have 32 bits, then the maximum value for any timeout in > + * 10ms ticks is 248 days. > + */ > + sec =3D tv->tv_sec; > + usec =3D tv->tv_usec; > + if (usec < 0) { > + sec--; > + usec +=3D 1000000; > + } > + if (sec < 0) { > +#ifdef DIAGNOSTIC > + if (usec > 0) { > + sec++; > + usec -=3D 1000000; > + } > + printf("tvotohz: negative time difference %ld sec %ld usec\n", > + sec, usec); > +#endif > + ticks =3D 1; > + } else if (sec <=3D LONG_MAX / 1000000) > + ticks =3D (sec * 1000000 + (unsigned long)usec + (tick - 1)) > + / tick + 1; > + else if (sec <=3D LONG_MAX / hz) > + ticks =3D sec * hz > + + ((unsigned long)usec + (tick - 1)) / tick + 1; > + else > + ticks =3D LONG_MAX; > + if (ticks > INT_MAX) > + ticks =3D INT_MAX; > + return ((int)ticks); > +} > + > +static int > +seconds_to_pow2ns(int seconds) > +{ > + uint64_t power; > + uint64_t ns; > + uint64_t shifted; > + > + if (seconds <=3D 0) > + errx(1, "seconds %d < 0", seconds); > + ns =3D ((uint64_t)seconds) * 1000000000ULL; > + power =3D flsll(ns); > + shifted =3D 1ULL << power; > + if (shifted <=3D ns) { > + power++; > + } > + if (debugging) { > + printf("shifted %lld\n", (long long)shifted); > + printf("seconds_to_pow2ns: seconds: %d, ns %lld, power %d\n", > + seconds, (long long)ns, (int)power); > + } > + return (power); > +} > + > + > /* > * Handle the few command line arguments supported. > */ > @@ -521,9 +684,7 @@ parseargs(int argc, char *argv[]) > { > int longindex; > int c; > - char *p; > const char *lopt; > - double a; > =20 > /* > * if we end with a 'd' aka 'watchdogd' then we are the daemon program, > @@ -565,21 +726,11 @@ parseargs(int argc, char *argv[]) > do_syslog =3D 0; > break; > case 't': > - p =3D NULL; > - errno =3D 0; > - a =3D strtod(optarg, &p); > - if ((p !=3D NULL && *p !=3D '\0') || errno !=3D 0) > - errx(EX_USAGE, "-t argument is not a number"); > - if (a < 0) > - errx(EX_USAGE, "-t argument must be positive"); > - > - if (a =3D=3D 0) > - timeout =3D WD_TO_NEVER; > - else > - timeout =3D flsll(a * 1e9); > - if (debugging) > - printf("Timeout is 2^%d nanoseconds\n", > - timeout); > + timeout_sec =3D atoi(optarg); > + timeout =3D parse_timeout_to_pow2ns(c, NULL, optarg); > + if (debugging) > + printf("Timeout is 2^%d nanoseconds\n", > + timeout); > break; > case 'T': > carp_thresh_seconds =3D fetchtimeout(c, "NULL", optarg); > @@ -618,4 +769,15 @@ parseargs(int argc, char *argv[]) > errx(EX_USAGE, "extra arguments."); > if (is_daemon && timeout < WD_TO_1SEC) > errx(EX_USAGE, "-t argument is less than one second."); > + if (pretimeout_set) { > + struct timespec ts; > + > + pow2ns_to_ts(timeout, &ts); > + if (pretimeout >=3D ts.tv_sec) { > + errx(EX_USAGE, > + "pretimeout (%d) >=3D timeout (%d -> %ld)\n" > + "see manual section TIMEOUT RESOLUTION", > + pretimeout, timeout_sec, (long)ts.tv_sec); > + } > + } Come on. It has been 3 days that tinderbox complains about this. =3D=3D=3D> usr.sbin/watchdogd (all) cc -O2 -pipe -std=3Dgnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /src/usr.sbin/watchdogd/watchdogd.c /src/usr.sbin/watchdogd/watchdogd.c:777:18: error: comparison of integers of different signs: 'u_int' (aka 'unsigned int') and 'time_t' (aka 'int') [-Werror,-Wsign-compare] if (pretimeout >=3D ts.tv_sec) { ~~~~~~~~~~ ^ ~~~~~~~~~ Glen --phCU5ROyZO6kBE05 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJR96HiAAoJEFJPDDeguUajazUH/1sy6pxuubcNOqtXlYKTsThQ OuEyILCaS7ddu+Tje33a54vnn4lloLaKdRKJiBiOFfOToIapJgZrZL3kWNWDCtDx UgHA7PTYBlw7WpoDEmRM4zqhkMu0vj0kkaTPuhleVug6zZAWdWtDUCMICEsnJBxV bLMtNnJ+ylIh187PwTiWTUWSRkYBm71sBcVmsVYCqeon1hBHmTgr9UfaTrqSGafo bltEys1bxUpzDztcMG1HS1FPf9RPjdLXtkIhlY95lhDigAbfqiBC5mYo0T7vGXJZ O//csLlwLAEIK2s3sBXyMtTDrQEGIHn2FcucoxmQgYC4tOX7KK6YNdBQQ+pdGB0= =5+1a -----END PGP SIGNATURE----- --phCU5ROyZO6kBE05-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 11:24:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 32AD5F0A; Tue, 30 Jul 2013 11:24:53 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BF1A42A49; Tue, 30 Jul 2013 11:24:52 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.7/8.14.7) with ESMTP id r6UBOmI8028229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 30 Jul 2013 13:24:49 +0200 (CEST) (envelope-from uqs@FreeBSD.org) Date: Tue, 30 Jul 2013 13:24:47 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Alfred Perlstein Subject: Re: svn commit: r253719 - in head: sys/conf sys/dev/watchdog sys/libkern sys/sys usr.sbin/watchdogd Message-ID: <20130730112447.GA54133@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Alfred Perlstein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201307272047.r6RKl2vI023259@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307272047.r6RKl2vI023259@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 11:24:53 -0000 On Sat, 2013-07-27 at 20:47:02 +0000, Alfred Perlstein wrote: > Author: alfred > Date: Sat Jul 27 20:47:01 2013 > New Revision: 253719 > URL: http://svnweb.freebsd.org/changeset/base/253719 > > Log: > Fix watchdog pretimeout. Alfred, this broken the build and hasn't been fixed for almost three days now. What's up with that? How was this change tested before commit? ===> usr.sbin/watchdogd (all) cc -O2 -pipe -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /data/src/freebsd-head/usr.sbin/watchdogd/watchdogd.c /data/src/freebsd-head/usr.sbin/watchdogd/watchdogd.c:777:18: error: comparison of integers of different signs: 'u_int' (aka 'unsigned int') and 'time_t' (aka 'int') [-Werror,-Wsign-compare] if (pretimeout >= ts.tv_sec) { ~~~~~~~~~~ ^ ~~~~~~~~~ 1 error generated. *** Error code 1 From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 12:17:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0F697E9E; Tue, 30 Jul 2013 12:17:46 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F00BD2D2C; Tue, 30 Jul 2013 12:17:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UCHjhr006512; Tue, 30 Jul 2013 12:17:45 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UCHj0d006511; Tue, 30 Jul 2013 12:17:45 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201307301217.r6UCHj0d006511@svn.freebsd.org> From: Jeremie Le Hen Date: Tue, 30 Jul 2013 12:17:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253801 - stable/9/sys/vm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 12:17:46 -0000 Author: jlh Date: Tue Jul 30 12:17:45 2013 New Revision: 253801 URL: http://svnweb.freebsd.org/changeset/base/253801 Log: MFC r253554: Fix a panic in the racct code when munlock(2) is called with incorrect values. The racct code in sys_munlock() assumed that the boundaries provided by the userland were correct as long as vm_map_unwire() returned successfully. However the latter contains its own logic and sometimes manages to do something out of those boundaries, even if they are buggy. This change makes the racct code to use the accounting done by the vm layer, as it is done in other places such as vm_mlock(). Despite fixing the panic, Alan Cox pointed that this code is still race-y though: two simultaneous callers will produce incorrect values. Reviewed by: alc MFC r253556: Fix previous commit when option RACCT is not used. Approved by: re (kib) Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Tue Jul 30 11:31:18 2013 (r253800) +++ stable/9/sys/vm/vm_mmap.c Tue Jul 30 12:17:45 2013 (r253801) @@ -1221,6 +1221,9 @@ sys_munlock(td, uap) { vm_offset_t addr, end, last, start; vm_size_t size; +#ifdef RACCT + vm_map_t map; +#endif int error; error = priv_check(td, PRIV_VM_MUNLOCK); @@ -1238,7 +1241,9 @@ sys_munlock(td, uap) #ifdef RACCT if (error == KERN_SUCCESS) { PROC_LOCK(td->td_proc); - racct_sub(td->td_proc, RACCT_MEMLOCK, ptoa(end - start)); + map = &td->td_proc->p_vmspace->vm_map; + racct_set(td->td_proc, RACCT_MEMLOCK, + ptoa(pmap_wired_count(map->pmap))); PROC_UNLOCK(td->td_proc); } #endif From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 12:23:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ACB65385; Tue, 30 Jul 2013 12:23:51 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6CF052D8A; Tue, 30 Jul 2013 12:23:51 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id C19574578; Tue, 30 Jul 2013 12:23:49 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 8E87D38C55; Tue, 30 Jul 2013 14:23:53 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "David E. O'Brien" Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> Date: Tue, 30 Jul 2013 14:23:53 +0200 In-Reply-To: <201307292058.r6TKwA56031193@svn.freebsd.org> (David E. O'Brien's message of "Mon, 29 Jul 2013 20:58:10 +0000 (UTC)") Message-ID: <86fvuwgrs6.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 12:23:51 -0000 "David E. O'Brien" writes: > Log: > Decouple yarrow from random(4) device. We've had a policy for several years now that all changes to the PRNG code in the kernel and libc must be reviewed by so@. Please revert this commit and submit your patch to secteam@freebsd.org for review. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 12:33:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C70279D5; Tue, 30 Jul 2013 12:33:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A73532E1B; Tue, 30 Jul 2013 12:33:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UCXL7p012178; Tue, 30 Jul 2013 12:33:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UCXLT8012177; Tue, 30 Jul 2013 12:33:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201307301233.r6UCXLT8012177@svn.freebsd.org> From: Dimitry Andric Date: Tue, 30 Jul 2013 12:33:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 12:33:22 -0000 Author: dim Date: Tue Jul 30 12:33:21 2013 New Revision: 253802 URL: http://svnweb.freebsd.org/changeset/base/253802 Log: Pull in r186696 from upstream clang trunk: This patch implements __get_cpuid_max() as an inline and __cpuid() and __cpuid_count() as macros to be compatible with GCC's cpuid.h. It also adds bit_ constants for the various feature bits as described in version 039 (May 2011) of Intel's SDM Volume 2 in the description of the CPUID instruction. The list of bit_ constants is a bit exhaustive (GCC doesn't do near this many). More bits could be added from a newer version of SDM if desired. Patch by John Baldwin! This should fix several ports which depend on this functionality being available. MFC after: 1 week Modified: head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Modified: head/contrib/llvm/tools/clang/lib/Headers/cpuid.h ============================================================================== --- head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 12:17:45 2013 (r253801) +++ head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 12:33:21 2013 (r253802) @@ -25,10 +25,132 @@ #error this header is for x86 only #endif +/* Features in %ecx for level 1 */ +#define bit_SSE3 0x00000001 +#define bit_PCLMULQDQ 0x00000002 +#define bit_DTES64 0x00000004 +#define bit_MONITOR 0x00000008 +#define bit_DSCPL 0x00000010 +#define bit_VMX 0x00000020 +#define bit_SMX 0x00000040 +#define bit_EIST 0x00000080 +#define bit_TM2 0x00000100 +#define bit_SSSE3 0x00000200 +#define bit_CNXTID 0x00000400 +#define bit_FMA 0x00001000 +#define bit_CMPXCHG16B 0x00002000 +#define bit_xTPR 0x00004000 +#define bit_PDCM 0x00008000 +#define bit_PCID 0x00020000 +#define bit_DCA 0x00040000 +#define bit_SSE41 0x00080000 +#define bit_SSE42 0x00100000 +#define bit_x2APIC 0x00200000 +#define bit_MOVBE 0x00400000 +#define bit_POPCNT 0x00800000 +#define bit_TSCDeadline 0x01000000 +#define bit_AESNI 0x02000000 +#define bit_XSAVE 0x04000000 +#define bit_OSXSAVE 0x08000000 +#define bit_AVX 0x10000000 +#define bit_RDRAND 0x40000000 + +/* Features in %edx for level 1 */ +#define bit_FPU 0x00000001 +#define bit_VME 0x00000002 +#define bit_DE 0x00000004 +#define bit_PSE 0x00000008 +#define bit_TSC 0x00000010 +#define bit_MSR 0x00000020 +#define bit_PAE 0x00000040 +#define bit_MCE 0x00000080 +#define bit_CX8 0x00000100 +#define bit_APIC 0x00000200 +#define bit_SEP 0x00000800 +#define bit_MTRR 0x00001000 +#define bit_PGE 0x00002000 +#define bit_MCA 0x00004000 +#define bit_CMOV 0x00008000 +#define bit_PAT 0x00010000 +#define bit_PSE36 0x00020000 +#define bit_PSN 0x00040000 +#define bit_CLFSH 0x00080000 +#define bit_DS 0x00200000 +#define bit_ACPI 0x00400000 +#define bit_MMX 0x00800000 +#define bit_FXSR 0x01000000 +#define bit_SSE 0x02000000 +#define bit_SSE2 0x04000000 +#define bit_SS 0x08000000 +#define bit_HTT 0x10000000 +#define bit_TM 0x20000000 +#define bit_PBE 0x80000000 + +/* Features in %ebx for level 7 sub-leaf 0 */ +#define bit_FSGSBASE 0x00000001 +#define bit_SMEP 0x00000080 +#define bit_ENH_MOVSB 0x00000200 + +/* PIC on i386 uses %ebx, so preserve it. */ +#if __i386__ +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm(" pushl %%ebx\n" \ + " cpuid\n" \ + " mov %%ebx,%1\n" \ + " popl %%ebx" \ + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#else +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level)) + +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ + : "0"(__level), "2"(__count)) +#endif + static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) { - __asm("cpuid" : "=a"(*__eax), "=b" (*__ebx), "=c"(*__ecx), "=d"(*__edx) - : "0"(__level)); + __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx); return 1; } + +static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig) +{ + unsigned int __eax, __ebx, __ecx, __edx; +#if __i386__ + int __cpuid_supported; + + __asm(" pushfl\n" + " popl %%eax\n" + " movl %%eax,%%ecx\n" + " xorl $0x00200000,%%eax\n" + " pushl %%eax\n" + " popfl\n" + " pushfl\n" + " popl %%eax\n" + " movl $0,%0\n" + " cmpl %%eax,%%ecx\n" + " je 1f\n" + " movl $1,%0\n" + "1:" + : "=r" (__cpuid_supported) : : "eax", "ecx"); + if (!__cpuid_supported) + return 0; +#endif + + __cpuid(__level, __eax, __ebx, __ecx, __edx); + if (__sig) + *__sig = __ebx; + return __eax; +} From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 13:00:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4CB54CB; Tue, 30 Jul 2013 13:00:10 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1DE132171; Tue, 30 Jul 2013 13:00:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UD093g019111; Tue, 30 Jul 2013 13:00:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UD09Te019110; Tue, 30 Jul 2013 13:00:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307301300.r6UD09Te019110@svn.freebsd.org> From: Alexander Motin Date: Tue, 30 Jul 2013 13:00:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253803 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 13:00:10 -0000 Author: mav Date: Tue Jul 30 13:00:09 2013 New Revision: 253803 URL: http://svnweb.freebsd.org/changeset/base/253803 Log: Add NO_RC16 quirk to make da driver avoid using READ CAPACITY(16) command if possible. Use it for Kingston JetFlash USB sticks, that are known to return garbage in response to that command. Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jul 30 12:33:21 2013 (r253802) +++ head/sys/cam/scsi/scsi_da.c Tue Jul 30 13:00:09 2013 (r253803) @@ -98,7 +98,8 @@ typedef enum { DA_Q_NO_SYNC_CACHE = 0x01, DA_Q_NO_6_BYTE = 0x02, DA_Q_NO_PREVENT = 0x04, - DA_Q_4K = 0x08 + DA_Q_4K = 0x08, + DA_Q_NO_RC16 = 0x10 } da_quirks; #define DA_Q_BIT_STRING \ @@ -106,7 +107,8 @@ typedef enum { "\001NO_SYNC_CACHE" \ "\002NO_6_BYTE" \ "\003NO_PREVENT" \ - "\0044K" + "\0044K" \ + "\005NO_RC16" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -680,6 +682,11 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_REMOVABLE, "Kingston", "DataTraveler G3", "1.00"}, /*quirks*/ DA_Q_NO_PREVENT }, + { + /* At least several Transcent USB sticks lie on RC16. */ + {T_DIRECT, SIP_MEDIA_REMOVABLE, "JetFlash", "Transcend*", + "*"}, /*quirks*/ DA_Q_NO_RC16 + }, /* ATA/SATA devices over SAS/USB/... */ { /* Hitachi Advanced Format (4k) drives */ @@ -2075,7 +2082,8 @@ daregister(struct cam_periph *periph, vo softc->minimum_cmd_size = 16; /* Predict whether device may support READ CAPACITY(16). */ - if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3) { + if (SID_ANSI_REV(&cgd->inq_data) >= SCSI_REV_SPC3 && + (softc->quirks & DA_Q_NO_RC16) == 0) { softc->flags |= DA_FLAG_CAN_RC16; softc->state = DA_STATE_PROBE_RC16; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 13:05:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6FEEC288; Tue, 30 Jul 2013 13:05:52 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DA0821B4; Tue, 30 Jul 2013 13:05:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UD5qCi021669; Tue, 30 Jul 2013 13:05:52 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UD5qi8021668; Tue, 30 Jul 2013 13:05:52 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201307301305.r6UD5qi8021668@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 30 Jul 2013 13:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253804 - head/usr.bin/fetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 13:05:52 -0000 Author: des Date: Tue Jul 30 13:05:51 2013 New Revision: 253804 URL: http://svnweb.freebsd.org/changeset/base/253804 Log: Add Michael Gmelin's name to the copyright statement. Modified: head/usr.bin/fetch/fetch.1 Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Tue Jul 30 13:00:09 2013 (r253803) +++ head/usr.bin/fetch/fetch.1 Tue Jul 30 13:05:51 2013 (r253804) @@ -1,5 +1,6 @@ .\"- -.\" Copyright (c) 2000-2011 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav +.\" Copyright (c) 2013 Michael Gmelin .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used .\" by permission. From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 13:07:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3AA8340F; Tue, 30 Jul 2013 13:07:56 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C82321D7; Tue, 30 Jul 2013 13:07:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UD7tBl022011; Tue, 30 Jul 2013 13:07:55 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UD7tCf022007; Tue, 30 Jul 2013 13:07:55 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201307301307.r6UD7tCf022007@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 30 Jul 2013 13:07:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253805 - in head: lib/libfetch usr.bin/fetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 13:07:56 -0000 Author: des Date: Tue Jul 30 13:07:55 2013 New Revision: 253805 URL: http://svnweb.freebsd.org/changeset/base/253805 Log: Include an Accept header in requests. PR: kern/180917 MFC after: 1 week Modified: head/lib/libfetch/fetch.3 head/lib/libfetch/http.c head/usr.bin/fetch/fetch.1 Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Tue Jul 30 13:05:51 2013 (r253804) +++ head/lib/libfetch/fetch.3 Tue Jul 30 13:07:55 2013 (r253805) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 1998-2011 Dag-Erling Smørgrav +.\" Copyright (c) 1998-2013 Dag-Erling Smørgrav .\" Copyright (c) 2013 Michael Gmelin .\" All rights reserved. .\" @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 25, 2013 +.Dd July 30, 2013 .Dt FETCH 3 .Os .Sh NAME @@ -571,6 +571,15 @@ variable is set. Same as .Ev FTP_PROXY , for compatibility. +.It Ev HTTP_ACCEPT +Specifies the value of the +.Va Accept +header for HTTP requests. +If empty, no +.Va Accept +header is sent. +The default is +.Dq */* . .It Ev HTTP_AUTH Specifies HTTP authorization parameters as a colon-separated list of items. Modified: head/lib/libfetch/http.c ============================================================================== --- head/lib/libfetch/http.c Tue Jul 30 13:05:51 2013 (r253804) +++ head/lib/libfetch/http.c Tue Jul 30 13:07:55 2013 (r253805) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000-2011 Dag-Erling Smørgrav + * Copyright (c) 2000-2013 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -1664,6 +1664,12 @@ http_request(struct url *URL, const char } /* other headers */ + if ((p = getenv("HTTP_ACCEPT")) != NULL) { + if (*p != '\0') + http_cmd(conn, "Accept: %s", p); + } else { + http_cmd(conn, "Accept: */*"); + } if ((p = getenv("HTTP_REFERER")) != NULL && *p != '\0') { if (strcasecmp(p, "auto") == 0) http_cmd(conn, "Referer: %s://%s%s", Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Tue Jul 30 13:05:51 2013 (r253804) +++ head/usr.bin/fetch/fetch.1 Tue Jul 30 13:07:55 2013 (r253805) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 27, 2011 +.Dd July 30, 2013 .Dt FETCH 1 .Os .Sh NAME @@ -340,6 +340,7 @@ for a description of additional environm .Ev FTP_PASSWORD , .Ev FTP_PROXY , .Ev ftp_proxy , +.Ev HTTP_ACCEPT , .Ev HTTP_AUTH , .Ev HTTP_PROXY , .Ev http_proxy , From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 13:34:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70F37DB6; Tue, 30 Jul 2013 13:34:20 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 219382430; Tue, 30 Jul 2013 13:34:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1V4A3y-00067J-Qf; Tue, 30 Jul 2013 17:34:07 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:Date:X-TorMail-User:Content-Type:MIME-Version:References:In-Reply-To:Subject:Cc:To:From; bh=FlhwNzIFBtM01a2pXPdmlI+/7o88nzfMloGShlamxQM=; b=UUQu85Jt8ZqEQGn4OuzZqB2Qemu9p8Db1s21YGaCHzzzGGeUMxdo30ejqeODk/P2GERIQs29/2So3V/xyNKjUnhtXSoLsfNK541GYF7vqSy/yaS+j0DoU0p7DUlEW3HMyfCAmd2zO2NAmaWTV4ZLV4U3qI/k3w9gSjSCQuJaXTA=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1V4A3i-000M2D-6A; Tue, 30 Jul 2013 13:33:51 +0000 From: Jan Beich To: Dimitry Andric Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers In-Reply-To: <201307301233.r6UCXLT8012177@svn.freebsd.org> (Dimitry Andric's message of "Tue, 30 Jul 2013 12:33:21 +0000 (UTC)") References: <201307301233.r6UCXLT8012177@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Date: Tue, 30 Jul 2013 13:33:51 +0000 Message-Id: <1V4A3i-000M2D-6A@internal.tormail.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 13:34:20 -0000 Dimitry Andric writes: > Author: dim > Date: Tue Jul 30 12:33:21 2013 > New Revision: 253802 > URL: http://svnweb.freebsd.org/changeset/base/253802 > > Log: > Pull in r186696 from upstream clang trunk: > > This patch implements __get_cpuid_max() as an inline and __cpuid() > and __cpuid_count() as macros to be compatible with GCC's cpuid.h. [...] > +#define bit_SSE41 0x00080000 > +#define bit_SSE42 0x00100000 GCC's spelling is different $ fgrep -r bit_SSE4 /usr/local/lib/gcc48/**/ /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_1 (1 << 19) /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_2 (1 << 20) /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4a (1 << 6) Even Clang's own from -msse* $ clang -dM -E -march=btver2 - Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 834595F7; Tue, 30 Jul 2013 13:55:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 462942522; Tue, 30 Jul 2013 13:55:07 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::bd91:996a:a777:8a5f] (unknown [IPv6:2001:7b8:3a7:0:bd91:996a:a777:8a5f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 574325C5A; Tue, 30 Jul 2013 15:55:02 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers From: Dimitry Andric In-Reply-To: <1V4A3i-000M2D-6A@internal.tormail.org> Date: Tue, 30 Jul 2013 15:55:00 +0200 Content-Transfer-Encoding: 7bit Message-Id: <62DAF25F-E087-48BC-9BB1-05A5E078EDCA@FreeBSD.org> References: <201307301233.r6UCXLT8012177@svn.freebsd.org> <1V4A3i-000M2D-6A@internal.tormail.org> To: Jan Beich , John Baldwin X-Mailer: Apple Mail (2.1508) Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 13:55:07 -0000 On Jul 30, 2013, at 15:33, Jan Beich wrote: > Dimitry Andric writes: > >> Author: dim >> Date: Tue Jul 30 12:33:21 2013 >> New Revision: 253802 >> URL: http://svnweb.freebsd.org/changeset/base/253802 >> >> Log: >> Pull in r186696 from upstream clang trunk: >> >> This patch implements __get_cpuid_max() as an inline and __cpuid() >> and __cpuid_count() as macros to be compatible with GCC's cpuid.h. > [...] >> +#define bit_SSE41 0x00080000 >> +#define bit_SSE42 0x00100000 > > GCC's spelling is different > > $ fgrep -r bit_SSE4 /usr/local/lib/gcc48/**/ > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_1 (1 << 19) > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_2 (1 << 20) > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4a (1 << 6) > > Even Clang's own from -msse* > > $ clang -dM -E -march=btver2 - #define __SSE4A__ 1 > #define __SSE4_1__ 1 > #define __SSE4_2__ 1 Hm, that's a good one. John, is it OK to adapt those to match gcc's definitions? We should also submit it upstream then. -Dimitry From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 14:09:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE521F2C; Tue, 30 Jul 2013 14:09:36 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-oa0-x230.google.com (mail-oa0-x230.google.com [IPv6:2607:f8b0:4003:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F8FF262C; Tue, 30 Jul 2013 14:09:36 +0000 (UTC) Received: by mail-oa0-f48.google.com with SMTP id f4so16047078oah.21 for ; Tue, 30 Jul 2013 07:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=KpAwMS7h9Ic1+OzXZOfzC3H5bmRzVwdLnLRNyPBeA9Q=; b=uN5Z5RvwWYzo9vAueQdm6UMjd2sgOB0VDknlBHE3l/wm84pi/zAmnT+4l2s/zBnsRD JsYYtoTETp3lhlGfOiFWFfGpDPL4G0hn3dzqfXissFX9lF9sd5igCCYoKnaLwLtmTCIN EGfIeV5Dz/DQsViR1K44iFHlYtMQZSZMeJBLou2FmLuWGSRzNRZD6TeIFCpZOkZlwoSS xmRCWQXwZ1gsisisVaolY2Hsss3eWUL2DbfUiKerUgxxryGWFfEYFAHVvMGXQVgzekwt YS0P7+Tb+lddA7hs1sq1E3TMZriko6UfI1LNfP5w/yk8BSmXCaUeB+is1riCYkfPrYG/ yQ4g== MIME-Version: 1.0 X-Received: by 10.182.226.199 with SMTP id ru7mr4192313obc.12.1375193375519; Tue, 30 Jul 2013 07:09:35 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.182.162.65 with HTTP; Tue, 30 Jul 2013 07:09:35 -0700 (PDT) In-Reply-To: <201307301233.r6UCXLT8012177@svn.freebsd.org> References: <201307301233.r6UCXLT8012177@svn.freebsd.org> Date: Tue, 30 Jul 2013 07:09:35 -0700 X-Google-Sender-Auth: DJQQB_evmFKYNj2YHQ8pB3mElcU Message-ID: Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers From: Matthew Fleming To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 14:09:36 -0000 On Tue, Jul 30, 2013 at 5:33 AM, Dimitry Andric wrote: > Author: dim > Date: Tue Jul 30 12:33:21 2013 > New Revision: 253802 > URL: http://svnweb.freebsd.org/changeset/base/253802 > > Log: > Pull in r186696 from upstream clang trunk: > > This patch implements __get_cpuid_max() as an inline and __cpuid() > and __cpuid_count() as macros to be compatible with GCC's cpuid.h. > It also adds bit_ constants for the various feature bits as > described in version 039 (May 2011) of Intel's SDM Volume 2 in the > description of the CPUID instruction. The list of bit_ > constants is a bit exhaustive (GCC doesn't do near this many). More > bits could be added from a newer version of SDM if desired. > > Patch by John Baldwin! > > This should fix several ports which depend on this functionality being > available. > > MFC after: 1 week > > Modified: > head/contrib/llvm/tools/clang/lib/Headers/cpuid.h > > Modified: head/contrib/llvm/tools/clang/lib/Headers/cpuid.h > > ============================================================================== > --- head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 > 12:17:45 2013 (r253801) > +++ head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 > 12:33:21 2013 (r253802) > +/* PIC on i386 uses %ebx, so preserve it. */ > +#if __i386__ > +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ > + __asm(" pushl %%ebx\n" \ > + " cpuid\n" \ > + " mov %%ebx,%1\n" \ > + " popl %%ebx" \ > + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ > + : "0"(__level)) > + > +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ > + __asm(" pushl %%ebx\n" \ > + " cpuid\n" \ > + " mov %%ebx,%1\n" \ > + " popl %%ebx" \ > + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ > + : "0"(__level), "2"(__count)) > +#else > +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ > + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ > + : "0"(__level)) > + > +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ > + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ > + : "0"(__level), "2"(__count)) > +#endif > PIC mode on amd64 also uses %ebx. The difference is that FreeBSD makefiles set -fPIC for i386 kernel compile but not amd64. Locally we use -fPIC for amd64 (it was added 6 years ago to our environment because it gave better kernel debugging). Anyways, is there some way to detect PIC mode and use that to decide whether to use %ebx for the cpuid instruction, rather than using i386? Thanks, matthew From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 14:17:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D105781; Tue, 30 Jul 2013 14:17:00 +0000 (UTC) (envelope-from dim@freebsd.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B958126C9; Tue, 30 Jul 2013 14:16:59 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::bd91:996a:a777:8a5f] (unknown [IPv6:2001:7b8:3a7:0:bd91:996a:a777:8a5f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 702CD5C5A; Tue, 30 Jul 2013 16:16:58 +0200 (CEST) Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers From: Dimitry Andric In-Reply-To: Date: Tue, 30 Jul 2013 16:16:58 +0200 Message-Id: <2DE35C45-B110-4D93-BFA7-542A3D1EE902@freebsd.org> References: <201307301233.r6UCXLT8012177@svn.freebsd.org> To: Matthew Fleming X-Mailer: Apple Mail (2.1508) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 14:17:00 -0000 On Jul 30, 2013, at 16:09, Matthew Fleming wrote: > On Tue, Jul 30, 2013 at 5:33 AM, Dimitry Andric = wrote: > Author: dim > Date: Tue Jul 30 12:33:21 2013 > New Revision: 253802 > URL: http://svnweb.freebsd.org/changeset/base/253802 >=20 > Log: > Pull in r186696 from upstream clang trunk: >=20 > This patch implements __get_cpuid_max() as an inline and __cpuid() > and __cpuid_count() as macros to be compatible with GCC's cpuid.h. > It also adds bit_ constants for the various feature bits as > described in version 039 (May 2011) of Intel's SDM Volume 2 in the > description of the CPUID instruction. The list of bit_ > constants is a bit exhaustive (GCC doesn't do near this many). = More > bits could be added from a newer version of SDM if desired. ... > +/* PIC on i386 uses %ebx, so preserve it. */ > +#if __i386__ > +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ > + __asm(" pushl %%ebx\n" \ > + " cpuid\n" \ > + " mov %%ebx,%1\n" \ > + " popl %%ebx" \ ... > PIC mode on amd64 also uses %ebx. The difference is that FreeBSD = makefiles set -fPIC for i386 kernel compile but not amd64. Locally we = use -fPIC for amd64 (it was added 6 years ago to our environment because = it gave better kernel debugging). >=20 > Anyways, is there some way to detect PIC mode and use that to decide = whether to use %ebx for the cpuid instruction, rather than using i386? Upstream gcc checks this with: #if defined(__i386__) && defined(__PIC__) ... #elif defined(__x86_64__) && (defined(__code_model_medium__) || = defined(__code_model_large__)) && defined(__PIC__) ... and it exchanges ebx or rbx with %k1 or %q1, respectively, instead of = push/pop. That might be a little more efficient. I guess the defined(__PIC__) should be enough for us, in most cases. = The code_model stuff is for x32 support, which we do not have yet. -Dimitry From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 14:50:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9E5B13DD; Tue, 30 Jul 2013 14:50:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6E22F2892; Tue, 30 Jul 2013 14:50:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UEojwK053484; Tue, 30 Jul 2013 14:50:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UEoiKP053483; Tue, 30 Jul 2013 14:50:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201307301450.r6UEoiKP053483@svn.freebsd.org> From: Alexander Motin Date: Tue, 30 Jul 2013 14:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253806 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 14:50:45 -0000 Author: mav Date: Tue Jul 30 14:50:44 2013 New Revision: 253806 URL: http://svnweb.freebsd.org/changeset/base/253806 Log: Allow three IOCTLs to be used on suspended pool, restoring state that existed before IOCTL code refactoring merged change 4445fffb from illumos at r248571. This change allows `zpool clear` to be used again to recover suspended pool. It seems the only was supposed by the code to restore pool operation after reconnecting lost disks that were required for data completeness. There are still cases where `zpool clear` command can just safely stuck due to deadlocks inside ZFS kernel part, but probably that is better then having no chances to recover at all. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 30 13:07:55 2013 (r253805) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 30 14:50:44 2013 (r253806) @@ -5495,10 +5495,10 @@ zfs_ioctl_init(void) zfs_secpolicy_read, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_ERROR_LOG, zfs_ioc_error_log, - zfs_secpolicy_inject, B_FALSE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_inject, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_DSOBJ_TO_DSNAME, zfs_ioc_dsobj_to_dsname, - zfs_secpolicy_diff, B_FALSE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_diff, B_FALSE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_POOL_GET_HISTORY, zfs_ioc_pool_get_history, zfs_secpolicy_config, B_FALSE, POOL_CHECK_SUSPENDED); @@ -5507,7 +5507,7 @@ zfs_ioctl_init(void) zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_CLEAR, zfs_ioc_clear, - zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); + zfs_secpolicy_config, B_TRUE, POOL_CHECK_NONE); zfs_ioctl_register_pool(ZFS_IOC_POOL_REOPEN, zfs_ioc_pool_reopen, zfs_secpolicy_config, B_TRUE, POOL_CHECK_SUSPENDED); From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 15:31:57 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 45A9D479; Tue, 30 Jul 2013 15:31:57 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2400B2B3B; Tue, 30 Jul 2013 15:31:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.6/8.14.6) with ESMTP id r6UFVucF031507; Tue, 30 Jul 2013 08:31:56 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.6/8.14.6/Submit) id r6UFVuFY031506; Tue, 30 Jul 2013 08:31:56 -0700 (PDT) (envelope-from sgk) Date: Tue, 30 Jul 2013 08:31:56 -0700 From: Steve Kargl To: David Schultz Subject: Re: svn commit: r253215 - head/lib/msun/src Message-ID: <20130730153156.GA31462@troutmask.apl.washington.edu> References: <201307111741.r6BHf5gQ060844@svn.freebsd.org> <20130729070517.GA3192@zim.MIT.EDU> <00F2B647-8D25-45FB-B852-5214AC27AD26@FreeBSD.org> <20130730070223.GA74642@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130730070223.GA74642@zim.MIT.EDU> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, David Chisnall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 15:31:57 -0000 On Tue, Jul 30, 2013 at 12:02:23AM -0700, David Schultz wrote: > Fortran has its own problems and isn't very well supported. I take issue with the later assertion. Fortran is well support in GCC >4.6. See GCC list of front-end maintainers. :-) > But for what it's worth, C++ is actually a good choice for > high-performance numerics, IMO, mainly because of operator > overloading and generics. I can write a function that looks like > actual math, and call it with a float, a double, or even an > arbitrary-precision mpfr_t, and it just works. I almost spit my morning coffee on my keyboard. One can do the same thing in Fortran. Of course, I'm talking about a modern version of Fortran: namely, Fortran 2003 or Fortran 2008. -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 16:17:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 677B5DFD; Tue, 30 Jul 2013 16:17:31 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 54C812D3E; Tue, 30 Jul 2013 16:17:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UGHVaV078510; Tue, 30 Jul 2013 16:17:31 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UGHVds078509; Tue, 30 Jul 2013 16:17:31 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307301617.r6UGHVds078509@svn.freebsd.org> From: Rui Paulo Date: Tue, 30 Jul 2013 16:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253807 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 16:17:31 -0000 Author: rpaulo Date: Tue Jul 30 16:17:30 2013 New Revision: 253807 URL: http://svnweb.freebsd.org/changeset/base/253807 Log: Unbreak sparc64 LINT. Need to fix this correctly at some point in the future. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Tue Jul 30 14:50:44 2013 (r253806) +++ head/sys/dev/usb/wlan/if_rsu.c Tue Jul 30 16:17:30 2013 (r253807) @@ -2077,7 +2077,7 @@ rsu_power_off(struct rsu_softc *sc) } static int -rsu_fw_loadsection(struct rsu_softc *sc, uint8_t *buf, int len) +rsu_fw_loadsection(struct rsu_softc *sc, const uint8_t *buf, int len) { struct rsu_data *data; struct r92s_tx_desc *txd; @@ -2111,9 +2111,9 @@ rsu_fw_loadsection(struct rsu_softc *sc, static int rsu_load_firmware(struct rsu_softc *sc) { - struct r92s_fw_hdr *hdr; + const struct r92s_fw_hdr *hdr; struct r92s_fw_priv *dmem; - uint8_t *imem, *emem; + const uint8_t *imem, *emem; int imemsz, ememsz; const struct firmware *fw; size_t size; @@ -2136,7 +2136,7 @@ rsu_load_firmware(struct rsu_softc *sc) error = EINVAL; goto fail; } - hdr = (struct r92s_fw_hdr *)fw->data; + hdr = (const struct r92s_fw_hdr *)fw->data; if (hdr->signature != htole16(0x8712) && hdr->signature != htole16(0x8192)) { device_printf(sc->sc_dev, @@ -2163,7 +2163,7 @@ rsu_load_firmware(struct rsu_softc *sc) error = EINVAL; goto fail; } - imem = (uint8_t *)&hdr[1]; + imem = (const uint8_t *)&hdr[1]; emem = imem + imemsz; /* Load IMEM section. */ @@ -2238,7 +2238,7 @@ rsu_load_firmware(struct rsu_softc *sc) } /* Update DMEM section before loading. */ - dmem = &hdr->priv; + dmem = __DECONST(struct r92s_fw_priv *, &hdr->priv); memset(dmem, 0, sizeof(*dmem)); dmem->hci_sel = R92S_HCI_SEL_USB | R92S_HCI_SEL_8172; dmem->nendpoints = sc->npipes; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 16:18:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 28135F57; Tue, 30 Jul 2013 16:18:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9CA32D53; Tue, 30 Jul 2013 16:18:41 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 64755B97A; Tue, 30 Jul 2013 12:18:40 -0400 (EDT) From: John Baldwin To: sbruno@freebsd.org Subject: Re: svn commit: r253708 - head/sys/dev/ipmi Date: Tue, 30 Jul 2013 12:02:19 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291617.39898.jhb@freebsd.org> <1375138259.1479.69.camel@localhost> In-Reply-To: <1375138259.1479.69.camel@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307301202.19954.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 12:18:40 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 16:18:42 -0000 On Monday, July 29, 2013 6:50:59 pm Sean Bruno wrote: > [sbruno_comment_blocks == 4] > > > > > The identify function in 7.x has no such check: > > > > static void > > ipmi_isa_identify(driver_t *driver, device_t parent) > > { > > struct ipmi_get_info info; > > uint32_t devid; > > > > if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE && > > device_find_child(parent, "ipmi", -1) == NULL) { > > Ok then what is this ^^^^^^^^^ ? Doesn't this mean that if > device_find_child() returns a child node that we should abort? Is that > not the same as what I'm going on about? This makes it only add at most one child device. It is a common idiom in identify routines so that if you kldunload and re-kldload you don't end up with two "ipmi" devices added by the identify routine. > > I'd rather be sure this is the right fix, and if it isn't I'd prefer to > > revert this as I don't think it is actually fixing anything. > > > It definitely does *not* have the effect that I advertised in my commit > message. > > the commit DOES: > -- remove any attempt to do anything in ipmi_isa_* functions. > -- does not emit any errors on attach failure (which are noisy and > distracting). For these, the better fix would be to check ipmi_attached in ipmi_isa_probe(). This is what happens in all the other bus front ends. > -- make attaching to ipmi0 more "reliable" by blindly raising the > timeout value to 6 seconds. (6 seconds is the totally empirical > value I came up with in testing that never failed to attach across > 100+ reboots). This is valid, and I don't think that should be reverted. > I disagree that it should be reverted. We can argue about it if you > wish and I'm open to modifying back to the original code. I don't think > I'd agree with removing the error messages on attachment failure though. > I view the attachment failures as "sysadmin noise" but they should be > there *if* there is a real attach failure. How about just moving the ipmi_attached check into the probe routine to match all the other uses (grep for ipmi_attached in the dir to see what I mean). Also, when you MFC, don't claim it fixes NMIs from bce(4), just that it removes noise and expands the timeout. :) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 16:18:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5512ACB; Tue, 30 Jul 2013 16:18:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 232AF2D55; Tue, 30 Jul 2013 16:18:44 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id CDFEEB963; Tue, 30 Jul 2013 12:18:42 -0400 (EDT) From: John Baldwin To: Jan Beich Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers Date: Tue, 30 Jul 2013 12:14:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307301233.r6UCXLT8012177@svn.freebsd.org> <1V4A3i-000M2D-6A@internal.tormail.org> In-Reply-To: <1V4A3i-000M2D-6A@internal.tormail.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307301214.48930.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 12:18:42 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 16:18:44 -0000 On Tuesday, July 30, 2013 9:33:51 am Jan Beich wrote: > Dimitry Andric writes: > > > Author: dim > > Date: Tue Jul 30 12:33:21 2013 > > New Revision: 253802 > > URL: http://svnweb.freebsd.org/changeset/base/253802 > > > > Log: > > Pull in r186696 from upstream clang trunk: > > > > This patch implements __get_cpuid_max() as an inline and __cpuid() > > and __cpuid_count() as macros to be compatible with GCC's cpuid.h. > [...] > > +#define bit_SSE41 0x00080000 > > +#define bit_SSE42 0x00100000 > > GCC's spelling is different > > $ fgrep -r bit_SSE4 /usr/local/lib/gcc48/**/ > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_1 (1 << 19) > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4_2 (1 << 20) > /usr/local/lib/gcc48/**/cpuid.h:#define bit_SSE4a (1 << 6) Note that this was a clean-room implementation, so I based this on the names in the Intel SDM. I was actually hoping for discussion on the clang lists perhaps along the lines of not supplying these constants at all, or only a subset, etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 16:18:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A5552E7; Tue, 30 Jul 2013 16:18:46 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 628132D5A; Tue, 30 Jul 2013 16:18:46 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 15BFFB977; Tue, 30 Jul 2013 12:18:45 -0400 (EDT) From: John Baldwin To: Matthew Fleming Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers Date: Tue, 30 Jul 2013 12:16:15 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307301233.r6UCXLT8012177@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307301216.15235.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 12:18:45 -0400 (EDT) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Dimitry Andric X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 16:18:46 -0000 On Tuesday, July 30, 2013 10:09:35 am Matthew Fleming wrote: > On Tue, Jul 30, 2013 at 5:33 AM, Dimitry Andric wrote: > > > Author: dim > > Date: Tue Jul 30 12:33:21 2013 > > New Revision: 253802 > > URL: http://svnweb.freebsd.org/changeset/base/253802 > > > > Log: > > Pull in r186696 from upstream clang trunk: > > > > This patch implements __get_cpuid_max() as an inline and __cpuid() > > and __cpuid_count() as macros to be compatible with GCC's cpuid.h. > > It also adds bit_ constants for the various feature bits as > > described in version 039 (May 2011) of Intel's SDM Volume 2 in the > > description of the CPUID instruction. The list of bit_ > > constants is a bit exhaustive (GCC doesn't do near this many). More > > bits could be added from a newer version of SDM if desired. > > > > Patch by John Baldwin! > > > > This should fix several ports which depend on this functionality being > > available. > > > > MFC after: 1 week > > > > Modified: > > head/contrib/llvm/tools/clang/lib/Headers/cpuid.h > > > > Modified: head/contrib/llvm/tools/clang/lib/Headers/cpuid.h > > > > ============================================================================== > > --- head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 > > 12:17:45 2013 (r253801) > > +++ head/contrib/llvm/tools/clang/lib/Headers/cpuid.h Tue Jul 30 > > 12:33:21 2013 (r253802) > > +/* PIC on i386 uses %ebx, so preserve it. */ > > +#if __i386__ > > +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ > > + __asm(" pushl %%ebx\n" \ > > + " cpuid\n" \ > > + " mov %%ebx,%1\n" \ > > + " popl %%ebx" \ > > + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ > > + : "0"(__level)) > > + > > +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ > > + __asm(" pushl %%ebx\n" \ > > + " cpuid\n" \ > > + " mov %%ebx,%1\n" \ > > + " popl %%ebx" \ > > + : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \ > > + : "0"(__level), "2"(__count)) > > +#else > > +#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \ > > + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ > > + : "0"(__level)) > > + > > +#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \ > > + __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \ > > + : "0"(__level), "2"(__count)) > > +#endif > > > > PIC mode on amd64 also uses %ebx. The difference is that FreeBSD makefiles > set -fPIC for i386 kernel compile but not amd64. Locally we use -fPIC for > amd64 (it was added 6 years ago to our environment because it gave better > kernel debugging). Note that this is used in userland and the kernel. > Anyways, is there some way to detect PIC mode and use that to decide > whether to use %ebx for the cpuid instruction, rather than using i386? Does clang supply a reliable #define to indicate that PIC is in use? If not, then this should use the PIC path always to be safe. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 16:20:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 097314C3; Tue, 30 Jul 2013 16:20:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EAE0B2D85; Tue, 30 Jul 2013 16:20:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UGKs4t080626; Tue, 30 Jul 2013 16:20:54 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UGKsfZ080625; Tue, 30 Jul 2013 16:20:54 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201307301620.r6UGKsfZ080625@svn.freebsd.org> From: John Baldwin Date: Tue, 30 Jul 2013 16:20:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253808 - head/usr.sbin/watchdogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 16:20:55 -0000 Author: jhb Date: Tue Jul 30 16:20:54 2013 New Revision: 253808 URL: http://svnweb.freebsd.org/changeset/base/253808 Log: Apply a casting sledgehammer. Submitted by: dhw Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Tue Jul 30 16:17:30 2013 (r253807) +++ head/usr.sbin/watchdogd/watchdogd.c Tue Jul 30 16:20:54 2013 (r253808) @@ -774,7 +774,7 @@ parseargs(int argc, char *argv[]) struct timespec ts; pow2ns_to_ts(timeout, &ts); - if (pretimeout >= ts.tv_sec) { + if (pretimeout >= (uintmax_t)ts.tv_sec) { errx(EX_USAGE, "pretimeout (%d) >= timeout (%d -> %ld)\n" "see manual section TIMEOUT RESOLUTION", From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 17:35:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 757706A4; Tue, 30 Jul 2013 17:35:07 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 622C22110; Tue, 30 Jul 2013 17:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UHZ70s002593; Tue, 30 Jul 2013 17:35:07 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UHZ73K002592; Tue, 30 Jul 2013 17:35:07 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307301735.r6UHZ73K002592@svn.freebsd.org> From: Scott Long Date: Tue, 30 Jul 2013 17:35:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253809 - head/sys/dev/mps X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 17:35:07 -0000 Author: scottl Date: Tue Jul 30 17:35:06 2013 New Revision: 253809 URL: http://svnweb.freebsd.org/changeset/base/253809 Log: Fix a printf typo. Obtained from: LSI Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Tue Jul 30 16:20:54 2013 (r253808) +++ head/sys/dev/mps/mps_sas.c Tue Jul 30 17:35:06 2013 (r253809) @@ -3070,7 +3070,7 @@ mpssas_action_resetdev(struct mpssas_sof tm = mps_alloc_command(sc); if (tm == NULL) { mps_dprint(sc, MPS_ERROR, - "comand alloc failure in mpssas_action_resetdev\n"); + "command alloc failure in mpssas_action_resetdev\n"); ccb->ccb_h.status = CAM_RESRC_UNAVAIL; xpt_done(ccb); return; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:16:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B116F72; Tue, 30 Jul 2013 18:16:44 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4738F231B; Tue, 30 Jul 2013 18:16:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIGifD014767; Tue, 30 Jul 2013 18:16:44 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UIGiYP014766; Tue, 30 Jul 2013 18:16:44 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201307301816.r6UIGiYP014766@svn.freebsd.org> From: "Andrey A. Chernov" Date: Tue, 30 Jul 2013 18:16:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253810 - head/usr.bin/grep/regex X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:16:44 -0000 Author: ache Date: Tue Jul 30 18:16:43 2013 New Revision: 253810 URL: http://svnweb.freebsd.org/changeset/base/253810 Log: grep -i does not work for simple patterns and single byte locales, like LANG=ru_RU.KOI8-R grep -i Fix it. MFC after: 3 days Modified: head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Tue Jul 30 17:35:06 2013 (r253809) +++ head/usr.bin/grep/regex/tre-fastmatch.c Tue Jul 30 18:16:43 2013 (r253810) @@ -395,7 +395,7 @@ static int fastcmp(const fastmatch_t *fg if (p == NULL) \ return REG_ESPACE; \ for (unsigned int i = 0; i < plen; i++) \ - p[i] = tolower(pat[i]); \ + p[i] = tolower((unsigned char)pat[i]); \ _CALC_BMGS(arr, p, plen); \ xfree(p); \ } \ @@ -1030,7 +1030,7 @@ fastcmp(const fastmatch_t *fg, const voi continue; /* Compare */ - if (fg->icase ? (tolower(pat_byte[i]) == tolower(str_byte[i])) + if (fg->icase ? (tolower((unsigned char)pat_byte[i]) == tolower((unsigned char)str_byte[i])) : (pat_byte[i] == str_byte[i])) continue; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:38:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8F0EB82C; Tue, 30 Jul 2013 18:38:50 +0000 (UTC) (envelope-from mrvmurray@icloud.com) Received: from nk11p16im-asmtp001.me.com (nk11p16im-asmtp001.me.com [17.158.104.160]) by mx1.freebsd.org (Postfix) with ESMTP id 7343B2418; Tue, 30 Jul 2013 18:38:50 +0000 (UTC) Received: from gronkulator.grondar.org (graveyard.grondar.org [88.96.155.33]) by nk11p16im-asmtp001.mac.com (Oracle Communications Messaging Server 7u4-26.01(7.0.4.26.0) 64bit (built Jul 13 2012)) with ESMTPSA id <0MQR00IEMFOBJRA0@nk11p16im-asmtp001.mac.com>; Tue, 30 Jul 2013 17:38:39 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.10.8794,1.0.431,0.0.0000 definitions=2013-07-30_08:2013-07-30,2013-07-30,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1305010000 definitions=main-1307300119 Subject: Re: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... MIME-version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Content-type: text/plain; charset=windows-1252 From: Mark Murray In-reply-to: <201307292026.r6TKQRRb021717@svn.freebsd.org> Date: Tue, 30 Jul 2013 18:38:34 +0100 Content-transfer-encoding: quoted-printable Message-id: <56BFE108-69BF-47A1-9934-B047BB64B694@icloud.com> References: <201307292026.r6TKQRRb021717@svn.freebsd.org> To: "David E. O'Brien" X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:38:50 -0000 This looks like a Good Thing(=99), thank you! I'm doing an = implementation of Fortuna CSPRNG, and this is going to save me a BUNCH of work! M On 29 Jul 2013, at 21:26, David E. O'Brien wrote: > Author: obrien > Date: Mon Jul 29 20:26:27 2013 > New Revision: 253779 > URL: http://svnweb.freebsd.org/changeset/base/253779 >=20 > Log: > Decouple yarrow from random(4) device. >=20 --=20 Mark R V Murray From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:41:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5D1F99A4; Tue, 30 Jul 2013 18:41:37 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3089A243B; Tue, 30 Jul 2013 18:41:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIfbGa023131; Tue, 30 Jul 2013 18:41:37 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UIfaon023129; Tue, 30 Jul 2013 18:41:36 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307301841.r6UIfaon023129@svn.freebsd.org> From: Sean Bruno Date: Tue, 30 Jul 2013 18:41:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253811 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:41:37 -0000 Author: sbruno Date: Tue Jul 30 18:41:36 2013 New Revision: 253811 URL: http://svnweb.freebsd.org/changeset/base/253811 Log: After discussions, revert svn r253708. Changelog for 253708 was completely wrong and the code implemented something non-standard for the wrong reasons. Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ipmi/ipmi_isa.c head/sys/dev/ipmi/ipmivars.h Modified: head/sys/dev/ipmi/ipmi_isa.c ============================================================================== --- head/sys/dev/ipmi/ipmi_isa.c Tue Jul 30 18:16:43 2013 (r253810) +++ head/sys/dev/ipmi/ipmi_isa.c Tue Jul 30 18:41:36 2013 (r253811) @@ -56,15 +56,8 @@ ipmi_isa_identify(driver_t *driver, devi struct ipmi_get_info info; uint32_t devid; - /* - * Give other drivers precedence. Unfortunately, this doesn't - * work if we have an SMBIOS table that duplicates a PCI device - * that's later on the bus than the PCI-ISA bridge. - */ - if (ipmi_attached) - return; - - if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE) { + if (ipmi_smbios_identify(&info) && info.iface_type != SSIF_MODE && + device_find_child(parent, "ipmi", -1) == NULL) { /* * XXX: Hack alert. On some broken systems, the IPMI * interface is described via SMBIOS, but the actual @@ -182,6 +175,14 @@ ipmi_isa_attach(device_t dev) !ipmi_hint_identify(dev, &info)) return (ENXIO); + /* + * Give other drivers precedence. Unfortunately, this doesn't + * work if we have an SMBIOS table that duplicates a PCI device + * that's later on the bus than the PCI-ISA bridge. + */ + if (ipmi_attached) + return (EBUSY); + switch (info.iface_type) { case KCS_MODE: count = 2; Modified: head/sys/dev/ipmi/ipmivars.h ============================================================================== --- head/sys/dev/ipmi/ipmivars.h Tue Jul 30 18:16:43 2013 (r253810) +++ head/sys/dev/ipmi/ipmivars.h Tue Jul 30 18:41:36 2013 (r253811) @@ -219,7 +219,7 @@ struct ipmi_ipmb { ((sc)->ipmi_io_res[1] != NULL ? OUTB_MULTIPLE(sc, x, value) : \ OUTB_SINGLE(sc, x, value)) -#define MAX_TIMEOUT 6 * hz +#define MAX_TIMEOUT 3 * hz int ipmi_attach(device_t); int ipmi_detach(device_t); From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:44:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EFC64B2A; Tue, 30 Jul 2013 18:44:29 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DCE932468; Tue, 30 Jul 2013 18:44:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIiTHr023574; Tue, 30 Jul 2013 18:44:29 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UIiTSe023573; Tue, 30 Jul 2013 18:44:29 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307301844.r6UIiTSe023573@svn.freebsd.org> From: Sean Bruno Date: Tue, 30 Jul 2013 18:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253812 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:44:30 -0000 Author: sbruno Date: Tue Jul 30 18:44:29 2013 New Revision: 253812 URL: http://svnweb.freebsd.org/changeset/base/253812 Log: empirical testing showed that 3 seconds is just too slow for GET_DEVICE_ID to return on newer Dell hardware. Bump to 6 second timeouts until someone has a better idea on how to handle this Reviewed by: jhb@ MFC after: 2 weeks Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ipmi/ipmivars.h Modified: head/sys/dev/ipmi/ipmivars.h ============================================================================== --- head/sys/dev/ipmi/ipmivars.h Tue Jul 30 18:41:36 2013 (r253811) +++ head/sys/dev/ipmi/ipmivars.h Tue Jul 30 18:44:29 2013 (r253812) @@ -219,7 +219,7 @@ struct ipmi_ipmb { ((sc)->ipmi_io_res[1] != NULL ? OUTB_MULTIPLE(sc, x, value) : \ OUTB_SINGLE(sc, x, value)) -#define MAX_TIMEOUT 3 * hz +#define MAX_TIMEOUT 6 * hz int ipmi_attach(device_t); int ipmi_detach(device_t); From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:50:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B06BFDEC; Tue, 30 Jul 2013 18:50:37 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 98B2624CE; Tue, 30 Jul 2013 18:50:37 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIobGO055073; Tue, 30 Jul 2013 18:50:37 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6UIoaRc055069; Tue, 30 Jul 2013 18:50:36 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 11:50:34 -0700 From: "David O'Brien" To: Dag-Erling =?unknown-8bit?B?U23DuHJncmF2?= Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130730185034.GA63635@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86fvuwgrs6.fsf@nine.des.no> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:50:37 -0000 On Tue, Jul 30, 2013 at 02:23:53PM +0200, Dag-Erling Smrgrav wrote: > "David E. O'Brien" writes: > > Log: > > Decouple yarrow from random(4) device. > > We've had a policy for several years now that all changes to the PRNG > code in the kernel and libc must be reviewed by so@. Hi DES, Where was this policy published or communicated? There is no MAINTAINER line in sys/dev/random/, nor an entry in /usr/src/MAINTAINERS. It is hard to follow some policy that cannot be found. > Please revert > this commit and submit your patch to secteam@freebsd.org for review. There was a lot of work put into this patch. 'make tenderbox', and much boot testing of various kernel configs on both i386, amd64, both IvyBridge and non-IvyBridge systems, ARM (Beaglebone) with both statically compiled in random(4) and loaded via modules. This change does not change any of the PRNG algorithms. Please see if you cannot review the code within the tree with doing a whiplash backout-recommit. Do you have any specific concerns? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:51:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2474FF56; Tue, 30 Jul 2013 18:51:40 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0BE9724E9; Tue, 30 Jul 2013 18:51:40 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIpdEx056590; Tue, 30 Jul 2013 18:51:39 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6UIpdwC056587; Tue, 30 Jul 2013 18:51:39 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 11:51:38 -0700 From: "David O'Brien" To: Steve Kargl Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130730185138.GB63635@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <20130729214315.GA27225@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130729214315.GA27225@troutmask.apl.washington.edu> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:51:40 -0000 On Mon, Jul 29, 2013 at 02:43:15PM -0700, Steve Kargl wrote: > On Mon, Jul 29, 2013 at 08:58:10PM +0000, David E. O'Brien wrote: > > Author: obrien > > Date: Mon Jul 29 20:58:09 2013 > > New Revision: 253786 > > URL: http://svnweb.freebsd.org/changeset/base/253786 > > > > Log: > > > > * If the kernel doesn't have any random_adaptor adapters present > > then the creation of /dev/random is postponed until next > > random_adaptor is kldload'ed. > > I don't use modules. What is the magic I need to add to my > kernel config files? Perhaps, an entry in src/UPDATING is > needed. Hi Steve, >From the src/UPDATING entry :-) For example, to use Yarrow, add "options YARROW_RNG" to your kernel config. For hardware backed RNGs, use either "RDRAND_RNG" or "PADLOCK_RNG" options. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:54:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3E5B3171; Tue, 30 Jul 2013 18:54:25 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B4452511; Tue, 30 Jul 2013 18:54:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UIsPOG026493; Tue, 30 Jul 2013 18:54:25 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UIsPrL026492; Tue, 30 Jul 2013 18:54:25 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307301854.r6UIsPrL026492@svn.freebsd.org> From: Sean Bruno Date: Tue, 30 Jul 2013 18:54:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253813 - head/sys/dev/ipmi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:54:25 -0000 Author: sbruno Date: Tue Jul 30 18:54:24 2013 New Revision: 253813 URL: http://svnweb.freebsd.org/changeset/base/253813 Log: Check for ipmi_attached in ipmi_isa_probe as a suggested alternative to ipmi_isa_attach. This keeps unintended but harmless noise about "ipmi1" from appearing in the boot up sequence. Submitted by: jbh@ (suggested by) Sponsored by: Yahoo! Inc. Modified: head/sys/dev/ipmi/ipmi_isa.c Modified: head/sys/dev/ipmi/ipmi_isa.c ============================================================================== --- head/sys/dev/ipmi/ipmi_isa.c Tue Jul 30 18:44:29 2013 (r253812) +++ head/sys/dev/ipmi/ipmi_isa.c Tue Jul 30 18:54:24 2013 (r253813) @@ -78,6 +78,14 @@ static int ipmi_isa_probe(device_t dev) { + /* + * Give other drivers precedence. Unfortunately, this doesn't + * work if we have an SMBIOS table that duplicates a PCI device + * that's later on the bus than the PCI-ISA bridge. + */ + if (ipmi_attached) + return (ENXIO); + /* Skip any PNP devices. */ if (isa_get_logicalid(dev) != 0) return (ENXIO); @@ -175,14 +183,6 @@ ipmi_isa_attach(device_t dev) !ipmi_hint_identify(dev, &info)) return (ENXIO); - /* - * Give other drivers precedence. Unfortunately, this doesn't - * work if we have an SMBIOS table that duplicates a PCI device - * that's later on the bus than the PCI-ISA bridge. - */ - if (ipmi_attached) - return (EBUSY); - switch (info.iface_type) { case KCS_MODE: count = 2; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:57:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 650232FD for ; Tue, 30 Jul 2013 18:57:09 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm15-vm9.bullet.mail.gq1.yahoo.com (nm15-vm9.bullet.mail.gq1.yahoo.com [98.137.176.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2554C253C for ; Tue, 30 Jul 2013 18:57:08 +0000 (UTC) Received: from [98.137.12.189] by nm15.bullet.mail.gq1.yahoo.com with NNFMP; 30 Jul 2013 18:57:01 -0000 Received: from [208.71.42.196] by tm10.bullet.mail.gq1.yahoo.com with NNFMP; 30 Jul 2013 18:57:01 -0000 Received: from [127.0.0.1] by smtp207.mail.gq1.yahoo.com with NNFMP; 30 Jul 2013 18:57:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1375210621; bh=HbGYmQYsk2r076nmVs1ZQ7MHPh1SWAoKV42Ed4SjvCA=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=mZCjokrK3VnvEHAKpjmOQtfE9Ye27+qu70xImWaAxtX1wOS49lgpqxuh4IAffj4WbiZNzPWcZdDyVUcMYdwufsILarql4Y6ZFgAooqWBEGdX3V+RCBuZ0Z0FUeq4ol2DLCfL693mVVl4vlpo3fOsfBuQV1EWLg4yThYKQoPfvM8= X-Yahoo-Newman-Id: 163325.33251.bm@smtp207.mail.gq1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 3.3srx8VM1lRTAbVCfquKzdzTVPwY8eSrInBXxpgE0qyy9Q 1huaduPTD3iIKhapZ4SIstgVtrO38v2WvQ0kTgRWfpmiPVxo9TCWlqyqgeBf ILu7jiktr3Y9sF_q_5GvM214Q8LlJbWEP6io2rvpUNyHLGgBwBLb8Tr4VKlK xQbe2TtNY7..O6MzvOa9MLXtgQcKo2pwhiQ_Ln69raqFRkRlTebpAaZbtnQT uSQ7Qd3kOfy0QYi96uoBiK_cYNVm_QHn1EJJ6ZBgrFmBwQ.vBW9pkqP0RPPU DuJ2EMbGUB_wI9Mtrwa2EYF8uPFcHShJYgOFw.kjlzefBwaji59bK3J9Eo_P spT1RaefKhNpW1AmTscHd98B5sFlfnk0117SMAYzHpNWgOUw33G2XNqsVzRz 9g3CeZ2cuY1H0WbifYLQlDVFULc703fnYj_TjHyHkYWiThIlWZrE.5kjqNUT p7akokJg0pTOM7uqjV0XP4SuM3UCyu6R2NfjLcAyGqrBUmsm_ubonw1sSAvD X2BZTScTcT3ePbbZYr6O91Skls2Rbjzz44oyUpzg- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp207.mail.gq1.yahoo.com with SMTP; 30 Jul 2013 11:57:01 -0700 PDT Subject: Re: svn commit: r253708 - head/sys/dev/ipmi From: Sean Bruno To: John Baldwin In-Reply-To: <201307301202.19954.jhb@freebsd.org> References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307291617.39898.jhb@freebsd.org> <1375138259.1479.69.camel@localhost> <201307301202.19954.jhb@freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-nLcfD2EZQaVp/sCqIGTt" Date: Tue, 30 Jul 2013 11:57:00 -0700 Message-ID: <1375210620.1496.30.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, sbruno@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:57:09 -0000 --=-nLcfD2EZQaVp/sCqIGTt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > >=20 > > Ok then what is this ^^^^^^^^^ ? Doesn't this mean that if > > device_find_child() returns a child node that we should abort? Is that > > not the same as what I'm going on about? >=20 > This makes it only add at most one child device. It is a common idiom in > identify routines so that if you kldunload and re-kldload you don't end > up with two "ipmi" devices added by the identify routine. >=20 Ok, understood. Why, in this edge case, is ipmi attaching twice then? Shouldn't device_find_child() return non-NULL because the ACPI interface is attached and /dev/ipmi0 has been started? Or is it too early in the probe/attach device enumeration process for this check to succeed? Because of this, doesn't the BUS_ADD_CHILD later on "contaminate" our device tree with a device that doesn't exist? I'm being kind of a PITA about this, I know. I just want to understand what I'm missing here. I'm "arguing" that the attempted creation (even though it fails) of /dev/ipmi1 in any way is really a bug. =20 > > > I'd rather be sure this is the right fix, and if it isn't I'd prefer = to > > > revert this as I don't think it is actually fixing anything. > > >=20 > > It definitely does *not* have the effect that I advertised in my commit > > message. > >=20 > > the commit DOES: > > -- remove any attempt to do anything in ipmi_isa_* functions. > > -- does not emit any errors on attach failure (which are noisy and > > distracting). >=20 > For these, the better fix would be to check ipmi_attached in ipmi_isa_pro= be(). > This is what happens in all the other bus front ends. >=20 For clarity, I'm reverting 253708 completely. =20 > > -- make attaching to ipmi0 more "reliable" by blindly raising the > > timeout value to 6 seconds. (6 seconds is the totally empirical > > value I came up with in testing that never failed to attach across > > 100+ reboots). >=20 > This is valid, and I don't think that should be reverted. >=20 I will apply this *separately* r253812 > > I disagree that it should be reverted. We can argue about it if you > > wish and I'm open to modifying back to the original code. I don't thin= k > > I'd agree with removing the error messages on attachment failure though= . > > I view the attachment failures as "sysadmin noise" but they should be > > there *if* there is a real attach failure. >=20 > How about just moving the ipmi_attached check into the probe routine to > match all the other uses (grep for ipmi_attached in the dir to see what > I mean). Also, when you MFC, don't claim it fixes NMIs from bce(4), > just that it removes noise and expands the timeout. :) >=20 Sounds good. Done. Tests look good. commited r253813. Sean --=-nLcfD2EZQaVp/sCqIGTt Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJR+Ax8AAoJEBkJRdwI6BaH1v0IAJRxjGZyOWB0Yo15UHYMwGJe JXgAi0ZeQNAeFEasXcViRKgAP0kPKMGs3v33BddDBF7+l/1jVrfB3+1bE5HYQuue 4lOkocCujd/GgWGVcZoxvDcQLHIBvn/LURaFS28im1LcIBnn2APbn4KSOtQ9CZha f6QBTEX4ZiW1ZGQGa6sRWwAcldNZjC7b/RjGLzk3F+c9ldkfU0b0vnPDymfbvLTu F1wE9l72Rk3clgqPLYOSnL/etXxpCoJJQWcwvSkWFK0+95IM2mpYrCN+R/+DtQ6U yt+Z3AVjGxzLhyQ+r7FCViV/UFu4RNiKyZyxlxFlgPS7CgTIfjpaSiFuUdqL7V4= =D7tZ -----END PGP SIGNATURE----- --=-nLcfD2EZQaVp/sCqIGTt-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 18:58:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7B4DC451 for ; Tue, 30 Jul 2013 18:58:28 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm11-vm1.bullet.mail.bf1.yahoo.com (nm11-vm1.bullet.mail.bf1.yahoo.com [98.139.213.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E24AA254E for ; Tue, 30 Jul 2013 18:58:27 +0000 (UTC) Received: from [66.196.81.170] by nm11.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jul 2013 18:58:25 -0000 Received: from [98.139.211.193] by tm16.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jul 2013 18:58:25 -0000 Received: from [127.0.0.1] by smtp202.mail.bf1.yahoo.com with NNFMP; 30 Jul 2013 18:58:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1375210705; bh=TegXWsxBoyzO00Q7CPQxSxW0zpw4iYYaC2jKZGSDmvs=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=HbHPNtlzurs5KQcpy4wO/VL2zfCBXA5k69jH9H1Gsgs3qrKfqyEZgYUaeTUdKkNAegjUKRNvpIIEV1N9Y/F7U5+rgHR61lCXYrQbKyCUhfewgeCRX1A0/emMKacDYcKtWNTdNa/JMDuGTcQ35aqUcQk/ciPcp0dwg2EQ5glm7ag= X-Yahoo-Newman-Id: 364023.7440.bm@smtp202.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FH5wLMYVM1kmIt9HpqJQGkxgw8mVt3e2CQo5NU6dZB49Ewl AwzNkR9HcgpBH04dpMvgQcRO8yLPzrxYOYbjF0QCMDmEdMfZrWGhdvet_EiI R2opTSIEV1mT8RnxPG_Ckdh4gyVIdZ4oVexKo.U6UA9t9Mh6jXOkyXofOI0I 6nCTKCpmzCx8uvxRBDVGyj_5BvVSB6nj6bKUmLf11BcadrTFzFERpUjEhjdZ P.xQv1s4ov0V_NHkJ0JTiIvTWuzjAfw4xY5luZ_mBLLl5A420.CMpSFpb3wl bpe_YjyXRXPu1Z54YHfaYfpGMI5WoRXBrjEwL2In9owIUqOpHzqK.uUiIDIg W8d8vJYyycrv2xOggzl2VF9UOzzPuzeXxwzjbGp6q2qjHV46qdclUstOQCo. p43Pfoo79J8zAJ0X8re7VluDQPu4lPaqXBHmjEmICxYKrpxebcY4Xmk0F8od ZkIsxrULAADozZ50qQDgjCqyRCiLv4x__gheJCFvgtuUnVy_mde04y0hoali ScvU5EZ65jHDOnK9PLlocY4f.aMuNdnK6sQ-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with ) by smtp202.mail.bf1.yahoo.com with SMTP; 30 Jul 2013 11:58:25 -0700 PDT Subject: Re: svn commit: r253813 - head/sys/dev/ipmi From: Sean Bruno To: Sean Bruno In-Reply-To: <201307301854.r6UIsPrL026492@svn.freebsd.org> References: <201307301854.r6UIsPrL026492@svn.freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-S4Sqmd+tv67Imm/8zc1+" Date: Tue, 30 Jul 2013 11:58:23 -0700 Message-ID: <1375210703.1496.31.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 18:58:28 -0000 --=-S4Sqmd+tv67Imm/8zc1+ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Tue, 2013-07-30 at 18:54 +0000, Sean Bruno wrote: > Submitted by: jbh@ (suggested by) Graaaahahahahah ... jhb@ ... why can't I type today? Sean --=-S4Sqmd+tv67Imm/8zc1+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (FreeBSD) iQEcBAABAgAGBQJR+AzPAAoJEBkJRdwI6BaHFV8IAJaiip2Voxhi6SxL43KWc02Z lZ2lpuFSqTnIggW1KRu1VYSjWfZGFVCb0Q9poKFfYX09BtDZtifjUglimO/oB+Lp wsITiwz5DxMovE/uiec9DolbuF3XGOMvIjRNZ9D+S/OpngMU7Zifcdhxqxf+PcB7 SbhhJBMOrb1cTzd1yrv4x5M/W3HmcxFCFJL7nZF3FKwO55jVWUoViqj/z6tBqksE GrzDnI51jm1MOluFDPXBxiVAloM5WiJxnqlteX+X6782admCyNncqd2OpJr00ePG JprbAx86g6F6G/4aAplzAiYzViBfSBl3wxaKqnKHs2dv1DWnJYNG5afluKqQZLk= =Z4vH -----END PGP SIGNATURE----- --=-S4Sqmd+tv67Imm/8zc1+-- From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:02:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CF7CE643; Tue, 30 Jul 2013 19:02:08 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6E8E2583; Tue, 30 Jul 2013 19:02:08 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UJ28AY058408; Tue, 30 Jul 2013 19:02:08 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6UJ288W058405; Tue, 30 Jul 2013 19:02:08 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 12:02:07 -0700 From: "David O'Brien" To: John Baldwin Subject: Re: svn commit: r253618 - head/sys/dev/usb/gadget Message-ID: <20130730190207.GC63635@dragon.NUXI.org> References: <201307241832.r6OIWFGc074918@svn.freebsd.org> <201307241529.35175.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307241529.35175.jhb@freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:02:08 -0000 On Wed, Jul 24, 2013 at 03:29:34PM -0400, John Baldwin wrote: > On Wednesday, July 24, 2013 2:32:15 pm David E. O'Brien wrote: > > per style(9): > > Kernel include files (i.e. sys/*.h) come first; normally, include > > OR , but not both. includes > > , and it is okay to depend on that. > > This is not fully correct. The consistent style throughout the tree when > using _FBSDID() is: > > #include > __FBSDID() > > #include > ... > > Please fix these to match that. It might not be a bad idea to document the > __FBSDID() practice in style.9 while you are at it. Hi John, As BDE mentioned, the text [still] says it is OK to depend on and including . I was one of the ones that put __FBSDID() in much of our code. I used a script to add the two lines: #include __FBSDID("$FreeBSD$"); I did it this way so as to not break the "but not both" rule for and . In otherwords my script wasn't smart enough to see if or was already being included and put the '__FBSDID("$FreeBSD$");' right below it. I don't feel #include __FBSDID("$FreeBSD$"); #include is against style(9). Should explicit language be added that one of , , or should be included first followed by '__FBSDID("$FreeBSD$");' (when used). Followed by all other headers. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:19:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29BA8B3A; Tue, 30 Jul 2013 19:19:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E9F752644; Tue, 30 Jul 2013 19:19:01 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3CC61B94B; Tue, 30 Jul 2013 15:19:00 -0400 (EDT) From: John Baldwin To: obrien@freebsd.org Subject: Re: svn commit: r253618 - head/sys/dev/usb/gadget Date: Tue, 30 Jul 2013 15:17:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307241832.r6OIWFGc074918@svn.freebsd.org> <201307241529.35175.jhb@freebsd.org> <20130730190207.GC63635@dragon.NUXI.org> In-Reply-To: <20130730190207.GC63635@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201307301517.49989.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 15:19:00 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:19:02 -0000 On Tuesday, July 30, 2013 3:02:07 pm David O'Brien wrote: > On Wed, Jul 24, 2013 at 03:29:34PM -0400, John Baldwin wrote: > > On Wednesday, July 24, 2013 2:32:15 pm David E. O'Brien wrote: > > > per style(9): > > > Kernel include files (i.e. sys/*.h) come first; normally, include > > > OR , but not both. includes > > > , and it is okay to depend on that. > > > > This is not fully correct. The consistent style throughout the tree when > > using _FBSDID() is: > > > > #include > > __FBSDID() > > > > #include > > ... > > > > Please fix these to match that. It might not be a bad idea to document the > > __FBSDID() practice in style.9 while you are at it. > > Hi John, > As BDE mentioned, the text [still] says it is OK to depend on > and including . He also noted that the style is documented by example, and that much of style(9) is done by example. > I was one of the ones that put __FBSDID() in much of our code. I used > a script to add the two lines: > #include > __FBSDID("$FreeBSD$"); > > I did it this way so as to not break the "but not both" rule for > and . In otherwords my script wasn't > smart enough to see if or was already > being included and put the '__FBSDID("$FreeBSD$");' right below it. > > I don't feel > #include > __FBSDID("$FreeBSD$"); > > #include > > is against style(9). Nothing else uses this style, and a whole lot of code does use the other convention. At this point the other convention is the de facto style. If that is the consequence of your script, so be it. At this point that is a whole lot of water under the bridge, and the most readable thing is to be consistent with all the other code in the tree, not start a new pattern. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:19:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 05EFCB3B; Tue, 30 Jul 2013 19:19:03 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C5A182645; Tue, 30 Jul 2013 19:19:02 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7855FB963; Tue, 30 Jul 2013 15:19:01 -0400 (EDT) From: John Baldwin To: sbruno@freebsd.org Subject: Re: svn commit: r253708 - head/sys/dev/ipmi Date: Tue, 30 Jul 2013 15:18:51 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p28; KDE/4.5.5; amd64; ; ) References: <201307271632.r6RGWYF8046749@svn.freebsd.org> <201307301202.19954.jhb@freebsd.org> <1375210620.1496.30.camel@localhost> In-Reply-To: <1375210620.1496.30.camel@localhost> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201307301518.51746.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Jul 2013 15:19:01 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:19:03 -0000 On Tuesday, July 30, 2013 2:57:00 pm Sean Bruno wrote: > > > > > > > Ok then what is this ^^^^^^^^^ ? Doesn't this mean that if > > > device_find_child() returns a child node that we should abort? Is that > > > not the same as what I'm going on about? > > > > This makes it only add at most one child device. It is a common idiom in > > identify routines so that if you kldunload and re-kldload you don't end > > up with two "ipmi" devices added by the identify routine. > > > Ok, understood. Why, in this edge case, is ipmi attaching twice then? > Shouldn't device_find_child() return non-NULL because the ACPI interface > is attached and /dev/ipmi0 has been started? Or is it too early in the > probe/attach device enumeration process for this check to succeed? Two _different_ buses. This prevents multiple ipmiX devices on the parent "isa0" device. The other ipmiX device is one on acpi0, not isa0. > Because of this, doesn't the BUS_ADD_CHILD later on "contaminate" our > device tree with a device that doesn't exist? I'm being kind of a PITA > about this, I know. I just want to understand what I'm missing here. Well, except it does exist (in a manner of speaking). :) The ACPI ipmiX device represents a device in the ACPI namespace that has a known _HID for IPMI BMCs. The ISA ipmiX device represents a device discovered via the SMBIOS tables. In practice the same physical device is being enumerated two different ways. Most physical devices don't have aliases in this fashion, but x86 has a lot of cruft, and so in this particular instance you can find out about the device from two very different sources, and there are systems that support ACPI, but only enumerate the IPMI BMC via SMBIOS, so we can't just ignore the SMBIOS table if ACPI is being used. Instead, we have to wait until the SMBIOS-enumerated device probes to decide that we have a fully functional ACPI-enumerated device that already "owns" the device. > I'm "arguing" that the attempted creation (even though it fails) > of /dev/ipmi1 in any way is really a bug. To be clear, we never attempt to create /dev/ipmi1 (a character device in /dev). We might have a new-bus node named ipmi1 that represents the IPMI BMC described by the SMBIOS table, but that is different from /dev/ipmi1. > Sounds good. Done. Tests look good. commited r253813. Looks good to me, thanks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:19:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D758DC1; Tue, 30 Jul 2013 19:19:33 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14D332655; Tue, 30 Jul 2013 19:19:33 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UJJWBk061483; Tue, 30 Jul 2013 19:19:32 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6UJJW7U061480; Tue, 30 Jul 2013 19:19:32 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 12:19:32 -0700 From: "David O'Brien" To: Dag-Erling =?unknown-8bit?B?U23DuHJncmF2?= Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130730191932.GA64241@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130730185034.GA63635@dragon.NUXI.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:19:33 -0000 On Tue, Jul 30, 2013 at 11:50:34AM -0700, David O'Brien (@FreeBSD) wrote: > Please see if you cannot review the code within the tree with doing > a whiplash backout-recommit. s/with/without/ Please let me know if you're OK with taking this route. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:21:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C044DF2E; Tue, 30 Jul 2013 19:21:36 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93A582669; Tue, 30 Jul 2013 19:21:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UJLaDo035744; Tue, 30 Jul 2013 19:21:36 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UJLa5A035743; Tue, 30 Jul 2013 19:21:36 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201307301921.r6UJLa5A035743@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 30 Jul 2013 19:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253814 - head/usr.bin/script X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:21:36 -0000 Author: obrien Date: Tue Jul 30 19:21:36 2013 New Revision: 253814 URL: http://svnweb.freebsd.org/changeset/base/253814 Log: MFC'ing to 9.2. Modified: head/usr.bin/script/script.1 Modified: head/usr.bin/script/script.1 ============================================================================== --- head/usr.bin/script/script.1 Tue Jul 30 18:54:24 2013 (r253813) +++ head/usr.bin/script/script.1 Tue Jul 30 19:21:36 2013 (r253814) @@ -178,7 +178,7 @@ and options first appeared in .Nx 2.0 and were ported to -.Fx 10.0 . +.Fx 9.2 . .Sh BUGS The .Nm From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:24:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CDF6F11E; Tue, 30 Jul 2013 19:24:05 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B8E68267F; Tue, 30 Jul 2013 19:24:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UJO5oC036116; Tue, 30 Jul 2013 19:24:05 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UJO5xR036114; Tue, 30 Jul 2013 19:24:05 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201307301924.r6UJO5xR036114@svn.freebsd.org> From: "David E. O'Brien" Date: Tue, 30 Jul 2013 19:24:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253815 - stable/9/usr.bin/script X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:24:05 -0000 Author: obrien Date: Tue Jul 30 19:24:05 2013 New Revision: 253815 URL: http://svnweb.freebsd.org/changeset/base/253815 Log: MFC: r238896, r238897, r241331 (usr.bin/script/ only), r241972, r242138, r248388, 253814 + Add "-f" to also output filemon(4) information. + Add d, p and r switches for recording script sessions with timing data and playing sessions back with or without time delays. + Remove contractions. Approved by: releng (glebius) Modified: stable/9/usr.bin/script/script.1 stable/9/usr.bin/script/script.c Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/script/ (props changed) Modified: stable/9/usr.bin/script/script.1 ============================================================================== --- stable/9/usr.bin/script/script.1 Tue Jul 30 19:21:36 2013 (r253814) +++ stable/9/usr.bin/script/script.1 Tue Jul 30 19:24:05 2013 (r253815) @@ -28,7 +28,7 @@ .\" @(#)script.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd September 28, 2011 +.Dd Oct 27, 2012 .Dt SCRIPT 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Nd make typescript of terminal session .Sh SYNOPSIS .Nm -.Op Fl akq +.Op Fl adfkpqr .Op Fl t Ar time .Op Ar file Op Ar command ... .Sh DESCRIPTION @@ -72,10 +72,27 @@ Append the output to or .Pa typescript , retaining the prior contents. +.It Fl d +When playing back a session with the +.Fl p +flag, do not sleep between records when playing back a timestamped session. +.It Fl f +Create +.Ar file.filemon +or +.Pa typescript.filemon +using +.Xr filemon 4 . .It Fl k Log keys sent to the program as well as output. +.It Fl p +Play back a session recorded with the +.Fl r +flag in real time. .It Fl q -Run in quiet mode, omit the start and stop status messages. +Run in quiet mode, omit the start, stop and command status messages. +.It Fl r +Record a session with input, output, and timestamping. .It Fl t Ar time Specify the interval at which the script output file will be flushed to disk, in seconds. @@ -141,6 +158,7 @@ is assumed. .El .Sh SEE ALSO .Xr csh 1 +.Xr filemon 4 .Po for the .Em history @@ -151,6 +169,16 @@ The .Nm command appeared in .Bx 3.0 . +.Pp +The +.Fl d , +.Fl p +and +.Fl r +options first appeared in +.Nx 2.0 +and were ported to +.Fx 9.2 . .Sh BUGS The .Nm Modified: stable/9/usr.bin/script/script.c ============================================================================== --- stable/9/usr.bin/script/script.c Tue Jul 30 19:21:36 2013 (r253814) +++ stable/9/usr.bin/script/script.c Tue Jul 30 19:24:05 2013 (r253815) @@ -1,4 +1,5 @@ /* + * Copyright (c) 2010, 2012 David E. O'Brien * Copyright (c) 1980, 1992, 1993 * The Regents of the University of California. All rights reserved. * @@ -27,25 +28,24 @@ * SUCH DAMAGE. */ -#include - +#include __FBSDID("$FreeBSD$"); - #ifndef lint static const char copyright[] = "@(#) Copyright (c) 1980, 1992, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif - #ifndef lint static const char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93"; #endif -#include #include #include #include #include +#include +#include +#include #include #include @@ -59,11 +59,22 @@ static const char sccsid[] = "@(#)script #include #include +#define DEF_BUF 65536 + +struct stamp { + uint64_t scr_len; /* amount of data */ + uint64_t scr_sec; /* time it arrived in seconds... */ + uint32_t scr_usec; /* ...and microseconds */ + uint32_t scr_direction; /* 'i', 'o', etc (also indicates endianness) */ +}; + static FILE *fscript; static int master, slave; static int child; static const char *fname; -static int qflg, ttyflg; +static char *fmfname; +static int fflg, qflg, ttyflg; +static int usesleep, rawout; static struct termios tt; @@ -71,6 +82,9 @@ static void done(int) __dead2; static void doshell(char **); static void fail(void); static void finish(void); +static void record(FILE *, char *, size_t, int); +static void consume(FILE *, off_t, char *, int); +static void playback(FILE *) __dead2; static void usage(void); int @@ -79,27 +93,45 @@ main(int argc, char *argv[]) int cc; struct termios rtt, stt; struct winsize win; - int aflg, kflg, ch, n; struct timeval tv, *tvp; time_t tvec, start; char obuf[BUFSIZ]; char ibuf[BUFSIZ]; fd_set rfd; - int flushtime = 30; - int readstdin; + int aflg, kflg, pflg, ch, k, n; + int flushtime, readstdin; + int fm_fd, fm_log; + + aflg = kflg = pflg = 0; + usesleep = 1; + rawout = 0; + flushtime = 30; + fm_fd = -1; /* Shut up stupid "may be used uninitialized" GCC + warning. (not needed w/clang) */ - aflg = kflg = 0; - while ((ch = getopt(argc, argv, "aqkt:")) != -1) + while ((ch = getopt(argc, argv, "adfkpqrt:")) != -1) switch(ch) { case 'a': aflg = 1; break; - case 'q': - qflg = 1; + case 'd': + usesleep = 0; + break; + case 'f': + fflg = 1; break; case 'k': kflg = 1; break; + case 'p': + pflg = 1; + break; + case 'q': + qflg = 1; + break; + case 'r': + rawout = 1; + break; case 't': flushtime = atoi(optarg); if (flushtime < 0) @@ -119,9 +151,29 @@ main(int argc, char *argv[]) } else fname = "typescript"; - if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL) + if ((fscript = fopen(fname, pflg ? "r" : aflg ? "a" : "w")) == NULL) err(1, "%s", fname); + if (fflg) { + asprintf(&fmfname, "%s.filemon", fname); + if (!fmfname) + err(1, "%s.filemon", fname); + if ((fm_fd = open("/dev/filemon", O_RDWR)) == -1) + err(1, "open(\"/dev/filemon\", O_RDWR)"); + if ((fm_log = open(fmfname, O_WRONLY | O_CREAT | O_TRUNC, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1) + err(1, "open(%s)", fmfname); + if (ioctl(fm_fd, FILEMON_SET_FD, &fm_log) < 0) + err(1, "Cannot set filemon log file descriptor"); + + /* Set up these two fd's to close on exec. */ + (void)fcntl(fm_fd, F_SETFD, FD_CLOEXEC); + (void)fcntl(fm_log, F_SETFD, FD_CLOEXEC); + } + + if (pflg) + playback(fscript); + if ((ttyflg = isatty(STDIN_FILENO)) != 0) { if (tcgetattr(STDIN_FILENO, &tt) == -1) err(1, "tcgetattr"); @@ -134,11 +186,28 @@ main(int argc, char *argv[]) err(1, "openpty"); } + if (rawout) + record(fscript, NULL, 0, 's'); + if (!qflg) { tvec = time(NULL); (void)printf("Script started, output file is %s\n", fname); - (void)fprintf(fscript, "Script started on %s", ctime(&tvec)); + if (!rawout) { + (void)fprintf(fscript, "Script started on %s", + ctime(&tvec)); + if (argv[0]) { + fprintf(fscript, "command: "); + for (k = 0 ; argv[k] ; ++k) + fprintf(fscript, "%s%s", k ? " " : "", + argv[k]); + fprintf(fscript, "\n"); + } + } fflush(fscript); + if (fflg) { + (void)printf("Filemon started, output file is %s\n", + fmfname); + } } if (ttyflg) { rtt = tt; @@ -156,6 +225,9 @@ main(int argc, char *argv[]) doshell(argv); close(slave); + if (fflg && ioctl(fm_fd, FILEMON_SET_PID, &child) < 0) + err(1, "Cannot set filemon PID"); + start = tvec = time(0); readstdin = 1; for (;;) { @@ -163,15 +235,12 @@ main(int argc, char *argv[]) FD_SET(master, &rfd); if (readstdin) FD_SET(STDIN_FILENO, &rfd); - if (!readstdin && ttyflg) { - tv.tv_sec = 1; + if ((!readstdin && ttyflg) || flushtime > 0) { + tv.tv_sec = !readstdin && ttyflg ? 1 : + flushtime - (tvec - start); tv.tv_usec = 0; tvp = &tv; readstdin = 1; - } else if (flushtime > 0) { - tv.tv_sec = flushtime - (tvec - start); - tv.tv_usec = 0; - tvp = &tv; } else { tvp = NULL; } @@ -190,6 +259,8 @@ main(int argc, char *argv[]) readstdin = 0; } if (cc > 0) { + if (rawout) + record(fscript, ibuf, cc, 'i'); (void)write(master, ibuf, cc); if (kflg && tcgetattr(master, &stt) >= 0 && ((stt.c_lflag & ECHO) == 0)) { @@ -202,7 +273,10 @@ main(int argc, char *argv[]) if (cc <= 0) break; (void)write(STDOUT_FILENO, obuf, cc); - (void)fwrite(obuf, 1, cc, fscript); + if (rawout) + record(fscript, obuf, cc, 'o'); + else + (void)fwrite(obuf, 1, cc, fscript); } tvec = time(0); if (tvec - start >= flushtime) { @@ -218,7 +292,7 @@ static void usage(void) { (void)fprintf(stderr, - "usage: script [-akq] [-t time] [file [command ...]]\n"); + "usage: script [-adfkpqr] [-t time] [file [command ...]]\n"); exit(1); } @@ -242,19 +316,14 @@ static void doshell(char **av) { const char *shell; - int k; shell = getenv("SHELL"); if (shell == NULL) shell = _PATH_BSHELL; - if (av[0]) - for (k = 0 ; av[k] ; ++k) - fprintf(fscript, "%s%s", k ? " " : "", av[k]); - fprintf(fscript, "\r\n"); - (void)close(master); (void)fclose(fscript); + free(fmfname); login_tty(slave); setenv("SCRIPT", fname, 1); if (av[0]) { @@ -282,11 +351,148 @@ done(int eno) if (ttyflg) (void)tcsetattr(STDIN_FILENO, TCSAFLUSH, &tt); tvec = time(NULL); + if (rawout) + record(fscript, NULL, 0, 'e'); if (!qflg) { - (void)fprintf(fscript,"\nScript done on %s", ctime(&tvec)); + if (!rawout) + (void)fprintf(fscript,"\nScript done on %s", + ctime(&tvec)); (void)printf("\nScript done, output file is %s\n", fname); + if (fflg) { + (void)printf("Filemon done, output file is %s\n", + fmfname); + } } (void)fclose(fscript); (void)close(master); exit(eno); } + +static void +record(FILE *fp, char *buf, size_t cc, int direction) +{ + struct iovec iov[2]; + struct stamp stamp; + struct timeval tv; + + (void)gettimeofday(&tv, NULL); + stamp.scr_len = cc; + stamp.scr_sec = tv.tv_sec; + stamp.scr_usec = tv.tv_usec; + stamp.scr_direction = direction; + iov[0].iov_len = sizeof(stamp); + iov[0].iov_base = &stamp; + iov[1].iov_len = cc; + iov[1].iov_base = buf; + if (writev(fileno(fp), &iov[0], 2) == -1) + err(1, "writev"); +} + +static void +consume(FILE *fp, off_t len, char *buf, int reg) +{ + size_t l; + + if (reg) { + if (fseeko(fp, len, SEEK_CUR) == -1) + err(1, NULL); + } + else { + while (len > 0) { + l = MIN(DEF_BUF, len); + if (fread(buf, sizeof(char), l, fp) != l) + err(1, "cannot read buffer"); + len -= l; + } + } +} + +#define swapstamp(stamp) do { \ + if (stamp.scr_direction > 0xff) { \ + stamp.scr_len = bswap64(stamp.scr_len); \ + stamp.scr_sec = bswap64(stamp.scr_sec); \ + stamp.scr_usec = bswap32(stamp.scr_usec); \ + stamp.scr_direction = bswap32(stamp.scr_direction); \ + } \ +} while (0/*CONSTCOND*/) + +static void +playback(FILE *fp) +{ + struct timespec tsi, tso; + struct stamp stamp; + struct stat pst; + char buf[DEF_BUF]; + off_t nread, save_len; + size_t l; + time_t tclock; + int reg; + + if (fstat(fileno(fp), &pst) == -1) + err(1, "fstat failed"); + + reg = S_ISREG(pst.st_mode); + + for (nread = 0; !reg || nread < pst.st_size; nread += save_len) { + if (fread(&stamp, sizeof(stamp), 1, fp) != 1) { + if (reg) + err(1, "reading playback header"); + else + break; + } + swapstamp(stamp); + save_len = sizeof(stamp); + + if (reg && stamp.scr_len > + (uint64_t)(pst.st_size - save_len) - nread) + errx(1, "invalid stamp"); + + save_len += stamp.scr_len; + tclock = stamp.scr_sec; + tso.tv_sec = stamp.scr_sec; + tso.tv_nsec = stamp.scr_usec * 1000; + + switch (stamp.scr_direction) { + case 's': + if (!qflg) + (void)printf("Script started on %s", + ctime(&tclock)); + tsi = tso; + (void)consume(fp, stamp.scr_len, buf, reg); + break; + case 'e': + if (!qflg) + (void)printf("\nScript done on %s", + ctime(&tclock)); + (void)consume(fp, stamp.scr_len, buf, reg); + break; + case 'i': + /* throw input away */ + (void)consume(fp, stamp.scr_len, buf, reg); + break; + case 'o': + tsi.tv_sec = tso.tv_sec - tsi.tv_sec; + tsi.tv_nsec = tso.tv_nsec - tsi.tv_nsec; + if (tsi.tv_nsec < 0) { + tsi.tv_sec -= 1; + tsi.tv_nsec += 1000000000; + } + if (usesleep) + (void)nanosleep(&tsi, NULL); + tsi = tso; + while (stamp.scr_len > 0) { + l = MIN(DEF_BUF, stamp.scr_len); + if (fread(buf, sizeof(char), l, fp) != l) + err(1, "cannot read buffer"); + + (void)write(STDOUT_FILENO, buf, l); + stamp.scr_len -= l; + } + break; + default: + errx(1, "invalid direction"); + } + } + (void)fclose(fp); + exit(0); +} From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:24:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 83C16122 for ; Tue, 30 Jul 2013 19:24:09 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com [209.85.217.169]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 055E92683 for ; Tue, 30 Jul 2013 19:24:08 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id d10so5517886lbj.14 for ; Tue, 30 Jul 2013 12:24:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=NZaRkYjBGtQEmZH0/qCwEd6jdVhGCoUpW1pqO4ZbeP0=; b=CmYk7spMdvftWzgWgtPX06NE69d7x5azfNI6xuouVP41t5CPQu4VGqIKkg2VURwkQo YkyaprjwxiG3NiU1Osql5CO/JNpedZZL3ICcbfAOv5fcHfX3QkHTDwf+T0+B3Vk5BI3J fR9aPil99WfyrVPV3wlo3+gmHlOCzTyT25FZhxMY5VNoiKNT6RG8oIExDMltGczhCJ3Z wCruSnyx0v2J+qn6oJ7CMhPIOGBh4pHW832tYHkoa5+baMqVbABa5WqhI+rbT+/9o4jo 9ur5zQddcbE46wWQgLyOSgxPHfXbH0KRuzOS209bBwtED4N4CI+lQtMkX5+PCCrFJjYQ H76A== X-Received: by 10.152.30.35 with SMTP id p3mr12172549lah.32.1375212241449; Tue, 30 Jul 2013 12:24:01 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id b8sm26777388lah.0.2013.07.30.12.24.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 12:24:00 -0700 (PDT) Message-ID: <51F812D0.90302@freebsd.org> Date: Tue, 30 Jul 2013 23:24:00 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> In-Reply-To: <20130730185034.GA63635@dragon.NUXI.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnr8fJLh4D8dQU1QHOocbNI7KJlZSk3/wKAgG38xU5uffWf39C5eZ9C93UYWGwEykjwps0x Cc: svn-src-head@freebsd.org, =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:24:09 -0000 On 30.07.2013 22:50, David O'Brien wrote: > Hi DES, > Where was this policy published or communicated? > There is no MAINTAINER line in sys/dev/random/, nor an entry in > /usr/src/MAINTAINERS. It is hard to follow some policy that cannot > be found. ~5 years ago I was forced to stop commits due to this policy invented on the fly and differently applied by different secteam@ members. Sad story. > Do you have any specific concerns? What about arc4rand_iniseed_state code dead without yarrow loaded? randomdev_soft.c: void random_yarrow_unblock(void) { if (!random_systat.seeded) { random_systat.seeded = 1; selwakeuppri(&random_systat.rsel, PUSER); wakeup(&random_systat); } (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, ARC4_ENTR_HAVE); } -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:34:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9690A740; Tue, 30 Jul 2013 19:34:46 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DB2F26FA; Tue, 30 Jul 2013 19:34:46 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UJYkhb065294; Tue, 30 Jul 2013 19:34:46 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6UJYkHJ065291; Tue, 30 Jul 2013 19:34:46 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 12:34:44 -0700 From: "David O'Brien" To: Andrey Chernov Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130730193444.GD63635@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> <51F812D0.90302@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F812D0.90302@freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, Dag-Erling =?unknown-8bit?Q?Sm=F8rgrav?= , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:34:46 -0000 On Tue, Jul 30, 2013 at 11:24:00PM +0400, Andrey Chernov wrote: > > Do you have any specific concerns? > > What about arc4rand_iniseed_state code dead without yarrow loaded? I am look at that now. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:53:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A8963F78; Tue, 30 Jul 2013 19:53:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 3812527DF; Tue, 30 Jul 2013 19:53:57 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id DA2EBD422E7; Wed, 31 Jul 2013 05:35:37 +1000 (EST) Date: Wed, 31 Jul 2013 05:35:36 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David O'Brien Subject: Re: svn commit: r253618 - head/sys/dev/usb/gadget In-Reply-To: <20130730190207.GC63635@dragon.NUXI.org> Message-ID: <20130731052029.T2672@besplex.bde.org> References: <201307241832.r6OIWFGc074918@svn.freebsd.org> <201307241529.35175.jhb@freebsd.org> <20130730190207.GC63635@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=DstvpgP+ c=1 sm=1 tr=0 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 a=PO7r1zJSAAAA:8 a=JYkn-E3srG0A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=4v6nFQ3yUQ4A:10 a=Kt2FaaZfBZeE9Yv_FBQA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:53:58 -0000 On Tue, 30 Jul 2013, David O'Brien wrote: > On Wed, Jul 24, 2013 at 03:29:34PM -0400, John Baldwin wrote: >> On Wednesday, July 24, 2013 2:32:15 pm David E. O'Brien wrote: >>> per style(9): >>> Kernel include files (i.e. sys/*.h) come first; normally, include >>> OR , but not both. includes >>> , and it is okay to depend on that. >> >> This is not fully correct. The consistent style throughout the tree when >> using _FBSDID() is: >> >> #include >> __FBSDID() >> >> #include >> ... >> >> Please fix these to match that. It might not be a bad idea to document the >> __FBSDID() practice in style.9 while you are at it. > > Hi John, > As BDE mentioned, the text [still] says it is OK to depend on > and including . > > I was one of the ones that put __FBSDID() in much of our code. I used > a script to add the two lines: > #include > __FBSDID("$FreeBSD$"); > > I did it this way so as to not break the "but not both" rule for > and . In otherwords my script wasn't > smart enough to see if or was already > being included and put the '__FBSDID("$FreeBSD$");' right below it. I tought it was because moving up the include of sys/param.h or sys/types.h to before __FBSDID() would have been more warmly recieved. __FBSDID() is ugly enough even without it distorting the normal include grouping. > I don't feel > #include > __FBSDID("$FreeBSD$"); > > #include > > is against style(9). Of course it is. It would distort the normal include grouping, and there are no examples of this in style(9), and there is an explicit example of using sys/cdefs.h before __FBSDID(). > Should explicit language be added that one of , > , or should be included first > followed by '__FBSDID("$FreeBSD$");' (when used). Followed > by all other headers. Unfortunately, it seems to be necessary to say that every example is intentional. I use the following minor changes which don't fix the text about sys/param.h not actually coming first, but which says more about the intentionality of nearby examples. % Index: style.9 % =================================================================== % RCS file: /home/ncvs/src/share/man/man9/style.9,v % retrieving revision 1.110 % diff -u -2 -r1.110 style.9 % --- style.9 3 Jul 2004 18:29:24 -0000 1.110 % +++ style.9 7 Jul 2004 11:47:22 -0000 % @@ -90,17 +130,22 @@ % .Ed % .Pp % -Leave another blank line before the header files. % +Leave one blank line before the header files. % .Pp % -Kernel include files (i.e.\& % +Kernel include files (i.e.,\& % .Pa sys/*.h ) % -come first; normally, include % -.In sys/types.h % -OR % -.In sys/param.h , % -but not both. % +come first; normally, % .In sys/types.h % +or % +.In sys/param.h % +will be needed before any others. % +.In sys/param.h % includes % +.In sys/types.h . % +Do not include both. % +Many headers, including % +.In sys/types.h , % +include % .In sys/cdefs.h , % -and it is okay to depend on that. % +and it is OK to depend on that. % .Bd -literal % #include /* Non-local includes in angle brackets. */ % @@ -116,12 +161,11 @@ % .Ed % .Pp % -Do not use files in % +Do not include files in % .Pa /usr/include % for files in the kernel. % .Pp % -Leave a blank line before the next group, the % -.Pa /usr/include % -files, % -which should be sorted alphabetically by name. % +Leave a blank line before the next group (XXX nah, all groups), % +the <*.h> include files. % +Sort the <*.h> include files (XXX nah, all groups) alphabetically. % .Bd -literal % #include % @@ -138,5 +182,6 @@ % .Ed % .Pp % -Leave another blank line before the user include files. % +Leave another blank line before the local include files. % +XXX nah, leave it before all groups. % .Bd -literal % #include "pathnames.h" /* Local includes in double quotes. */ Bruce From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 19:57:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C78A2182; Tue, 30 Jul 2013 19:57:26 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-bk0-x232.google.com (mail-bk0-x232.google.com [IPv6:2a00:1450:4008:c01::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CABC52806; Tue, 30 Jul 2013 19:57:25 +0000 (UTC) Received: by mail-bk0-f50.google.com with SMTP id ik8so1776436bkc.23 for ; Tue, 30 Jul 2013 12:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=p5h//BEebiXDfE5VVMxnyZ2TbThtXEZHaDzHRbEY6nk=; b=VzEkfsVXTlPcGgjo4NcPOtwSuK3RilyUS+utJ3aENfArFt1IQeEw27ob87e5SX5g2X zcnphIn1zGBzWzQQ0LxHa8BXQdppP/QGpRamyxXAcEaeccUNeDBAxPnXlL0DuDFkN06m /3OmEs0NSRHINRxE1E8ULOFrfaLKn+nZbDpyEPhJUuP4zJ45A6iZgpc7ZFHmR5YQHoEI g7IgknvFWC3gy/GVKUs3fN3TgUxVPycdxZdZIiXrD5UhFW/LQRz25OhCs8/+GFM24j2F UB3jPHh7018q/tFjJiOJRcHGXDmIGpZDz8HTzrQfWXdGqXAA29TBes/SBnyRoo/Ub51t cv9Q== X-Received: by 10.205.8.65 with SMTP id or1mr2750497bkb.162.1375214244023; Tue, 30 Jul 2013 12:57:24 -0700 (PDT) Received: from [192.168.1.4] (adea192.neoplus.adsl.tpnet.pl. [79.184.78.192]) by mx.google.com with ESMTPSA id d8sm10202812bkj.6.2013.07.30.12.57.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 12:57:23 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=iso-8859-2 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20130729203848.GG948@alchemy.franken.de> Date: Tue, 30 Jul 2013 21:57:21 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 19:57:26 -0000 Wiadomo=B6=E6 napisana przez Marius Strobl w = dniu 29 lip 2013, o godz. 22:38: > On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala = wrote: >> Author: trasz >> Date: Fri Apr 12 16:25:03 2013 >> New Revision: 249410 >> URL: http://svnweb.freebsd.org/changeset/base/249410 >>=20 >> Log: >> Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' >> and kern.cam.ctl.disable tunable; those were introduced as a = workaround >> to make it possible to boot GENERIC on low memory machines. >>=20 >> With ctl(4) being built as a module and automatically loaded by = ctladm(8), >> this makes CTL work out of the box. >>=20 >=20 > Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in > order to reduce the default memory footprint there? Yup, my bad. I'm waiting for reply from re@ whether it's a good thing to do at this point of the release process. From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:28:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3CF5ECBD; Tue, 30 Jul 2013 20:28:29 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6B6742969; Tue, 30 Jul 2013 20:28:28 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.7/8.14.7/ALCHEMY.FRANKEN.DE) with ESMTP id r6UKSKRK070146; Tue, 30 Jul 2013 22:28:20 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.7/8.14.7/Submit) id r6UKSKXi070145; Tue, 30 Jul 2013 22:28:20 +0200 (CEST) (envelope-from marius) Date: Tue, 30 Jul 2013 22:28:20 +0200 From: Marius Strobl To: Edward Tomasz Napiera?a Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf Message-ID: <20130730202820.GM56034@alchemy.franken.de> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:28:29 -0000 On Tue, Jul 30, 2013 at 09:57:21PM +0200, Edward Tomasz Napiera?a wrote: > Wiadomo?? napisana przez Marius Strobl w dniu 29 lip 2013, o godz. 22:38: > > On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala wrote: > >> Author: trasz > >> Date: Fri Apr 12 16:25:03 2013 > >> New Revision: 249410 > >> URL: http://svnweb.freebsd.org/changeset/base/249410 > >> > >> Log: > >> Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' > >> and kern.cam.ctl.disable tunable; those were introduced as a workaround > >> to make it possible to boot GENERIC on low memory machines. > >> > >> With ctl(4) being built as a module and automatically loaded by ctladm(8), > >> this makes CTL work out of the box. > >> > > > > Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in > > order to reduce the default memory footprint there? > > Yup, my bad. I'm waiting for reply from re@ whether it's a good thing > to do at this point of the release process. > Yeah, I saw that request and was looking into what it would actually take to remove ctl(4) from GENERICs in stable/9. Unfortunately, it's not exactly as straight forward as MFCing the two above revisions 1:1. For one, IMO kern.cam.ctl.disable shouldn't be removed there in case someone uses an old kernel configuration file having "device ctl" but relies on that tunable to work. That's no big deal, though, and makes the merge even less intrusive. However, the real problem is that ctl.ko currently is globally disabled in stable/9 as it doesn't build with PAE/ XEN. Actually, the compiler is right to complain as a 32-bit void-pointer is casted to a 64-bit integer in that case. What I don't get so far is why on earth this doesn't break compilation in head ... Marius From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:37:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99E4CFC4; Tue, 30 Jul 2013 20:37:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7717C29D8; Tue, 30 Jul 2013 20:37:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UKbYic058210; Tue, 30 Jul 2013 20:37:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UKbWEx058200; Tue, 30 Jul 2013 20:37:32 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302037.r6UKbWEx058200@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 20:37:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253816 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:37:34 -0000 Author: delphij Date: Tue Jul 30 20:37:32 2013 New Revision: 253816 URL: http://svnweb.freebsd.org/changeset/base/253816 Log: MFV r253780: To quote Illumos #3875: The problem here is that if we ever end up in the error path, we drop the locks protecting access to the zfsvfs_t prior to forcibly unmounting the filesystem. Because z_os is NULL, any thread that had already picked up the zfsvfs_t and was sitting in ZFS_ENTER() when we dropped our locks in zfs_resume_fs() will now acquire the lock, attempt to use z_os, and panic. Illumos ZFS issues: 3875 panic in zfs_root() after failed rollback MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Tue Jul 30 20:37:32 2013 (r253816) @@ -517,6 +517,38 @@ dmu_objset_rele(objset_t *os, void *tag) dsl_pool_rele(dp, tag); } +/* + * When we are called, os MUST refer to an objset associated with a dataset + * that is owned by 'tag'; that is, is held and long held by 'tag' and ds_owner + * == tag. We will then release and reacquire ownership of the dataset while + * holding the pool config_rwlock to avoid intervening namespace or ownership + * changes may occur. + * + * This exists solely to accommodate zfs_ioc_userspace_upgrade()'s desire to + * release the hold on its dataset and acquire a new one on the dataset of the + * same name so that it can be partially torn down and reconstructed. + */ +void +dmu_objset_refresh_ownership(objset_t *os, void *tag) +{ + dsl_pool_t *dp; + dsl_dataset_t *ds, *newds; + char name[MAXNAMELEN]; + + ds = os->os_dsl_dataset; + VERIFY3P(ds, !=, NULL); + VERIFY3P(ds->ds_owner, ==, tag); + VERIFY(dsl_dataset_long_held(ds)); + + dsl_dataset_name(ds, name); + dp = dmu_objset_pool(os); + dsl_pool_config_enter(dp, FTAG); + dmu_objset_disown(os, tag); + VERIFY0(dsl_dataset_own(dp, name, tag, &newds)); + VERIFY3P(newds, ==, os->os_dsl_dataset); + dsl_pool_config_exit(dp, FTAG); +} + void dmu_objset_disown(objset_t *os, void *tag) { Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 20:37:32 2013 (r253816) @@ -1602,7 +1602,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * if (error != 0) return (error); error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, - origin_head, drc->drc_force); + origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { dsl_dataset_rele(origin_head, FTAG); return (error); @@ -1654,6 +1654,9 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); + + if (drc->drc_owner != NULL) + VERIFY3P(origin_head->ds_owner, ==, drc->drc_owner); } else { dsl_dataset_t *ds = drc->drc_ds; @@ -1752,8 +1755,10 @@ dmu_recv_new_end(dmu_recv_cookie_t *drc) } int -dmu_recv_end(dmu_recv_cookie_t *drc) +dmu_recv_end(dmu_recv_cookie_t *drc, void *owner) { + drc->drc_owner = owner; + if (drc->drc_newfs) return (dmu_recv_new_end(drc)); else Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 20:37:32 2013 (r253816) @@ -1755,16 +1755,52 @@ dsl_dataset_rename_snapshot(const char * dsl_dataset_rename_snapshot_sync, &ddrsa, 1)); } +/* + * If we're doing an ownership handoff, we need to make sure that there is + * only one long hold on the dataset. We're not allowed to change anything here + * so we don't permanently release the long hold or regular hold here. We want + * to do this only when syncing to avoid the dataset unexpectedly going away + * when we release the long hold. + */ +static int +dsl_dataset_handoff_check(dsl_dataset_t *ds, void *owner, dmu_tx_t *tx) +{ + boolean_t held; + + if (!dmu_tx_is_syncing(tx)) + return (0); + + if (owner != NULL) { + VERIFY3P(ds->ds_owner, ==, owner); + dsl_dataset_long_rele(ds, owner); + } + + held = dsl_dataset_long_held(ds); + + if (owner != NULL) + dsl_dataset_long_hold(ds, owner); + + if (held) + return (SET_ERROR(EBUSY)); + + return (0); +} + +typedef struct dsl_dataset_rollback_arg { + const char *ddra_fsname; + void *ddra_owner; +} dsl_dataset_rollback_arg_t; + static int dsl_dataset_rollback_check(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds; int64_t unused_refres_delta; int error; - error = dsl_dataset_hold(dp, fsname, FTAG, &ds); + error = dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds); if (error != 0) return (error); @@ -1780,9 +1816,10 @@ dsl_dataset_rollback_check(void *arg, dm return (SET_ERROR(EINVAL)); } - if (dsl_dataset_long_held(ds)) { + error = dsl_dataset_handoff_check(ds, ddra->ddra_owner, tx); + if (error != 0) { dsl_dataset_rele(ds, FTAG); - return (SET_ERROR(EBUSY)); + return (error); } /* @@ -1819,12 +1856,12 @@ dsl_dataset_rollback_check(void *arg, dm static void dsl_dataset_rollback_sync(void *arg, dmu_tx_t *tx) { - const char *fsname = arg; + dsl_dataset_rollback_arg_t *ddra = arg; dsl_pool_t *dp = dmu_tx_pool(tx); dsl_dataset_t *ds, *clone; uint64_t cloneobj; - VERIFY0(dsl_dataset_hold(dp, fsname, FTAG, &ds)); + VERIFY0(dsl_dataset_hold(dp, ddra->ddra_fsname, FTAG, &ds)); cloneobj = dsl_dataset_create_sync(ds->ds_dir, "%rollback", ds->ds_prev, DS_CREATE_FLAG_NODIRTY, kcred, tx); @@ -1840,11 +1877,26 @@ dsl_dataset_rollback_sync(void *arg, dmu dsl_dataset_rele(ds, FTAG); } +/* + * If owner != NULL: + * + * - The existing dataset MUST be owned by the specified owner at entry + * - Upon return, dataset will still be held by the same owner, whether we + * succeed or not. + * + * This mode is required any time the existing filesystem is mounted. See + * notes above zfs_suspend_fs() for further details. + */ int -dsl_dataset_rollback(const char *fsname) +dsl_dataset_rollback(const char *fsname, void *owner) { + dsl_dataset_rollback_arg_t ddra; + + ddra.ddra_fsname = fsname; + ddra.ddra_owner = owner; + return (dsl_sync_task(fsname, dsl_dataset_rollback_check, - dsl_dataset_rollback_sync, (void *)fsname, 1)); + dsl_dataset_rollback_sync, (void *)&ddra, 1)); } struct promotenode { @@ -2362,7 +2414,7 @@ dsl_dataset_promote(const char *name, ch int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force) + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx) { int64_t unused_refres_delta; @@ -2391,7 +2443,7 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ - if (dsl_dataset_long_held(origin_head)) + if (dsl_dataset_handoff_check(origin_head, owner, tx)) return (SET_ERROR(EBUSY)); /* check amount of any unconsumed refreservation */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h Tue Jul 30 20:37:32 2013 (r253816) @@ -136,6 +136,7 @@ struct objset { int dmu_objset_hold(const char *name, void *tag, objset_t **osp); int dmu_objset_own(const char *name, dmu_objset_type_t type, boolean_t readonly, void *tag, objset_t **osp); +void dmu_objset_refresh_ownership(objset_t *os, void *tag); void dmu_objset_rele(objset_t *os, void *tag); void dmu_objset_disown(objset_t *os, void *tag); int dmu_objset_from_ds(struct dsl_dataset *ds, objset_t **osp); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h Tue Jul 30 20:37:32 2013 (r253816) @@ -62,6 +62,7 @@ typedef struct dmu_recv_cookie { struct avl_tree *drc_guid_to_ds_map; zio_cksum_t drc_cksum; uint64_t drc_newsnapobj; + void *drc_owner; } dmu_recv_cookie_t; int dmu_recv_begin(char *tofs, char *tosnap, struct drr_begin *drrb, @@ -72,6 +73,6 @@ int dmu_recv_stream(dmu_recv_cookie_t *d int dmu_recv_stream(dmu_recv_cookie_t *drc, struct file *fp, offset_t *voffp, #endif int cleanup_fd, uint64_t *action_handlep); -int dmu_recv_end(dmu_recv_cookie_t *drc); +int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); #endif /* _DMU_SEND_H */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 20:37:32 2013 (r253816) @@ -247,7 +247,7 @@ void dsl_dataset_long_rele(dsl_dataset_t boolean_t dsl_dataset_long_held(dsl_dataset_t *ds); int dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone, - dsl_dataset_t *origin_head, boolean_t force); + dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx); void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, @@ -264,7 +264,7 @@ int dsl_dataset_snap_lookup(dsl_dataset_ int dsl_dataset_snap_remove(dsl_dataset_t *ds, const char *name, dmu_tx_t *tx); void dsl_dataset_set_refreservation_sync_impl(dsl_dataset_t *ds, zprop_source_t source, uint64_t value, dmu_tx_t *tx); -int dsl_dataset_rollback(const char *fsname); +int dsl_dataset_rollback(const char *fsname, void *owner); #ifdef ZFS_DEBUG #define dprintf_ds(ds, fmt, ...) do { \ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Jul 30 20:37:32 2013 (r253816) @@ -3566,13 +3566,13 @@ zfs_ioc_rollback(zfs_cmd_t *zc) if (error == 0) { int resume_err; - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, zfsvfs); resume_err = zfs_resume_fs(zfsvfs, zc->zc_name); error = error ? error : resume_err; } VFS_RELE(zfsvfs->z_vfs); } else { - error = dsl_dataset_rollback(zc->zc_name); + error = dsl_dataset_rollback(zc->zc_name, NULL); } return (error); } @@ -4101,13 +4101,13 @@ zfs_ioc_recv(zfs_cmd_t *zc) * If the suspend fails, then the recv_end will * likely also fail, and clean up after itself. */ - end_err = dmu_recv_end(&drc); + end_err = dmu_recv_end(&drc, zfsvfs); if (error == 0) error = zfs_resume_fs(zfsvfs, tofs); error = error ? error : end_err; VFS_RELE(zfsvfs->z_vfs); } else { - error = dmu_recv_end(&drc); + error = dmu_recv_end(&drc, NULL); } } @@ -4598,8 +4598,11 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset_phys_t). Suspend/resume the fs will do that. */ error = zfs_suspend_fs(zfsvfs); - if (error == 0) + if (error == 0) { + dmu_objset_refresh_ownership(zfsvfs->z_os, + zfsvfs); error = zfs_resume_fs(zfsvfs, zc->zc_name); + } } if (error == 0) error = dmu_objset_userspace_upgrade(zfsvfs->z_os); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Jul 30 19:24:05 2013 (r253815) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Tue Jul 30 20:37:32 2013 (r253816) @@ -2222,7 +2222,9 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int * Block out VOPs and close zfsvfs_t::z_os * * Note, if successful, then we return with the 'z_teardown_lock' and - * 'z_teardown_inactive_lock' write held. + * 'z_teardown_inactive_lock' write held. We leave ownership of the underlying + * dataset and objset intact so that they can be atomically handed off during + * a subsequent rollback or recv operation and the resume thereafter. */ int zfs_suspend_fs(zfsvfs_t *zfsvfs) @@ -2231,71 +2233,76 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs) if ((error = zfsvfs_teardown(zfsvfs, B_FALSE)) != 0) return (error); - dmu_objset_disown(zfsvfs->z_os, zfsvfs); return (0); } /* - * Reopen zfsvfs_t::z_os and release VOPs. + * Rebuild SA and release VOPs. Note that ownership of the underlying dataset + * is an invariant across any of the operations that can be performed while the + * filesystem was suspended. Whether it succeeded or failed, the preconditions + * are the same: the relevant objset and associated dataset are owned by + * zfsvfs, held, and long held on entry. */ int zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname) { int err; + znode_t *zp; + uint64_t sa_obj = 0; ASSERT(RRW_WRITE_HELD(&zfsvfs->z_teardown_lock)); ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); - err = dmu_objset_own(osname, DMU_OST_ZFS, B_FALSE, zfsvfs, - &zfsvfs->z_os); - if (err) { - zfsvfs->z_os = NULL; - } else { - znode_t *zp; - uint64_t sa_obj = 0; + /* + * We already own this, so just hold and rele it to update the + * objset_t, as the one we had before may have been evicted. + */ + VERIFY0(dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os)); + VERIFY3P(zfsvfs->z_os->os_dsl_dataset->ds_owner, ==, zfsvfs); + VERIFY(dsl_dataset_long_held(zfsvfs->z_os->os_dsl_dataset)); + dmu_objset_rele(zfsvfs->z_os, zfsvfs); - /* - * Make sure version hasn't changed - */ + /* + * Make sure version hasn't changed + */ - err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, - &zfsvfs->z_version); + err = zfs_get_zplprop(zfsvfs->z_os, ZFS_PROP_VERSION, + &zfsvfs->z_version); - if (err) - goto bail; + if (err) + goto bail; - err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, - ZFS_SA_ATTRS, 8, 1, &sa_obj); + err = zap_lookup(zfsvfs->z_os, MASTER_NODE_OBJ, + ZFS_SA_ATTRS, 8, 1, &sa_obj); - if (err && zfsvfs->z_version >= ZPL_VERSION_SA) - goto bail; + if (err && zfsvfs->z_version >= ZPL_VERSION_SA) + goto bail; - if ((err = sa_setup(zfsvfs->z_os, sa_obj, - zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) - goto bail; + if ((err = sa_setup(zfsvfs->z_os, sa_obj, + zfs_attr_table, ZPL_END, &zfsvfs->z_attr_table)) != 0) + goto bail; - if (zfsvfs->z_version >= ZPL_VERSION_SA) - sa_register_update_callback(zfsvfs->z_os, - zfs_sa_upgrade); + if (zfsvfs->z_version >= ZPL_VERSION_SA) + sa_register_update_callback(zfsvfs->z_os, + zfs_sa_upgrade); - VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); + VERIFY(zfsvfs_setup(zfsvfs, B_FALSE) == 0); - zfs_set_fuid_feature(zfsvfs); + zfs_set_fuid_feature(zfsvfs); - /* - * Attempt to re-establish all the active znodes with - * their dbufs. If a zfs_rezget() fails, then we'll let - * any potential callers discover that via ZFS_ENTER_VERIFY_VP - * when they try to use their znode. - */ - mutex_enter(&zfsvfs->z_znodes_lock); - for (zp = list_head(&zfsvfs->z_all_znodes); zp; - zp = list_next(&zfsvfs->z_all_znodes, zp)) { - (void) zfs_rezget(zp); - } - mutex_exit(&zfsvfs->z_znodes_lock); + /* + * Attempt to re-establish all the active znodes with + * their dbufs. If a zfs_rezget() fails, then we'll let + * any potential callers discover that via ZFS_ENTER_VERIFY_VP + * when they try to use their znode. + */ + mutex_enter(&zfsvfs->z_znodes_lock); + for (zp = list_head(&zfsvfs->z_all_znodes); zp; + zp = list_next(&zfsvfs->z_all_znodes, zp)) { + (void) zfs_rezget(zp); } + mutex_exit(&zfsvfs->z_znodes_lock); bail: /* release the VOPs */ @@ -2304,8 +2311,8 @@ bail: if (err) { /* - * Since we couldn't reopen zfsvfs::z_os, or - * setup the sa framework force unmount this file system. + * Since we couldn't setup the sa framework, try to force + * unmount this file system. */ if (vn_vfswlock(zfsvfs->z_vfs->vfs_vnodecovered) == 0) (void) dounmount(zfsvfs->z_vfs, MS_FORCE, curthread); From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:39:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A128F1B1; Tue, 30 Jul 2013 20:39:50 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22d.google.com (mail-wg0-x22d.google.com [IPv6:2a00:1450:400c:c00::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C1AF29F2; Tue, 30 Jul 2013 20:39:49 +0000 (UTC) Received: by mail-wg0-f45.google.com with SMTP id x12so6522493wgg.12 for ; Tue, 30 Jul 2013 13:39:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=UUFgRMBAtYC+OPbxbaxOc5CIQCdwKczt730oG/yCdxY=; b=ITwvDX9n4+rCdtkxIzVbtjIb/Q1h/WiCe+/70k+K8Hzh8cIdJv+kP+zABbEu9mA2fa sN9hvFA3JCDJiZd3jPXGpiUPSgcecZkymWRfCqsxUlR4UTSbyZcSxpTuMqT+qi2MhDla Ymp0ojrAWKG+n6Kdj1areAPWzS4Xk1+7T38bjx8jyfc1ZW3XcAJJr38JYYfK37hKZlKm ODlxCK+ztjeAF+G2Kl0OPVzTqfojK9VsjL1mkQn9nQdElHX0LPuNndw1US5FlrQxzR/E p6Y9nqB4RYp03OQPT/leqnIEpzcNb83bSILEHGXDy+ihg4q/1IV7cEUki1Hmid2WoOJL 6g0Q== MIME-Version: 1.0 X-Received: by 10.194.203.73 with SMTP id ko9mr8519787wjc.79.1375216787815; Tue, 30 Jul 2013 13:39:47 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Tue, 30 Jul 2013 13:39:47 -0700 (PDT) In-Reply-To: <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> Date: Tue, 30 Jul 2013 13:39:47 -0700 X-Google-Sender-Auth: brNSj08aZC8C_g5H7n7rWpI1i2A Message-ID: Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf From: Adrian Chadd To: =?ISO-8859-2?Q?Edward_Tomasz_Napiera=B3a?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org, Marius Strobl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:39:50 -0000 On 30 July 2013 12:57, Edward Tomasz Napiera=C5=82a wro= te: > Yup, my bad. I'm waiting for reply from re@ whether it's a good thing > to do at this point of the release process. This is one thing that prevents 9.2 from booting in a VM with 128mb or less RAM. Or, any of the soekris/alix style hardware that doesn't ship with 2GB RAM. So yes, I'd like to see this disabled by default before 9.2 goes out. -adrian From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:40:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A6376338; Tue, 30 Jul 2013 20:40:54 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-bk0-x231.google.com (mail-bk0-x231.google.com [IPv6:2a00:1450:4008:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A908C2A01; Tue, 30 Jul 2013 20:40:53 +0000 (UTC) Received: by mail-bk0-f49.google.com with SMTP id r7so2239546bkg.8 for ; Tue, 30 Jul 2013 13:40:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=VWSDJS5u0t3OGtAUa6UTteb3J3OJApVMOA8Kzezpw9A=; b=Vn/sgyE3euFYXPHyEgS2ejQeXLhn+gAEzrzGAfRRVfl070Kc9qlHKiAFs52wewAfxr lZAmpSvMGGCbCD3qG23eCcTsfMEGK7nWY+LkxHkO8zGwPKP2cITyvZPxAwD+T8CZqmVz 82PBi5bI9cuJjILD77eVOv1VbSt3LzHTH97kpxrS/0pJtLcxCZOhWyRbE5Wdh8f4rFWX xWLFz4y21VooBBEHHfx9tu1uNzvqO9JpQAsZx+bAF2unRINoVI9XwuAmNlI3zkL93u1F VeNuJNiEq59DmI3wC5Rv5ixfv7Y6aMtT7AQTW+/xo3Sh8yCvSsauB2gi+6Mt93OZMxC4 3LXA== X-Received: by 10.205.21.129 with SMTP id qs1mr9771397bkb.13.1375216851644; Tue, 30 Jul 2013 13:40:51 -0700 (PDT) Received: from [192.168.1.4] (adea192.neoplus.adsl.tpnet.pl. [79.184.78.192]) by mx.google.com with ESMTPSA id ok9sm17910731bkb.8.2013.07.30.13.40.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 13:40:51 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Content-Type: text/plain; charset=iso-8859-2 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf From: =?iso-8859-2?Q?Edward_Tomasz_Napiera=B3a?= In-Reply-To: <20130730202820.GM56034@alchemy.franken.de> Date: Tue, 30 Jul 2013 22:40:49 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> <20130730202820.GM56034@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:40:54 -0000 Wiadomo=B6=E6 napisana przez Marius Strobl w = dniu 30 lip 2013, o godz. 22:28: > On Tue, Jul 30, 2013 at 09:57:21PM +0200, Edward Tomasz Napiera?a = wrote: >> Wiadomo?? napisana przez Marius Strobl w = dniu 29 lip 2013, o godz. 22:38: >>> On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala = wrote: >>>> Author: trasz >>>> Date: Fri Apr 12 16:25:03 2013 >>>> New Revision: 249410 >>>> URL: http://svnweb.freebsd.org/changeset/base/249410 >>>>=20 >>>> Log: >>>> Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' >>>> and kern.cam.ctl.disable tunable; those were introduced as a = workaround >>>> to make it possible to boot GENERIC on low memory machines. >>>>=20 >>>> With ctl(4) being built as a module and automatically loaded by = ctladm(8), >>>> this makes CTL work out of the box. >>>>=20 >>>=20 >>> Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in >>> order to reduce the default memory footprint there? >>=20 >> Yup, my bad. I'm waiting for reply from re@ whether it's a good = thing >> to do at this point of the release process. >>=20 >=20 > Yeah, I saw that request and was looking into what it would actually > take to remove ctl(4) from GENERICs in stable/9. Unfortunately, it's > not exactly as straight forward as MFCing the two above revisions 1:1. > For one, IMO kern.cam.ctl.disable shouldn't be removed there in case > someone uses an old kernel configuration file having "device ctl" but > relies on that tunable to work. That's no big deal, though, and makes > the merge even less intrusive. However, the real problem is that = ctl.ko > currently is globally disabled in stable/9 as it doesn't build with = PAE/ > XEN. Actually, the compiler is right to complain as a 32-bit = void-pointer > is casted to a 64-bit integer in that case. What I don't get so far is > why on earth this doesn't break compilation in head ... Damn. Now that you mention it... yeah, it was me who disconnected it, in r249530. I had no idea what's going on either. From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:45:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 394B178F; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 25EF12A4F; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UKjSAW061213; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UKjStx061212; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302045.r6UKjStx061212@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 20:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253817 - vendor-sys/illumos/dist/uts/common/sys/fs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:45:28 -0000 Author: delphij Date: Tue Jul 30 20:45:27 2013 New Revision: 253817 URL: http://svnweb.freebsd.org/changeset/base/253817 Log: Commit a missed file in r253781: Update vendor/illumos/dist and vendor-sys/illumos/dist to illumos-gate 14089:520f3adc5d46: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Modified: vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Tue Jul 30 20:37:32 2013 (r253816) +++ vendor-sys/illumos/dist/uts/common/sys/fs/zfs.h Tue Jul 30 20:45:27 2013 (r253817) @@ -140,6 +140,7 @@ typedef enum { ZFS_PROP_CLONES, ZFS_PROP_LOGICALUSED, ZFS_PROP_LOGICALREFERENCED, + ZFS_PROP_INCONSISTENT, /* not exposed to the user */ ZFS_NUM_PROPS } zfs_prop_t; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 20:45:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 676EF790; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5463E2A50; Tue, 30 Jul 2013 20:45:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UKjSi1061217; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UKjS7B061216; Tue, 30 Jul 2013 20:45:28 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201307302045.r6UKjS7B061216@svn.freebsd.org> From: Steven Hartland Date: Tue, 30 Jul 2013 20:45:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253818 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:45:28 -0000 Author: smh Date: Tue Jul 30 20:45:27 2013 New Revision: 253818 URL: http://svnweb.freebsd.org/changeset/base/253818 Log: MFV r253784: Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to pthread_join prior to fd close. This was introduced by r251646 (MFV r251644) Illumos ZFS issue: 3909 "zfs send -D" does not work MFC after: 1 day Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jul 30 20:45:27 2013 (r253817) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Tue Jul 30 20:45:27 2013 (r253818) @@ -1576,8 +1576,8 @@ zfs_send(zfs_handle_t *zhp, const char * if (tid != 0) { if (err != 0) (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } if (sdd.cleanup_fd != -1) { @@ -1613,8 +1613,8 @@ err_out: VERIFY(0 == close(sdd.cleanup_fd)); if (tid != 0) { (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } return (err); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 21:02:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B4213DF7; Tue, 30 Jul 2013 21:02:11 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 91F922AF7; Tue, 30 Jul 2013 21:02:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UL2B9a067198; Tue, 30 Jul 2013 21:02:11 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UL2AkU067186; Tue, 30 Jul 2013 21:02:10 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302102.r6UL2AkU067186@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 21:02:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253819 - in head: cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/lib/libzfs/common sys/cddl/contrib/opensolaris/common/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:02:11 -0000 Author: delphij Date: Tue Jul 30 21:02:09 2013 New Revision: 253819 URL: http://svnweb.freebsd.org/changeset/base/253819 Log: MFV r253781 + r253871: Illumos ZFS issues: 3894 zfs should not allow snapshot of inconsistent dataset MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jul 30 20:45:27 2013 (r253818) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Tue Jul 30 21:02:09 2013 (r253819) @@ -3530,6 +3530,12 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void int rv = 0; int error; + if (sd->sd_recursive && + zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) != 0) { + zfs_close(zhp); + return (0); + } + error = asprintf(&name, "%s@%s", zfs_get_name(zhp), sd->sd_snapname); if (error == -1) nomem(); Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Jul 30 20:45:27 2013 (r253818) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Jul 30 21:02:09 2013 (r253819) @@ -1885,6 +1885,10 @@ get_numeric_property(zfs_handle_t *zhp, zcmd_free_nvlists(&zc); break; + case ZFS_PROP_INCONSISTENT: + *val = zhp->zfs_dmustats.dds_inconsistent; + break; + default: switch (zfs_prop_get_type(prop)) { case PROP_TYPE_NUMBER: @@ -3379,13 +3383,16 @@ zfs_snapshot_cb(zfs_handle_t *zhp, void char name[ZFS_MAXNAMELEN]; int rv = 0; - (void) snprintf(name, sizeof (name), - "%s@%s", zfs_get_name(zhp), sd->sd_snapname); + if (zfs_prop_get_int(zhp, ZFS_PROP_INCONSISTENT) == 0) { + (void) snprintf(name, sizeof (name), + "%s@%s", zfs_get_name(zhp), sd->sd_snapname); - fnvlist_add_boolean(sd->sd_nvl, name); + fnvlist_add_boolean(sd->sd_nvl, name); - rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + rv = zfs_iter_filesystems(zhp, zfs_snapshot_cb, sd); + } zfs_close(zhp); + return (rv); } Modified: head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 30 20:45:27 2013 (r253818) +++ head/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c Tue Jul 30 21:02:09 2013 (r253819) @@ -395,6 +395,8 @@ zfs_prop_init(void) PROP_READONLY, ZFS_TYPE_DATASET, "UNIQUE"); zprop_register_hidden(ZFS_PROP_OBJSETID, "objsetid", PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "OBJSETID"); + zprop_register_hidden(ZFS_PROP_INCONSISTENT, "inconsistent", + PROP_TYPE_NUMBER, PROP_READONLY, ZFS_TYPE_DATASET, "INCONSISTENT"); /* oddball properties */ zprop_register_impl(ZFS_PROP_CREATION, "creation", PROP_TYPE_NUMBER, 0, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 20:45:27 2013 (r253818) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 21:02:09 2013 (r253819) @@ -1608,7 +1608,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * return (error); } error = dsl_dataset_snapshot_check_impl(origin_head, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); dsl_dataset_rele(origin_head, FTAG); if (error != 0) return (error); @@ -1616,7 +1616,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_head_check_impl(drc->drc_ds, 1); } else { error = dsl_dataset_snapshot_check_impl(drc->drc_ds, - drc->drc_tosnap, tx); + drc->drc_tosnap, tx, B_TRUE); } return (error); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 20:45:27 2013 (r253818) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 21:02:09 2013 (r253819) @@ -994,7 +994,7 @@ typedef struct dsl_dataset_snapshot_arg int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx) + dmu_tx_t *tx, boolean_t recv) { int error; uint64_t value; @@ -1020,6 +1020,18 @@ dsl_dataset_snapshot_check_impl(dsl_data if (error != ENOENT) return (error); + /* + * We don't allow taking snapshots of inconsistent datasets, such as + * those into which we are currently receiving. However, if we are + * creating this snapshot as part of a receive, this check will be + * executed atomically with respect to the completion of the receive + * itself but prior to the clearing of DS_FLAG_INCONSISTENT; in this + * case we ignore this, knowing it will be fixed up for us shortly in + * dmu_recv_end_sync(). + */ + if (!recv && DS_IS_INCONSISTENT(ds)) + return (SET_ERROR(EBUSY)); + error = dsl_dataset_snapshot_reserve_space(ds, tx); if (error != 0) return (error); @@ -1056,7 +1068,7 @@ dsl_dataset_snapshot_check(void *arg, dm error = dsl_dataset_hold(dp, dsname, FTAG, &ds); if (error == 0) { error = dsl_dataset_snapshot_check_impl(ds, - atp + 1, tx); + atp + 1, tx, B_FALSE); dsl_dataset_rele(ds, FTAG); } @@ -1322,7 +1334,8 @@ dsl_dataset_snapshot_tmp_check(void *arg if (error != 0) return (error); - error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, tx); + error = dsl_dataset_snapshot_check_impl(ds, ddsta->ddsta_snapname, + tx, B_FALSE); if (error != 0) { dsl_dataset_rele(ds, FTAG); return (error); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 20:45:27 2013 (r253818) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 21:02:09 2013 (r253819) @@ -251,7 +251,7 @@ int dsl_dataset_clone_swap_check_impl(ds void dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone, dsl_dataset_t *origin_head, dmu_tx_t *tx); int dsl_dataset_snapshot_check_impl(dsl_dataset_t *ds, const char *snapname, - dmu_tx_t *tx); + dmu_tx_t *tx, boolean_t recv); void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 30 20:45:27 2013 (r253818) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h Tue Jul 30 21:02:09 2013 (r253819) @@ -143,6 +143,7 @@ typedef enum { ZFS_PROP_CLONES, ZFS_PROP_LOGICALUSED, ZFS_PROP_LOGICALREFERENCED, + ZFS_PROP_INCONSISTENT, /* not exposed to the user */ ZFS_NUM_PROPS } zfs_prop_t; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 21:14:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 884C4229; Tue, 30 Jul 2013 21:14:27 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from caravan.chchile.org (caravan.chchile.org [178.32.125.136]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3D92B82; Tue, 30 Jul 2013 21:14:26 +0000 (UTC) Received: by caravan.chchile.org (Postfix, from userid 1000) id 86214B70CD; Tue, 30 Jul 2013 21:14:19 +0000 (UTC) Date: Tue, 30 Jul 2013 23:14:19 +0200 From: Jeremie Le Hen To: Justin Hibbits Subject: Re: svn commit: r253756 - head/sys/dev/wi Message-ID: <20130730211419.GH13628@caravan.chchile.org> Mail-Followup-To: Justin Hibbits , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201307290539.r6T5dKsE054386@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201307290539.r6T5dKsE054386@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:14:27 -0000 On Mon, Jul 29, 2013 at 05:39:20AM +0000, Justin Hibbits wrote: > Author: jhibbits > Date: Mon Jul 29 05:39:20 2013 > New Revision: 253756 > URL: http://svnweb.freebsd.org/changeset/base/253756 > > Log: > Use the streaming functions for reading/writing the BAP fields on wi(4). This > fixes wi(4) device access on big endian architectures. > > PR: kern/164499 > Reviewed by: adrian > Obtained from: NetBSD That's funny that this commit comes right after Adrian's proposal to remove wi(4) :). -- Jeremie Le Hen Scientists say the world is made up of Protons, Neutrons and Electrons. They forgot to mention Morons. From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 21:20:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6700343B; Tue, 30 Jul 2013 21:20:14 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 44F7E2BCE; Tue, 30 Jul 2013 21:20:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6ULKEf3073644; Tue, 30 Jul 2013 21:20:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6ULKD8q073634; Tue, 30 Jul 2013 21:20:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302120.r6ULKD8q073634@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 21:20:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253820 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:20:14 -0000 Author: delphij Date: Tue Jul 30 21:20:12 2013 New Revision: 253820 URL: http://svnweb.freebsd.org/changeset/base/253820 Log: MFV r253782: To quote Illumos issue #3888: When 'zfs recv -F' is used with an incremental recv it rolls back any changes made since the last snapshot in case new changes were made to the file system while the recv is in progress (without -F the recv would fail when it does it's final check to commit the recv-ed data as the recv-ed data conflicts with the newly written data). However, if there is a snapshot taken after the recv began rolling back to the 'latest' snapshot will not help and the recv will still fail. 'zfs recv -F' should be extended to destroy any snapshots created since the source snapshot when finishing the recv (effectively rolling back through all snapshots, instead of just to the latest snapshot). Illumos ZFS issues: 3888 zfs recv -F should destroy any snapshots created since the incremental source MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 21:02:09 2013 (r253819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 21:20:12 2013 (r253820) @@ -683,6 +683,7 @@ typedef struct dmu_recv_begin_arg { const char *drba_origin; dmu_recv_cookie_t *drba_cookie; cred_t *drba_cred; + uint64_t drba_snapobj; } dmu_recv_begin_arg_t; static int @@ -693,11 +694,6 @@ recv_begin_check_existing_impl(dmu_recv_ int error; dsl_pool_t *dp = ds->ds_dir->dd_pool; - /* must not have any changes since most recent snapshot */ - if (!drba->drba_cookie->drc_force && - dsl_dataset_modified_since_lastsnap(ds)) - return (SET_ERROR(ETXTBSY)); - /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, @@ -713,41 +709,47 @@ recv_begin_check_existing_impl(dmu_recv_ return (error == 0 ? EEXIST : error); if (fromguid != 0) { - /* if incremental, most recent snapshot must match fromguid */ - if (ds->ds_prev == NULL) + dsl_dataset_t *snap; + uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + + /* Find snapshot in this dir that matches fromguid. */ + while (obj != 0) { + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (SET_ERROR(ENODEV)); + if (snap->ds_dir != ds->ds_dir) { + dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ENODEV)); + } + if (snap->ds_phys->ds_guid == fromguid) + break; + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + } + if (obj == 0) return (SET_ERROR(ENODEV)); - /* - * most recent snapshot must match fromguid, or there are no - * changes since the fromguid one - */ - if (ds->ds_prev->ds_phys->ds_guid != fromguid) { - uint64_t birth = ds->ds_prev->ds_phys->ds_bp.blk_birth; - uint64_t obj = ds->ds_prev->ds_phys->ds_prev_snap_obj; - while (obj != 0) { - dsl_dataset_t *snap; - error = dsl_dataset_hold_obj(dp, obj, FTAG, - &snap); - if (error != 0) - return (SET_ERROR(ENODEV)); - if (snap->ds_phys->ds_creation_txg < birth) { - dsl_dataset_rele(snap, FTAG); - return (SET_ERROR(ENODEV)); - } - if (snap->ds_phys->ds_guid == fromguid) { - dsl_dataset_rele(snap, FTAG); - break; /* it's ok */ - } - obj = snap->ds_phys->ds_prev_snap_obj; + if (drba->drba_cookie->drc_force) { + drba->drba_snapobj = obj; + } else { + /* + * If we are not forcing, there must be no + * changes since fromsnap. + */ + if (dsl_dataset_modified_since_snap(ds, snap)) { dsl_dataset_rele(snap, FTAG); + return (SET_ERROR(ETXTBSY)); } - if (obj == 0) - return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_prev->ds_object; } + + dsl_dataset_rele(snap, FTAG); } else { /* if full, most recent snapshot must be $ORIGIN */ if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) return (SET_ERROR(ENODEV)); + drba->drba_snapobj = ds->ds_phys->ds_prev_snap_obj; } return (0); @@ -856,8 +858,14 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t error = dsl_dataset_hold(dp, tofs, FTAG, &ds); if (error == 0) { /* create temporary clone */ + dsl_dataset_t *snap = NULL; + if (drba->drba_snapobj != 0) { + VERIFY0(dsl_dataset_hold_obj(dp, + drba->drba_snapobj, FTAG, &snap)); + } dsobj = dsl_dataset_create_sync(ds->ds_dir, recv_clone_name, - ds->ds_prev, crflags, drba->drba_cred, tx); + snap, crflags, drba->drba_cred, tx); + dsl_dataset_rele(snap, FTAG); dsl_dataset_rele(ds, FTAG); } else { dsl_dir_t *dd; @@ -1601,6 +1609,32 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head); if (error != 0) return (error); + if (drc->drc_force) { + /* + * We will destroy any snapshots in tofs (i.e. before + * origin_head) that are after the origin (which is + * the snap before drc_ds, because drc_ds can not + * have any snaps of its own). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + error = dsl_dataset_hold_obj(dp, obj, FTAG, + &snap); + if (error != 0) + return (error); + if (snap->ds_dir != origin_head->ds_dir) + error = SET_ERROR(EINVAL); + if (error == 0) { + error = dsl_destroy_snapshot_check_impl( + snap, B_FALSE); + } + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_dataset_rele(snap, FTAG); + if (error != 0) + return (error); + } + } error = dsl_dataset_clone_swap_check_impl(drc->drc_ds, origin_head, drc->drc_force, drc->drc_owner, tx); if (error != 0) { @@ -1635,6 +1669,27 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t VERIFY0(dsl_dataset_hold(dp, drc->drc_tofs, FTAG, &origin_head)); + + if (drc->drc_force) { + /* + * Destroy any snapshots of drc_tofs (origin_head) + * after the origin (the snap before drc_ds). + */ + uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; + while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + dsl_dataset_t *snap; + VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, + &snap)); + ASSERT3P(snap->ds_dir, ==, origin_head->ds_dir); + obj = snap->ds_phys->ds_prev_snap_obj; + dsl_destroy_snapshot_sync_impl(snap, + B_FALSE, tx); + dsl_dataset_rele(snap, FTAG); + } + } + VERIFY3P(drc->drc_ds->ds_prev, ==, + origin_head->ds_prev); + dsl_dataset_clone_swap_sync_impl(drc->drc_ds, origin_head, tx); dsl_dataset_snapshot_sync_impl(origin_head, Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 21:02:09 2013 (r253819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jul 30 21:20:12 2013 (r253820) @@ -1593,16 +1593,16 @@ dsl_dataset_space(dsl_dataset_t *ds, } boolean_t -dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds) +dsl_dataset_modified_since_snap(dsl_dataset_t *ds, dsl_dataset_t *snap) { dsl_pool_t *dp = ds->ds_dir->dd_pool; ASSERT(dsl_pool_config_held(dp)); - if (ds->ds_prev == NULL) + if (snap == NULL) return (B_FALSE); if (ds->ds_phys->ds_bp.blk_birth > - ds->ds_prev->ds_phys->ds_creation_txg) { - objset_t *os, *os_prev; + snap->ds_phys->ds_creation_txg) { + objset_t *os, *os_snap; /* * It may be that only the ZIL differs, because it was * reset in the head. Don't count that as being @@ -1610,10 +1610,10 @@ dsl_dataset_modified_since_lastsnap(dsl_ */ if (dmu_objset_from_ds(ds, &os) != 0) return (B_TRUE); - if (dmu_objset_from_ds(ds->ds_prev, &os_prev) != 0) + if (dmu_objset_from_ds(snap, &os_snap) != 0) return (B_TRUE); return (bcmp(&os->os_phys->os_meta_dnode, - &os_prev->os_phys->os_meta_dnode, + &os_snap->os_phys->os_meta_dnode, sizeof (os->os_phys->os_meta_dnode)) != 0); } return (B_FALSE); @@ -2436,15 +2436,14 @@ dsl_dataset_clone_swap_check_impl(dsl_da dsl_dataset_is_snapshot(origin_head)) return (SET_ERROR(EINVAL)); - /* the branch point should be just before them */ - if (clone->ds_prev != origin_head->ds_prev) + /* if we are not forcing, the branch point should be just before them */ + if (!force && clone->ds_prev != origin_head->ds_prev) return (SET_ERROR(EINVAL)); /* clone should be the clone (unless they are unrelated) */ if (clone->ds_prev != NULL && clone->ds_prev != clone->ds_dir->dd_pool->dp_origin_snap && - origin_head->ds_object != - clone->ds_prev->ds_phys->ds_next_snap_obj) + origin_head->ds_dir != clone->ds_prev->ds_dir) return (SET_ERROR(EINVAL)); /* the clone should be a child of the origin */ @@ -2452,7 +2451,8 @@ dsl_dataset_clone_swap_check_impl(dsl_da return (SET_ERROR(EINVAL)); /* origin_head shouldn't be modified unless 'force' */ - if (!force && dsl_dataset_modified_since_lastsnap(origin_head)) + if (!force && + dsl_dataset_modified_since_snap(origin_head, origin_head->ds_prev)) return (SET_ERROR(ETXTBSY)); /* origin_head should have no long holds (e.g. is not mounted) */ @@ -2489,6 +2489,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat ASSERT(clone->ds_reserved == 0); ASSERT(origin_head->ds_quota == 0 || clone->ds_phys->ds_unique_bytes <= origin_head->ds_quota); + ASSERT3P(clone->ds_prev, ==, origin_head->ds_prev); dmu_buf_will_dirty(clone->ds_dbuf, tx); dmu_buf_will_dirty(origin_head->ds_dbuf, tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jul 30 21:02:09 2013 (r253819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c Tue Jul 30 21:20:12 2013 (r253820) @@ -46,10 +46,7 @@ typedef struct dmu_snapshots_destroy_arg nvlist_t *dsda_errlist; } dmu_snapshots_destroy_arg_t; -/* - * ds must be owned. - */ -static int +int dsl_destroy_snapshot_check_impl(dsl_dataset_t *ds, boolean_t defer) { if (!dsl_dataset_is_snapshot(ds)) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 21:02:09 2013 (r253819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Tue Jul 30 21:20:12 2013 (r253820) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2013 Steven Hartland. All rights reserved. */ @@ -206,7 +206,8 @@ void dsl_dataset_set_blkptr(dsl_dataset_ spa_t *dsl_dataset_get_spa(dsl_dataset_t *ds); -boolean_t dsl_dataset_modified_since_lastsnap(dsl_dataset_t *ds); +boolean_t dsl_dataset_modified_since_snap(dsl_dataset_t *ds, + dsl_dataset_t *snap); void dsl_dataset_sync(dsl_dataset_t *os, zio_t *zio, dmu_tx_t *tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h Tue Jul 30 21:02:09 2013 (r253819) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h Tue Jul 30 21:20:12 2013 (r253820) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -35,15 +35,16 @@ struct nvlist; struct dsl_dataset; struct dmu_tx; -int dsl_destroy_snapshots_nvl(struct nvlist *snaps, boolean_t defer, - struct nvlist *errlist); -int dsl_destroy_snapshot(const char *name, boolean_t defer); -int dsl_destroy_head(const char *name); -int dsl_destroy_head_check_impl(struct dsl_dataset *ds, int expected_holds); -void dsl_destroy_head_sync_impl(struct dsl_dataset *ds, struct dmu_tx *tx); -int dsl_destroy_inconsistent(const char *dsname, void *arg); -void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *ds, - boolean_t defer, struct dmu_tx *tx); +int dsl_destroy_snapshots_nvl(struct nvlist *, boolean_t, + struct nvlist *); +int dsl_destroy_snapshot(const char *, boolean_t); +int dsl_destroy_head(const char *); +int dsl_destroy_head_check_impl(struct dsl_dataset *, int); +void dsl_destroy_head_sync_impl(struct dsl_dataset *, struct dmu_tx *); +int dsl_destroy_inconsistent(const char *, void *); +int dsl_destroy_snapshot_check_impl(struct dsl_dataset *, boolean_t); +void dsl_destroy_snapshot_sync_impl(struct dsl_dataset *, + boolean_t, struct dmu_tx *); #ifdef __cplusplus } From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 21:35:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D357165F; Tue, 30 Jul 2013 21:35:03 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B100B2C3A; Tue, 30 Jul 2013 21:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6ULZ3tr079758; Tue, 30 Jul 2013 21:35:03 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6ULZ2tu079748; Tue, 30 Jul 2013 21:35:02 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307302135.r6ULZ2tu079748@svn.freebsd.org> From: Xin LI Date: Tue, 30 Jul 2013 21:35:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253821 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:35:04 -0000 Author: delphij Date: Tue Jul 30 21:35:02 2013 New Revision: 253821 URL: http://svnweb.freebsd.org/changeset/base/253821 Log: MFV r253783: Skip eviction step of processing free records when doing ZFS receive to avoid the expensive search operation of non-existent dbufs in dn_dbufs. Illumos ZFS issues: 3834 incremental replication of 'holey' file systems is slow MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Jul 30 21:20:12 2013 (r253820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Tue Jul 30 21:35:02 2013 (r253821) @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -796,9 +797,12 @@ dbuf_unoverride(dbuf_dirty_record_t *dr) /* * Evict (if its unreferenced) or clear (if its referenced) any level-0 * data blocks in the free range, so that any future readers will find - * empty blocks. Also, if we happen accross any level-1 dbufs in the + * empty blocks. Also, if we happen across any level-1 dbufs in the * range that have not already been marked dirty, mark them dirty so * they stay in memory. + * + * This is a no-op if the dataset is in the middle of an incremental + * receive; see comment below for details. */ void dbuf_free_range(dnode_t *dn, uint64_t start, uint64_t end, dmu_tx_t *tx) @@ -814,6 +818,20 @@ dbuf_free_range(dnode_t *dn, uint64_t st last_l1 = end >> epbs; } dprintf_dnode(dn, "start=%llu end=%llu\n", start, end); + + if (dmu_objset_is_receiving(dn->dn_objset)) { + /* + * When processing a free record from a zfs receive, + * there should have been no previous modifications to the + * data in this range. Therefore there should be no dbufs + * in the range. Searching dn_dbufs for these non-existent + * dbufs can be very expensive, so simply ignore this. + */ + VERIFY3P(dbuf_find(dn, 0, start), ==, NULL); + VERIFY3P(dbuf_find(dn, 0, end), ==, NULL); + return; + } + mutex_enter(&dn->dn_dbufs_mtx); for (db = list_head(&dn->dn_dbufs); db; db = db_next) { db_next = list_next(&dn->dn_dbufs, db); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 21:20:12 2013 (r253820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Tue Jul 30 21:35:02 2013 (r253821) @@ -96,6 +96,32 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o { struct drr_free *drrf = &(dsp->dsa_drr->drr_u.drr_free); + /* + * When we receive a free record, dbuf_free_range() assumes + * that the receiving system doesn't have any dbufs in the range + * being freed. This is always true because there is a one-record + * constraint: we only send one WRITE record for any given + * object+offset. We know that the one-record constraint is + * true because we always send data in increasing order by + * object,offset. + * + * If the increasing-order constraint ever changes, we should find + * another way to assert that the one-record constraint is still + * satisfied. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + + /* + * If we are doing a non-incremental send, then there can't + * be any data in the dataset we're receiving into. Therefore + * a free record would simply be a no-op. Save space by not + * sending it to begin with. + */ + if (!dsp->dsa_incremental) + return (0); + if (length != -1ULL && offset + length < offset) length = -1ULL; @@ -162,6 +188,15 @@ dump_data(dmu_sendarg_t *dsp, dmu_object { struct drr_write *drrw = &(dsp->dsa_drr->drr_u.drr_write); + /* + * We send data in increasing object, offset order. + * See comment in dump_free() for details. + */ + ASSERT(object > dsp->dsa_last_data_object || + (object == dsp->dsa_last_data_object && + offset > dsp->dsa_last_data_offset)); + dsp->dsa_last_data_object = object; + dsp->dsa_last_data_offset = offset + blksz - 1; /* * If there is any kind of pending aggregation (currently either @@ -229,6 +264,10 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin { struct drr_freeobjects *drrfo = &(dsp->dsa_drr->drr_u.drr_freeobjects); + /* See comment in dump_free(). */ + if (!dsp->dsa_incremental) + return (0); + /* * If there is a pending op, but it's not PENDING_FREEOBJECTS, * push it out, since free block aggregation can only be done for @@ -305,9 +344,9 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t if (dump_bytes(dsp, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) return (SET_ERROR(EINTR)); - /* free anything past the end of the file */ + /* Free anything past the end of the file. */ if (dump_free(dsp, object, (dnp->dn_maxblkid + 1) * - (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL)) + (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL) != 0) return (SET_ERROR(EINTR)); if (dsp->dsa_err != 0) return (SET_ERROR(EINTR)); @@ -495,6 +534,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_toguid = ds->ds_phys->ds_guid; ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); dsp->dsa_pending_op = PENDING_NONE; + dsp->dsa_incremental = (fromtxg != 0); mutex_enter(&ds->ds_sendstream_lock); list_insert_head(&ds->ds_sendstreams, dsp); @@ -1819,3 +1859,13 @@ dmu_recv_end(dmu_recv_cookie_t *drc, voi else return (dmu_recv_existing_end(drc)); } + +/* + * Return TRUE if this objset is currently being received into. + */ +boolean_t +dmu_objset_is_receiving(objset_t *os) +{ + return (os->os_dsl_dataset != NULL && + os->os_dsl_dataset->ds_owner == dmu_recv_tag); +} Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Jul 30 21:20:12 2013 (r253820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Tue Jul 30 21:35:02 2013 (r253821) @@ -587,8 +587,7 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t { dmu_tx_hold_t *txh; dnode_t *dn; - uint64_t start, end, i; - int err, shift; + int err; zio_t *zio; ASSERT(tx->tx_txg == 0); @@ -599,34 +598,48 @@ dmu_tx_hold_free(dmu_tx_t *tx, uint64_t return; dn = txh->txh_dnode; - /* first block */ - if (off != 0) - dmu_tx_count_write(txh, off, 1); - /* last block */ - if (len != DMU_OBJECT_END) - dmu_tx_count_write(txh, off+len, 1); - - dmu_tx_count_dnode(txh); - if (off >= (dn->dn_maxblkid+1) * dn->dn_datablksz) return; if (len == DMU_OBJECT_END) len = (dn->dn_maxblkid+1) * dn->dn_datablksz - off; + dmu_tx_count_dnode(txh); + /* - * For i/o error checking, read the first and last level-0 - * blocks, and all the level-1 blocks. The above count_write's - * have already taken care of the level-0 blocks. + * For i/o error checking, we read the first and last level-0 + * blocks if they are not aligned, and all the level-1 blocks. + * + * Note: dbuf_free_range() assumes that we have not instantiated + * any level-0 dbufs that will be completely freed. Therefore we must + * exercise care to not read or count the first and last blocks + * if they are blocksize-aligned. + */ + if (dn->dn_datablkshift == 0) { + dmu_tx_count_write(txh, off, len); + } else { + /* first block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off, 1); + /* last block will be modified if it is not aligned */ + if (!IS_P2ALIGNED(off + len, 1 << dn->dn_datablkshift)) + dmu_tx_count_write(txh, off+len, 1); + } + + /* + * Check level-1 blocks. */ if (dn->dn_nlevels > 1) { - shift = dn->dn_datablkshift + dn->dn_indblkshift - + int shift = dn->dn_datablkshift + dn->dn_indblkshift - SPA_BLKPTRSHIFT; - start = off >> shift; - end = dn->dn_datablkshift ? ((off+len) >> shift) : 0; + uint64_t start = off >> shift; + uint64_t end = (off + len) >> shift; + + ASSERT(dn->dn_datablkshift != 0); + ASSERT(dn->dn_indblkshift != 0); zio = zio_root(tx->tx_pool->dp_spa, NULL, NULL, ZIO_FLAG_CANFAIL); - for (i = start; i <= end; i++) { + for (uint64_t i = start; i <= end; i++) { uint64_t ibyte = i << shift; err = dnode_next_offset(dn, 0, &ibyte, 2, 1, 0); i = ibyte >> shift; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h Tue Jul 30 21:20:12 2013 (r253820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_impl.h Tue Jul 30 21:35:02 2013 (r253821) @@ -21,8 +21,11 @@ /* * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + */ +/* * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #ifndef _SYS_DMU_IMPL_H @@ -293,6 +296,9 @@ typedef struct dmu_sendarg { uint64_t dsa_toguid; int dsa_err; dmu_pendop_t dsa_pending_op; + boolean_t dsa_incremental; + uint64_t dsa_last_data_object; + uint64_t dsa_last_data_offset; } dmu_sendarg_t; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h Tue Jul 30 21:20:12 2013 (r253820) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h Tue Jul 30 21:35:02 2013 (r253821) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -74,5 +74,6 @@ int dmu_recv_stream(dmu_recv_cookie_t *d #endif int cleanup_fd, uint64_t *action_handlep); int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner); +boolean_t dmu_objset_is_receiving(objset_t *os); #endif /* _DMU_SEND_H */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 21:41:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 95BE982A; Tue, 30 Jul 2013 21:41:02 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 24F1E2C75; Tue, 30 Jul 2013 21:41:01 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.7/8.14.7/ALCHEMY.FRANKEN.DE) with ESMTP id r6ULf02Z061591; Tue, 30 Jul 2013 23:41:00 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.7/8.14.7/Submit) id r6ULf0CT061590; Tue, 30 Jul 2013 23:41:00 +0200 (CEST) (envelope-from marius) Date: Tue, 30 Jul 2013 23:41:00 +0200 From: Marius Strobl To: Edward Tomasz Napiera?a Subject: Re: svn commit: r249410 - in head/sys: amd64/conf arm/conf cam/ctl conf i386/conf ia64/conf modules/ctl sparc64/conf Message-ID: <20130730214100.GO56034@alchemy.franken.de> References: <201304121625.r3CGP3Dv068400@svn.freebsd.org> <20130729203848.GG948@alchemy.franken.de> <517A021B-6C7B-48C3-9AC2-CBA937BBAC80@FreeBSD.org> <20130730202820.GM56034@alchemy.franken.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ken@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 21:41:02 -0000 On Tue, Jul 30, 2013 at 10:40:49PM +0200, Edward Tomasz Napiera?a wrote: > Wiadomo?? napisana przez Marius Strobl w dniu 30 lip 2013, o godz. 22:28: > > On Tue, Jul 30, 2013 at 09:57:21PM +0200, Edward Tomasz Napiera?a wrote: > >> Wiadomo?? napisana przez Marius Strobl w dniu 29 lip 2013, o godz. 22:38: > >>> On Fri, Apr 12, 2013 at 04:25:03PM +0000, Edward Tomasz Napierala wrote: > >>>> Author: trasz > >>>> Date: Fri Apr 12 16:25:03 2013 > >>>> New Revision: 249410 > >>>> URL: http://svnweb.freebsd.org/changeset/base/249410 > >>>> > >>>> Log: > >>>> Remove ctl(4) from GENERIC. Also remove 'options CTL_DISABLE' > >>>> and kern.cam.ctl.disable tunable; those were introduced as a workaround > >>>> to make it possible to boot GENERIC on low memory machines. > >>>> > >>>> With ctl(4) being built as a module and automatically loaded by ctladm(8), > >>>> this makes CTL work out of the box. > >>>> > >>> > >>> Uhm, shouldn't r249328 and the above change be MFCed to stable/9 in > >>> order to reduce the default memory footprint there? > >> > >> Yup, my bad. I'm waiting for reply from re@ whether it's a good thing > >> to do at this point of the release process. > >> > > > > Yeah, I saw that request and was looking into what it would actually > > take to remove ctl(4) from GENERICs in stable/9. Unfortunately, it's > > not exactly as straight forward as MFCing the two above revisions 1:1. > > For one, IMO kern.cam.ctl.disable shouldn't be removed there in case > > someone uses an old kernel configuration file having "device ctl" but > > relies on that tunable to work. That's no big deal, though, and makes > > the merge even less intrusive. However, the real problem is that ctl.ko > > currently is globally disabled in stable/9 as it doesn't build with PAE/ > > XEN. Actually, the compiler is right to complain as a 32-bit void-pointer > > is casted to a 64-bit integer in that case. What I don't get so far is > > why on earth this doesn't break compilation in head ... > > Damn. Now that you mention it... yeah, it was me who disconnected it, > in r249530. I had no idea what's going on either. > Well, could be a clang vs. GCC thing but I currently can't build an i386 world from head with GCC due to yet another breakage in order to verify that *sigh*. Anyway, it seems support for bus address still is to be properly implemented in ctl(4) so it doesn't make much sense to fiddle with making that part compile on all architectures. The bottom line probably is that the least intrusive thing to do is to request an approval for a direct commit to stable/9 reverting r249530 but disabling ctl.ko for XEN with something like the below patch. I did run that through a universe build and it didn't break anything. Marius Index: i386/conf/XEN =================================================================== --- i386/conf/XEN (revision 253803) +++ i386/conf/XEN (working copy) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Index: modules/Makefile =================================================================== --- modules/Makefile (revision 253803) +++ modules/Makefile (working copy) @@ -76,6 +76,7 @@ SUBDIR= \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ + ctl \ ${_cxgb} \ cxgbe \ ${_cyclic} \ From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 22:57:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0608F407; Tue, 30 Jul 2013 22:57:14 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CCD9D2EF4; Tue, 30 Jul 2013 22:57:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UMvDLg003578; Tue, 30 Jul 2013 22:57:13 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UMvDho003574; Tue, 30 Jul 2013 22:57:13 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307302257.r6UMvDho003574@svn.freebsd.org> From: Scott Long Date: Tue, 30 Jul 2013 22:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253822 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 22:57:14 -0000 Author: scottl Date: Tue Jul 30 22:57:12 2013 New Revision: 253822 URL: http://svnweb.freebsd.org/changeset/base/253822 Log: Add a 'surrender' mode to fsck_ffs. With the -S flag, once hard read errors are encountered, the fsck will stop instead of wasting time chewing through possibly other errors. Obtained from: Netflix MFC after: 3 days Modified: head/sbin/fsck_ffs/fsck.h head/sbin/fsck_ffs/fsutil.c head/sbin/fsck_ffs/main.c Modified: head/sbin/fsck_ffs/fsck.h ============================================================================== --- head/sbin/fsck_ffs/fsck.h Tue Jul 30 21:35:02 2013 (r253821) +++ head/sbin/fsck_ffs/fsck.h Tue Jul 30 22:57:12 2013 (r253822) @@ -324,6 +324,7 @@ char skipclean; /* skip clean file syst int fsmodified; /* 1 => write done to file system */ int fsreadfd; /* file descriptor for reading file system */ int fswritefd; /* file descriptor for writing file system */ +int surrender; /* Give up if reads fail */ ufs2_daddr_t maxfsblock; /* number of blocks in the file system */ char *blockmap; /* ptr to primary blk allocation map */ Modified: head/sbin/fsck_ffs/fsutil.c ============================================================================== --- head/sbin/fsck_ffs/fsutil.c Tue Jul 30 21:35:02 2013 (r253821) +++ head/sbin/fsck_ffs/fsutil.c Tue Jul 30 22:57:12 2013 (r253822) @@ -549,7 +549,18 @@ blread(int fd, char *buf, ufs2_daddr_t b slowio_end(); return (0); } - rwerror("READ BLK", blk); + + /* + * This is handled specially here instead of in rwerror because + * rwerror is used for all sorts of errors, not just true read/write + * errors. It should be refactored and fixed. + */ + if (surrender) { + pfatal("CANNOT READ_BLK: %ld", (long)blk); + errx(EEXIT, "ABORTING DUE TO READ ERRORS"); + } else + rwerror("READ BLK", blk); + if (lseek(fd, offset, 0) < 0) rwerror("SEEK BLK", blk); errs = 0; Modified: head/sbin/fsck_ffs/main.c ============================================================================== --- head/sbin/fsck_ffs/main.c Tue Jul 30 21:35:02 2013 (r253821) +++ head/sbin/fsck_ffs/main.c Tue Jul 30 22:57:12 2013 (r253822) @@ -82,7 +82,7 @@ main(int argc, char *argv[]) sync(); skipclean = 1; inoopt = 0; - while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:npryZ")) != -1) { + while ((ch = getopt(argc, argv, "b:Bc:CdEfFm:nprSyZ")) != -1) { switch (ch) { case 'b': skipclean = 0; @@ -142,6 +142,10 @@ main(int argc, char *argv[]) inoopt++; break; + case 'S': + surrender = 1; + break; + case 'y': yflag++; nflag = 0; From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 23:26:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E22A72B; Tue, 30 Jul 2013 23:26:06 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8262FB2; Tue, 30 Jul 2013 23:26:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UNQ6iv012599; Tue, 30 Jul 2013 23:26:06 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UNQ5w5012596; Tue, 30 Jul 2013 23:26:05 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307302326.r6UNQ5w5012596@svn.freebsd.org> From: Scott Long Date: Tue, 30 Jul 2013 23:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253823 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 23:26:06 -0000 Author: scottl Date: Tue Jul 30 23:26:05 2013 New Revision: 253823 URL: http://svnweb.freebsd.org/changeset/base/253823 Log: Create a knob, kern.ipc.sfreadahead, that allows one to tune the amount of readahead that sendfile() will do. Default remains the same. Obtained from: Netflix MFC after: 3 days Modified: head/sys/kern/kern_mutex.c head/sys/kern/subr_uio.c head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Jul 30 22:57:12 2013 (r253822) +++ head/sys/kern/kern_mutex.c Tue Jul 30 23:26:05 2013 (r253823) @@ -218,13 +218,14 @@ __mtx_lock_flags(volatile uintptr_t *c, KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, ("mtx_lock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); - WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, - file, line, NULL); + WITNESS_CHECKORDER(&m->lock_object, (opts & ~MTX_RECURSE) | + LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); __mtx_lock(m, curthread, opts, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); - WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); + WITNESS_LOCK(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_EXCLUSIVE, + file, line); curthread->td_locks++; } @@ -271,9 +272,11 @@ __mtx_lock_spin_flags(volatile uintptr_t ("mtx_lock_spin() of sleep mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); if (mtx_owned(m)) - KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, + KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || + (opts & MTX_RECURSE) != 0, ("mtx_lock_spin: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); + opts &= ~MTX_RECURSE; WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); __mtx_lock_spin(m, curthread, opts, file, line); @@ -335,12 +338,14 @@ _mtx_trylock_flags_(volatile uintptr_t * ("mtx_trylock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); - if (mtx_owned(m) && (m->lock_object.lo_flags & LO_RECURSABLE) != 0) { + if (mtx_owned(m) && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || + (opts & MTX_RECURSE) != 0)) { m->mtx_recurse++; atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); rval = 1; } else rval = _mtx_obtain_lock(m, (uintptr_t)curthread); + opts &= ~MTX_RECURSE; LOCK_LOG_TRY("LOCK", &m->lock_object, opts, rval, file, line); if (rval) { @@ -391,15 +396,18 @@ __mtx_lock_sleep(volatile uintptr_t *c, m = mtxlock2mtx(c); if (mtx_owned(m)) { - KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, + KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || + (opts & MTX_RECURSE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); + opts &= ~MTX_RECURSE; m->mtx_recurse++; atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_sleep: %p recursing", m); return; } + opts &= ~MTX_RECURSE; #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Tue Jul 30 22:57:12 2013 (r253822) +++ head/sys/kern/subr_uio.c Tue Jul 30 23:26:05 2013 (r253823) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef SOCKET_SEND_COW #include @@ -122,7 +123,12 @@ retry: if (uobject->backing_object != NULL) pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); } - vm_page_insert(kern_pg, uobject, upindex); + if (vm_page_insert(kern_pg, uobject, upindex)) { + VM_OBJECT_WUNLOCK(uobject); + VM_WAIT; + VM_OBJECT_WLOCK(uobject); + goto retry; + } vm_page_dirty(kern_pg); VM_OBJECT_WUNLOCK(uobject); vm_map_lookup_done(map, entry); Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Tue Jul 30 22:57:12 2013 (r253822) +++ head/sys/kern/uipc_syscalls.c Tue Jul 30 23:26:05 2013 (r253823) @@ -122,6 +122,7 @@ counter_u64_t sfstat[sizeof(struct sfsta int nsfbufs; int nsfbufspeak; int nsfbufsused; +static int sfreadahead = MAXPHYS / MAXBSIZE; SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, "Maximum number of sendfile(2) sf_bufs available"); @@ -129,6 +130,9 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsp "Number of sendfile(2) sf_bufs at peak usage"); SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufsused, CTLFLAG_RD, &nsfbufsused, 0, "Number of sendfile(2) sf_bufs in use"); +SYSCTL_INT(_kern_ipc, OID_AUTO, sfreadahead, CTLFLAG_RW, &sfreadahead, 0, + "Number of sendfile(2) read-ahead MAXBSIZE blocks"); + static void sfstat_init(const void *unused) @@ -2240,6 +2244,7 @@ retry_space: error = EBUSY; else { ssize_t resid; + int readahead = sfreadahead * MAXBSIZE; /* * Ensure that our page is still around @@ -2255,9 +2260,9 @@ retry_space: * wrong, but is consistent with our original * implementation. */ - error = vn_rdwr(UIO_READ, vp, NULL, MAXBSIZE, + error = vn_rdwr(UIO_READ, vp, NULL, readahead, trunc_page(off), UIO_NOCOPY, IO_NODELOCKED | - IO_VMIO | ((MAXBSIZE / bsize) << IO_SEQSHIFT), + IO_VMIO | ((readahead / bsize) << IO_SEQSHIFT), td->td_ucred, NOCRED, &resid, td); VM_OBJECT_WLOCK(obj); vm_page_io_finish(pg); From owner-svn-src-all@FreeBSD.ORG Tue Jul 30 23:50:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 349EEC18; Tue, 30 Jul 2013 23:50:10 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 223F82080; Tue, 30 Jul 2013 23:50:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UNo91a018729; Tue, 30 Jul 2013 23:50:09 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UNo99V018727; Tue, 30 Jul 2013 23:50:09 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307302350.r6UNo99V018727@svn.freebsd.org> From: Scott Long Date: Tue, 30 Jul 2013 23:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253824 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 23:50:10 -0000 Author: scottl Date: Tue Jul 30 23:50:09 2013 New Revision: 253824 URL: http://svnweb.freebsd.org/changeset/base/253824 Log: Fix r253823. Some WIP patches snuck in. Submitted by: zont Modified: head/sys/kern/kern_mutex.c head/sys/kern/subr_uio.c Modified: head/sys/kern/kern_mutex.c ============================================================================== --- head/sys/kern/kern_mutex.c Tue Jul 30 23:26:05 2013 (r253823) +++ head/sys/kern/kern_mutex.c Tue Jul 30 23:50:09 2013 (r253824) @@ -218,14 +218,13 @@ __mtx_lock_flags(volatile uintptr_t *c, KASSERT(LOCK_CLASS(&m->lock_object) == &lock_class_mtx_sleep, ("mtx_lock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); - WITNESS_CHECKORDER(&m->lock_object, (opts & ~MTX_RECURSE) | - LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); + WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, + file, line, NULL); __mtx_lock(m, curthread, opts, file, line); LOCK_LOG_LOCK("LOCK", &m->lock_object, opts, m->mtx_recurse, file, line); - WITNESS_LOCK(&m->lock_object, (opts & ~MTX_RECURSE) | LOP_EXCLUSIVE, - file, line); + WITNESS_LOCK(&m->lock_object, opts | LOP_EXCLUSIVE, file, line); curthread->td_locks++; } @@ -272,11 +271,9 @@ __mtx_lock_spin_flags(volatile uintptr_t ("mtx_lock_spin() of sleep mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); if (mtx_owned(m)) - KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || - (opts & MTX_RECURSE) != 0, + KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, ("mtx_lock_spin: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); - opts &= ~MTX_RECURSE; WITNESS_CHECKORDER(&m->lock_object, opts | LOP_NEWORDER | LOP_EXCLUSIVE, file, line, NULL); __mtx_lock_spin(m, curthread, opts, file, line); @@ -338,14 +335,12 @@ _mtx_trylock_flags_(volatile uintptr_t * ("mtx_trylock() of spin mutex %s @ %s:%d", m->lock_object.lo_name, file, line)); - if (mtx_owned(m) && ((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || - (opts & MTX_RECURSE) != 0)) { + if (mtx_owned(m) && (m->lock_object.lo_flags & LO_RECURSABLE) != 0) { m->mtx_recurse++; atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); rval = 1; } else rval = _mtx_obtain_lock(m, (uintptr_t)curthread); - opts &= ~MTX_RECURSE; LOCK_LOG_TRY("LOCK", &m->lock_object, opts, rval, file, line); if (rval) { @@ -396,18 +391,15 @@ __mtx_lock_sleep(volatile uintptr_t *c, m = mtxlock2mtx(c); if (mtx_owned(m)) { - KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0 || - (opts & MTX_RECURSE) != 0, + KASSERT((m->lock_object.lo_flags & LO_RECURSABLE) != 0, ("_mtx_lock_sleep: recursed on non-recursive mutex %s @ %s:%d\n", m->lock_object.lo_name, file, line)); - opts &= ~MTX_RECURSE; m->mtx_recurse++; atomic_set_ptr(&m->mtx_lock, MTX_RECURSED); if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_sleep: %p recursing", m); return; } - opts &= ~MTX_RECURSE; #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); Modified: head/sys/kern/subr_uio.c ============================================================================== --- head/sys/kern/subr_uio.c Tue Jul 30 23:26:05 2013 (r253823) +++ head/sys/kern/subr_uio.c Tue Jul 30 23:50:09 2013 (r253824) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #ifdef SOCKET_SEND_COW #include @@ -123,12 +122,7 @@ retry: if (uobject->backing_object != NULL) pmap_remove(map->pmap, uaddr, uaddr + PAGE_SIZE); } - if (vm_page_insert(kern_pg, uobject, upindex)) { - VM_OBJECT_WUNLOCK(uobject); - VM_WAIT; - VM_OBJECT_WLOCK(uobject); - goto retry; - } + vm_page_insert(kern_pg, uobject, upindex); vm_page_dirty(kern_pg); VM_OBJECT_WUNLOCK(uobject); vm_map_lookup_done(map, entry); From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 00:07:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 07488E40; Wed, 31 Jul 2013 00:07:48 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CB53220F9; Wed, 31 Jul 2013 00:07:47 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V07l3R018774; Wed, 31 Jul 2013 00:07:47 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6V07lSY018771; Wed, 31 Jul 2013 00:07:47 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 17:07:46 -0700 From: "David O'Brien" To: Andrey Chernov Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130731000746.GA65806@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F6E0AB.3010001@freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 00:07:48 -0000 On Tue, Jul 30, 2013 at 01:37:47AM +0400, Andrey Chernov wrote: > On 30.07.2013 0:58, David E. O'Brien wrote: > > Decouple yarrow from random(4) device. .. > > We currently have 3 random_adaptors: > > + yarrow > > + rdrand (ivy.c) > > + nehemeiah > > After this commit we again have a problem with badly initialized arc4 > (for rdrand and nehemiah cases, when yarrow isn't loaded), because only > yarrow have reinit code. I believe you're talking about this code in sys/libkern/arc4random.c:arc4rand() if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, ARC4_ENTR_SEED) || reseed || (arc4_numruns > ARC4_RESEED_BYTES) || (tv.tv_sec > arc4_t_reseed)) arc4_randomstir(); Without setting 'arc4rand_iniseed_state' from ARC4_ENTR_NONE -> ARC4_ENTR_HAVE, we would still call arc4_randomstir() periodically due to (tv.tv_sec > arc4_t_reseed) and (arc4_numruns > ARC4_RESEED_BYTES). The lacking part is forcing a arc4_randomstir() call the next arc4rand()/arc4random() call after the PRNG is initialized. However, I don't think this has a large impact. But, this situation isn't the big issue. We have an existing bug where if one is using a hardware RNG, read_random() never gets changed from simply being read_random_phony() due to random_modevent() not calling random_yarrow_init_harvester() thru '(*random_systat->init)()'. Thus arc4random() has been weak for thus using the Intel RDRAND or Via Padlock. This is something we're going to address, but this commit is an infrastructure improvement commit (decoupling one thing from another), not addressing existing bugs or short comings. thoughts? -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 00:15:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8A189FD5; Wed, 31 Jul 2013 00:15:52 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71FFF2122; Wed, 31 Jul 2013 00:15:52 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V0FqRA021379; Wed, 31 Jul 2013 00:15:52 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6V0Fq1C021376; Wed, 31 Jul 2013 00:15:52 GMT (envelope-from obrien) Date: Tue, 30 Jul 2013 17:15:51 -0700 From: "David O'Brien" To: Andrey Chernov Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130731001551.GA67237@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> <20130731000746.GA65806@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130731000746.GA65806@dragon.NUXI.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 00:15:52 -0000 On Tue, Jul 30, 2013 at 05:07:46PM -0700, David O'Brien (@FreeBSD) wrote: > I believe you're talking about this code in > sys/libkern/arc4random.c:arc4rand() > > if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, > ARC4_ENTR_SEED) || reseed || > (arc4_numruns > ARC4_RESEED_BYTES) || > (tv.tv_sec > arc4_t_reseed)) > arc4_randomstir(); Looking at this, seems to me that it would be more optimized if we tested the things that are most likely to be TRUE first instead of those things most likely to be FALSE? ARC4_ENTR_HAVE->ARC4_ENTR_SEED can only happen once per boot, and the 'reseed' flag is '0' in the majority of the arc4rand() callers. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 01:07:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 986F4686 for ; Wed, 31 Jul 2013 01:07:40 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-x234.google.com (mail-bk0-x234.google.com [IPv6:2a00:1450:4008:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 26B6C2293 for ; Wed, 31 Jul 2013 01:07:39 +0000 (UTC) Received: by mail-bk0-f52.google.com with SMTP id e11so27362bkh.39 for ; Tue, 30 Jul 2013 18:07:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:cc:content-type; bh=3Kjk7rHOUtQS85W1MZScO+Kit2vkyg1PQq/AI/c1TOE=; b=EiVu+1a5McZanvawXCxERC3JhLvZIdHSVDoaNR7eW/gf+L3aPWY3HnAEyAz7Dp52Lh M8CQX66Oz4SlKdmtzZCZ78nnq/Os8v/58IAMRJZAPIJRZjbPEoS3l2Hsbhpjanoz49Ao mjYwfJolCPPrUpvwnuYm2DFixoJQSDKSrVKLMWbWM4ZXPOfa52VAVyd7uW7s47OAwdj3 caSJVhKNaB31k/JyxBlkppQ4Sp5flhrRi/hMr/mrZkRU5BbwlQYb590Xl7g8BjTngdwM uqzoZEoFZ2Spadfd00TeHoB06ZnXRbC6kyatnHGfHk5EiUJiVvXfEKUgOTZsXHjjo+3j rokw== MIME-Version: 1.0 X-Received: by 10.205.22.138 with SMTP id qw10mt10949850bkb.29.1375232858318; Tue, 30 Jul 2013 18:07:38 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.204.9.148 with HTTP; Tue, 30 Jul 2013 18:07:37 -0700 (PDT) Received: by 10.204.9.148 with HTTP; Tue, 30 Jul 2013 18:07:37 -0700 (PDT) In-Reply-To: <20130730211419.GH13628@caravan.chchile.org> References: <201307290539.r6T5dKsE054386@svn.freebsd.org> <20130730211419.GH13628@caravan.chchile.org> Date: Tue, 30 Jul 2013 18:07:37 -0700 X-Google-Sender-Auth: JlCgWRqxtp3VpqGzfRPjmz5PQLs Message-ID: Subject: Re: svn commit: r253756 - head/sys/dev/wi From: Justin Hibbits Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 01:07:40 -0000 On Jul 30, 2013 2:14 PM, "Jeremie Le Hen" wrote: > > On Mon, Jul 29, 2013 at 05:39:20AM +0000, Justin Hibbits wrote: > > Author: jhibbits > > Date: Mon Jul 29 05:39:20 2013 > > New Revision: 253756 > > URL: http://svnweb.freebsd.org/changeset/base/253756 > > > > Log: > > Use the streaming functions for reading/writing the BAP fields on wi(4). This > > fixes wi(4) device access on big endian architectures. > > > > PR: kern/164499 > > Reviewed by: adrian > > Obtained from: NetBSD > > That's funny that this commit comes right after Adrian's proposal to > remove wi(4) :). > > -- > Jeremie Le Hen It's two years in the making. I have one more, too, coming in a few minutes, also strongly encouraged by Adrian :-) - Justin From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 01:13:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6A989875; Wed, 31 Jul 2013 01:13:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 47B8022CD; Wed, 31 Jul 2013 01:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V1DVOA044881; Wed, 31 Jul 2013 01:13:31 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V1DUKY044876; Wed, 31 Jul 2013 01:13:30 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201307310113.r6V1DUKY044876@svn.freebsd.org> From: Justin Hibbits Date: Wed, 31 Jul 2013 01:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 01:13:31 -0000 Author: jhibbits Date: Wed Jul 31 01:13:29 2013 New Revision: 253825 URL: http://svnweb.freebsd.org/changeset/base/253825 Log: Add the macio attachment for wi(4). Partially obtained from NetBSD. Reviewed by: adrian Obtained from: NetBSD (partially) Added: head/sys/dev/wi/if_wi_macio.c (contents, props changed) Modified: head/sys/modules/Makefile head/sys/modules/wi/Makefile head/sys/powerpc/powermac/macio.c head/sys/powerpc/powermac/maciovar.h Added: head/sys/dev/wi/if_wi_macio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/wi/if_wi_macio.c Wed Jul 31 01:13:29 2013 (r253825) @@ -0,0 +1,141 @@ +/*- + * Copyright (c) 2013 Justin Hibbits + * All rights reserved. + * Copyright (c) 1997, 1998, 1999 + * Bill Paul . All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Bill Paul. + * 4. Neither the name of the author nor the names of any co-contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF + * THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Lucent WaveLAN/IEEE 802.11 MacIO attachment for FreeBSD. + * + * Based on the PCMCIA driver + * Written by Bill Paul + * Electrical Engineering Department + * Columbia University, New York City + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +static int wi_macio_probe(device_t); +static int wi_macio_attach(device_t); + +static device_method_t wi_macio_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, wi_macio_probe), + DEVMETHOD(device_attach, wi_macio_attach), + DEVMETHOD(device_detach, wi_detach), + DEVMETHOD(device_shutdown, wi_shutdown), + + { 0, 0 } +}; + +static driver_t wi_macio_driver = { + "wi", + wi_macio_methods, + sizeof(struct wi_softc) +}; + +DRIVER_MODULE(wi, macio, wi_macio_driver, wi_devclass, 0, 0); +MODULE_DEPEND(wi, wlan, 1, 1, 1); + +static int +wi_macio_probe(device_t dev) +{ + const char *name, *compat; + + /* Make sure we're a network driver */ + name = ofw_bus_get_name(dev); + if (name == NULL) + return (ENXIO); + + if (strcmp(name, "radio") != 0) { + return ENXIO; + } + compat = ofw_bus_get_compat(dev); + if (strcmp(compat, "wireless") != 0) { + return ENXIO; + } + + device_set_desc(dev, "Apple Airport"); + return 0; +} + +static int +wi_macio_attach(device_t dev) +{ + struct wi_softc *sc; + int error; + + sc = device_get_softc(dev); + sc->wi_gone = 0; + sc->wi_bus_type = 0; + + error = wi_alloc(dev, 0); + if (error == 0) { + /* Make sure interrupts are disabled. */ + CSR_WRITE_2(sc, WI_INT_EN, 0); + CSR_WRITE_2(sc, WI_EVENT_ACK, 0xFFFF); + + error = wi_attach(dev); + if (error != 0) + wi_free(dev); + } + return error; +} Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Jul 30 23:50:09 2013 (r253824) +++ head/sys/modules/Makefile Wed Jul 31 01:13:29 2013 (r253825) @@ -826,6 +826,7 @@ _sound= sound .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris .endif +_wi= wi .endif .if ${MACHINE_ARCH} == "powerpc64" Modified: head/sys/modules/wi/Makefile ============================================================================== --- head/sys/modules/wi/Makefile Tue Jul 30 23:50:09 2013 (r253824) +++ head/sys/modules/wi/Makefile Wed Jul 31 01:13:29 2013 (r253825) @@ -6,5 +6,15 @@ KMOD= if_wi SRCS= if_wi.c if_wi_pccard.c if_wi_pci.c \ card_if.h device_if.h bus_if.h pci_if.h pccarddevs.h \ opt_wlan.h +.if ${MACHINE_CPUARCH} == "powerpc" +SRCS+= if_wi_macio.c +SRCS+= ofw_bus_if.h +.endif + + +.if ${MACHINE_CPUARCH} == "powerpc" +SRCS+= if_wi_macio.c +SRCS+= ofw_bus_if.h +.endif .include Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Tue Jul 30 23:50:09 2013 (r253824) +++ head/sys/powerpc/powermac/macio.c Wed Jul 31 01:13:29 2013 (r253825) @@ -605,3 +605,47 @@ macio_get_devinfo(device_t dev, device_t dinfo = device_get_ivars(child); return (&dinfo->mdi_obdinfo); } + +int +macio_enable_wireless(device_t dev, bool enable) +{ + struct macio_softc *sc = device_get_softc(dev); + uint32_t x; + + if (enable) { + x = bus_read_4(sc->sc_memr, KEYLARGO_FCR2); + x |= 0x4; + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, x); + + /* Enable card slot. */ + bus_write_1(sc->sc_memr, KEYLARGO_GPIO_BASE + 0x0f, 5); + DELAY(1000); + bus_write_1(sc->sc_memr, KEYLARGO_GPIO_BASE + 0x0f, 4); + DELAY(1000); + x = bus_read_4(sc->sc_memr, KEYLARGO_FCR2); + x &= ~0x80000000; + + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, x); + /* out8(gpio + 0x10, 4); */ + + bus_write_1(sc->sc_memr, KEYLARGO_EXTINT_GPIO_REG_BASE + 0x0b, 0); + bus_write_1(sc->sc_memr, KEYLARGO_EXTINT_GPIO_REG_BASE + 0x0a, 0x28); + bus_write_1(sc->sc_memr, KEYLARGO_EXTINT_GPIO_REG_BASE + 0x0d, 0x28); + bus_write_1(sc->sc_memr, KEYLARGO_GPIO_BASE + 0x0d, 0x28); + bus_write_1(sc->sc_memr, KEYLARGO_GPIO_BASE + 0x0e, 0x28); + bus_write_4(sc->sc_memr, 0x1c000, 0); + + /* Initialize the card. */ + bus_write_4(sc->sc_memr, 0x1a3e0, 0x41); + x = bus_read_4(sc->sc_memr, KEYLARGO_FCR2); + x |= 0x80000000; + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, x); + } else { + x = bus_read_4(sc->sc_memr, KEYLARGO_FCR2); + x &= ~0x4; + bus_write_4(sc->sc_memr, KEYLARGO_FCR2, x); + /* out8(gpio + 0x10, 0); */ + } + + return (0); +} Modified: head/sys/powerpc/powermac/maciovar.h ============================================================================== --- head/sys/powerpc/powermac/maciovar.h Tue Jul 30 23:50:09 2013 (r253824) +++ head/sys/powerpc/powermac/maciovar.h Wed Jul 31 01:13:29 2013 (r253825) @@ -43,10 +43,15 @@ #define HEATHROW_FCR 0x38 #define KEYLARGO_FCR0 0x38 #define KEYLARGO_FCR1 0x3c +#define KEYLARGO_FCR2 0x40 #define FCR_ENET_ENABLE 0x60000000 #define FCR_ENET_RESET 0x80000000 +/* Used only by macio_enable_wireless() for now. */ +#define KEYLARGO_GPIO_BASE 0x6a +#define KEYLARGO_EXTINT_GPIO_REG_BASE 0x58 + /* * Format of a macio reg property entry. */ @@ -66,4 +71,6 @@ struct macio_devinfo { struct resource_list mdi_resources; }; +extern int macio_enable_wireless(device_t dev, bool enable); + #endif /* _MACIO_MACIOVAR_H_ */ From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 01:43:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3DDD9B74; Wed, 31 Jul 2013 01:43:00 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BD522365; Wed, 31 Jul 2013 01:43:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V1h02o053500; Wed, 31 Jul 2013 01:43:00 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V1h0rO053494; Wed, 31 Jul 2013 01:43:00 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201307310143.r6V1h0rO053494@svn.freebsd.org> From: Justin Hibbits Date: Wed, 31 Jul 2013 01:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253826 - head/sys/modules/wi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 01:43:00 -0000 Author: jhibbits Date: Wed Jul 31 01:42:59 2013 New Revision: 253826 URL: http://svnweb.freebsd.org/changeset/base/253826 Log: Remove duplicate SRCS include block. Spotted by jmallett. Modified: head/sys/modules/wi/Makefile Modified: head/sys/modules/wi/Makefile ============================================================================== --- head/sys/modules/wi/Makefile Wed Jul 31 01:13:29 2013 (r253825) +++ head/sys/modules/wi/Makefile Wed Jul 31 01:42:59 2013 (r253826) @@ -6,11 +6,6 @@ KMOD= if_wi SRCS= if_wi.c if_wi_pccard.c if_wi_pci.c \ card_if.h device_if.h bus_if.h pci_if.h pccarddevs.h \ opt_wlan.h -.if ${MACHINE_CPUARCH} == "powerpc" -SRCS+= if_wi_macio.c -SRCS+= ofw_bus_if.h -.endif - .if ${MACHINE_CPUARCH} == "powerpc" SRCS+= if_wi_macio.c From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 01:58:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 06739DC4 for ; Wed, 31 Jul 2013 01:58:48 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f52.google.com (mail-la0-f52.google.com [209.85.215.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7DF7823E4 for ; Wed, 31 Jul 2013 01:58:46 +0000 (UTC) Received: by mail-la0-f52.google.com with SMTP id fq13so84484lab.25 for ; Tue, 30 Jul 2013 18:58:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=w47n9+4LrT+1w5tNPGSM6lsj+Z+QeoodjmUCLAWVe0s=; b=Z6tuDFQzwFwsg3p+9p4q8KWOHK+vSvo/HMcQ0EI4lmiWDYX2uu0ahVkOK2cw4hvDic 0kxCff/GQ89b8eRPjC67F30REKhcuucCVJjhNOgnjudBkmturkLHt32D7AgJtiGMSnBq DxRqJiocMIBwbaiOcIWFvxth/uZVSn2DXg6t0+WmgPqYl/iCi7leLPoHnh01AZbhYNCp Nd0VjZ4csk1nwJiJ8ypnDowI3TGrA31LvXRrw/l4eLoGg+vobX3Q+O6j7QuAmIFh3Bip QQwJgdakY+jE6LMczFETILacpx/go9xiSZgbS5l1iw620W+sbTjkUsDC+rrpBEG27+6D n2Fg== X-Received: by 10.112.5.199 with SMTP id u7mr28951057lbu.67.1375235925240; Tue, 30 Jul 2013 18:58:45 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id gh5sm286942lbc.12.2013.07.30.18.58.44 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 18:58:44 -0700 (PDT) Message-ID: <51F86F53.9020600@freebsd.org> Date: Wed, 31 Jul 2013 05:58:43 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> <20130731000746.GA65806@dragon.NUXI.org> In-Reply-To: <20130731000746.GA65806@dragon.NUXI.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQm0Edd9yGRXMs98GGYEomzymTIR5nqi9eAcw41qXwHjJ5SdPfIS3lgeyzQi/hqmO51kM+bR Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 01:58:48 -0000 On 31.07.2013 4:07, David O'Brien wrote: > I believe you're talking about this code in > sys/libkern/arc4random.c:arc4rand() > > if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, > ARC4_ENTR_SEED) || reseed || > (arc4_numruns > ARC4_RESEED_BYTES) || > (tv.tv_sec > arc4_t_reseed)) > arc4_randomstir(); > > Without setting 'arc4rand_iniseed_state' from ARC4_ENTR_NONE -> > ARC4_ENTR_HAVE, we would still call arc4_randomstir() periodically due > to (tv.tv_sec > arc4_t_reseed) and (arc4_numruns > ARC4_RESEED_BYTES). The whole problem is that arc4 is poorly initialized right after boot, but immediately used in many places like tcp. It reseeds again only after 5 minutes after boot making vulnerability window at this interval. > But, this situation isn't the big issue. We have an existing bug where > if one is using a hardware RNG, read_random() never gets changed from > simply being read_random_phony() due to random_modevent() not calling > random_yarrow_init_harvester() thru '(*random_systat->init)()'. Thus > arc4random() has been weak for thus using the Intel RDRAND or Via > Padlock. I don't fix hardware RNG parts due to missing hardware for tests. They should have the same line as randomdev_soft.c somewhere. -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 02:13:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77AE1318; Wed, 31 Jul 2013 02:13:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 660B2246D; Wed, 31 Jul 2013 02:13:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V2DJFk062926; Wed, 31 Jul 2013 02:13:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V2DJm5062925; Wed, 31 Jul 2013 02:13:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307310213.r6V2DJm5062925@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Jul 2013 02:13:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253827 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 02:13:19 -0000 Author: rpaulo Date: Wed Jul 31 02:13:18 2013 New Revision: 253827 URL: http://svnweb.freebsd.org/changeset/base/253827 Log: When using tcpdump -I -i wlanN and wlanN is not a monitor mode VAP, tcpdump will print an error message saying rfmon is not supported. Give a concise explanation as to how one might solve this problem by creating a monitor mode VAP. Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Wed Jul 31 01:42:59 2013 (r253826) +++ head/contrib/tcpdump/tcpdump.c Wed Jul 31 02:13:18 2013 (r253827) @@ -71,6 +71,8 @@ extern int SIZE_BUF; #ifdef __FreeBSD__ #include #include +#include +#include #include #include #include @@ -1307,6 +1309,27 @@ main(int argc, char **argv) *cp != '\0') error("%s: %s\n(%s)", device, pcap_statustostr(status), cp); +#ifdef __FreeBSD__ + else if (status == PCAP_ERROR_RFMON_NOTSUP && + strncmp(device, "wlan", 4) == 0) { + char parent[8], newdev[8]; + char sysctl[32]; + size_t s = sizeof(parent); + + snprintf(sysctl, sizeof(sysctl), + "net.wlan.%d.%%parent", atoi(device + 4)); + sysctlbyname(sysctl, parent, &s, NULL, 0); + strlcpy(newdev, device, sizeof(newdev)); + /* Suggest a new wlan device. */ + newdev[strlen(newdev)-1]++; + error("%s is not a monitor mode VAP\n" + "To create a new monitor mode VAP use:\n" + " ifconfig %s create wlandev %s wlanmode " + "monitor\nand use %s as the tcpdump " + "interface", device, newdev, parent, + newdev); + } +#endif else error("%s: %s", device, pcap_statustostr(status)); From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 02:13:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9646C42A for ; Wed, 31 Jul 2013 02:13:30 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com [209.85.215.53]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 19771246E for ; Wed, 31 Jul 2013 02:13:29 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id el20so94242lab.12 for ; Tue, 30 Jul 2013 19:13:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=69tq1R+mszX5UOsO4qMDD0OXDDmMRO4nZbzyypQfNgI=; b=AwM2tHcgkn9IRHiYGAimGbDFFcDUoeUu8VWyO/SVhLYA1dB5qMGaQ0h5d+A9DSPG0b +qtWK56DL0hLkU3Nxh8JfJJt4PmRjLelSjjlGGgOktHozhRhsgzk/tidT1niN+RdA20E VmNemqwAD37lYGJW3N6T/jmjJZXrATAJAY8zDS8eOZzrPtwp+ILuQQxCLaWFhxAc5FAy Ku7MuQ9qZHjOP1Y4fMlXGHnxjTskh2fVheGS0bkoiCw5FQrzmqVs2o6X+6WRkz0gB60c /DsJQf8ga6K+ckZ8CdieVdZL10WoFvenTCyeHqQBDtBCgJ+0vmhZ8DEZj5AY3wISl6rC JTvg== X-Received: by 10.152.45.65 with SMTP id k1mr29928443lam.78.1375236807821; Tue, 30 Jul 2013 19:13:27 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id m1sm27204622lag.3.2013.07.30.19.13.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 30 Jul 2013 19:13:27 -0700 (PDT) Message-ID: <51F872C5.6020508@freebsd.org> Date: Wed, 31 Jul 2013 06:13:25 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> <20130731000746.GA65806@dragon.NUXI.org> <20130731001551.GA67237@dragon.NUXI.org> In-Reply-To: <20130731001551.GA67237@dragon.NUXI.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmwQBkW8mdCpwB/8LqS5LygcJugnlwwK6m0No5lomdm7AkAXjzXKIV+6v4cE52XPoGbauHc Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 02:13:30 -0000 On 31.07.2013 4:15, David O'Brien wrote: > On Tue, Jul 30, 2013 at 05:07:46PM -0700, David O'Brien (@FreeBSD) wrote: >> I believe you're talking about this code in >> sys/libkern/arc4random.c:arc4rand() >> >> if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, >> ARC4_ENTR_SEED) || reseed || >> (arc4_numruns > ARC4_RESEED_BYTES) || >> (tv.tv_sec > arc4_t_reseed)) >> arc4_randomstir(); > > Looking at this, seems to me that it would be more optimized if we tested > the things that are most likely to be TRUE first instead of those things > most likely to be FALSE? ARC4_ENTR_HAVE->ARC4_ENTR_SEED can only happen > once per boot, and the 'reseed' flag is '0' in the majority of the > arc4rand() callers. > This code can be called concurrently, so the first part is to reseed immediately if we have good entropy, making other threads wait for the lock released in arc4_randomstir() and arc4_t_reseed, arc4_numruns reset, so they don't call arc4_randomstir() in chain, if possible (small window still exists, as it was in original code). While there is no harm for arc4 algo itself to call arc4_randomstir() several times in line, it is just CPU waste. I don't touch the order of the rest conditions. -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 04:51:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5A098D91; Wed, 31 Jul 2013 04:51:13 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 48318295A; Wed, 31 Jul 2013 04:51:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V4pDPh010583; Wed, 31 Jul 2013 04:51:13 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V4pDbG010582; Wed, 31 Jul 2013 04:51:13 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307310451.r6V4pDbG010582@svn.freebsd.org> From: Scott Long Date: Wed, 31 Jul 2013 04:51:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253828 - head/sbin/fsck_ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 04:51:13 -0000 Author: scottl Date: Wed Jul 31 04:51:12 2013 New Revision: 253828 URL: http://svnweb.freebsd.org/changeset/base/253828 Log: Document the -S flag to fsck_ffs Obtained from: Netflix Modified: head/sbin/fsck_ffs/fsck_ffs.8 Modified: head/sbin/fsck_ffs/fsck_ffs.8 ============================================================================== --- head/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 31 02:13:18 2013 (r253827) +++ head/sbin/fsck_ffs/fsck_ffs.8 Wed Jul 31 04:51:12 2013 (r253828) @@ -29,7 +29,7 @@ .\" @(#)fsck.8 8.4 (Berkeley) 5/9/95 .\" $FreeBSD$ .\" -.Dd February 10, 2012 +.Dd July 30, 2013 .Dt FSCK_FFS 8 .Os .Sh NAME @@ -275,6 +275,11 @@ and frees up space that can allocated to The .Fl r option is ignored when running in preen mode. +.It Fl S +Surrender on error. +With this flag enabled, a hard error returned on disk i/o will cause +.Nm +to abort instead of continuing on and possibly tripping over more i/o errors. .It Fl y Assume a yes response to all questions asked by .Nm ; From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 05:03:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7FA50131; Wed, 31 Jul 2013 05:03:19 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 28F2F29D4; Wed, 31 Jul 2013 05:03:19 +0000 (UTC) Received: from kruse-124.4.ixsystems.com (drawbridge.ixsystems.com [206.40.55.65]) by elvis.mu.org (Postfix) with ESMTPSA id E51BD1A3C2C; Tue, 30 Jul 2013 22:03:12 -0700 (PDT) Message-ID: <51F89A91.1070806@mu.org> Date: Tue, 30 Jul 2013 22:03:13 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Alfred Perlstein , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r253719 - in head: sys/conf sys/dev/watchdog sys/libkern sys/sys usr.sbin/watchdogd References: <201307272047.r6RKl2vI023259@svn.freebsd.org> <20130730112447.GA54133@acme.spoerlein.net> In-Reply-To: <20130730112447.GA54133@acme.spoerlein.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 05:03:19 -0000 On 7/30/13 4:24 AM, Ulrich Spörlein wrote: > On Sat, 2013-07-27 at 20:47:02 +0000, Alfred Perlstein wrote: >> Author: alfred >> Date: Sat Jul 27 20:47:01 2013 >> New Revision: 253719 >> URL: http://svnweb.freebsd.org/changeset/base/253719 >> >> Log: >> Fix watchdog pretimeout. > Alfred, > > this broken the build and hasn't been fixed for almost three days now. > What's up with that? How was this change tested before commit? > > ===> usr.sbin/watchdogd (all) > cc -O2 -pipe -std=gnu99 -Qunused-arguments -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c /data/src/freebsd-head/usr.sbin/watchdogd/watchdogd.c > /data/src/freebsd-head/usr.sbin/watchdogd/watchdogd.c:777:18: error: comparison of integers of different signs: 'u_int' (aka 'unsigned int') and 'time_t' (aka 'int') [-Werror,-Wsign-compare] > if (pretimeout >= ts.tv_sec) { > ~~~~~~~~~~ ^ ~~~~~~~~~ > 1 error generated. > *** Error code 1 > Yikes! What? I did test this a ton of times. My apologies to all. Let me see what I can do. -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 05:12:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CD7F52D3; Wed, 31 Jul 2013 05:12:52 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9FAB62A12; Wed, 31 Jul 2013 05:12:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V5CquY017042; Wed, 31 Jul 2013 05:12:52 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V5CqL7017039; Wed, 31 Jul 2013 05:12:52 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201307310512.r6V5CqL7017039@svn.freebsd.org> From: Navdeep Parhar Date: Wed, 31 Jul 2013 05:12:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253829 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 05:12:52 -0000 Author: np Date: Wed Jul 31 05:12:51 2013 New Revision: 253829 URL: http://svnweb.freebsd.org/changeset/base/253829 Log: Display SGE tunables in the sysctl tree. dev.t5nex.0.fl_pktshift: payload DMA offset in rx buffer (bytes) dev.t5nex.0.fl_pad: payload pad boundary (bytes) dev.t5nex.0.spg_len: status page size (bytes) dev.t5nex.0.cong_drop: congestion drop setting Discussed with: scottl Modified: head/sys/dev/cxgbe/adapter.h head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/adapter.h ============================================================================== --- head/sys/dev/cxgbe/adapter.h Wed Jul 31 04:51:12 2013 (r253828) +++ head/sys/dev/cxgbe/adapter.h Wed Jul 31 05:12:51 2013 (r253829) @@ -801,6 +801,8 @@ void t4_init_sge_cpl_handlers(struct ada void t4_tweak_chip_settings(struct adapter *); int t4_read_chip_settings(struct adapter *); int t4_create_dma_tag(struct adapter *); +void t4_sge_sysctls(struct adapter *, struct sysctl_ctx_list *, + struct sysctl_oid_list *); int t4_destroy_dma_tag(struct adapter *); int t4_setup_adapter_queues(struct adapter *); int t4_teardown_adapter_queues(struct adapter *); Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Wed Jul 31 04:51:12 2013 (r253828) +++ head/sys/dev/cxgbe/t4_main.c Wed Jul 31 05:12:51 2013 (r253829) @@ -4223,6 +4223,8 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nfilters", CTLFLAG_RD, NULL, sc->tids.nftids, "number of filters"); + t4_sge_sysctls(sc, ctx, children); + #ifdef SBUF_DRAIN /* * dev.t4nex.X.misc. Marked CTLFLAG_SKIP to avoid information overload. Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Wed Jul 31 04:51:12 2013 (r253828) +++ head/sys/dev/cxgbe/t4_sge.c Wed Jul 31 05:12:51 2013 (r253829) @@ -498,6 +498,24 @@ t4_create_dma_tag(struct adapter *sc) return (rc); } +void +t4_sge_sysctls(struct adapter *sc, struct sysctl_ctx_list *ctx, + struct sysctl_oid_list *children) +{ + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pktshift", CTLFLAG_RD, + NULL, fl_pktshift, "payload DMA offset in rx buffer (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "fl_pad", CTLFLAG_RD, + NULL, fl_pad, "payload pad boundary (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "spg_len", CTLFLAG_RD, + NULL, spg_len, "status page size (bytes)"); + + SYSCTL_ADD_INT(ctx, children, OID_AUTO, "cong_drop", CTLFLAG_RD, + NULL, cong_drop, "congestion drop setting"); +} + int t4_destroy_dma_tag(struct adapter *sc) { From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 05:21:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3EBBA466; Wed, 31 Jul 2013 05:21:06 +0000 (UTC) (envelope-from bright@mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BADBE2A42; Wed, 31 Jul 2013 05:21:05 +0000 (UTC) Received: from kruse-124.4.ixsystems.com (drawbridge.ixsystems.com [206.40.55.65]) by elvis.mu.org (Postfix) with ESMTPSA id C67CB1A3C20; Tue, 30 Jul 2013 22:21:04 -0700 (PDT) Message-ID: <51F89EC0.9010205@mu.org> Date: Tue, 30 Jul 2013 22:21:04 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Glen Barber Subject: Re: svn commit: r253719 - in head: sys/conf sys/dev/watchdog sys/libkern sys/sys usr.sbin/watchdogd References: <201307272047.r6RKl2vI023259@svn.freebsd.org> <20130730112210.GE2571@glenbarber.us> In-Reply-To: <20130730112210.GE2571@glenbarber.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Alfred Perlstein , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 05:21:06 -0000 On 7/30/13 4:22 AM, Glen Barber wrote: > On Sat, Jul 27, 2013 at 08:47:02PM +0000, Alfred Perlstein wrote: >> Author: alfred >> Date: Sat Jul 27 20:47:01 2013 >> New Revision: 253719 >> URL: http://svnweb.freebsd.org/changeset/base/253719 >> >> Log: >> Fix watchdog pretimeout. >> >> The original API calls for pow2ns, however the new APIs from >> Linux call for seconds. >> >> We need to be able to convert to/from 2^Nns to seconds in both >> userland and kernel to fix this and properly compare units. >> >> Added: >> head/sys/libkern/flsll.c (contents, props changed) >> Modified: >> head/sys/conf/files >> head/sys/dev/watchdog/watchdog.c >> head/sys/sys/libkern.h >> head/usr.sbin/watchdogd/watchdogd.c >> >> Modified: head/sys/conf/files >> ============================================================================== >> --- head/sys/conf/files Sat Jul 27 20:15:18 2013 (r253718) >> +++ head/sys/conf/files Sat Jul 27 20:47:01 2013 (r253719) >> @@ -2976,6 +2976,7 @@ libkern/arc4random.c standard >> libkern/bcd.c standard >> libkern/bsearch.c standard >> libkern/crc32.c standard >> +libkern/flsll.c standard >> libkern/fnmatch.c standard >> libkern/iconv.c optional libiconv >> libkern/iconv_converter_if.m optional libiconv >> >> Modified: head/sys/dev/watchdog/watchdog.c >> ============================================================================== >> --- head/sys/dev/watchdog/watchdog.c Sat Jul 27 20:15:18 2013 (r253718) >> +++ head/sys/dev/watchdog/watchdog.c Sat Jul 27 20:47:01 2013 (r253719) >> @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> #include >> #include >> @@ -60,10 +61,56 @@ static int wd_softtimeout_act = WD_SOFT_ >> >> static struct cdev *wd_dev; >> static volatile u_int wd_last_u; /* last timeout value set by kern_do_pat */ >> +static u_int wd_last_u_sysctl; /* last timeout value set by kern_do_pat */ >> +static u_int wd_last_u_sysctl_secs; /* wd_last_u in seconds */ >> + >> +SYSCTL_NODE(_hw, OID_AUTO, watchdog, CTLFLAG_RD, 0, "Main watchdog device"); >> +SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u, CTLFLAG_RD, >> + &wd_last_u_sysctl, 0, "Watchdog last update time"); >> +SYSCTL_UINT(_hw_watchdog, OID_AUTO, wd_last_u_secs, CTLFLAG_RD, >> + &wd_last_u_sysctl_secs, 0, "Watchdog last update time"); >> >> static int wd_lastpat_valid = 0; >> static time_t wd_lastpat = 0; /* when the watchdog was last patted */ >> >> +static void >> +pow2ns_to_ts(int pow2ns, struct timespec *ts) >> +{ >> + uint64_t ns; >> + >> + ns = 1ULL << pow2ns; >> + ts->tv_sec = ns / 1000000000ULL; >> + ts->tv_nsec = ns % 1000000000ULL; >> +} >> + >> +static int >> +pow2ns_to_ticks(int pow2ns) >> +{ >> + struct timeval tv; >> + struct timespec ts; >> + >> + pow2ns_to_ts(pow2ns, &ts); >> + TIMESPEC_TO_TIMEVAL(&tv, &ts); >> + return (tvtohz(&tv)); >> +} >> + >> +static int >> +seconds_to_pow2ns(int seconds) >> +{ >> + uint64_t power; >> + uint64_t ns; >> + uint64_t shifted; >> + >> + ns = ((uint64_t)seconds) * 1000000000ULL; >> + power = flsll(ns); >> + shifted = 1ULL << power; >> + if (shifted <= ns) { >> + power++; >> + } >> + return (power); >> +} >> + >> + >> int >> wdog_kern_pat(u_int utim) >> { >> @@ -86,6 +133,8 @@ wdog_kern_pat(u_int utim) >> * This can be zero (to disable the watchdog) >> */ >> wd_last_u = (utim & WD_INTERVAL); >> + wd_last_u_sysctl = wd_last_u; >> + wd_last_u_sysctl_secs = pow2ns_to_ticks(wd_last_u) / hz; >> } >> if ((utim & WD_INTERVAL) == WD_TO_NEVER) { >> utim = 0; >> @@ -101,7 +150,7 @@ wdog_kern_pat(u_int utim) >> callout_stop(&wd_softtimeo_handle); >> } else { >> (void) callout_reset(&wd_softtimeo_handle, >> - hz*utim, wd_timeout_cb, "soft"); >> + pow2ns_to_ticks(utim), wd_timeout_cb, "soft"); >> } >> error = 0; >> } else { >> @@ -201,10 +250,13 @@ static int >> wd_set_pretimeout(int newtimeout, int disableiftoolong) >> { >> u_int utime; >> + struct timespec utime_ts; >> + int timeout_ticks; >> >> utime = wdog_kern_last_timeout(); >> + pow2ns_to_ts(utime, &utime_ts); >> /* do not permit a pre-timeout >= than the timeout. */ >> - if (newtimeout >= utime) { >> + if (newtimeout >= utime_ts.tv_sec) { >> /* >> * If 'disableiftoolong' then just fall through >> * so as to disable the pre-watchdog >> @@ -222,8 +274,22 @@ wd_set_pretimeout(int newtimeout, int di >> return 0; >> } >> >> + timeout_ticks = pow2ns_to_ticks(utime) - (hz*newtimeout); >> +#if 0 >> + printf("wd_set_pretimeout: " >> + "newtimeout: %d, " >> + "utime: %d -> utime_ticks: %d, " >> + "hz*newtimeout: %d, " >> + "timeout_ticks: %d -> sec: %d\n", >> + newtimeout, >> + utime, pow2ns_to_ticks(utime), >> + hz*newtimeout, >> + timeout_ticks, timeout_ticks / hz); >> +#endif >> + >> /* We determined the value is sane, so reset the callout */ >> - (void) callout_reset(&wd_pretimeo_handle, hz*(utime - newtimeout), >> + (void) callout_reset(&wd_pretimeo_handle, >> + timeout_ticks, >> wd_timeout_cb, "pre-timeout"); >> wd_pretimeout = newtimeout; >> return 0; >> @@ -282,7 +348,7 @@ wd_ioctl(struct cdev *dev __unused, u_lo >> break; >> case WDIOC_SETTIMEOUT: >> u = *(u_int *)data; >> - error = wdog_kern_pat(u); >> + error = wdog_kern_pat(seconds_to_pow2ns(u)); >> break; >> case WDIOC_GETTIMEOUT: >> u = wdog_kern_last_timeout(); >> >> Added: head/sys/libkern/flsll.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/libkern/flsll.c Sat Jul 27 20:47:01 2013 (r253719) >> @@ -0,0 +1,47 @@ >> +/*- >> + * Copyright (c) 1990, 1993 >> + * The Regents of the University of California. All rights reserved. >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the distribution. >> + * 4. Neither the name of the University nor the names of its contributors >> + * may be used to endorse or promote products derived from this software >> + * without specific prior written permission. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND >> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE >> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT >> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY >> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> + >> +#include >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +/* >> + * Find Last Set bit >> + */ >> +int >> +flsll(long long mask) >> +{ >> + int bit; >> + >> + if (mask == 0) >> + return (0); >> + for (bit = 1; mask != 1; bit++) >> + mask = (unsigned long long)mask >> 1; >> + return (bit); >> +} >> >> Modified: head/sys/sys/libkern.h >> ============================================================================== >> --- head/sys/sys/libkern.h Sat Jul 27 20:15:18 2013 (r253718) >> +++ head/sys/sys/libkern.h Sat Jul 27 20:47:01 2013 (r253719) >> @@ -94,6 +94,10 @@ int fls(int); >> #ifndef HAVE_INLINE_FLSL >> int flsl(long); >> #endif >> +#ifndef HAVE_INLINE_FLSLL >> +int flsll(long long); >> +#endif >> + >> int fnmatch(const char *, const char *, int); >> int locc(int, char *, u_int); >> void *memchr(const void *s, int c, size_t n); >> >> Modified: head/usr.sbin/watchdogd/watchdogd.c >> ============================================================================== >> --- head/usr.sbin/watchdogd/watchdogd.c Sat Jul 27 20:15:18 2013 (r253718) >> +++ head/usr.sbin/watchdogd/watchdogd.c Sat Jul 27 20:47:01 2013 (r253719) >> @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); >> #include >> #include >> #include >> +#include >> #include >> >> #include >> @@ -58,19 +59,24 @@ __FBSDID("$FreeBSD$"); >> >> #include >> >> +static long fetchtimeout(int opt, const char *longopt, const char *myoptarg); >> static void parseargs(int, char *[]); >> +static int seconds_to_pow2ns(int); >> static void sighandler(int); >> static void watchdog_loop(void); >> static int watchdog_init(void); >> static int watchdog_onoff(int onoff); >> static int watchdog_patpat(u_int timeout); >> static void usage(void); >> +static int tstotv(struct timeval *tv, struct timespec *ts); >> +static int tvtohz(struct timeval *tv); >> >> static int debugging = 0; >> static int end_program = 0; >> static const char *pidfile = _PATH_VARRUN "watchdogd.pid"; >> static u_int timeout = WD_TO_128SEC; >> static u_int pretimeout = 0; >> +static u_int timeout_sec; >> static u_int passive = 0; >> static int is_daemon = 0; >> static int is_dry_run = 0; /* do not arm the watchdog, only >> @@ -183,6 +189,59 @@ main(int argc, char *argv[]) >> } >> } >> >> +static void >> +pow2ns_to_ts(int pow2ns, struct timespec *ts) >> +{ >> + uint64_t ns; >> + >> + ns = 1ULL << pow2ns; >> + ts->tv_sec = ns / 1000000000ULL; >> + ts->tv_nsec = ns % 1000000000ULL; >> +} >> + >> +/* >> + * Convert a timeout in seconds to N where 2^N nanoseconds is close to >> + * "seconds". >> + * >> + * The kernel expects the timeouts for watchdogs in "2^N nanosecond format". >> + */ >> +static u_int >> +parse_timeout_to_pow2ns(char opt, const char *longopt, const char *myoptarg) >> +{ >> + double a; >> + u_int rv; >> + struct timespec ts; >> + struct timeval tv; >> + int ticks; >> + char shortopt[] = "- "; >> + >> + if (!longopt) >> + shortopt[1] = opt; >> + >> + a = fetchtimeout(opt, longopt, myoptarg); >> + >> + if (a == 0) >> + rv = WD_TO_NEVER; >> + else >> + rv = seconds_to_pow2ns(a); >> + pow2ns_to_ts(rv, &ts); >> + tstotv(&tv, &ts); >> + ticks = tvtohz(&tv); >> + if (debugging) { >> + printf("Timeout for %s%s " >> + "is 2^%d nanoseconds " >> + "(in: %s sec -> out: %ld sec %ld ns -> %d ticks)\n", >> + longopt ? "-" : "", longopt ? longopt : shortopt, >> + rv, >> + myoptarg, ts.tv_sec, ts.tv_nsec, ticks); >> + } >> + if (ticks <= 0) { >> + errx(1, "Timeout for %s%s is too small, please choose a higher timeout.", longopt ? "-" : "", longopt ? longopt : shortopt); >> + } >> + >> + return (rv); >> +} >> + >> /* >> * Catch signals and begin shutdown process. >> */ >> @@ -513,6 +572,110 @@ timeout_act_str2int(const char *lopt, co >> return rv; >> } >> >> +int >> +tstotv(struct timeval *tv, struct timespec *ts) >> +{ >> + >> + tv->tv_sec = ts->tv_sec; >> + tv->tv_usec = ts->tv_nsec / 1000; >> + return 0; >> +} >> + >> +/* >> + * Convert a timeval to a number of ticks. >> + * Mostly copied from the kernel. >> + */ >> +int >> +tvtohz(struct timeval *tv) >> +{ >> + register unsigned long ticks; >> + register long sec, usec; >> + int hz; >> + size_t hzsize; >> + int error; >> + int tick; >> + >> + hzsize = sizeof(hz); >> + >> + error = sysctlbyname("kern.hz", &hz, &hzsize, NULL, 0); >> + if (error) >> + err(1, "sysctlbyname kern.hz"); >> + >> + tick = 1000000 / hz; >> + >> + /* >> + * If the number of usecs in the whole seconds part of the time >> + * difference fits in a long, then the total number of usecs will >> + * fit in an unsigned long. Compute the total and convert it to >> + * ticks, rounding up and adding 1 to allow for the current tick >> + * to expire. Rounding also depends on unsigned long arithmetic >> + * to avoid overflow. >> + * >> + * Otherwise, if the number of ticks in the whole seconds part of >> + * the time difference fits in a long, then convert the parts to >> + * ticks separately and add, using similar rounding methods and >> + * overflow avoidance. This method would work in the previous >> + * case but it is slightly slower and assumes that hz is integral. >> + * >> + * Otherwise, round the time difference down to the maximum >> + * representable value. >> + * >> + * If ints have 32 bits, then the maximum value for any timeout in >> + * 10ms ticks is 248 days. >> + */ >> + sec = tv->tv_sec; >> + usec = tv->tv_usec; >> + if (usec < 0) { >> + sec--; >> + usec += 1000000; >> + } >> + if (sec < 0) { >> +#ifdef DIAGNOSTIC >> + if (usec > 0) { >> + sec++; >> + usec -= 1000000; >> + } >> + printf("tvotohz: negative time difference %ld sec %ld usec\n", >> + sec, usec); >> +#endif >> + ticks = 1; >> + } else if (sec <= LONG_MAX / 1000000) >> + ticks = (sec * 1000000 + (unsigned long)usec + (tick - 1)) >> + / tick + 1; >> + else if (sec <= LONG_MAX / hz) >> + ticks = sec * hz >> + + ((unsigned long)usec + (tick - 1)) / tick + 1; >> + else >> + ticks = LONG_MAX; >> + if (ticks > INT_MAX) >> + ticks = INT_MAX; >> + return ((int)ticks); >> +} >> + >> +static int >> +seconds_to_pow2ns(int seconds) >> +{ >> + uint64_t power; >> + uint64_t ns; >> + uint64_t shifted; >> + >> + if (seconds <= 0) >> + errx(1, "seconds %d < 0", seconds); >> + ns = ((uint64_t)seconds) * 1000000000ULL; >> + power = flsll(ns); >> + shifted = 1ULL << power; >> + if (shifted <= ns) { >> + power++; >> + } >> + if (debugging) { >> + printf("shifted %lld\n", (long long)shifted); >> + printf("seconds_to_pow2ns: seconds: %d, ns %lld, power %d\n", >> + seconds, (long long)ns, (int)power); >> + } >> + return (power); >> +} >> + >> + >> /* >> * Handle the few command line arguments supported. >> */ >> @@ -521,9 +684,7 @@ parseargs(int argc, char *argv[]) >> { >> int longindex; >> int c; >> - char *p; >> const char *lopt; >> - double a; >> >> /* >> * if we end with a 'd' aka 'watchdogd' then we are the daemon program, >> @@ -565,21 +726,11 @@ parseargs(int argc, char *argv[]) >> do_syslog = 0; >> break; >> case 't': >> - p = NULL; >> - errno = 0; >> - a = strtod(optarg, &p); >> - if ((p != NULL && *p != '\0') || errno != 0) >> - errx(EX_USAGE, "-t argument is not a number"); >> - if (a < 0) >> - errx(EX_USAGE, "-t argument must be positive"); >> - >> - if (a == 0) >> - timeout = WD_TO_NEVER; >> - else >> - timeout = flsll(a * 1e9); >> - if (debugging) >> - printf("Timeout is 2^%d nanoseconds\n", >> - timeout); >> + timeout_sec = atoi(optarg); >> + timeout = parse_timeout_to_pow2ns(c, NULL, optarg); >> + if (debugging) >> + printf("Timeout is 2^%d nanoseconds\n", >> + timeout); >> break; >> case 'T': >> carp_thresh_seconds = fetchtimeout(c, "NULL", optarg); >> @@ -618,4 +769,15 @@ parseargs(int argc, char *argv[]) >> errx(EX_USAGE, "extra arguments."); >> if (is_daemon && timeout < WD_TO_1SEC) >> errx(EX_USAGE, "-t argument is less than one second."); >> + if (pretimeout_set) { >> + struct timespec ts; >> + >> + pow2ns_to_ts(timeout, &ts); >> + if (pretimeout >= ts.tv_sec) { >> + errx(EX_USAGE, >> + "pretimeout (%d) >= timeout (%d -> %ld)\n" >> + "see manual section TIMEOUT RESOLUTION", >> + pretimeout, timeout_sec, (long)ts.tv_sec); >> + } >> + } > Come on. It has been 3 days that tinderbox complains about this. > > ===> usr.sbin/watchdogd (all) > cc -O2 -pipe -std=gnu99 -Qunused-arguments -fstack-protector > -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter > -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type > -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter > -Wcast-align -Wchar-subscripts -Winline -Wnested-externs > -Wredundant-decls -Wold-style-definition -Wmissing-variable-declarations > -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -c > /src/usr.sbin/watchdogd/watchdogd.c > /src/usr.sbin/watchdogd/watchdogd.c:777:18: error: comparison of > integers of different signs: 'u_int' (aka 'unsigned int') and 'time_t' > (aka 'int') [-Werror,-Wsign-compare] > if (pretimeout >= ts.tv_sec) { > ~~~~~~~~~~ ^ ~~~~~~~~~ > > Glen > Really sorry about this, it seemed that this compiled just fine when I was testing it. Now I'm thinking that maybe only the kernel part wound up compile tested with WARNS set. Then $work went nuts. I will try to update my email filters to catch this quicker next time. -Alfred From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 05:41:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E50948DF; Wed, 31 Jul 2013 05:41:35 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-wg0-x232.google.com (mail-wg0-x232.google.com [IPv6:2a00:1450:400c:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 047A32AB8; Wed, 31 Jul 2013 05:41:34 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id m15so206339wgh.5 for ; Tue, 30 Jul 2013 22:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=JGmNofwLY6DP2QZpTdilUqV5HflfKIqC3wv1ea5sLko=; b=Lfa+Szzls/VB64tHaZpXIlsc0hMkjRm39X7rUC1hVxc6wbRDet/nJ1i+Cu34RrnL4G IDbK9HSh48BzBNCk++IJeGBCF3wzTyvqL7FTgQfqrZkpmNU7BxCeHYeCxvbMAlmusUX8 48sU3kNf2vuthZuefFSvY1NVVe5D39u7YVsCKRd2cptNYiwwD0xgUegmWyeqRkifg5pY Kgxa7niB/WPMh/mDI0BXmLRtXoeMYtOyVMcq376yqo48RQYg0eAd+2wT1NLBcfrFxB7k X3JBVLT5n1VNt1lCqEWDouUVNq/zcHIsp4bFwjqzJRmpoziq9CdjUhK3yA/EcRCvVMRc 0igw== MIME-Version: 1.0 X-Received: by 10.195.13.202 with SMTP id fa10mr48087482wjd.14.1375249293189; Tue, 30 Jul 2013 22:41:33 -0700 (PDT) Sender: pluknet@gmail.com Received: by 10.216.82.70 with HTTP; Tue, 30 Jul 2013 22:41:33 -0700 (PDT) In-Reply-To: <201307310113.r6V1DUKY044876@svn.freebsd.org> References: <201307310113.r6V1DUKY044876@svn.freebsd.org> Date: Wed, 31 Jul 2013 09:41:33 +0400 X-Google-Sender-Auth: 4ZexnKfRCeVdYePnC9xOzk5ZrAY Message-ID: Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac From: Sergey Kandaurov To: Justin Hibbits Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 05:41:36 -0000 On 31 July 2013 05:13, Justin Hibbits wrote: > Author: jhibbits > Date: Wed Jul 31 01:13:29 2013 > New Revision: 253825 > URL: http://svnweb.freebsd.org/changeset/base/253825 > > Log: > Add the macio attachment for wi(4). Partially obtained from NetBSD. > > Reviewed by: adrian > Obtained from: NetBSD (partially) > > Added: > head/sys/dev/wi/if_wi_macio.c (contents, props changed) > Modified: > head/sys/modules/Makefile > head/sys/modules/wi/Makefile > head/sys/powerpc/powermac/macio.c > head/sys/powerpc/powermac/maciovar.h > > Added: head/sys/dev/wi/if_wi_macio.c > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/dev/wi/if_wi_macio.c Wed Jul 31 01:13:29 2013 (r253825) > @@ -0,0 +1,141 @@ > +/*- > + * Copyright (c) 2013 Justin Hibbits > + * All rights reserved. > + * Copyright (c) 1997, 1998, 1999 > + * Bill Paul . All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * 3. All advertising materials mentioning features or use of this software > + * must display the following acknowledgement: > + * This product includes software developed by Bill Paul. > + * 4. Neither the name of the author nor the names of any co-contributors > + * may be used to endorse or promote products derived from this software > + * without specific prior written permission. > + * > + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD Oh noes! You must be kidding :) $ grep -ri 'or the voices in his head' /usr/src | wc -l 156 -- wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 05:52:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B47F0B3F; Wed, 31 Jul 2013 05:52:04 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 930DF2B08; Wed, 31 Jul 2013 05:52:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V5q4VI028490; Wed, 31 Jul 2013 05:52:04 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V5q4Ci028487; Wed, 31 Jul 2013 05:52:04 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307310552.r6V5q4Ci028487@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Jul 2013 05:52:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253830 - in head/sys/arm/ti: . am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 05:52:04 -0000 Author: rpaulo Date: Wed Jul 31 05:52:03 2013 New Revision: 253830 URL: http://svnweb.freebsd.org/changeset/base/253830 Log: Initialisation routines for the mailbox, spinlock and PRU-ICSS clocks. Modified: head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/ti_prcm.h Modified: head/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_prcm.c Wed Jul 31 05:12:51 2013 (r253829) +++ head/sys/arm/ti/am335x/am335x_prcm.c Wed Jul 31 05:52:03 2013 (r253830) @@ -78,15 +78,19 @@ __FBSDID("$FreeBSD$"); #define CM_PER_EPWMSS2_CLKCTRL (CM_PER + 0x0D8) #define CM_PER_L3_INSTR_CLKCTRL (CM_PER + 0x0DC) #define CM_PER_L3_CLKCTRL (CM_PER + 0x0E0) +#define CM_PER_PRUSS_CLKCTRL (CM_PER + 0x0E8) #define CM_PER_TIMER5_CLKCTRL (CM_PER + 0x0EC) #define CM_PER_TIMER6_CLKCTRL (CM_PER + 0x0F0) #define CM_PER_MMC1_CLKCTRL (CM_PER + 0x0F4) #define CM_PER_MMC2_CLKCTRL (CM_PER + 0x0F8) #define CM_PER_TPTC1_CLKCTRL (CM_PER + 0x0FC) #define CM_PER_TPTC2_CLKCTRL (CM_PER + 0x100) +#define CM_PER_SPINLOCK0_CLKCTRL (CM_PER + 0x10C) +#define CM_PER_MAILBOX0_CLKCTRL (CM_PER + 0x110) #define CM_PER_OCPWP_L3_CLKSTCTRL (CM_PER + 0x12C) #define CM_PER_OCPWP_CLKCTRL (CM_PER + 0x130) #define CM_PER_CPSW_CLKSTCTRL (CM_PER + 0x144) +#define CM_PER_PRUSS_CLKSTCTRL (CM_PER + 0x140) #define CM_WKUP 0x400 #define CM_WKUP_CLKSTCTRL (CM_WKUP + 0x000) @@ -107,6 +111,10 @@ __FBSDID("$FreeBSD$"); #define CLKSEL_TIMER4_CLK (CM_DPLL + 0x010) #define CLKSEL_TIMER5_CLK (CM_DPLL + 0x018) #define CLKSEL_TIMER6_CLK (CM_DPLL + 0x01C) +#define CLKSEL_PRUSS_OCP_CLK (CM_DPLL + 0x030) + +#define PRM_PER 0xC00 +#define PRM_PER_RSTCTRL (PRM_PER + 0x00) #define PRM_DEVICE_OFFSET 0xF00 #define PRM_RSTCTRL (PRM_DEVICE_OFFSET + 0x00) @@ -136,6 +144,7 @@ static void am335x_prcm_reset(void); static int am335x_clk_cpsw_activate(struct ti_clock_dev *clkdev); static int am335x_clk_musb0_activate(struct ti_clock_dev *clkdev); static int am335x_clk_lcdc_activate(struct ti_clock_dev *clkdev); +static int am335x_clk_pruss_activate(struct ti_clock_dev *clkdev); #define AM335X_GENERIC_CLOCK_DEV(i) \ { .id = (i), \ @@ -243,6 +252,23 @@ struct ti_clock_dev ti_clk_devmap[] = { AM335X_GENERIC_CLOCK_DEV(PWMSS1_CLK), AM335X_GENERIC_CLOCK_DEV(PWMSS2_CLK), + /* System Mailbox clock */ + AM335X_GENERIC_CLOCK_DEV(MAILBOX0_CLK), + + /* SPINLOCK */ + AM335X_GENERIC_CLOCK_DEV(SPINLOCK0_CLK), + + /* PRU-ICSS */ + { .id = PRUSS_CLK, + .clk_activate = am335x_clk_pruss_activate, + .clk_deactivate = NULL, + .clk_set_source = NULL, + .clk_accessible = NULL, + .clk_get_source_freq = NULL, + }, + + + { INVALID_CLK_IDENT, NULL, NULL, NULL, NULL } }; @@ -295,6 +321,9 @@ static struct am335x_clk_details g_am335 _CLK_DETAIL(PWMSS1_CLK, CM_PER_EPWMSS1_CLKCTRL, 0), _CLK_DETAIL(PWMSS2_CLK, CM_PER_EPWMSS2_CLKCTRL, 0), + _CLK_DETAIL(MAILBOX0_CLK, CM_PER_MAILBOX0_CLKCTRL, 0), + _CLK_DETAIL(SPINLOCK0_CLK, CM_PER_SPINLOCK0_CLKCTRL, 0), + { INVALID_CLK_IDENT, 0}, }; @@ -628,7 +657,7 @@ am335x_clk_lcdc_activate(struct ti_clock DELAY(10); /* - * For now set frequenct to 5xSYSFREQ + * For now set frequency to 5xSYSFREQ * More flexible control might be required */ prcm_write_4(CM_WKUP_CM_CLKSEL_DPLL_DISP, (5 << 8) | 0); @@ -654,3 +683,44 @@ am335x_clk_lcdc_activate(struct ti_clock return (0); } + +static int +am335x_clk_pruss_activate(struct ti_clock_dev *clkdev) +{ + struct am335x_prcm_softc *sc = am335x_prcm_sc; + + if (sc == NULL) + return (ENXIO); + + /* Set MODULEMODE to ENABLE(2) */ + prcm_write_4(CM_PER_PRUSS_CLKCTRL, 2); + + /* Wait for MODULEMODE to become ENABLE(2) */ + while ((prcm_read_4(CM_PER_PRUSS_CLKCTRL) & 0x3) != 2) + DELAY(10); + + /* Set CLKTRCTRL to SW_WKUP(2) */ + prcm_write_4(CM_PER_PRUSS_CLKSTCTRL, 2); + + /* Wait for the 200 MHz OCP clock to become active */ + while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<4)) == 0) + DELAY(10); + + /* Wait for the 200 MHz IEP clock to become active */ + while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<5)) == 0) + DELAY(10); + + /* Wait for the 192 MHz UART clock to become active */ + while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<6)) == 0) + DELAY(10); + + /* Select DISP DPLL as OCP clock */ + prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 1); + while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 1) + DELAY(10); + + /* Clear the RESET bit */ + prcm_write_4(PRM_PER_RSTCTRL, prcm_read_4(PRM_PER_RSTCTRL) & ~2); + + return (0); +} Modified: head/sys/arm/ti/ti_prcm.h ============================================================================== --- head/sys/arm/ti/ti_prcm.h Wed Jul 31 05:12:51 2013 (r253829) +++ head/sys/arm/ti/ti_prcm.h Wed Jul 31 05:52:03 2013 (r253830) @@ -149,6 +149,14 @@ typedef enum { PWMSS1_CLK, PWMSS2_CLK, + /* Mailbox modules */ + MAILBOX0_CLK = 1500, + + /* Spinlock modules */ + SPINLOCK0_CLK = 1600, + + PRUSS_CLK = 1700, + INVALID_CLK_IDENT } clk_ident_t; From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 06:05:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 77BAAD0E; Wed, 31 Jul 2013 06:05:35 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6462F2B57; Wed, 31 Jul 2013 06:05:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V65ZJh032079; Wed, 31 Jul 2013 06:05:35 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V65ZEk032078; Wed, 31 Jul 2013 06:05:35 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307310605.r6V65ZEk032078@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Jul 2013 06:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253831 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 06:05:35 -0000 Author: rpaulo Date: Wed Jul 31 06:05:34 2013 New Revision: 253831 URL: http://svnweb.freebsd.org/changeset/base/253831 Log: Cleanup the allocations when the attachment fails. Modified: head/sys/dev/usb/wlan/if_rsu.c Modified: head/sys/dev/usb/wlan/if_rsu.c ============================================================================== --- head/sys/dev/usb/wlan/if_rsu.c Wed Jul 31 05:52:03 2013 (r253830) +++ head/sys/dev/usb/wlan/if_rsu.c Wed Jul 31 06:05:34 2013 (r253831) @@ -323,7 +323,7 @@ rsu_attach(device_t self) device_printf(sc->sc_dev, "could not allocate USB transfers, err=%s\n", usbd_errstr(error)); - goto detach; + goto fail_usb; } RSU_LOCK(sc); /* Read chip revision. */ @@ -333,7 +333,7 @@ rsu_attach(device_t self) error = rsu_read_rom(sc); if (error != 0) { device_printf(self, "could not read ROM\n"); - goto detach; + goto fail_rom; } RSU_UNLOCK(sc); IEEE80211_ADDR_COPY(sc->sc_bssid, &sc->rom[0x12]); @@ -341,7 +341,7 @@ rsu_attach(device_t self) ifp = sc->sc_ifp = if_alloc(IFT_IEEE80211); if (ifp == NULL) { device_printf(self, "cannot allocate interface\n"); - goto detach; + goto fail_ifalloc; } ic = ifp->if_l2com; ifp->if_softc = sc; @@ -407,8 +407,11 @@ rsu_attach(device_t self) return (0); -detach: - rsu_detach(self); +fail_ifalloc: +fail_rom: + usbd_transfer_unsetup(sc->sc_xfer, RSU_N_TRANSFER); +fail_usb: + mtx_destroy(&sc->sc_mtx); return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 06:23:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 658942F1; Wed, 31 Jul 2013 06:23:11 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5377C2C05; Wed, 31 Jul 2013 06:23:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V6NBTh037837; Wed, 31 Jul 2013 06:23:11 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V6NBWA037836; Wed, 31 Jul 2013 06:23:11 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201307310623.r6V6NBWA037836@svn.freebsd.org> From: Rui Paulo Date: Wed, 31 Jul 2013 06:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253832 - head/sys/boot/fdt/dts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 06:23:11 -0000 Author: rpaulo Date: Wed Jul 31 06:23:10 2013 New Revision: 253832 URL: http://svnweb.freebsd.org/changeset/base/253832 Log: Add definitions for the Mailbox, Spinlock and PRU-ICSS devices. Modified: head/sys/boot/fdt/dts/am335x.dtsi Modified: head/sys/boot/fdt/dts/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/am335x.dtsi Wed Jul 31 06:05:34 2013 (r253831) +++ head/sys/boot/fdt/dts/am335x.dtsi Wed Jul 31 06:23:10 2013 (r253832) @@ -219,5 +219,24 @@ /* 1 - Host Mode, 0 - Device Mode */ modemask = <2>; }; + + mbox0@480C8000 { + compatible = "am335x,system-mbox"; + reg = < 0x480C8000 0x1000 >; + interrupts = <77>; + interrupt-parent = <&AINTC>; + }; + + spinlock0@480CA000 { + compatible = "am335x,spinlock"; + reg = < 0x480CA000 0x1000 >; + }; + + pruss@4A300000 { + compatible = "ti,pruss-v2"; + reg = <0x4A300000 0x80000>; + interrupt-parent = <&AINTC>; + interrupts = <20 21 22 23 24 25 26 27>; + }; }; }; From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 07:06:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2A1F545D; Wed, 31 Jul 2013 07:06:59 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 180C72DC4; Wed, 31 Jul 2013 07:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V76wS8051234; Wed, 31 Jul 2013 07:06:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V76w9R051233; Wed, 31 Jul 2013 07:06:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307310706.r6V76w9R051233@svn.freebsd.org> From: Xin LI Date: Wed, 31 Jul 2013 07:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253833 - head/sbin/mdconfig X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 07:06:59 -0000 Author: delphij Date: Wed Jul 31 07:06:58 2013 New Revision: 253833 URL: http://svnweb.freebsd.org/changeset/base/253833 Log: Resolve fflag with realpath(). MFC after: 2 weeks Modified: head/sbin/mdconfig/mdconfig.c Modified: head/sbin/mdconfig/mdconfig.c ============================================================================== --- head/sbin/mdconfig/mdconfig.c Wed Jul 31 06:23:10 2013 (r253832) +++ head/sbin/mdconfig/mdconfig.c Wed Jul 31 07:06:58 2013 (r253833) @@ -161,7 +161,9 @@ main(int argc, char **argv) case 'f': if (fflag != NULL) errx(1, "-f can be passed only once"); - fflag = optarg; + fflag = realpath(optarg, NULL); + if (fflag == NULL) + err(1, "realpath"); break; case 'o': if (!strcmp(optarg, "async")) From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 07:09:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4B2A45AF; Wed, 31 Jul 2013 07:09:36 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 393A02DD4; Wed, 31 Jul 2013 07:09:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6V79a2m051644; Wed, 31 Jul 2013 07:09:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6V79aHd051643; Wed, 31 Jul 2013 07:09:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201307310709.r6V79aHd051643@svn.freebsd.org> From: Xin LI Date: Wed, 31 Jul 2013 07:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253834 - head/sbin/swapon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 07:09:36 -0000 Author: delphij Date: Wed Jul 31 07:09:35 2013 New Revision: 253834 URL: http://svnweb.freebsd.org/changeset/base/253834 Log: Make two buffer variables static for now. It is not safe to reference stack memory after return. MFC after: 2 weeks Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Wed Jul 31 07:06:58 2013 (r253833) +++ head/sbin/swapon/swapon.c Wed Jul 31 07:09:35 2013 (r253834) @@ -446,7 +446,7 @@ swap_on_off_md(const char *name, char *m FILE *sfd; int fd, mdunit, error; const char *ret; - char mdpath[PATH_MAX], linebuf[PATH_MAX]; + static char mdpath[PATH_MAX], linebuf[PATH_MAX]; char *p, *vnodefile; size_t linelen; u_long ul; From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 09:33:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D9CECEAD; Wed, 31 Jul 2013 09:33:48 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 99CA12601; Wed, 31 Jul 2013 09:33:48 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id C67BB4606; Wed, 31 Jul 2013 09:33:47 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id F0BEB38DE3; Wed, 31 Jul 2013 11:33:51 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> Date: Wed, 31 Jul 2013 11:33:51 +0200 In-Reply-To: <20130730185034.GA63635@dragon.NUXI.org> (David O'Brien's message of "Tue, 30 Jul 2013 11:50:34 -0700") Message-ID: <86zjt3f4zk.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 09:33:48 -0000 "David O'Brien" writes: > Dag-Erling Sm=C3=B8rgrav writes: > > We've had a policy for several years now that all changes to the > > PRNG code in the kernel and libc must be reviewed by so@. > Where was this policy published or communicated? > There is no MAINTAINER line in sys/dev/random/, nor an entry in > /usr/src/MAINTAINERS. It is hard to follow some policy that cannot > be found. If it isn't adequately documented, then we need to look into that. It's not the only such case - jfv@'s hard lock on Intel NIC drivers isn't documented either. That doesn't mean we shouldn't enforce it. > This change does not change any of the PRNG algorithms. You know as well as I do that "I didn't change anything" is in the top five on the list of "programmers' famous last words". > Do you have any specific concerns? I don't have any major issues with the patch, but it should still have been submitted for pre-commit review. I have two minor issues: - The sysctl is currently a space-separated list with an extraneous leading space and a magic string (which contains separators) to indicate an empty list. At the very least, the leading space should be removed and the magic string should be changed to not include spaces; "none" should suffice. I would prefer a comma-separated list and an empty string to indicate an empty list. - The non-standard (at least in an IT context) spelling of "adapter". I'll try to get a second opinion within the day. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 09:39:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3703B291; Wed, 31 Jul 2013 09:39:03 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id EA475268D; Wed, 31 Jul 2013 09:39:02 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2A3954631; Wed, 31 Jul 2013 09:39:02 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 59BF138DE7; Wed, 31 Jul 2013 11:38:36 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> <86zjt3f4zk.fsf@nine.des.no> Date: Wed, 31 Jul 2013 11:38:36 +0200 In-Reply-To: <86zjt3f4zk.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Wed, 31 Jul 2013 11:33:51 +0200") Message-ID: <86vc3rf4rn.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 09:39:03 -0000 Dag-Erling Sm=C3=B8rgrav writes: > I don't have any major issues with the patch, but it should still have > been submitted for pre-commit review. Actually, I forgot the most important issue: you seem to have committed only a tiny part of the patch. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 09:40:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0BD5147D; Wed, 31 Jul 2013 09:40:45 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BFB1126CF; Wed, 31 Jul 2013 09:40:44 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id EDB9F4644; Wed, 31 Jul 2013 09:40:43 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 21D9438DEA; Wed, 31 Jul 2013 11:40:48 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <86fvuwgrs6.fsf@nine.des.no> <20130730185034.GA63635@dragon.NUXI.org> <86zjt3f4zk.fsf@nine.des.no> <86vc3rf4rn.fsf@nine.des.no> Date: Wed, 31 Jul 2013 11:40:48 +0200 In-Reply-To: <86vc3rf4rn.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Wed, 31 Jul 2013 11:38:36 +0200") Message-ID: <86r4eff4nz.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 09:40:45 -0000 Dag-Erling Sm=C3=B8rgrav writes: > Actually, I forgot the most important issue: you seem to have committed > only a tiny part of the patch. Never mind, I found the rest. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 09:43:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED5006EF; Wed, 31 Jul 2013 09:43:32 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id AE83F2704; Wed, 31 Jul 2013 09:43:32 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id E3D384651; Wed, 31 Jul 2013 09:43:31 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id 1D3B338DED; Wed, 31 Jul 2013 11:43:06 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "David E. O'Brien" Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> Date: Wed, 31 Jul 2013 11:43:06 +0200 In-Reply-To: <201307292058.r6TKwA56031193@svn.freebsd.org> (David E. O'Brien's message of "Mon, 29 Jul 2013 20:58:10 +0000 (UTC)") Message-ID: <86mwp3f4k5.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 09:43:33 -0000 "David E. O'Brien" writes: > * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" o= ption. > The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarr= ow. Please revert this, as anybody with a custom kernel config who doesn't have a hardware RNG is now without a PRNG. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 10:40:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 40E93B45; Wed, 31 Jul 2013 10:40:12 +0000 (UTC) (envelope-from philip@rincewind.paeps.cx) Received: from rincewind.paeps.cx (rincewind.paeps.cx [5.9.88.46]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EFC532A27; Wed, 31 Jul 2013 10:40:11 +0000 (UTC) Received: by rincewind.paeps.cx (Postfix, from userid 1001) id 76284129D; Wed, 31 Jul 2013 12:40:09 +0200 (CEST) Date: Wed, 31 Jul 2013 12:40:09 +0200 From: Philip Paeps To: "David E. O'Brien" Subject: Re: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... Message-ID: <20130731104009.GG59509@rincewind.paeps.cx> Mail-Followup-To: "David E. O'Brien" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201307292026.r6TKQRRb021717@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201307292026.r6TKQRRb021717@svn.freebsd.org> X-PGP-Fingerprint: 356B AE02 4763 F739 2FA2 E438 2649 E628 C5D3 4D05 X-Date: Today is Boomtime, the 66th day of Confusion in the YOLD 3179 X-Phase-of-Moon: The Moon is Waning Crescent (34% of Full) X-Philip-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 10:40:12 -0000 On 2013-07-29 20:26:27 (+0000), David E. O'Brien wrote: > Author: obrien > Date: Mon Jul 29 20:26:27 2013 > New Revision: 253779 > URL: http://svnweb.freebsd.org/changeset/base/253779 > > Log: > Decouple yarrow from random(4) device. As Dag-Erling already pointed out in relpy to r253789: please submit any RNG changes to secteam@ to review before committing them. That aside, it would have been easier to review this if it were split into more than two commits. > * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. > The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. I would really prefer to see this logic reversed. Of course, we expect people to read UPDATING, but disabling functionality that has been enabled by default "forever" without any warning, especially in a security-related context is not cool. Please change YARROW_RNG to RNG_NO_YARROW or something similar and keep it in by default. If you think there's a really good reason to kick support out by default, there are mailing lists to discuss this. > * Add random_adaptors.[ch] which is basically a store of random_adaptor's. > random_adaptor is basically an adapter that plugs in to random(4). This is a good idea. I've briefly read through the code (ie: not a thorough review) and it looks okay at first glance. It would have been good if this were a separate commit and given a chance to be reviewed by people familiar with the RNG code. > Unplugging random_adaptor from random(4) is not supported, and is probably a > bad idea anyway, due to potential loss of entropy pools. I agree. But what happens to the adaptors if you kldunload random? > * If the kernel doesn't have any random_adaptor adapters present then the > creation of /dev/random is postponed until next random_adaptor is kldload'ed. This worries me. A fast-booting system might want random numbers in userland before a random_adaptor is loaded (and properly seeded?). We don't have particularly stellar support for early random numbers, but we should be careful not to make it worse. Also: what happens to in-kernel consumers of random (like TCP) before the first random_adaptor is attached (and properly seeded)? I'd really like to see this get some more review. Philip -- Philip Paeps Senior Reality Engineer Ministry of Information From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 10:54:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B2BFB9C; Wed, 31 Jul 2013 10:54:24 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F6382AD3; Wed, 31 Jul 2013 10:54:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VAsO0u020439; Wed, 31 Jul 2013 10:54:24 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VAsOgP020438; Wed, 31 Jul 2013 10:54:24 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201307311054.r6VAsOgP020438@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 31 Jul 2013 10:54:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253835 - stable/9/usr.sbin/ctladm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 10:54:24 -0000 Author: trasz Date: Wed Jul 31 10:54:24 2013 New Revision: 253835 URL: http://svnweb.freebsd.org/changeset/base/253835 Log: MFC r249328: Make ctladm(8) try to load ctl.ko kernel module if needed. Approved by: re (delphij) Modified: stable/9/usr.sbin/ctladm/ctladm.c Directory Properties: stable/9/usr.sbin/ctladm/ (props changed) Modified: stable/9/usr.sbin/ctladm/ctladm.c ============================================================================== --- stable/9/usr.sbin/ctladm/ctladm.c Wed Jul 31 07:09:35 2013 (r253834) +++ stable/9/usr.sbin/ctladm/ctladm.c Wed Jul 31 10:54:24 2013 (r253835) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -3816,6 +3817,7 @@ main(int argc, char **argv) int retval, fd; int retries; int initid; + int saved_errno; retval = 0; cmdargs = CTLADM_ARG_NONE; @@ -3965,6 +3967,14 @@ main(int argc, char **argv) if ((cmdargs & CTLADM_ARG_DEVICE) && (command != CTLADM_CMD_HELP)) { fd = open(device, O_RDWR); + if (fd == -1 && errno == ENOENT) { + saved_errno = errno; + retval = kldload("ctl"); + if (retval != -1) + fd = open(device, O_RDWR); + else + errno = saved_errno; + } if (fd == -1) { fprintf(stderr, "%s: error opening %s: %s\n", argv[0], device, strerror(errno)); From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 11:36:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4A7699C7; Wed, 31 Jul 2013 11:36:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 35CD32C8F; Wed, 31 Jul 2013 11:36:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VBaKdo032742; Wed, 31 Jul 2013 11:36:20 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VBaKdC032740; Wed, 31 Jul 2013 11:36:20 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201307311136.r6VBaKdC032740@svn.freebsd.org> From: Marius Strobl Date: Wed, 31 Jul 2013 11:36:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253836 - in stable/9/sys: i386/conf modules X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:36:21 -0000 Author: marius Date: Wed Jul 31 11:36:20 2013 New Revision: 253836 URL: http://svnweb.freebsd.org/changeset/base/253836 Log: Revert r249530 and re-enable compilation of ctl.ko for all configurations except i386 XEN, for which it still doesn't build so far. This is a direct commit to stable/9. Approved by: re (delphij, kib) Modified: stable/9/sys/i386/conf/XEN stable/9/sys/modules/Makefile Modified: stable/9/sys/i386/conf/XEN ============================================================================== --- stable/9/sys/i386/conf/XEN Wed Jul 31 10:54:24 2013 (r253835) +++ stable/9/sys/i386/conf/XEN Wed Jul 31 11:36:20 2013 (r253836) @@ -7,7 +7,7 @@ cpu I686_CPU ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -makeoptions WITHOUT_MODULES="aha ahb amd cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" +makeoptions WITHOUT_MODULES="aha ahb amd ctl cxgb dpt drm drm2 hptnr hptmv ida malo mps mwl nve rdma sound sym trm xfs" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption Modified: stable/9/sys/modules/Makefile ============================================================================== --- stable/9/sys/modules/Makefile Wed Jul 31 10:54:24 2013 (r253835) +++ stable/9/sys/modules/Makefile Wed Jul 31 11:36:20 2013 (r253836) @@ -76,6 +76,7 @@ SUBDIR= \ ${_cryptodev} \ ${_cs} \ ${_ctau} \ + ctl \ ${_cxgb} \ cxgbe \ ${_cyclic} \ From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 11:42:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B63EFC31; Wed, 31 Jul 2013 11:42:43 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3EBA2CD1; Wed, 31 Jul 2013 11:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VBghqt035164; Wed, 31 Jul 2013 11:42:43 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VBghWX035160; Wed, 31 Jul 2013 11:42:43 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201307311142.r6VBghWX035160@svn.freebsd.org> From: Erwin Lansing Date: Wed, 31 Jul 2013 11:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253837 - in vendor/bind9/dist: . lib/dns/rdata/generic X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:42:43 -0000 Author: erwin Date: Wed Jul 31 11:42:42 2013 New Revision: 253837 URL: http://svnweb.freebsd.org/changeset/base/253837 Log: Vendor import of BIND 9.8.5-P2 Approved by: delphij (mentor, implicit) Sponsored by: DK Hostmaster A/S Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES ============================================================================== --- vendor/bind9/dist/CHANGES Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/CHANGES Wed Jul 31 11:42:42 2013 (r253837) @@ -1,3 +1,9 @@ + --- 9.8.5-P2 released --- + +3621. [security] Incorrect bounds checking on private type 'keydata' + can lead to a remotely triggerable REQUIRE failure + (CVE-2013-4854). [RT #34238] + --- 9.8.5-P1 released --- 3584. [security] Caching data from an incompletely signed zone could Modified: vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c ============================================================================== --- vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/lib/dns/rdata/generic/keydata_65533.c Wed Jul 31 11:42:42 2013 (r253837) @@ -176,7 +176,7 @@ fromwire_keydata(ARGS_FROMWIRE) { UNUSED(options); isc_buffer_activeregion(source, &sr); - if (sr.length < 4) + if (sr.length < 16) return (ISC_R_UNEXPECTEDEND); isc_buffer_forward(source, sr.length); Modified: vendor/bind9/dist/version ============================================================================== --- vendor/bind9/dist/version Wed Jul 31 11:36:20 2013 (r253836) +++ vendor/bind9/dist/version Wed Jul 31 11:42:42 2013 (r253837) @@ -9,4 +9,4 @@ MAJORVER=9 MINORVER=8 PATCHVER=5 RELEASETYPE=-P -RELEASEVER=1 +RELEASEVER=2 From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 11:45:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7F320DA5; Wed, 31 Jul 2013 11:45:41 +0000 (UTC) (envelope-from erwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 52D972CF0; Wed, 31 Jul 2013 11:45:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VBjfT4035579; Wed, 31 Jul 2013 11:45:41 GMT (envelope-from erwin@svn.freebsd.org) Received: (from erwin@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VBjf6p035578; Wed, 31 Jul 2013 11:45:41 GMT (envelope-from erwin@svn.freebsd.org) Message-Id: <201307311145.r6VBjf6p035578@svn.freebsd.org> From: Erwin Lansing Date: Wed, 31 Jul 2013 11:45:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253838 - vendor/bind9/9.8.5-P2 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 11:45:41 -0000 Author: erwin Date: Wed Jul 31 11:45:40 2013 New Revision: 253838 URL: http://svnweb.freebsd.org/changeset/base/253838 Log: Tag the 9.8.5-P2 release. Approved by: delphij (mentor, implicit) Added: vendor/bind9/9.8.5-P2/ - copied from r253837, vendor/bind9/dist/ From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 12:21:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A9867EAF; Wed, 31 Jul 2013 12:21:43 +0000 (UTC) (envelope-from dim@freebsd.org) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 699E02EED; Wed, 31 Jul 2013 12:21:43 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::bc7b:eae4:1dd1:7fcc] (unknown [IPv6:2001:7b8:3a7:0:bc7b:eae4:1dd1:7fcc]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id A1C5F5C5A; Wed, 31 Jul 2013 14:21:38 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253802 - head/contrib/llvm/tools/clang/lib/Headers From: Dimitry Andric In-Reply-To: <201307301216.15235.jhb@freebsd.org> Date: Wed, 31 Jul 2013 14:21:42 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201307301233.r6UCXLT8012177@svn.freebsd.org> <201307301216.15235.jhb@freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.1508) Cc: "svn-src-head@freebsd.org" , Matthew Fleming , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 12:21:43 -0000 On Jul 30, 2013, at 18:16, John Baldwin wrote: > On Tuesday, July 30, 2013 10:09:35 am Matthew Fleming wrote: >> On Tue, Jul 30, 2013 at 5:33 AM, Dimitry Andric = wrote: >>=20 >>> Author: dim >>> Date: Tue Jul 30 12:33:21 2013 >>> New Revision: 253802 >>> URL: http://svnweb.freebsd.org/changeset/base/253802 ... >> PIC mode on amd64 also uses %ebx. The difference is that FreeBSD = makefiles >> set -fPIC for i386 kernel compile but not amd64. Locally we use = -fPIC for >> amd64 (it was added 6 years ago to our environment because it gave = better >> kernel debugging). >=20 > Note that this is used in userland and the kernel. >=20 >> Anyways, is there some way to detect PIC mode and use that to decide >> whether to use %ebx for the cpuid instruction, rather than using = i386? >=20 > Does clang supply a reliable #define to indicate that PIC is in use? = If not, > then this should use the PIC path always to be safe. Just like gcc, clang defines both __pic__ and __PIC__ as 1 for -fpic, and as 2 for -fPIC (though on x86, there is no difference between the=20 two). Similarly, __pie__ and __PIE__ are defined as 1 for -fpie, and as 2 for -fPIE. -Dimitry From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 12:35:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B11AF735; Wed, 31 Jul 2013 12:35:06 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F06F2FB6; Wed, 31 Jul 2013 12:35:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VCZ6TV052713; Wed, 31 Jul 2013 12:35:06 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VCZ6Zl052712; Wed, 31 Jul 2013 12:35:06 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201307311235.r6VCZ6Zl052712@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 31 Jul 2013 12:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253839 - head/contrib/binutils/ld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 12:35:06 -0000 Author: bapt Date: Wed Jul 31 12:35:06 2013 New Revision: 253839 URL: http://svnweb.freebsd.org/changeset/base/253839 Log: Change default behaviour of ld(1) to not recursively copy DT_NEEDED This is the default behaviour of the newer binutils as well as most alternative linkers. All the ports tree has been fixed to be able to link properly with this new behaviour. Modified: head/contrib/binutils/ld/ldmain.c Modified: head/contrib/binutils/ld/ldmain.c ============================================================================== --- head/contrib/binutils/ld/ldmain.c Wed Jul 31 11:45:40 2013 (r253838) +++ head/contrib/binutils/ld/ldmain.c Wed Jul 31 12:35:06 2013 (r253839) @@ -98,7 +98,7 @@ bfd_boolean as_needed; /* Nonzero means never create DT_NEEDED entries for dynamic libraries in DT_NEEDED tags. */ -bfd_boolean add_needed = TRUE; +bfd_boolean add_needed = FALSE; /* TRUE if we should demangle symbol names. */ bfd_boolean demangling; From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 14:07:43 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D9746B06; Wed, 31 Jul 2013 14:07:42 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9A0582432; Wed, 31 Jul 2013 14:07:42 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1V4X41-000E3A-NZ; Wed, 31 Jul 2013 14:07:41 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r6VE7dSM020097; Wed, 31 Jul 2013 08:07:39 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18AxlvDe9jHWun+b8NVVRmx Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac From: Ian Lepore To: Sergey Kandaurov In-Reply-To: References: <201307310113.r6V1DUKY044876@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Wed, 31 Jul 2013 08:07:39 -0600 Message-ID: <1375279659.45247.148.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Justin Hibbits , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 14:07:43 -0000 On Wed, 2013-07-31 at 09:41 +0400, Sergey Kandaurov wrote: > On 31 July 2013 05:13, Justin Hibbits wrote: > > Author: jhibbits > > Date: Wed Jul 31 01:13:29 2013 > > New Revision: 253825 > > URL: http://svnweb.freebsd.org/changeset/base/253825 > > > > Log: > > Add the macio attachment for wi(4). Partially obtained from NetBSD. > > > > Reviewed by: adrian > > Obtained from: NetBSD (partially) > > > > Added: > > head/sys/dev/wi/if_wi_macio.c (contents, props changed) > > Modified: > > head/sys/modules/Makefile > > head/sys/modules/wi/Makefile > > head/sys/powerpc/powermac/macio.c > > head/sys/powerpc/powermac/maciovar.h > > > > Added: head/sys/dev/wi/if_wi_macio.c > > ============================================================================== > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/sys/dev/wi/if_wi_macio.c Wed Jul 31 01:13:29 2013 (r253825) > > @@ -0,0 +1,141 @@ > > +/*- > > + * Copyright (c) 2013 Justin Hibbits > > + * All rights reserved. > > + * Copyright (c) 1997, 1998, 1999 > > + * Bill Paul . All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in the > > + * documentation and/or other materials provided with the distribution. > > + * 3. All advertising materials mentioning features or use of this software > > + * must display the following acknowledgement: > > + * This product includes software developed by Bill Paul. > > + * 4. Neither the name of the author nor the names of any co-contributors > > + * may be used to endorse or promote products derived from this software > > + * without specific prior written permission. > > + * > > + * THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR THE VOICES IN HIS HEAD > > Oh noes! You must be kidding :) > > $ grep -ri 'or the voices in his head' /usr/src | wc -l > 156 > I think the "voices" thing is kind of harmless and cute, if a bit unprofessional. I'm more concerned about the 201 files in the base that say I have to give Mr. Paul credit in any product documentation and advertising materials (the marketing department is going to love that one, huh?). How many other such one-off requirements are buried in the license blocks of the source that I had no idea existed and am failing to comply with? -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 15:55:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7A66CE45; Wed, 31 Jul 2013 15:55:02 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6886C2938; Wed, 31 Jul 2013 15:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VFt2iX012919; Wed, 31 Jul 2013 15:55:02 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VFt2tX012918; Wed, 31 Jul 2013 15:55:02 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201307311555.r6VFt2tX012918@svn.freebsd.org> From: Scott Long Date: Wed, 31 Jul 2013 15:55:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253840 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 15:55:02 -0000 Author: scottl Date: Wed Jul 31 15:55:01 2013 New Revision: 253840 URL: http://svnweb.freebsd.org/changeset/base/253840 Log: Another fix for r253823; retain the default of 1 readahead block for sendfile. Submitted by: glebius Obtained from: Netflix MFC after: 3 days Modified: head/sys/kern/uipc_syscalls.c Modified: head/sys/kern/uipc_syscalls.c ============================================================================== --- head/sys/kern/uipc_syscalls.c Wed Jul 31 12:35:06 2013 (r253839) +++ head/sys/kern/uipc_syscalls.c Wed Jul 31 15:55:01 2013 (r253840) @@ -122,7 +122,7 @@ counter_u64_t sfstat[sizeof(struct sfsta int nsfbufs; int nsfbufspeak; int nsfbufsused; -static int sfreadahead = MAXPHYS / MAXBSIZE; +static int sfreadahead = 1; SYSCTL_INT(_kern_ipc, OID_AUTO, nsfbufs, CTLFLAG_RDTUN, &nsfbufs, 0, "Maximum number of sendfile(2) sf_bufs available"); From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 16:24:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DD55E6A7; Wed, 31 Jul 2013 16:24:50 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B0D812A6B; Wed, 31 Jul 2013 16:24:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VGOo5q022084; Wed, 31 Jul 2013 16:24:50 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VGOob5022079; Wed, 31 Jul 2013 16:24:50 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307311624.r6VGOob5022079@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Jul 2013 16:24:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253841 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 16:24:50 -0000 Author: hrs Date: Wed Jul 31 16:24:49 2013 New Revision: 253841 URL: http://svnweb.freebsd.org/changeset/base/253841 Log: Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable interfaces. This eliminates unnecessary IPv6 processing for non-IPv6 interfaces. MFC after: 3 days Modified: head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Wed Jul 31 15:55:01 2013 (r253840) +++ head/sys/netinet6/in6.c Wed Jul 31 16:24:49 2013 (r253841) @@ -2746,6 +2746,13 @@ in6_domifattach(struct ifnet *ifp) { struct in6_ifextra *ext; + /* There are not IPv6-capable interfaces. */ + switch (ifp->if_type) { + case IFT_PFLOG: + case IFT_PFSYNC: + case IFT_USB: + return (NULL); + } ext = (struct in6_ifextra *)malloc(sizeof(*ext), M_IFADDR, M_WAITOK); bzero(ext, sizeof(*ext)); Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Wed Jul 31 15:55:01 2013 (r253840) +++ head/sys/netinet6/in6_ifattach.c Wed Jul 31 16:24:49 2013 (r253841) @@ -724,15 +724,8 @@ in6_ifattach(struct ifnet *ifp, struct i struct in6_ifaddr *ia; struct in6_addr in6; - /* some of the interfaces are inherently not IPv6 capable */ - switch (ifp->if_type) { - case IFT_PFLOG: - case IFT_PFSYNC: - ND_IFINFO(ifp)->flags &= ~ND6_IFF_AUTO_LINKLOCAL; - ND_IFINFO(ifp)->flags |= ND6_IFF_IFDISABLED; + if (ifp->if_afdata[AF_INET6] == NULL) return; - } - /* * quirks based on interface type */ Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Wed Jul 31 15:55:01 2013 (r253840) +++ head/sys/netinet6/nd6.c Wed Jul 31 16:24:49 2013 (r253841) @@ -1227,6 +1227,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru struct nd_prefix *pr; int i = 0, error = 0; + if (ifp->if_afdata[AF_INET6] == NULL) + return (EPFNOSUPPORT); switch (cmd) { case SIOCGDRLST_IN6: /* @@ -1801,6 +1803,8 @@ nd6_slowtimo(void *arg) nd6_slowtimo, curvnet); IFNET_RLOCK_NOSLEEP(); TAILQ_FOREACH(ifp, &V_ifnet, if_list) { + if (ifp->if_afdata[AF_INET6] == NULL) + continue; nd6if = ND_IFINFO(ifp); if (nd6if->basereachable && /* already initialized */ (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 16:26:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 043327FF; Wed, 31 Jul 2013 16:26:35 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CBB772A79; Wed, 31 Jul 2013 16:26:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VGQYD4022325; Wed, 31 Jul 2013 16:26:34 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VGQYtN022324; Wed, 31 Jul 2013 16:26:34 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307311626.r6VGQYtN022324@svn.freebsd.org> From: Sean Bruno Date: Wed, 31 Jul 2013 16:26:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253842 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 16:26:35 -0000 Author: sbruno Date: Wed Jul 31 16:26:34 2013 New Revision: 253842 URL: http://svnweb.freebsd.org/changeset/base/253842 Log: device if_bridge gets me a bridge device Modified: head/sys/mips/conf/DIR-825 Modified: head/sys/mips/conf/DIR-825 ============================================================================== --- head/sys/mips/conf/DIR-825 Wed Jul 31 16:24:49 2013 (r253841) +++ head/sys/mips/conf/DIR-825 Wed Jul 31 16:26:34 2013 (r253842) @@ -25,7 +25,7 @@ nodevice gpio nodevice gpioled nodevice gif nodevice gre -nodevice bridge +nodevice if_bridge nodevice usb nodevice ehci nodevice wlan From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 16:26:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3C0C911; Wed, 31 Jul 2013 16:26:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C21122A7A; Wed, 31 Jul 2013 16:26:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VGQfeQ022374; Wed, 31 Jul 2013 16:26:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VGQfnR022373; Wed, 31 Jul 2013 16:26:41 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201307311626.r6VGQfnR022373@svn.freebsd.org> From: Hiroki Sato Date: Wed, 31 Jul 2013 16:26:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253843 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 16:26:41 -0000 Author: hrs Date: Wed Jul 31 16:26:41 2013 New Revision: 253843 URL: http://svnweb.freebsd.org/changeset/base/253843 Log: Document net.link.bridge.allow_llz_overlap. Modified: head/share/man/man4/bridge.4 Modified: head/share/man/man4/bridge.4 ============================================================================== --- head/share/man/man4/bridge.4 Wed Jul 31 16:26:34 2013 (r253842) +++ head/share/man/man4/bridge.4 Wed Jul 31 16:26:41 2013 (r253843) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2013 +.Dd July 27, 2013 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -185,7 +185,7 @@ and applications use both of them. .Pp To prevent this situation, .Nm -checks whether an link-local scoped IPv6 address is configured on +checks whether a link-local scoped IPv6 address is configured on a member interface to be added and the .Nm interface. @@ -194,13 +194,13 @@ When the interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. -When both -.Nm -interface and the existing member interfaces do not have one, -adding an interface with IPv6 addresses as a new member interface is allowed. -These means only one interface in the link-local scope zone where the -.Nm -interface forms can have link-local scoped IPv6 addresses. +.Pp +This behavior can be disabled by setting +.Xr sysctl 8 +variable +.Va net.link.bridge.allow_llz_overlap +to +.Li 1 . .Pp Note that .Li ACCEPT_RTADV From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 16:27:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 237C5A88; Wed, 31 Jul 2013 16:27:57 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 119852A88; Wed, 31 Jul 2013 16:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VGRuCe022540; Wed, 31 Jul 2013 16:27:56 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VGRuSJ022539; Wed, 31 Jul 2013 16:27:56 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201307311627.r6VGRuSJ022539@svn.freebsd.org> From: Sean Bruno Date: Wed, 31 Jul 2013 16:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253844 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 16:27:57 -0000 Author: sbruno Date: Wed Jul 31 16:27:56 2013 New Revision: 253844 URL: http://svnweb.freebsd.org/changeset/base/253844 Log: Adjust magic numbers to allow attachment of ath(4) modules. Modified: head/sys/mips/conf/DIR-825.hints Modified: head/sys/mips/conf/DIR-825.hints ============================================================================== --- head/sys/mips/conf/DIR-825.hints Wed Jul 31 16:26:41 2013 (r253843) +++ head/sys/mips/conf/DIR-825.hints Wed Jul 31 16:27:56 2013 (r253844) @@ -15,11 +15,11 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 # ath0 - slot 17 -hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1fff1000 +hint.pcib.0.bus.0.17.0.ath_fixup_addr=0x1f661000 hint.pcib.0.bus.0.17.0.ath_fixup_size=4096 # ath1 - slot 18 -hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1fff5000 +hint.pcib.0.bus.0.18.0.ath_fixup_addr=0x1f665000 hint.pcib.0.bus.0.18.0.ath_fixup_size=4096 # .. and now, telling each ath(4) NIC where to find the firmware From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 17:21:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AB19B878; Wed, 31 Jul 2013 17:21:29 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 95B892E23; Wed, 31 Jul 2013 17:21:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VHLTMD039564; Wed, 31 Jul 2013 17:21:29 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VHLI6x039498; Wed, 31 Jul 2013 17:21:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201307311721.r6VHLI6x039498@svn.freebsd.org> From: "David E. O'Brien" Date: Wed, 31 Jul 2013 17:21:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253845 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/padlock_rng sys/modules/random ... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 17:21:29 -0000 Author: obrien Date: Wed Jul 31 17:21:18 2013 New Revision: 253845 URL: http://svnweb.freebsd.org/changeset/base/253845 Log: Back out r253779 & r253786. Deleted: head/sys/dev/random/random_adaptors.c head/sys/dev/random/random_adaptors.h head/sys/modules/padlock_rng/ head/sys/modules/rdrand_rng/ head/sys/modules/yarrow_rng/ Modified: head/UPDATING head/share/man/man4/random.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/AC100 head/sys/arm/conf/ARMADAXP head/sys/arm/conf/ARNDALE head/sys/arm/conf/ATMEL head/sys/arm/conf/AVILA head/sys/arm/conf/BEAGLEBONE head/sys/arm/conf/BWCT head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CNS11XXNAS head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/DB-78XXX head/sys/arm/conf/DB-88F5XXX head/sys/arm/conf/DB-88F6XXX head/sys/arm/conf/DOCKSTAR head/sys/arm/conf/DREAMPLUG-1001 head/sys/arm/conf/EA3250 head/sys/arm/conf/EB9200 head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/ETHERNUT5 head/sys/arm/conf/GUMSTIX head/sys/arm/conf/HL200 head/sys/arm/conf/HL201 head/sys/arm/conf/IQ31244 head/sys/arm/conf/KB920X head/sys/arm/conf/LN2410SBC head/sys/arm/conf/NSLU head/sys/arm/conf/PANDABOARD head/sys/arm/conf/QILA9G20 head/sys/arm/conf/RPI-B head/sys/arm/conf/SAM9260EK head/sys/arm/conf/SAM9G20EK head/sys/arm/conf/SAM9X25EK head/sys/arm/conf/SHEEVAPLUG head/sys/arm/conf/SN9G45 head/sys/arm/conf/TS7800 head/sys/arm/conf/VERSATILEPB head/sys/arm/conf/ZEDBOARD head/sys/conf/NOTES head/sys/conf/files head/sys/conf/options head/sys/dev/random/ivy.c head/sys/dev/random/nehemiah.c head/sys/dev/random/probe.c head/sys/dev/random/randomdev.c head/sys/dev/random/randomdev.h head/sys/dev/random/randomdev_soft.c head/sys/dev/random/randomdev_soft.h head/sys/dev/random/yarrow.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/i386/conf/XEN head/sys/ia64/conf/GENERIC head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/AR724X_BASE head/sys/mips/conf/AR91XX_BASE head/sys/mips/conf/AR933X_BASE head/sys/mips/conf/BERI_TEMPLATE head/sys/mips/conf/DIR-825 head/sys/mips/conf/GXEMUL head/sys/mips/conf/OCTEON1 head/sys/mips/conf/PB92 head/sys/mips/conf/RT305X head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.SWARM head/sys/mips/conf/std.XLP head/sys/modules/Makefile head/sys/modules/random/Makefile head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/powerpc/conf/WII head/sys/sparc64/conf/GENERIC head/tools/tools/sysdoc/sysdoc.sh head/tools/tools/sysdoc/tunables.mdoc Modified: head/UPDATING ============================================================================== --- head/UPDATING Wed Jul 31 16:27:56 2013 (r253844) +++ head/UPDATING Wed Jul 31 17:21:18 2013 (r253845) @@ -31,19 +31,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20130729: - random(4) and actual RNG implementations (aka, adaptors) have been - further decoupled. If you are running a custom kernel, you may - need to explicitly enable at least one RNG adaptor in your kernel - config. For example, to use Yarrow, add "options YARROW_RNG" to - your kernel config. For hardware backed RNGs, use either - "RDRAND_RNG" or "PADLOCK_RNG" options. - If you use random.ko via 'random_load="YES"' in /boot/loader.conf - instead of "device random", you will need to change that to - 'yarrow_rng_load="YES"', 'rdrand_rng_load="YES"', or - 'padlock_rng_load="YES"'. random.ko will be loaded automatically - as a dependency module. - 20130726: Behavior of devfs rules path matching has been changed. Pattern is now always matched against fully qualified devfs Modified: head/share/man/man4/random.4 ============================================================================== --- head/share/man/man4/random.4 Wed Jul 31 16:27:56 2013 (r253844) +++ head/share/man/man4/random.4 Wed Jul 31 17:21:18 2013 (r253845) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2013 +.Dd September 7, 2012 .Dt RANDOM 4 .Os .Sh NAME @@ -43,13 +43,6 @@ The device will probe for certain hardware entropy sources, and use these in preference to the fallback, which is a generator implemented in software. -If the kernel environment MIB's -.Va hw.nehemiah_rng_enable -or -.Va hw.ivy_rng_enable -are set to -.Dq Li 0 , -the associated hardware entropy source will be ignored. .Pp If the device is using the software generator, @@ -81,7 +74,6 @@ device, use the command line: .Pp which results in something like: .Bd -literal -offset indent -kern.random.adaptors: yarrow kern.random.sys.seeded: 1 kern.random.sys.harvest.ethernet: 1 kern.random.sys.harvest.point_to_point: 1 @@ -97,9 +89,7 @@ kern.random.yarrow.slowoverthresh: 2 (These would not be seen if a hardware generator is present.) .Pp -Other than -.Dl kern.random.adaptors -all settings are read/write. +All settings are read/write. .Pp The .Va kern.random.sys.seeded Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/amd64/conf/GENERIC Wed Jul 31 17:21:18 2013 (r253845) @@ -295,7 +295,6 @@ device loop # Network loopback device random # Entropy device options PADLOCK_RNG # VIA Padlock RNG options RDRAND_RNG # Intel Bull Mountain RNG -options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/arm/conf/AC100 ============================================================================== --- head/sys/arm/conf/AC100 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/AC100 Wed Jul 31 17:21:18 2013 (r253845) @@ -61,7 +61,6 @@ options MUTEX_DEBUG # Pseudo devices device random -options YARROW_RNG # Yarrow software RNG device pty device loop device md Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/ARMADAXP Wed Jul 31 17:21:18 2013 (r253845) @@ -61,7 +61,6 @@ options KDB_TRACE # Pseudo devices device random -options YARROW_RNG # Yarrow software RNG device pty device loop device md Modified: head/sys/arm/conf/ARNDALE ============================================================================== --- head/sys/arm/conf/ARNDALE Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/ARNDALE Wed Jul 31 17:21:18 2013 (r253845) @@ -88,7 +88,6 @@ options ROOTDEVNAME=\"ufs:/dev/da0\" device loop device random -options YARROW_RNG # Yarrow software RNG device pty device md device gpio Modified: head/sys/arm/conf/ATMEL ============================================================================== --- head/sys/arm/conf/ATMEL Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/ATMEL Wed Jul 31 17:21:18 2013 (r253845) @@ -134,7 +134,6 @@ device geom_map # GEOM partition mappin # Pseudo devices. device loop # Network loopback device random # Entropy device -options YARROW_RNG # Yarrow software RNG device ether # Ethernet support device vlan # 802.1Q VLAN support device tun # Packet tunnel. Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/AVILA Wed Jul 31 17:21:18 2013 (r253845) @@ -107,7 +107,6 @@ device if_bridge device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # Wireless NIC cards device wlan # 802.11 support Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/BEAGLEBONE Wed Jul 31 17:21:18 2013 (r253845) @@ -90,7 +90,6 @@ device pty device snp device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # I2C support device iicbus Modified: head/sys/arm/conf/BWCT ============================================================================== --- head/sys/arm/conf/BWCT Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/BWCT Wed Jul 31 17:21:18 2013 (r253845) @@ -68,7 +68,6 @@ options NO_FFS_SNAPSHOT options NO_SWAPPING device loop device random -options YARROW_RNG # Yarrow software RNG device ether device vlan device uart Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/CAMBRIA Wed Jul 31 17:21:18 2013 (r253845) @@ -110,7 +110,6 @@ device if_bridge device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # Wireless NIC cards device wlan # 802.11 support Modified: head/sys/arm/conf/CNS11XXNAS ============================================================================== --- head/sys/arm/conf/CNS11XXNAS Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/CNS11XXNAS Wed Jul 31 17:21:18 2013 (r253845) @@ -102,7 +102,6 @@ device loop device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG #options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/CRB Wed Jul 31 17:21:18 2013 (r253845) @@ -105,7 +105,6 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG device iopwdog options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/CUBIEBOARD Wed Jul 31 17:21:18 2013 (r253845) @@ -92,7 +92,6 @@ device pty device snp device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # I2C support #device iicbus @@ -131,3 +130,4 @@ device miibus options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts + Modified: head/sys/arm/conf/DB-78XXX ============================================================================== --- head/sys/arm/conf/DB-78XXX Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/DB-78XXX Wed Jul 31 17:21:18 2013 (r253845) @@ -55,7 +55,6 @@ device pci device loop device md device random -options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DB-88F5XXX ============================================================================== --- head/sys/arm/conf/DB-88F5XXX Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/DB-88F5XXX Wed Jul 31 17:21:18 2013 (r253845) @@ -54,7 +54,6 @@ device pci device md device loop device random -options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DB-88F6XXX ============================================================================== --- head/sys/arm/conf/DB-88F6XXX Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/DB-88F6XXX Wed Jul 31 17:21:18 2013 (r253845) @@ -55,7 +55,6 @@ device pci device loop device md device random -options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/DOCKSTAR ============================================================================== --- head/sys/arm/conf/DOCKSTAR Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/DOCKSTAR Wed Jul 31 17:21:18 2013 (r253845) @@ -46,7 +46,6 @@ options KDB # Pseudo devices device md device random -options YARROW_RNG # Yarrow software RNG device loop # Serial ports Modified: head/sys/arm/conf/DREAMPLUG-1001 ============================================================================== --- head/sys/arm/conf/DREAMPLUG-1001 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/DREAMPLUG-1001 Wed Jul 31 17:21:18 2013 (r253845) @@ -62,7 +62,6 @@ device loop #Network loopback device md #Memory/malloc disk device pty #BSD-style compatibility pseudo ttys device random #Entropy device -options YARROW_RNG # Yarrow software RNG device tun #Packet tunnel. device ether #Required for all ethernet devices device vlan #802.1Q VLAN support Modified: head/sys/arm/conf/EA3250 ============================================================================== --- head/sys/arm/conf/EA3250 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/EA3250 Wed Jul 31 17:21:18 2013 (r253845) @@ -54,7 +54,6 @@ device loop device md device pty device random -options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/EB9200 ============================================================================== --- head/sys/arm/conf/EB9200 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/EB9200 Wed Jul 31 17:21:18 2013 (r253845) @@ -60,7 +60,6 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random -options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/EFIKA_MX Wed Jul 31 17:21:18 2013 (r253845) @@ -96,7 +96,6 @@ device bpf # Berkeley packet filter # Pseudo devices. device loop # Network loopback device random # Entropy device -options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/EP80219 Wed Jul 31 17:21:18 2013 (r253845) @@ -101,7 +101,6 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG options ARM_USE_SMALL_ALLOC # Floppy drives Modified: head/sys/arm/conf/ETHERNUT5 ============================================================================== --- head/sys/arm/conf/ETHERNUT5 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/ETHERNUT5 Wed Jul 31 17:21:18 2013 (r253845) @@ -126,7 +126,6 @@ device geom_map # GEOM partition mappin # Pseudo devices. device loop # Network loopback device random # Entropy device -options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/GUMSTIX ============================================================================== --- head/sys/arm/conf/GUMSTIX Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/GUMSTIX Wed Jul 31 17:21:18 2013 (r253845) @@ -88,4 +88,3 @@ options DDB #Enable the kernel debugg device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG Modified: head/sys/arm/conf/HL200 ============================================================================== --- head/sys/arm/conf/HL200 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/HL200 Wed Jul 31 17:21:18 2013 (r253845) @@ -65,7 +65,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random -options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/HL201 ============================================================================== --- head/sys/arm/conf/HL201 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/HL201 Wed Jul 31 17:21:18 2013 (r253845) @@ -67,7 +67,6 @@ options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random -options YARROW_RNG # Yarrow software RNG device loop device ether device uart @@ -130,3 +129,4 @@ device pass # Passthrough device (dire #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm options ROOTDEVNAME=\"ufs:da0s1a\" + Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/IQ31244 Wed Jul 31 17:21:18 2013 (r253845) @@ -106,7 +106,6 @@ options DDB #Enable the kernel debugg options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG options ARM_USE_SMALL_ALLOC # Floppy drives Modified: head/sys/arm/conf/KB920X ============================================================================== --- head/sys/arm/conf/KB920X Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/KB920X Wed Jul 31 17:21:18 2013 (r253845) @@ -66,7 +66,6 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random -options YARROW_RNG # Yarrow software RNG device loop device ether device uart Modified: head/sys/arm/conf/LN2410SBC ============================================================================== --- head/sys/arm/conf/LN2410SBC Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/LN2410SBC Wed Jul 31 17:21:18 2013 (r253845) @@ -62,7 +62,6 @@ options SX_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING device random -options YARROW_RNG # Yarrow software RNG device loop device ether @@ -84,3 +83,4 @@ device ohci device umass device scbus # SCSI bus (required for da) device da # Direct Access (disks) + Modified: head/sys/arm/conf/NSLU ============================================================================== --- head/sys/arm/conf/NSLU Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/NSLU Wed Jul 31 17:21:18 2013 (r253845) @@ -105,7 +105,6 @@ device loop device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG #options ARM_USE_SMALL_ALLOC Modified: head/sys/arm/conf/PANDABOARD ============================================================================== --- head/sys/arm/conf/PANDABOARD Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/PANDABOARD Wed Jul 31 17:21:18 2013 (r253845) @@ -110,7 +110,6 @@ device md #options MD_ROOT_SIZE=7560 device random # Entropy device -options YARROW_RNG # Yarrow software RNG # USB support device usb Modified: head/sys/arm/conf/QILA9G20 ============================================================================== --- head/sys/arm/conf/QILA9G20 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/QILA9G20 Wed Jul 31 17:21:18 2013 (r253845) @@ -77,7 +77,6 @@ options NO_SWAPPING #options DIAGNOSTIC device random -options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/RPI-B Wed Jul 31 17:21:18 2013 (r253845) @@ -86,7 +86,6 @@ options INVARIANT_SUPPORT #Extra sanity device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # USB support device usb Modified: head/sys/arm/conf/SAM9260EK ============================================================================== --- head/sys/arm/conf/SAM9260EK Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/SAM9260EK Wed Jul 31 17:21:18 2013 (r253845) @@ -134,7 +134,6 @@ device mmcsd # MMC/SD memory card # Pseudo devices. device loop # Network loopback device random # Entropy device -options YARROW_RNG # Yarrow software RNG device ether # Ethernet support #device vlan # 802.1Q VLAN support #device tun # Packet tunnel. Modified: head/sys/arm/conf/SAM9G20EK ============================================================================== --- head/sys/arm/conf/SAM9G20EK Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/SAM9G20EK Wed Jul 31 17:21:18 2013 (r253845) @@ -76,7 +76,6 @@ options NO_SWAPPING #options DIAGNOSTIC device random -options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/SAM9X25EK ============================================================================== --- head/sys/arm/conf/SAM9X25EK Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/SAM9X25EK Wed Jul 31 17:21:18 2013 (r253845) @@ -77,7 +77,6 @@ options NO_SWAPPING #options DIAGNOSTIC device random -options YARROW_RNG # Yarrow software RNG device pty device loop device bpf @@ -151,3 +150,4 @@ device miibus #device wlan_ccmp # 802.11 CCMP support #device wlan_tkip # 802.11 TKIP support #device wlan_amrr # AMRR transmit rate control algorithm + Modified: head/sys/arm/conf/SHEEVAPLUG ============================================================================== --- head/sys/arm/conf/SHEEVAPLUG Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/SHEEVAPLUG Wed Jul 31 17:21:18 2013 (r253845) @@ -45,7 +45,6 @@ options KDB # Pseudo devices device random -options YARROW_RNG # Yarrow software RNG device loop # Serial ports Modified: head/sys/arm/conf/SN9G45 ============================================================================== --- head/sys/arm/conf/SN9G45 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/SN9G45 Wed Jul 31 17:21:18 2013 (r253845) @@ -76,7 +76,6 @@ options NO_SWAPPING #options DIAGNOSTIC device random -options YARROW_RNG # Yarrow software RNG device loop device bpf device ether Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/TS7800 Wed Jul 31 17:21:18 2013 (r253845) @@ -48,7 +48,6 @@ device pci device md device loop device random -options YARROW_RNG # Yarrow software RNG # Serial ports device uart Modified: head/sys/arm/conf/VERSATILEPB ============================================================================== --- head/sys/arm/conf/VERSATILEPB Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/VERSATILEPB Wed Jul 31 17:21:18 2013 (r253845) @@ -94,7 +94,6 @@ options INVARIANT_SUPPORT #Extra sanity device md device random # Entropy device -options YARROW_RNG # Yarrow software RNG # Flattened Device Tree options FDT Modified: head/sys/arm/conf/ZEDBOARD ============================================================================== --- head/sys/arm/conf/ZEDBOARD Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/arm/conf/ZEDBOARD Wed Jul 31 17:21:18 2013 (r253845) @@ -66,7 +66,6 @@ options KDB device loop device random -options YARROW_RNG # Yarrow software RNG device ether device if_cgem # Zynq-7000 gig ethernet device device mii Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/conf/NOTES Wed Jul 31 17:21:18 2013 (r253845) @@ -1132,9 +1132,6 @@ options VFS_AIO # Cryptographically secure random number generator; /dev/random device random -# Yarrow software RNG adapter for random -options YARROW_RNG - # The system memory devices; /dev/mem, /dev/kmem device mem Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/conf/files Wed Jul 31 17:21:18 2013 (r253845) @@ -540,8 +540,8 @@ crypto/des/des_ecb.c optional crypto | crypto/des/des_setkey.c optional crypto | ipsec | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \ - ipsec | yarrow_rng | wlan_ccmp -crypto/rijndael/rijndael-api-fst.c optional geom_bde | yarrow_rng + ipsec | random | wlan_ccmp +crypto/rijndael/rijndael-api-fst.c optional geom_bde | random crypto/rijndael/rijndael-api.c optional crypto | ipsec | wlan_ccmp crypto/sha1.c optional carp | crypto | ipsec | \ netgraph_mppc_encryption | sctp @@ -2030,12 +2030,11 @@ rt2860.fw optional rt2860fw | ralfw \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/harvest.c standard -dev/random/hash.c optional yarrow_rng +dev/random/hash.c optional random dev/random/probe.c optional random -dev/random/random_adaptors.c standard dev/random/randomdev.c optional random -dev/random/randomdev_soft.c optional yarrow_rng -dev/random/yarrow.c optional yarrow_rng +dev/random/randomdev_soft.c optional random +dev/random/yarrow.c optional random dev/rc/rc.c optional rc dev/re/if_re.c optional re dev/rndtest/rndtest.c optional rndtest Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/conf/options Wed Jul 31 17:21:18 2013 (r253845) @@ -905,6 +905,3 @@ RACCT opt_global.h # Resource Limits RCTL opt_global.h - -# Software random number generators for random(4) -YARROW_RNG opt_dontuse.h Modified: head/sys/dev/random/ivy.c ============================================================================== --- head/sys/dev/random/ivy.c Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/ivy.c Wed Jul 31 17:21:18 2013 (r253845) @@ -28,19 +28,16 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cpu.h" + +#ifdef RDRAND_RNG + #include #include -#include #include -#include #include #include #include - -#include -#include - -#include #include #define RETRY_COUNT 10 @@ -49,7 +46,7 @@ static void random_ivy_init(void); static void random_ivy_deinit(void); static int random_ivy_read(void *, int); -struct random_adaptor random_ivy = { +struct random_systat random_ivy = { .ident = "Hardware, Intel IvyBridge+ RNG", .init = random_ivy_init, .deinit = random_ivy_deinit, @@ -117,32 +114,4 @@ random_ivy_read(void *buf, int c) return (c - count); } -static int -rdrand_modevent(module_t mod, int type, void *unused) -{ - - switch (type) { - case MOD_LOAD: - if (cpu_feature2 & CPUID2_RDRAND) { - random_adaptor_register("rdrand", &random_ivy); - EVENTHANDLER_INVOKE(random_adaptor_attach, &random_ivy); - return (0); - } else { -#ifndef KLD_MODULE - if (bootverbose) #endif - printf( - "%s: RDRAND feature is not present on this CPU\n", - random_ivy.ident); -#ifdef KLD_MODULE - return (ENXIO); -#else - return (0); -#endif - } - } - - return (EINVAL); -} - -RANDOM_ADAPTOR_MODULE(random_rdrand, rdrand_modevent, 1); Modified: head/sys/dev/random/nehemiah.c ============================================================================== --- head/sys/dev/random/nehemiah.c Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/nehemiah.c Wed Jul 31 17:21:18 2013 (r253845) @@ -28,20 +28,19 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cpu.h" + +#ifdef PADLOCK_RNG + #include #include #include #include -#include #include #include -#include #include -#include -#include -#include #include #define RANDOM_BLOCK_SIZE 256 @@ -51,7 +50,7 @@ static void random_nehemiah_init(void); static void random_nehemiah_deinit(void); static int random_nehemiah_read(void *, int); -struct random_adaptor random_nehemiah = { +struct random_systat random_nehemiah = { .ident = "Hardware, VIA Nehemiah", .init = random_nehemiah_init, .deinit = random_nehemiah_deinit, @@ -209,33 +208,4 @@ random_nehemiah_read(void *buf, int c) return (c); } -static int -nehemiah_modevent(module_t mod, int type, void *unused) -{ - - switch (type) { - case MOD_LOAD: - if (via_feature_rng & VIA_HAS_RNG) { - random_adaptor_register("nehemiah", &random_nehemiah); - EVENTHANDLER_INVOKE(random_adaptor_attach, - &random_nehemiah); - return (0); - } else { -#ifndef KLD_MODULE - if (bootverbose) #endif - printf( - "%s: VIA RNG feature is not present on this CPU\n", - random_nehemiah.ident); -#ifdef KLD_MODULE - return (ENXIO); -#else - return (0); -#endif - } - } - - return (EINVAL); -} - -RANDOM_ADAPTOR_MODULE(nehemiah, nehemiah_modevent, 1); Modified: head/sys/dev/random/probe.c ============================================================================== --- head/sys/dev/random/probe.c Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/probe.c Wed Jul 31 17:21:18 2013 (r253845) @@ -28,35 +28,66 @@ #include __FBSDID("$FreeBSD$"); -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) #include "opt_cpu.h" #endif +#include #include #include #include +#include +#include #include +#include + +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#include +#include +#include +#include +#endif -#include #include +#include + +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#ifdef PADLOCK_RNG +extern struct random_systat random_nehemiah; +#endif +#ifdef RDRAND_RNG +extern struct random_systat random_ivy; +#endif +#endif void -random_ident_hardware(struct random_adaptor **adaptor) +random_ident_hardware(struct random_systat **systat) { - struct random_adaptor *tmp; - int enable; - /* Set default to software (yarrow) */ - *adaptor = random_adaptor_get("yarrow"); + /* Set default to software */ + *systat = &random_yarrow; /* Then go looking for hardware */ - enable = 1; - TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); - if (enable && (tmp = random_adaptor_get("nehemiah"))) - *adaptor = tmp; - - enable = 1; - TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); - if (enable && (tmp = random_adaptor_get("rdrand"))) - *adaptor = tmp; +#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) +#ifdef PADLOCK_RNG + if (via_feature_rng & VIA_HAS_RNG) { + int enable; + + enable = 1; + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); + if (enable) + *systat = &random_nehemiah; + } +#endif +#ifdef RDRAND_RNG + if (cpu_feature2 & CPUID2_RDRAND) { + int enable; + + enable = 1; + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); + if (enable) + *systat = &random_ivy; + } +#endif +#endif } Modified: head/sys/dev/random/randomdev.c ============================================================================== --- head/sys/dev/random/randomdev.c Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/randomdev.c Wed Jul 31 17:21:18 2013 (r253845) @@ -70,15 +70,12 @@ static struct cdevsw random_cdevsw = { .d_name = "random", }; -static struct random_adaptor *random_adaptor; -static eventhandler_tag attach_tag; -static int random_inited; - +struct random_systat *random_systat; /* For use with make_dev(9)/destroy_dev(9). */ static struct cdev *random_dev; -/* Used to fake out unused random calls in random_adaptor */ +/* Used to fake out unused random calls in random_systat */ void random_null_func(void) { @@ -91,8 +88,8 @@ random_close(struct cdev *dev __unused, { if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) == 0) && (securelevel_gt(td->td_ucred, 0) == 0)) { - (*random_adaptor->reseed)(); - random_adaptor->seeded = 1; + (*random_systat->reseed)(); + random_systat->seeded = 1; arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ } @@ -107,8 +104,8 @@ random_read(struct cdev *dev __unused, s void *random_buf; /* Blocking logic */ - if (!random_adaptor->seeded) - error = (*random_adaptor->block)(flag); + if (!random_systat->seeded) + error = (*random_systat->block)(flag); /* The actual read */ if (!error) { @@ -117,7 +114,7 @@ random_read(struct cdev *dev __unused, s while (uio->uio_resid > 0 && !error) { c = MIN(uio->uio_resid, PAGE_SIZE); - c = (*random_adaptor->read)(random_buf, c); + c = (*random_systat->read)(random_buf, c); error = uiomove(random_buf, c, uio); } @@ -142,7 +139,7 @@ random_write(struct cdev *dev __unused, error = uiomove(random_buf, c, uio); if (error) break; - (*random_adaptor->write)(random_buf, c); + (*random_systat->write)(random_buf, c); } free(random_buf, M_TEMP); @@ -175,37 +172,14 @@ random_poll(struct cdev *dev __unused, i int revents = 0; if (events & (POLLIN | POLLRDNORM)) { - if (random_adaptor->seeded) + if (random_systat->seeded) revents = events & (POLLIN | POLLRDNORM); else - revents = (*random_adaptor->poll) (events,td); + revents = (*random_systat->poll) (events,td); } return (revents); } -static void -random_initialize(void *p, struct random_adaptor *s) -{ - if (random_inited) { - printf("random: <%s> already initialized\n", - random_adaptor->ident); - return; - } - - random_adaptor = s; - - (s->init)(); - - printf("random: <%s> initialized\n", s->ident); - - random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw, - RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); - make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ - - /* mark random(4) as initialized, to avoid being called again */ - random_inited = 1; -} - /* ARGSUSED */ static int random_modevent(module_t mod __unused, int type, void *data __unused) @@ -214,29 +188,23 @@ random_modevent(module_t mod __unused, i switch (type) { case MOD_LOAD: - random_ident_hardware(&random_adaptor); + random_ident_hardware(&random_systat); + (*random_systat->init)(); - if (random_adaptor == NULL) { - printf( - "random: No random adaptor attached, postponing initialization\n"); - attach_tag = EVENTHANDLER_REGISTER(random_adaptor_attach, - random_initialize, NULL, EVENTHANDLER_PRI_ANY); - } else { - random_initialize(NULL, random_adaptor); - } + if (bootverbose) + printf("random: \n", + random_systat->ident); + + random_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, &random_cdevsw, + RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); + make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ break; case MOD_UNLOAD: - if (random_adaptor != NULL) { - (*random_adaptor->deinit)(); - destroy_dev(random_dev); - } - /* Unregister the event handler */ - if (attach_tag != NULL) { - EVENTHANDLER_DEREGISTER(random_adaptor_attach, - attach_tag); - } + (*random_systat->deinit)(); + + destroy_dev(random_dev); break; Modified: head/sys/dev/random/randomdev.h ============================================================================== --- head/sys/dev/random/randomdev.h Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/randomdev.h Wed Jul 31 17:21:18 2013 (r253845) @@ -38,7 +38,7 @@ typedef void random_write_func_t(void *, typedef int random_poll_func_t(int, struct thread *); typedef void random_reseed_func_t(void); -struct random_adaptor { +struct random_systat { struct selinfo rsel; const char *ident; int seeded; @@ -51,5 +51,7 @@ struct random_adaptor { random_reseed_func_t *reseed; }; -extern void random_ident_hardware(struct random_adaptor **); +extern struct random_systat *random_systat; + +extern void random_ident_hardware(struct random_systat **); extern void random_null_func(void); Modified: head/sys/dev/random/randomdev_soft.c ============================================================================== --- head/sys/dev/random/randomdev_soft.c Wed Jul 31 16:27:56 2013 (r253844) +++ head/sys/dev/random/randomdev_soft.c Wed Jul 31 17:21:18 2013 (r253845) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -51,7 +50,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -65,7 +63,7 @@ static int random_yarrow_poll(int event, static int random_yarrow_block(int flag); static void random_yarrow_flush_reseed(void); -struct random_adaptor random_yarrow = { +struct random_systat random_yarrow = { .ident = "Software, Yarrow", .init = random_yarrow_init, .deinit = random_yarrow_deinit, @@ -105,7 +103,7 @@ static int random_kthread_control = 0; static struct proc *random_kthread_proc; /* List for the dynamic sysctls */ -static struct sysctl_ctx_list random_clist; +struct sysctl_ctx_list random_clist; /* ARGSUSED */ static int @@ -122,20 +120,25 @@ random_yarrow_init(void) { int error, i; struct harvest *np; - struct sysctl_oid *random_sys_o, *random_sys_harvest_o; + struct sysctl_oid *random_o, *random_sys_o, *random_sys_harvest_o; enum esource e; - random_yarrow_init_alg(&random_clist); + random_o = SYSCTL_ADD_NODE(&random_clist, + SYSCTL_STATIC_CHILDREN(_kern), + OID_AUTO, "random", CTLFLAG_RW, 0, + "Software Random Number Generator"); + + random_yarrow_init_alg(&random_clist, random_o); random_sys_o = SYSCTL_ADD_NODE(&random_clist, - SYSCTL_STATIC_CHILDREN(_kern_random), + SYSCTL_CHILDREN(random_o), OID_AUTO, "sys", CTLFLAG_RW, 0, "Entropy Device Parameters"); SYSCTL_ADD_PROC(&random_clist, SYSCTL_CHILDREN(random_sys_o), OID_AUTO, "seeded", CTLTYPE_INT | CTLFLAG_RW, - &random_yarrow.seeded, 1, random_check_boolean, "I", + &random_systat->seeded, 1, random_check_boolean, "I", "Seeded State"); random_sys_harvest_o = SYSCTL_ADD_NODE(&random_clist, @@ -359,10 +362,10 @@ random_yarrow_write(void *buf, int count void random_yarrow_unblock(void) { - if (!random_yarrow.seeded) { - random_yarrow.seeded = 1; - selwakeuppri(&random_yarrow.rsel, PUSER); - wakeup(&random_yarrow); + if (!random_systat->seeded) { + random_systat->seeded = 1; + selwakeuppri(&random_systat->rsel, PUSER); + wakeup(random_systat); } (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, ARC4_ENTR_HAVE); @@ -374,10 +377,10 @@ random_yarrow_poll(int events, struct th *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 17:46:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 66227FB7; Wed, 31 Jul 2013 17:46:18 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4E2E22F8D; Wed, 31 Jul 2013 17:46:18 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VHkIpr041341; Wed, 31 Jul 2013 17:46:18 GMT (envelope-from obrien@freefall.freebsd.org) Received: (from obrien@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6VHkIaT041338; Wed, 31 Jul 2013 17:46:18 GMT (envelope-from obrien) Date: Wed, 31 Jul 2013 10:46:14 -0700 From: "David O'Brien" To: Andrey Chernov Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng Message-ID: <20130731174614.GA76782@dragon.NUXI.org> References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> <20130731000746.GA65806@dragon.NUXI.org> <51F86F53.9020600@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <51F86F53.9020600@freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT X-MUA-Host: dragon.NUXI.org X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: obrien@freebsd.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 17:46:18 -0000 On Wed, Jul 31, 2013 at 05:58:43AM +0400, Andrey Chernov wrote: > On 31.07.2013 4:07, David O'Brien wrote: > > I believe you're talking about this code in > > sys/libkern/arc4random.c:arc4rand() > > > > if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, > > ARC4_ENTR_SEED) || reseed || > > (arc4_numruns > ARC4_RESEED_BYTES) || > > (tv.tv_sec > arc4_t_reseed)) > > arc4_randomstir(); > > > > Without setting 'arc4rand_iniseed_state' from ARC4_ENTR_NONE -> > > ARC4_ENTR_HAVE, we would still call arc4_randomstir() periodically due > > to (tv.tv_sec > arc4_t_reseed) and (arc4_numruns > ARC4_RESEED_BYTES). > > The whole problem is that arc4 is poorly initialized right after boot, > but immediately used in many places like tcp. It reseeds again only > after 5 minutes after boot making vulnerability window at this interval. I realize the motivation for your r249631 change. But as it relates to the change I committed, there is no change in behavior in this. If one is using a hardware RNG, yarrow is not initialized and so the ARC4_ENTR_NONE -> ARC4_ENTR_HAVE transition does not happen. -- -- David (obrien@FreeBSD.org) From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:09:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 68368913; Wed, 31 Jul 2013 18:09:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20D152090; Wed, 31 Jul 2013 18:09:12 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id m46so896521wev.22 for ; Wed, 31 Jul 2013 11:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=a/z0tznRltB/K+yAmzDY+KkLdIGHTpDaJ1kqR8qGZLo=; b=KWD8TSa+mqy8HzOKqYu4wFkXg+DG8x5Xj69ivijg1TQWdNwKyqQRnitkyEW5k0hviw M6DzL8EMqvKNdqcyZQwZJ95Qibp6+StxzLDK2IYfBfaHfdUP5cPlhF+/2eFMpOVwwaYW 0A9MfwbXt8af0U7NI/Cd+WJigiKoAoov989qT9zsGxBLKJ+VF3iipSNYTntlkOyzB8kK cNTKeMdb/7wVYAoOcScYTy4oTojRKmbYPhukj1ptl9PpdrDHXzK2YBklAQYalWy9WKco UFmEQEB3mIvObdqpRvDY1z4uLcLgTyLyL0miWzkBFI8aZauNSkD7J//Uy9CdmsEi1Jgz yo/w== MIME-Version: 1.0 X-Received: by 10.180.39.212 with SMTP id r20mr5170226wik.30.1375294151414; Wed, 31 Jul 2013 11:09:11 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Wed, 31 Jul 2013 11:09:11 -0700 (PDT) In-Reply-To: <1375279659.45247.148.camel@revolution.hippie.lan> References: <201307310113.r6V1DUKY044876@svn.freebsd.org> <1375279659.45247.148.camel@revolution.hippie.lan> Date: Wed, 31 Jul 2013 11:09:11 -0700 X-Google-Sender-Auth: UShvdkCTb2dZYn4YbV7-L00IOTc Message-ID: Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac From: Adrian Chadd To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, Justin Hibbits , Sergey Kandaurov , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:09:14 -0000 On 31 July 2013 07:07, Ian Lepore wrote: > I'm more concerned about the 201 files in the base that say I have to > give Mr. Paul credit in any product documentation and advertising > materials (the marketing department is going to love that one, huh?). Welcome to licencing terms hell. This is why there have been occasional sprints in "fixing" the licence terms to be more consistent. > How many other such one-off requirements are buried in the license > blocks of the source that I had no idea existed and am failing to comply > with? That's what well written perl scripts to extract / process copyright notices are for. -adrian From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:15:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EA7C2AFA; Wed, 31 Jul 2013 18:15:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 00BBD20F5; Wed, 31 Jul 2013 18:15:56 +0000 (UTC) Received: by mail-wg0-f43.google.com with SMTP id z12so895050wgg.10 for ; Wed, 31 Jul 2013 11:15:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=i8wyYbCGhiJSxSDGMO0O8shnuoW1IWeu7wCWwM43hz0=; b=VYWzDvuQjNO56rP1sOyag3lZ9YxEjLTbRHcvf3o+am8AuYB5WNrQjquPEa+KDNH3aw 9nv/AF4zSHzmBPxhKbKXh+HeATxvR1yCT4MgJ2DO3GgUJ8QDSwg7UdV358mDALWgCFia AL8DJdJg0cWkfTIl9pkG1SsC141r1KyS6JU5j2szQ7fLXkXIC7iH7Y2iyKK8j6+z4w/J CIhrWAxG5fNO8fk5LsKrsl5gn/a+wEnc1/TCmkB16Pk8kHcmXJOicO2t4+PjbqDcLR+H apVVBHsYm1i6HaCdSz7kbgOWs4wks5NTX1m/yXxh7qE56Rck1ELRJ7UA6S6QUZkdrBi/ VQUg== MIME-Version: 1.0 X-Received: by 10.194.203.73 with SMTP id ko9mr11608102wjc.79.1375294555315; Wed, 31 Jul 2013 11:15:55 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Wed, 31 Jul 2013 11:15:55 -0700 (PDT) In-Reply-To: <20130731104009.GG59509@rincewind.paeps.cx> References: <201307292026.r6TKQRRb021717@svn.freebsd.org> <20130731104009.GG59509@rincewind.paeps.cx> Date: Wed, 31 Jul 2013 11:15:55 -0700 X-Google-Sender-Auth: hAujTNnox_fjvo5X__S9sisReOs Message-ID: Subject: Re: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... From: Adrian Chadd To: "David E. O'Brien" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:15:58 -0000 On 31 July 2013 03:40, Philip Paeps wrote: >> * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. >> The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. > > I would really prefer to see this logic reversed. Of course, we expect > people to read UPDATING, but disabling functionality that has been > enabled by default "forever" without any warning, especially in a > security-related context is not cool. Please change YARROW_RNG to > RNG_NO_YARROW or something similar and keep it in by default. If you > think there's a really good reason to kick support out by default, there > are mailing lists to discuss this. I'm 100% against this. I'm getting extremely fed up with the "default is on" bloat that is everywhere in our sub-systems. David is actually _tidying things up_ by making optional devices be standalone devices - that way they show up as very simple to include and expand when making modules of things. Otherwise you turn this into a single, monolithic module that has compile options.. and that sucks. David's way is clean, simple and architecturally well-designed. It's how it should've been done in the first place. I'd like to see people bite the bullet in 10.0 for this and other devices / subsystems. > But what happens to the adaptors if you kldunload random? Things should be correctly refcounted so you can't actually do that if any of the users of it are loaded. >> * If the kernel doesn't have any random_adaptor adapters present then the >> creation of /dev/random is postponed until next random_adaptor is kldload'ed. > > This worries me. A fast-booting system might want random numbers in > userland before a random_adaptor is loaded (and properly seeded?). We > don't have particularly stellar support for early random numbers, but we > should be careful not to make it worse. We have an infrastructure for this - it's called /boot/loader.conf . > Also: what happens to in-kernel consumers of random (like TCP) before > the first random_adaptor is attached (and properly seeded)? > > I'd really like to see this get some more review. I'd like to see the architectural changes needed for a cleanup like this take place, rather than getting lost in discussion. For the MIPS boards I hack on/for, I don't have any guaranteed random number generator. So it's Yarrow or bust. So we need to "properly seed" things as best as we can before any hardware random number generators are loaded. The same problem exists for i386/amd64 with hardware PRNGs.. we should ensure yarrow is properly seeded here. Tsk, -adrian From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:18:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE481C4C; Wed, 31 Jul 2013 18:18:02 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9C27F2108; Wed, 31 Jul 2013 18:18:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VII2jg058657; Wed, 31 Jul 2013 18:18:02 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VII2SO058656; Wed, 31 Jul 2013 18:18:02 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201307311818.r6VII2SO058656@svn.freebsd.org> From: Jim Harris Date: Wed, 31 Jul 2013 18:18:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253846 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:18:02 -0000 Author: jimharris Date: Wed Jul 31 18:18:02 2013 New Revision: 253846 URL: http://svnweb.freebsd.org/changeset/base/253846 Log: Add myself as maintainer for nvme(4), nvd(4) and nvmecontrol(8). Modified: head/MAINTAINERS Modified: head/MAINTAINERS ============================================================================== --- head/MAINTAINERS Wed Jul 31 17:21:18 2013 (r253845) +++ head/MAINTAINERS Wed Jul 31 18:18:02 2013 (r253846) @@ -128,3 +128,6 @@ sysdoc trhodes Pre-commit review prefe sh(1) jilles Pre-commit review requested. This also applies to kill(1), printf(1) and test(1) which are compiled in as builtins. +nvme(4) jimharris Pre-commit review requested. +nvd(4) jimharris Pre-commit review requested. +nvmecontrol(8) jimharris Pre-commit review requested. From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:18:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C6B96D95; Wed, 31 Jul 2013 18:18:53 +0000 (UTC) (envelope-from guy.helmer@gmail.com) Received: from mail.palisadesystems.com (mail.palisadesystems.com [216.81.178.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A8832111; Wed, 31 Jul 2013 18:18:53 +0000 (UTC) Received: from [192.168.221.39] ([192.168.221.39]) (authenticated bits=0) by mail.palisadesystems.com (8.14.6/8.14.6) with ESMTP id r6VIFWIv068953 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 31 Jul 2013 13:15:42 -0500 (CDT) (envelope-from guy.helmer@gmail.com) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac From: Guy Helmer In-Reply-To: Date: Wed, 31 Jul 2013 13:15:29 -0500 Content-Transfer-Encoding: 7bit Message-Id: References: <201307310113.r6V1DUKY044876@svn.freebsd.org> <1375279659.45247.148.camel@revolution.hippie.lan> To: Adrian Chadd X-Mailer: Apple Mail (2.1508) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.palisadesystems.com [192.168.222.92]); Wed, 31 Jul 2013 13:15:43 -0500 (CDT) X-Palisade-MailScanner-Information: Please contact the ISP for more information X-Palisade-MailScanner-ID: r6VIFWIv068953 X-Palisade-MailScanner: Found to be clean X-Palisade-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.999, required 5, ALL_TRUSTED -1.00, BAYES_00 -1.90, DKIM_ADSP_CUSTOM_MED 0.00, FREEMAIL_FROM 1.00, NML_ADSP_CUSTOM_MED 0.90) X-Palisade-MailScanner-From: guy.helmer@gmail.com X-Spam-Status: No Cc: Justin Hibbits , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Sergey Kandaurov , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:18:53 -0000 On Jul 31, 2013, at 1:09 PM, Adrian Chadd wrote: > On 31 July 2013 07:07, Ian Lepore wrote: > >> I'm more concerned about the 201 files in the base that say I have to >> give Mr. Paul credit in any product documentation and advertising >> materials (the marketing department is going to love that one, huh?). > > Welcome to licencing terms hell. This is why there have been > occasional sprints in "fixing" the licence terms to be more > consistent. > >> How many other such one-off requirements are buried in the license >> blocks of the source that I had no idea existed and am failing to comply >> with? > > That's what well written perl scripts to extract / process copyright > notices are for. Any pointers to freely-available scripts? Thx, Guy From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:23:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D74111E; Wed, 31 Jul 2013 18:23:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x236.google.com (mail-we0-x236.google.com [IPv6:2a00:1450:400c:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4286B215C; Wed, 31 Jul 2013 18:23:43 +0000 (UTC) Received: by mail-we0-f182.google.com with SMTP id u55so930438wes.13 for ; Wed, 31 Jul 2013 11:23:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=ye6iDBoLdnLM/3BAvmwhzfZQVorlosr4QRNkQWdn2TE=; b=gTjWxqz4MA1ZerRTYT1nlxyKd4QIYY4BFA8D8Dx5em2m5wyTRXkCdtAHX4+HBAgm57 dCxCULA2A53taQR16EfWjLpmZ9NgMezU7FlOeK1MwxpA6DMNzB1CRs5vaqzLrZZovjua tBmT3Gyt4WtCnwgM+BKbR7RV64o8jnNMH7m8nLpUfWRpGQ2UNd9QavmOz0Py2VQgFCoJ R7WeoElRpU2w4I+fv9fquodIJxGX4845wUNfNsX19/38O3rDc9jdWYkoWMsQTXt2cJJ9 Pc1jA6DMIQ54+HIuuAeOf3AmaTKwk00J1gN8l4KvJO8Bj0nTdweKc8IDVGYFGOiEWI3K or8g== MIME-Version: 1.0 X-Received: by 10.194.203.73 with SMTP id ko9mr11626977wjc.79.1375295021572; Wed, 31 Jul 2013 11:23:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Wed, 31 Jul 2013 11:23:41 -0700 (PDT) In-Reply-To: References: <201307310113.r6V1DUKY044876@svn.freebsd.org> <1375279659.45247.148.camel@revolution.hippie.lan> Date: Wed, 31 Jul 2013 11:23:41 -0700 X-Google-Sender-Auth: b5Apzeb-7EJXSwZ6brYRkakymQc Message-ID: Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac From: Adrian Chadd To: Guy Helmer Content-Type: text/plain; charset=ISO-8859-1 Cc: Justin Hibbits , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Sergey Kandaurov , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:23:44 -0000 On 31 July 2013 11:15, Guy Helmer wrote: >> That's what well written perl scripts to extract / process copyright >> notices are for. > > Any pointers to freely-available scripts? Nope. This crap goes for ${STUPID_AMOUNTS_OF_CASH} to companies who actually have a vested interest in surveying the licencing of files in software projects. It's kinda scary. -adrian From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 18:42:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8B9FB89D for ; Wed, 31 Jul 2013 18:42:35 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0AF642236 for ; Wed, 31 Jul 2013 18:42:34 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id mf11so758437lab.29 for ; Wed, 31 Jul 2013 11:42:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=xCLGl3BZhEUJ2+dhwzBEidLGM3Dvyuhfsl1NwyQg9wg=; b=RtLKAazLsdI2jvCpDKQAsTwjWueF0QdCtTNGEz80uEc8SBnjCMr3yioUmD3o47CqTg o7R5ue5aAFSnMwzCugvQh982rWY9Mn1JDuvfcPEfXl9AzWxnK2QkELjCeg5wxONlq/k4 c6n40YoG7EMpakxspfIIoJ3Hh2DTqGFdzTb4TXBH+U1bWsb227/wFbLhhF5kavRMb3jd M0AK7FHfbx0ODpbNC8jbg0qMKHvURiIbEaNb2nyBUOoWPvq1DLqi4XGIiIcQKm32XXeX N8fU4Jx366oDNNnzHtW9sU/OPf80etSlsTW2ieYTmVm/oK1gMK8vnzZ95WMURDuVulPk COFg== X-Received: by 10.112.20.66 with SMTP id l2mr30500974lbe.48.1375296146728; Wed, 31 Jul 2013 11:42:26 -0700 (PDT) Received: from [192.168.1.2] ([89.169.173.68]) by mx.google.com with ESMTPSA id l10sm527646lbh.13.2013.07.31.11.42.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 31 Jul 2013 11:42:26 -0700 (PDT) Message-ID: <51F95A8F.1060108@freebsd.org> Date: Wed, 31 Jul 2013 22:42:23 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: obrien@freebsd.org Subject: Re: svn commit: r253786 - in head/sys: dev/random modules/padlock_rng modules/rdrand_rng modules/yarrow_rng References: <201307292058.r6TKwA56031193@svn.freebsd.org> <51F6E0AB.3010001@freebsd.org> <20130731000746.GA65806@dragon.NUXI.org> <51F86F53.9020600@freebsd.org> <20130731174614.GA76782@dragon.NUXI.org> In-Reply-To: <20130731174614.GA76782@dragon.NUXI.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmPNU87y4xS3jtw9ZzG3f4ErFESeHhXeSNniD8GXPB3EPk3PxRCzW3FdMHjIYyQvK468FAV Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 18:42:35 -0000 On 31.07.2013 21:46, David O'Brien wrote: > I realize the motivation for your r249631 change. > > But as it relates to the change I committed, there is no change in > behavior in this. If one is using a hardware RNG, yarrow is not > initialized and so the ARC4_ENTR_NONE -> ARC4_ENTR_HAVE transition > does not happen. > Uh, I never claim that it was you who makes this thing broken) I only notice that you touch this area and bring your attention that hardware RNGs should be the same way fixed for arc4 too assuming you have appropriate hardware for tests since you touch it. I don't have such hardware so ever not examine path hardware RNGs go in this case. I hope your commit backing out is not final, but will be returned after secteam@ review with this thing fixed. -- http://ache.vniz.net/ bitcoin:1G6ugdNY6e5jx1GVnAU2ntj2NEfmjKG85r From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 19:14:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6B89A2C3; Wed, 31 Jul 2013 19:14:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1472375; Wed, 31 Jul 2013 19:14:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VJE0FI076326; Wed, 31 Jul 2013 19:14:00 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VJE0j5076322; Wed, 31 Jul 2013 19:14:00 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201307311914.r6VJE0j5076322@svn.freebsd.org> From: Ian Lepore Date: Wed, 31 Jul 2013 19:14:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253847 - in head/sys: kern nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 19:14:01 -0000 Author: ian Date: Wed Jul 31 19:14:00 2013 New Revision: 253847 URL: http://svnweb.freebsd.org/changeset/base/253847 Log: Changes to allow using BOOTP_NFSROOT and mounting an nfs root filesystem other than the one specified by the BOOTP server. This configures NFS using the BOOTP protocol while also respecting other root-path options such as setting vfs.root.mountfrom in the environment or using the RB_DFLTROOT boot option. It allows you to override the root path provided by the server, or to supply a root path when the server provides IP configuration but no root path info. This maintains the historical BOOTP_NFSROOT behavior of panicking on a failure to mount the root path provided by the server, unless you've provided an alternative via the ROOTDEVNAME kernel option or by setting vfs.root.mountfrom. The behavior of panicking when given no other options is preserved because it amounts to a bit of a retry loop that could eventually recover from a transient network or server problem. The user can now override the root path from loader(8) even if the kernel is compiled with BOOTP_NFSROOT. If vfs.root.mountfrom is set in the environment it is used unconditionally -- it always overrides the BOOTP info. If it begins with [old]nfs: then the BOOTP code uses it instead of the server-provided info. If it specifies some other filesystem then the bootp code will not panic like it used to and the code in vfs_mountroot.c will invoke the right filesystem to do the mount. If the kernel is compiled with the ROOTDEVNAME option, then that name is used by the BOOTP code if either * The server doesn't provide a pathname. * The boothowto flags include RB_DFLTROOT. The latter allows the user to compile in alternate path in ROOTDEVNAME such as ufs:/dev/da0s1a and boot from that path by setting boot_dftlroot=1 in loader(8) or using the '-r' option in boot(8). The one thing not provided here is automatic failover from a server-provided path to a compiled-in one without the user manually requesting that. The code just isn't currently structured in a way that makes that possible with a lot of rewrite. I think the ability to set vfs.root.mountfrom and to use ROOTDEVNAME automatically when the server doesn't provide a name covers the most common needs. A set of patches submitted by Lars Eggert provided the part I couldn't figure out by myself when I tried to do this last year; many thanks. Reviewed by: rodrigc Modified: head/sys/kern/vfs_mountroot.c head/sys/nfs/bootp_subr.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Wed Jul 31 18:18:02 2013 (r253846) +++ head/sys/kern/vfs_mountroot.c Wed Jul 31 19:14:00 2013 (r253847) @@ -714,8 +714,8 @@ parse_mount(char **conf) goto out; } - if (strcmp(fs, "zfs") != 0 && dev[0] != '\0' && - !parse_mount_dev_present(dev)) { + if (strcmp(fs, "zfs") != 0 && strstr(fs, "nfs") == NULL && + dev[0] != '\0' && !parse_mount_dev_present(dev)) { printf("mountroot: waiting for device %s ...\n", dev); delay = hz / 10; timeout = root_mount_timeout * hz; Modified: head/sys/nfs/bootp_subr.c ============================================================================== --- head/sys/nfs/bootp_subr.c Wed Jul 31 18:18:02 2013 (r253846) +++ head/sys/nfs/bootp_subr.c Wed Jul 31 19:14:00 2013 (r253847) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include "opt_bootp.h" #include "opt_nfs.h" +#include "opt_rootdevname.h" #include #include @@ -55,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -167,6 +169,7 @@ struct bootpc_tagcontext { struct bootpc_globalcontext { STAILQ_HEAD(, bootpc_ifcontext) interfaces; u_int32_t xid; + int any_root_overrides; int gotrootpath; int gotgw; int ifnum; @@ -865,13 +868,14 @@ bootpc_call(struct bootpc_globalcontext BOOTP_SETTLE_DELAY; } else printf(" (ignored)"); - if (ifctx->gotrootpath) { + if (ifctx->gotrootpath || + gctx->any_root_overrides) { gotrootpath = 1; rtimo = time_second + BOOTP_SETTLE_DELAY; - printf(" (got root path)"); - } else - printf(" (no root path)"); + if (ifctx->gotrootpath) + printf(" (got root path)"); + } printf("\n"); } } /* while secs */ @@ -1371,7 +1375,7 @@ static void bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx, struct bootpc_globalcontext *gctx) { - char *p; + char *p, *s; unsigned int ip; ifctx->gotgw = 0; @@ -1438,8 +1442,30 @@ bootpc_decode_reply(struct nfsv3_diskles } } - p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen, + /* + * Choose a root filesystem. If a value is forced in the environment + * and it contains "nfs:", use it unconditionally. Otherwise, if the + * kernel is compiled with the ROOTDEVNAME option, then use it if: + * - The server doesn't provide a pathname. + * - The boothowto flags include RB_DFLTROOT (user said to override + * the server value). + */ + p = NULL; + if ((s = getenv("vfs.root.mountfrom")) != NULL) { + if ((p = strstr(s, "nfs:")) != NULL) + p = strdup(p + 4, M_TEMP); + freeenv(s); + } + if (p == NULL) { + p = bootpc_tag(&gctx->tag, &ifctx->reply, ifctx->replylen, TAG_ROOT); + } +#ifdef ROOTDEVNAME + if ((p == NULL || (boothowto & RB_DFLTROOT) != 0) && + (p = strstr(ROOTDEVNAME, "nfs:")) != NULL) { + p += 4; + } +#endif if (p != NULL) { if (gctx->setrootfs != NULL) { printf("rootfs %s (ignored) ", p); @@ -1544,6 +1570,17 @@ bootpc_init(void) gctx->starttime = time_second; /* + * If ROOTDEVNAME is defined or vfs.root.mountfrom is set then we have + * root-path overrides that can potentially let us boot even if we don't + * get a root path from the server, so we can treat that as a non-error. + */ +#ifdef ROOTDEVNAME + gctx->any_root_overrides = 1; +#else + gctx->any_root_overrides = testenv("vfs.root.mountfrom"); +#endif + + /* * Find a network interface. */ CURVNET_SET(TD_TO_VNET(td)); @@ -1652,19 +1689,10 @@ retry: bootpc_compose_query(ifctx, td); error = bootpc_call(gctx, td); - if (error != 0) { -#ifdef BOOTP_NFSROOT - panic("BOOTP call failed"); -#else printf("BOOTP call failed\n"); -#endif } - rootdevnames[0] = "nfs:"; -#ifdef NFSCLIENT - rootdevnames[1] = "oldnfs:"; -#endif mountopts(&nd->root_args, NULL); STAILQ_FOREACH(ifctx, &gctx->interfaces, next) @@ -1672,7 +1700,7 @@ retry: bootpc_decode_reply(nd, ifctx, gctx); #ifdef BOOTP_NFSROOT - if (gctx->gotrootpath == 0) + if (gctx->gotrootpath == 0 && gctx->any_root_overrides == 0) panic("bootpc: No root path offered"); #endif @@ -1699,9 +1727,16 @@ retry: error = md_mount(&nd->root_saddr, nd->root_hostnam, nd->root_fh, &nd->root_fhsize, &nd->root_args, td); - if (error != 0) - panic("nfs_boot: mountd root, error=%d", error); - + if (error != 0) { + if (gctx->any_root_overrides == 0) + panic("nfs_boot: mount root, error=%d", error); + else + goto out; + } + rootdevnames[0] = "nfs:"; +#ifdef NFSCLIENT + rootdevnames[1] = "oldnfs:"; +#endif nfs_diskless_valid = 3; } From owner-svn-src-all@FreeBSD.ORG Wed Jul 31 22:54:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 51318B45; Wed, 31 Jul 2013 22:54:06 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6432B57; Wed, 31 Jul 2013 22:54:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6VMs6FN042215; Wed, 31 Jul 2013 22:54:06 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6VMs2X2042194; Wed, 31 Jul 2013 22:54:02 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201307312254.r6VMs2X2042194@svn.freebsd.org> From: Martin Matuska Date: Wed, 31 Jul 2013 22:54:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253848 - in vendor/xz/dist: . src/liblzma/api/lzma src/liblzma/check src/liblzma/common src/lzmainfo src/xz src/xzdec X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2013 22:54:06 -0000 Author: mm Date: Wed Jul 31 22:54:02 2013 New Revision: 253848 URL: http://svnweb.freebsd.org/changeset/base/253848 Log: Update vendor/xz from v5.0 branch to post-5.0.5 Git commit: b69900ed0b2f914fc6c0a180dcb522dbe5b80ea7 Modified: vendor/xz/dist/ChangeLog vendor/xz/dist/README vendor/xz/dist/THANKS vendor/xz/dist/src/liblzma/api/lzma/version.h vendor/xz/dist/src/liblzma/check/sha256.c vendor/xz/dist/src/liblzma/common/alone_decoder.c vendor/xz/dist/src/liblzma/common/alone_decoder.h vendor/xz/dist/src/liblzma/common/auto_decoder.c vendor/xz/dist/src/lzmainfo/lzmainfo.1 vendor/xz/dist/src/xz/coder.c vendor/xz/dist/src/xz/coder.h vendor/xz/dist/src/xz/file_io.c vendor/xz/dist/src/xz/list.c vendor/xz/dist/src/xz/util.c vendor/xz/dist/src/xz/xz.1 vendor/xz/dist/src/xzdec/xzdec.1 vendor/xz/dist/src/xzdec/xzdec.c Modified: vendor/xz/dist/ChangeLog ============================================================================== --- vendor/xz/dist/ChangeLog Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/ChangeLog Wed Jul 31 22:54:02 2013 (r253848) @@ -1,3 +1,348 @@ +commit b69900ed0b2f914fc6c0a180dcb522dbe5b80ea7 +Author: Lasse Collin +Date: Sun Jun 30 18:02:27 2013 +0300 + + Man pages: Use similar syntax for synopsis as in xz. + + The man pages of lzmainfo, xzmore, and xzdec had similar + constructs as the man page of xz had before the commit + eb6ca9854b8eb9fbf72497c1cf608d6b19d2d494. Eric S. Raymond + didn't mention these man pages in his bug report, but + it's nice to be consistent. + +commit cf4a1e1879d89be314ef3c064bd2656ea452f87e +Author: Lasse Collin +Date: Sun Jun 30 15:55:09 2013 +0300 + + Update NEWS for 5.0.5. + +commit cb94bb6d1f34e1e93c2d634ea9c3b7dfb3981d05 +Author: Lasse Collin +Date: Sun Jun 30 15:54:38 2013 +0300 + + Bump version and soname for 5.0.5. + +commit b7dee202d5b041ccae028d0c5433b83cecbe9e5d +Author: Lasse Collin +Date: Fri Jun 28 23:56:17 2013 +0300 + + xz: Fix return value type in io_write_buf(). + + It didn't affect the behavior of the code since -1 + becomes true anyway. + +commit 265e7b44d804b47373f10b7da28350db7611cea6 +Author: Lasse Collin +Date: Fri Jun 28 18:46:13 2013 +0300 + + xz: Remove an outdated NetBSD-specific comment. + + Nowadays errno == EFTYPE is documented in open(2). + +commit 78c2f8db902195468b8249c432252a6b281db836 +Author: Lasse Collin +Date: Fri Jun 28 18:09:47 2013 +0300 + + xz: Fix error detection of fcntl(fd, F_SETFL, flags) calls. + + POSIX says that fcntl(fd, F_SETFL, flags) returns -1 on + error and "other than -1" on success. This is how it is + documented e.g. on OpenBSD too. On Linux, success with + F_SETFL is always 0 (at least accorinding to fcntl(2) + from man-pages 3.51). + +commit 91750dff8f2c654ff636f12a2acdffe5492374b3 +Author: Lasse Collin +Date: Fri Jun 28 17:36:47 2013 +0300 + + xz: Fix use of wrong variable in a fcntl() call. + + Due to a wrong variable name, when writing a sparse file + to standard output, *all* file status flags were cleared + (to the extent the operating system allowed it) instead of + only clearing the O_APPEND flag. In practice this worked + fine in the common situations on GNU/Linux, but I didn't + check how it behaved elsewhere. + + The original flags were still restored correctly. I still + changed the code to use a separate boolean variable to + indicate when the flags should be restored instead of + relying on a special value in stdout_flags. + +commit e11888a79a4a77a69afde60445880d44f63d01aa +Author: Lasse Collin +Date: Wed Jun 26 13:30:57 2013 +0300 + + xz: Check the value of lzma_stream_flags.version in --list. + + It is a no-op for now, but if an old xz version is used + together with a newer liblzma that supports something new, + then this check becomes important and will stop the old xz + from trying to parse files that it won't understand. + +commit f39ddd88f3222219ada88998cf30abfdd3e0e96c +Author: Lasse Collin +Date: Wed Jun 26 12:17:00 2013 +0300 + + Build: Require Automake 1.12 and use serial-tests option. + + It should actually still work with Automake 1.10 if + the serial-tests option is removed. Automake 1.13 started + using parallel tests by default and the option to get + the old behavior isn't supported before 1.12. + + At least for now, parallel tests don't improve anything + in XZ Utils but they hide the progress output from + test_compress.sh. + +commit cb84e278027a90e9827a6f4d3bb0b4d4744a2fbb +Author: Lasse Collin +Date: Sun Jun 23 17:36:47 2013 +0300 + + xz: Validate Uncompressed Size from Block Header in list.c. + + This affects only "xz -lvv". Normal decompression with xz + already detected if Block Header and Index had mismatched + Uncompressed Size fields. So this just makes "xz -lvv" + show such files as corrupt instead of showing the + Uncompressed Size from Index. + +commit f01780fce454c7489f7dcbf806299b50da5f51b7 +Author: Lasse Collin +Date: Wed Jun 26 10:58:58 2013 +0300 + + Update THANKS. + +commit d98ede7d700b892e32d9c2f46563b6ebc566786d +Author: Lasse Collin +Date: Fri Jun 21 22:04:45 2013 +0300 + + xz: Make the man page more friendly to doclifter. + + Thanks to Eric S. Raymond. + +commit 19b447b64b3f520cd5b11429000b092f7c76709b +Author: Lasse Collin +Date: Fri Jun 21 21:54:59 2013 +0300 + + xz: A couple of man page fixes. + + Now the interaction of presets and custom filter chains + is described correctly. Earlier it contradicted itself. + + Thanks to DevHC who reported these issues on IRC to me + on 2012-12-14. + +commit 45edf2966fc9a4d2eae8f84b2fa027fb4fa1df8b +Author: Lasse Collin +Date: Fri Jun 21 21:50:26 2013 +0300 + + xz: Fix interaction between preset and custom filter chains. + + There was somewhat illogical behavior when --extreme was + specified and mixed with custom filter chains. + + Before this commit, "xz -9 --lzma2 -e" was equivalent + to "xz --lzma2". After it is equivalent to "xz -6e" + (all earlier preset options get forgotten when a custom + filter chain is specified and the default preset is 6 + to which -e is applied). I find this less illogical. + + This also affects the meaning of "xz -9e --lzma2 -7". + Earlier it was equivalent to "xz -7e" (the -e specified + before a custom filter chain wasn't forgotten). Now it + is "xz -7". Note that "xz -7e" still is the same as "xz -e7". + + Hopefully very few cared about this in the first place, + so pretty much no one should even notice this change. + + Thanks to Conley Moorhous. + +commit b065984e5a9272eb50bc0c6d3731e6199c0ae8a8 +Author: Lasse Collin +Date: Fri Apr 8 17:53:05 2011 +0300 + + xz: Change size_t to uint32_t in a few places. + +commit 32be621f52f2e1686db88baa7b01dc1ae338f426 +Author: Lasse Collin +Date: Sat Apr 27 22:07:46 2013 +0300 + + Build: Use -Wvla with GCC if supported. + + Variable-length arrays are mandatory in C99 but optional in C11. + The code doesn't currently use any VLAs and it shouldn't in the + future either to stay compatible with C11 without requiring any + optional C11 features. + +commit efb07cfba65e9e05984c02cd796c1b0338ce04dc +Author: Lasse Collin +Date: Mon Apr 15 19:29:09 2013 +0300 + + xzdec: Improve the --help message. + + The options are now ordered in the same order as in xz's help + message. + + Descriptions were added to the options that are ignored. + I left them in parenthesis even if it looks a bit weird + because I find it easier to spot the ignored vs. non-ignored + options from the list that way. + +commit e3c8be13699e2813f5e2879d8187444b46d82d89 +Author: Lasse Collin +Date: Fri Apr 5 19:25:40 2013 +0300 + + Update THANKS. + +commit ad8282efe483612f6b5544f9a0d2e4914fb2532a +Author: Jeff Bastian +Date: Wed Apr 3 13:59:17 2013 +0200 + + xzgrep: make the '-h' option to be --no-filename equivalent + + * src/scripts/xzgrep.in: Accept the '-h' option in argument parsing. + +commit 9271a3eb0e022b23e8712154be851d0afe4c02e4 +Author: Lasse Collin +Date: Fri Apr 5 19:34:09 2013 +0300 + + liblzma: Be less picky in lzma_alone_decoder(). + + To avoid false positives when detecting .lzma files, + rare values in dictionary size and uncompressed size fields + were rejected. They will still be rejected if .lzma files + are decoded with lzma_auto_decoder(), but when using + lzma_alone_decoder() directly, such files will now be accepted. + Hopefully this is an OK compromise. + + This doesn't affect xz because xz still has its own file + format detection code. This does affect lzmadec though. + So after this commit lzmadec will accept files that xz or + xz-emulating-lzma doesn't. + + NOTE: lzma_alone_decoder() still won't decode all .lzma files + because liblzma's LZMA decoder doesn't support lc + lp > 4. + + Reported here: + http://sourceforge.net/projects/lzmautils/forums/forum/708858/topic/7068827 + + Conflicts: + src/liblzma/common/alone_decoder.c + src/liblzma/common/alone_decoder.h + +commit 211b931cee58626c1d2e021810cb108cb5cbc10f +Author: Lasse Collin +Date: Tue Mar 5 19:14:50 2013 +0200 + + Avoid unneeded use of awk in xzless. + + Use "read" instead of "awk" in xzless to get the version + number of "less". The need for awk was introduced in + the commit db5c1817fabf7cbb9e4087b1576eb26f0747338e. + + Thanks to Ariel P for the patch. + +commit 9f62fd9605eade23b62b07a235d1f02156f7a5c6 +Author: Jonathan Nieder +Date: Mon Nov 19 00:10:10 2012 -0800 + + xzless: Make "less -V" parsing more robust + + In v4.999.9beta~30 (xzless: Support compressed standard input, + 2009-08-09), xzless learned to parse ‘less -V’ output to figure out + whether less is new enough to handle $LESSOPEN settings starting + with “|-â€. That worked well for a while, but the version string from + ‘less’ versions 448 (June, 2012) is misparsed, producing a warning: + + $ xzless /tmp/test.xz; echo $? + /usr/bin/xzless: line 49: test: 456 (GNU regular expressions): \ + integer expression expected + 0 + + More precisely, modern ‘less’ lists the regexp implementation along + with its version number, and xzless passes the entire version number + with attached parenthetical phrase as a number to "test $a -gt $b", + producing the above confusing message. + + $ less-444 -V | head -1 + less 444 + $ less -V | head -1 + less 456 (no regular expressions) + + So relax the pattern matched --- instead of expecting "less ", + look for a line of the form "less [ (extra parenthetical)]". + While at it, improve the behavior when no matching line is found --- + instead of producing a cryptic message, we can fall back on a LESSPIPE + setting that is supported by all versions of ‘less’. + + The implementation uses "awk" for simplicity. Hopefully that’s + portable enough. + + Reported-by: Jörg-Volker Peetz + Signed-off-by: Jonathan Nieder + +commit 1d05980f5b5c2c94d833001daccacce4a466876e +Author: Lasse Collin +Date: Wed Oct 3 15:54:24 2012 +0300 + + xz: Fix the note about --rsyncable on the man page. + +commit fb68497333598688d309a92838d91fd560f7e9f0 +Author: Lasse Collin +Date: Fri Sep 28 20:11:09 2012 +0300 + + xz: Improve handling of failed realloc in xrealloc. + + Thanks to Jim Meyering. + +commit 75013db6d4d63c195bd8b8d45729b4be0665a812 +Author: Lasse Collin +Date: Sat Dec 15 20:01:02 2012 +0200 + + A few typo fixes to comments and the xz man page. + + Thanks to Jim Meyering. + +commit e44b21839b1dcbac5097be39b87dd2ddb6e114fd +Author: Lasse Collin +Date: Thu Aug 2 17:13:30 2012 +0300 + + Build: Bump gettext version requirement to 0.18. + + Otherwise too old version of m4/lib-link.m4 gets included + when autoreconf -fi is run. + +commit fd3dbb23ca7e75a7a888d7e897c381dc06308307 +Author: Lasse Collin +Date: Thu Jul 5 07:36:28 2012 +0300 + + Tests: Remove tests/test_block.c that had gotten committed accidentally. + +commit 05a735d279d74af437c31f25f69aded4713c1a3d +Author: Lasse Collin +Date: Thu Jul 5 07:33:35 2012 +0300 + + Build: Include macosx/build.sh in the distribution. + + It has been in the Git repository since 2010 but probably + few people have seen it since it hasn't been included in + the release tarballs. :-( + +commit 4e6d62793b5e7b87edcc93c7ded072c1ecd94173 +Author: Lasse Collin +Date: Thu Jul 5 07:24:45 2012 +0300 + + Docs: Fix the name LZMA Utils -> XZ Utils in debug/README. + +commit dd95b5e7614baf1f07a1316b5106bd616a9efa79 +Author: Lasse Collin +Date: Thu Jul 5 07:23:17 2012 +0300 + + Include debug/translation.bash in the distribution. + + Also fix the script name mentioned in README. + commit 20778053a07eb90c159c1377ca8dc05a90fd530b Author: Lasse Collin Date: Fri Jun 22 14:36:16 2012 +0300 Modified: vendor/xz/dist/README ============================================================================== --- vendor/xz/dist/README Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/README Wed Jul 31 22:54:02 2013 (r253848) @@ -210,8 +210,8 @@ XZ Utils # make -C po update-po make install - bash debug/translations.bash | less - bash debug/translations.bash | less -S # For --list outputs + bash debug/translation.bash | less + bash debug/translation.bash | less -S # For --list outputs Repeat the above as needed (no need to re-run configure though). Modified: vendor/xz/dist/THANKS ============================================================================== --- vendor/xz/dist/THANKS Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/THANKS Wed Jul 31 22:54:02 2013 (r253848) @@ -6,6 +6,7 @@ Some people have helped more, some less, has been important. :-) In alphabetical order: - Mark Adler - H. Peter Anvin + - Jeff Bastian - Nelson H. F. Beebe - Karl Berry - Anders F. Björklund @@ -47,6 +48,7 @@ has been important. :-) In alphabetical - Bela Lubkin - Gregory Margo - Jim Meyering + - Conley Moorhous - RafaÅ‚ MużyÅ‚o - Adrien Nader - Hongbo Ni @@ -58,8 +60,10 @@ has been important. :-) In alphabetical - Diego Elio Pettenò - Elbert Pol - Mikko Pouru + - Pavel Raiskup - Robert Readman - Bernhard Reutner-Fischer + - Eric S. Raymond - Cristian Rodríguez - Christian von Roques - Jukka Salmi Modified: vendor/xz/dist/src/liblzma/api/lzma/version.h ============================================================================== --- vendor/xz/dist/src/liblzma/api/lzma/version.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/api/lzma/version.h Wed Jul 31 22:54:02 2013 (r253848) @@ -22,7 +22,7 @@ */ #define LZMA_VERSION_MAJOR 5 #define LZMA_VERSION_MINOR 0 -#define LZMA_VERSION_PATCH 4 +#define LZMA_VERSION_PATCH 5 #define LZMA_VERSION_STABILITY LZMA_VERSION_STABILITY_STABLE #ifndef LZMA_VERSION_COMMIT Modified: vendor/xz/dist/src/liblzma/check/sha256.c ============================================================================== --- vendor/xz/dist/src/liblzma/check/sha256.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/check/sha256.c Wed Jul 31 22:54:02 2013 (r253848) @@ -6,7 +6,6 @@ /// \todo Crypto++ has x86 ASM optimizations. They use SSE so if they /// are imported to liblzma, SSE instructions need to be used /// conditionally to keep the code working on older boxes. -/// We could also support using some external libary for SHA-256. // // This code is based on the code found from 7-Zip, which has a modified // version of the SHA-256 found from Crypto++ . Modified: vendor/xz/dist/src/liblzma/common/alone_decoder.c ============================================================================== --- vendor/xz/dist/src/liblzma/common/alone_decoder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/alone_decoder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -26,6 +26,11 @@ struct lzma_coder_s { SEQ_CODE, } sequence; + /// If true, reject files that are unlikely to be .lzma files. + /// If false, more non-.lzma files get accepted and will give + /// LZMA_DATA_ERROR either immediately or after a few output bytes. + bool picky; + /// Position in the header fields size_t pos; @@ -68,13 +73,13 @@ alone_decode(lzma_coder *coder, |= (size_t)(in[*in_pos]) << (coder->pos * 8); if (++coder->pos == 4) { - if (coder->options.dict_size != UINT32_MAX) { + if (coder->picky && coder->options.dict_size + != UINT32_MAX) { // A hack to ditch tons of false positives: // We allow only dictionary sizes that are // 2^n or 2^n + 2^(n-1). LZMA_Alone created // only files with 2^n, but accepts any - // dictionary size. If someone complains, this - // will be reconsidered. + // dictionary size. uint32_t d = coder->options.dict_size - 1; d |= d >> 2; d |= d >> 3; @@ -103,9 +108,9 @@ alone_decode(lzma_coder *coder, // Another hack to ditch false positives: Assume that // if the uncompressed size is known, it must be less - // than 256 GiB. Again, if someone complains, this - // will be reconsidered. - if (coder->uncompressed_size != LZMA_VLI_UNKNOWN + // than 256 GiB. + if (coder->picky + && coder->uncompressed_size != LZMA_VLI_UNKNOWN && coder->uncompressed_size >= (LZMA_VLI_C(1) << 38)) return LZMA_FORMAT_ERROR; @@ -189,7 +194,7 @@ alone_decoder_memconfig(lzma_coder *code extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, lzma_allocator *allocator, - uint64_t memlimit) + uint64_t memlimit, bool picky) { lzma_next_coder_init(&lzma_alone_decoder_init, next, allocator); @@ -208,6 +213,7 @@ lzma_alone_decoder_init(lzma_next_coder } next->coder->sequence = SEQ_PROPERTIES; + next->coder->picky = picky; next->coder->pos = 0; next->coder->options.dict_size = 0; next->coder->options.preset_dict = NULL; @@ -223,7 +229,7 @@ lzma_alone_decoder_init(lzma_next_coder extern LZMA_API(lzma_ret) lzma_alone_decoder(lzma_stream *strm, uint64_t memlimit) { - lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit); + lzma_next_strm_init(lzma_alone_decoder_init, strm, memlimit, false); strm->internal->supported_actions[LZMA_RUN] = true; strm->internal->supported_actions[LZMA_FINISH] = true; Modified: vendor/xz/dist/src/liblzma/common/alone_decoder.h ============================================================================== --- vendor/xz/dist/src/liblzma/common/alone_decoder.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/alone_decoder.h Wed Jul 31 22:54:02 2013 (r253848) @@ -16,7 +16,8 @@ #include "common.h" -extern lzma_ret lzma_alone_decoder_init(lzma_next_coder *next, - lzma_allocator *allocator, uint64_t memlimit); +extern lzma_ret lzma_alone_decoder_init( + lzma_next_coder *next, lzma_allocator *allocator, + uint64_t memlimit, bool picky); #endif Modified: vendor/xz/dist/src/liblzma/common/auto_decoder.c ============================================================================== --- vendor/xz/dist/src/liblzma/common/auto_decoder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/liblzma/common/auto_decoder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -54,7 +54,7 @@ auto_decode(lzma_coder *coder, lzma_allo coder->memlimit, coder->flags)); } else { return_if_error(lzma_alone_decoder_init(&coder->next, - allocator, coder->memlimit)); + allocator, coder->memlimit, true)); // If the application wants to know about missing // integrity check or about the check in general, we Modified: vendor/xz/dist/src/lzmainfo/lzmainfo.1 ============================================================================== --- vendor/xz/dist/src/lzmainfo/lzmainfo.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/lzmainfo/lzmainfo.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -4,14 +4,14 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH LZMAINFO 1 "2010-09-27" "Tukaani" "XZ Utils" +.TH LZMAINFO 1 "2013-06-30" "Tukaani" "XZ Utils" .SH NAME lzmainfo \- show information stored in the .lzma file header .SH SYNOPSIS .B lzmainfo .RB [ \-\-help ] .RB [ \-\-version ] -.RI [ file ]... +.RI [ file... ] .SH DESCRIPTION .B lzmainfo shows information stored in the Modified: vendor/xz/dist/src/xz/coder.c ============================================================================== --- vendor/xz/dist/src/xz/coder.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/coder.c Wed Jul 31 22:54:02 2013 (r253848) @@ -37,15 +37,10 @@ static io_buf in_buf; static io_buf out_buf; /// Number of filters. Zero indicates that we are using a preset. -static size_t filters_count = 0; +static uint32_t filters_count = 0; /// Number of the preset (0-9) -static size_t preset_number = 6; - -/// If a preset is used (no custom filter chain) and preset_extreme is true, -/// a significantly slower compression is used to achieve slightly better -/// compression ratio. -static bool preset_extreme = false; +static uint32_t preset_number = LZMA_PRESET_DEFAULT; /// Integrity check type static lzma_check check; @@ -63,11 +58,9 @@ coder_set_check(lzma_check new_check) } -extern void -coder_set_preset(size_t new_preset) +static void +forget_filter_chain(void) { - preset_number = new_preset; - // Setting a preset makes us forget a possibly defined custom // filter chain. while (filters_count > 0) { @@ -81,9 +74,20 @@ coder_set_preset(size_t new_preset) extern void +coder_set_preset(uint32_t new_preset) +{ + preset_number &= ~LZMA_PRESET_LEVEL_MASK; + preset_number |= new_preset; + forget_filter_chain(); + return; +} + + +extern void coder_set_extreme(void) { - preset_extreme = true; + preset_number |= LZMA_PRESET_EXTREME; + forget_filter_chain(); return; } @@ -98,6 +102,12 @@ coder_add_filter(lzma_vli id, void *opti filters[filters_count].options = options; ++filters_count; + // Setting a custom filter chain makes us forget the preset options. + // This makes a difference if one specifies e.g. "xz -9 --lzma2 -e" + // where the custom filter chain resets the preset level back to + // the default 6, making the example equivalent to "xz -6e". + preset_number = LZMA_PRESET_DEFAULT; + return; } @@ -134,9 +144,6 @@ coder_set_compression_settings(void) } // Get the preset for LZMA1 or LZMA2. - if (preset_extreme) - preset_number |= LZMA_PRESET_EXTREME; - if (lzma_lzma_preset(&opt_lzma, preset_number)) message_bug(); Modified: vendor/xz/dist/src/xz/coder.h ============================================================================== --- vendor/xz/dist/src/xz/coder.h Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/coder.h Wed Jul 31 22:54:02 2013 (r253848) @@ -46,7 +46,7 @@ extern bool opt_auto_adjust; extern void coder_set_check(lzma_check check); /// Set preset number -extern void coder_set_preset(size_t new_preset); +extern void coder_set_preset(uint32_t new_preset); /// Enable extreme mode extern void coder_set_extreme(void); Modified: vendor/xz/dist/src/xz/file_io.c ============================================================================== --- vendor/xz/dist/src/xz/file_io.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/file_io.c Wed Jul 31 22:54:02 2013 (r253848) @@ -41,9 +41,10 @@ static bool warn_fchown; static bool try_sparse = true; #ifndef TUKLIB_DOSLIKE -/// File status flags of standard output. This is used by io_open_dest() -/// and io_close_dest(). -static int stdout_flags = 0; +/// Original file status flags of standard output. This is used by +/// io_open_dest() and io_close_dest() to save and restore the flags. +static int stdout_flags; +static bool restore_stdout_flags = false; #endif @@ -397,10 +398,6 @@ io_open_src_real(file_pair *pair) was_symlink = true; # elif defined(__NetBSD__) - // As of 2010-09-05, NetBSD doesn't document what errno is - // used with O_NOFOLLOW. It is EFTYPE though, and I - // understood that is very unlikely to change even though - // it is undocumented. if (errno == EFTYPE) was_symlink = true; @@ -441,7 +438,7 @@ io_open_src_real(file_pair *pair) flags &= ~O_NONBLOCK; - if (fcntl(pair->src_fd, F_SETFL, flags)) + if (fcntl(pair->src_fd, F_SETFL, flags) == -1) goto error_msg; } #endif @@ -634,11 +631,11 @@ io_open_dest_real(file_pair *pair) if (!S_ISREG(pair->dest_st.st_mode)) return false; - const int flags = fcntl(STDOUT_FILENO, F_GETFL); - if (flags == -1) + stdout_flags = fcntl(STDOUT_FILENO, F_GETFL); + if (stdout_flags == -1) return false; - if (flags & O_APPEND) { + if (stdout_flags & O_APPEND) { // Creating a sparse file is not possible // when O_APPEND is active (it's used by // shell's >> redirection). As I understand @@ -657,12 +654,14 @@ io_open_dest_real(file_pair *pair) return false; if (fcntl(STDOUT_FILENO, F_SETFL, - stdout_flags & ~O_APPEND)) + stdout_flags & ~O_APPEND) + == -1) return false; - // Remember the flags so that io_close_dest() - // can restore them. - stdout_flags = flags; + // Disabling O_APPEND succeeded. Mark + // that the flags should be restored + // in io_close_dest(). + restore_stdout_flags = true; } else if (lseek(STDOUT_FILENO, 0, SEEK_CUR) != pair->dest_st.st_size) { @@ -703,13 +702,12 @@ io_close_dest(file_pair *pair, bool succ { #ifndef TUKLIB_DOSLIKE // If io_open_dest() has disabled O_APPEND, restore it here. - if (stdout_flags != 0) { + if (restore_stdout_flags) { assert(pair->dest_fd == STDOUT_FILENO); - const int fail = fcntl(STDOUT_FILENO, F_SETFL, stdout_flags); - stdout_flags = 0; + restore_stdout_flags = false; - if (fail) { + if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) { message_error(_("Error restoring the O_APPEND flag " "to standard output: %s"), strerror(errno)); @@ -882,7 +880,7 @@ io_write_buf(file_pair *pair, const uint if (amount == -1) { if (errno == EINTR) { if (user_abort) - return -1; + return true; continue; } Modified: vendor/xz/dist/src/xz/list.c ============================================================================== --- vendor/xz/dist/src/xz/list.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/list.c Wed Jul 31 22:54:02 2013 (r253848) @@ -203,6 +203,20 @@ parse_indexes(xz_file_info *xfi, file_pa goto error; } + // Check that the Stream Footer doesn't specify something + // that we don't support. This can only happen if the xz + // version is older than liblzma and liblzma supports + // something new. + // + // It is enough to check Stream Footer. Stream Header must + // match when it is compared against Stream Footer with + // lzma_stream_flags_compare(). + if (footer_flags.version != 0) { + message_error("%s: %s", pair->src_name, + message_strm(LZMA_OPTIONS_ERROR)); + goto error; + } + // Check that the size of the Index field looks sane. lzma_vli index_size = footer_flags.backward_size; if ((lzma_vli)(pos) < index_size + LZMA_STREAM_HEADER_SIZE) { @@ -429,7 +443,19 @@ parse_block_header(file_pair *pair, cons switch (lzma_block_compressed_size(&block, iter->block.unpadded_size)) { case LZMA_OK: - break; + // Validate also block.uncompressed_size if it is present. + // If it isn't present, there's no need to set it since + // we aren't going to actually decompress the Block; if + // we were decompressing, then we should set it so that + // the Block decoder could validate the Uncompressed Size + // that was stored in the Index. + if (block.uncompressed_size == LZMA_VLI_UNKNOWN + || block.uncompressed_size + == iter->block.uncompressed_size) + break; + + // If the above fails, the file is corrupt so + // LZMA_DATA_ERROR is a good error code. case LZMA_DATA_ERROR: // Free the memory allocated by lzma_block_header_decode(). Modified: vendor/xz/dist/src/xz/util.c ============================================================================== --- vendor/xz/dist/src/xz/util.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/util.c Wed Jul 31 22:54:02 2013 (r253848) @@ -26,9 +26,19 @@ xrealloc(void *ptr, size_t size) { assert(size > 0); + // Save ptr so that we can free it if realloc fails. + // The point is that message_fatal ends up calling stdio functions + // which in some libc implementations might allocate memory from + // the heap. Freeing ptr improves the chances that there's free + // memory for stdio functions if they need it. + void *p = ptr; ptr = realloc(ptr, size); - if (ptr == NULL) - message_fatal("%s", strerror(errno)); + + if (ptr == NULL) { + const int saved_errno = errno; + free(p); + message_fatal("%s", strerror(saved_errno)); + } return ptr; } Modified: vendor/xz/dist/src/xz/xz.1 ============================================================================== --- vendor/xz/dist/src/xz/xz.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xz/xz.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -5,16 +5,17 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZ 1 "2012-05-27" "Tukaani" "XZ Utils" +.TH XZ 1 "2013-06-21" "Tukaani" "XZ Utils" . .SH NAME xz, unxz, xzcat, lzma, unlzma, lzcat \- Compress or decompress .xz and .lzma files . .SH SYNOPSIS .B xz -.RI [ option ]... -.RI [ file ]... -.PP +.RI [ option... ] +.RI [ file... ] +. +.SH COMMAND ALIASES .B unxz is equivalent to .BR "xz \-\-decompress" . @@ -708,7 +709,7 @@ be dramatically higher than that of the DecMem contains the decompressor memory requirements. That is, the compression settings determine the memory requirements of the decompressor. -The exact decompressor memory usage is slighly more than +The exact decompressor memory usage is slightly more than the LZMA2 dictionary size, but the values in the table have been rounded up to the next full MiB. .RE @@ -897,11 +898,14 @@ if threading will be enabled by default. .SS "Custom compressor filter chains" A custom filter chain allows specifying the compression settings in detail instead of relying on -the settings associated to the preset levels. +the settings associated to the presets. When a custom filter chain is specified, -the compression preset level options -(\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR) are -silently ignored. +preset options (\fB\-0\fR ... \fB\-9\fR and \fB\-\-extreme\fR) +earlier on the command line are forgotten. +If a preset option is specified +after one or more custom filter chain options, +the new preset takes effect and +the custom filter chain options specified earlier are forgotten. .PP A filter chain is comparable to piping on the command line. When compressing, the uncompressed input goes to the first filter, @@ -934,6 +938,15 @@ Extra commas in are ignored. Every option has a default value, so you need to specify only those you want to change. +.PP +To see the whole filter chain and +.IR options , +use +.B "xz \-vv" +(that is, use +.B \-\-verbose +twice). +This works also for viewing the filter chain options used by presets. .TP \fB\-\-lzma1\fR[\fB=\fIoptions\fR] .PD 0 @@ -976,13 +989,12 @@ The only supported modifier is currently .BR e , which matches .BR \-\-extreme . -The default -.I preset -is -.BR 6 , -from which the default values for the rest of the LZMA1 or LZMA2 +If no +.B preset +is specified, the default values of LZMA1 or LZMA2 .I options -are taken. +are taken from the preset +.BR 6 . .TP .BI dict= size Dictionary (history buffer) @@ -1578,7 +1590,7 @@ is supported only together with .BR \-\-info\-memory , and .BR \-\-list . -It will be supported for normal compression and +It will be supported for compression and decompression in the future. . .SS Version @@ -2179,14 +2191,15 @@ The output can vary even between differe builds of the same XZ Utils version, if different build options are used. .PP -The above means that implementing +The above means that once .B \-\-rsyncable -to create rsyncable -.B .xz -files is not going to happen without -freezing a part of the encoder -implementation, which can then be used with -.BR \-\-rsyncable . +has been implemented, +the resulting files won't necessarily be rsyncable +unless both old and new files have been compressed +with the same xz version. +This problem can be fixed if a part of the encoder +implementation is frozen to keep rsyncable output +stable across xz versions. . .SS "Embedded .xz decompressors" Embedded Modified: vendor/xz/dist/src/xzdec/xzdec.1 ============================================================================== --- vendor/xz/dist/src/xzdec/xzdec.1 Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xzdec/xzdec.1 Wed Jul 31 22:54:02 2013 (r253848) @@ -4,17 +4,17 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH XZDEC 1 "2010-09-27" "Tukaani" "XZ Utils" +.TH XZDEC 1 "2013-06-30" "Tukaani" "XZ Utils" .SH NAME xzdec, lzmadec \- Small .xz and .lzma decompressors .SH SYNOPSIS .B xzdec -.RI [ option ]... -.RI [ file ]... +.RI [ option... ] +.RI [ file... ] .br .B lzmadec -.RI [ option ]... -.RI [ file ]... +.RI [ option... ] +.RI [ file... ] .SH DESCRIPTION .B xzdec is a liblzma-based decompression-only tool for Modified: vendor/xz/dist/src/xzdec/xzdec.c ============================================================================== --- vendor/xz/dist/src/xzdec/xzdec.c Wed Jul 31 19:14:00 2013 (r253847) +++ vendor/xz/dist/src/xzdec/xzdec.c Wed Jul 31 22:54:02 2013 (r253848) @@ -62,13 +62,13 @@ help(void) { printf( "Usage: %s [OPTION]... [FILE]...\n" -"Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n" +"Decompress files in the ." TOOL_FORMAT " format to standard output.\n" "\n" -" -c, --stdout (ignored)\n" -" -d, --decompress (ignored)\n" -" -k, --keep (ignored)\n" +" -d, --decompress (ignored, only decompression is supported)\n" +" -k, --keep (ignored, files are never deleted)\n" +" -c, --stdout (ignored, output is always written to standard output)\n" " -q, --quiet specify *twice* to suppress errors\n" -" -Q, --no-warn (ignored)\n" +" -Q, --no-warn (ignored, the exit status 2 is never used)\n" " -h, --help display this help and exit\n" " -V, --version display the version number and exit\n" "\n" From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 01:18:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3A789310; Thu, 1 Aug 2013 01:18:52 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 173B02FBD; Thu, 1 Aug 2013 01:18:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r711IpBW083982; Thu, 1 Aug 2013 01:18:51 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r711Ip7t083981; Thu, 1 Aug 2013 01:18:51 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201308010118.r711Ip7t083981@svn.freebsd.org> From: Peter Grehan Date: Thu, 1 Aug 2013 01:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253849 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 01:18:52 -0000 Author: grehan Date: Thu Aug 1 01:18:51 2013 New Revision: 253849 URL: http://svnweb.freebsd.org/changeset/base/253849 Log: Correctly maintain the CR0/CR4 shadow registers. This was exposed with AP spinup of Linux, and booting OpenBSD, where the CR0 register is unconditionally written to prior to the longjump to enter protected mode. The CR-vmexit handling was not updating CPU state which resulted in a vmentry failure with invalid guest state. A follow-on submit will fix the CPU state issue, but this fix prevents the CR-vmexit prior to entering protected mode by properly initializing and maintaining CR* state. Reviewed by: neel Reported by: Gopakumar.T @ netapp Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Wed Jul 31 22:54:02 2013 (r253848) +++ head/sys/amd64/vmm/intel/vmx.c Thu Aug 1 01:18:51 2013 (r253849) @@ -647,10 +647,10 @@ vmx_vpid(void) } static int -vmx_setup_cr_shadow(int which, struct vmcs *vmcs) +vmx_setup_cr_shadow(int which, struct vmcs *vmcs, uint32_t initial) { int error, mask_ident, shadow_ident; - uint64_t mask_value, shadow_value; + uint64_t mask_value; if (which != 0 && which != 4) panic("vmx_setup_cr_shadow: unknown cr%d", which); @@ -659,26 +659,24 @@ vmx_setup_cr_shadow(int which, struct vm mask_ident = VMCS_CR0_MASK; mask_value = cr0_ones_mask | cr0_zeros_mask; shadow_ident = VMCS_CR0_SHADOW; - shadow_value = cr0_ones_mask; } else { mask_ident = VMCS_CR4_MASK; mask_value = cr4_ones_mask | cr4_zeros_mask; shadow_ident = VMCS_CR4_SHADOW; - shadow_value = cr4_ones_mask; } error = vmcs_setreg(vmcs, 0, VMCS_IDENT(mask_ident), mask_value); if (error) return (error); - error = vmcs_setreg(vmcs, 0, VMCS_IDENT(shadow_ident), shadow_value); + error = vmcs_setreg(vmcs, 0, VMCS_IDENT(shadow_ident), initial); if (error) return (error); return (0); } -#define vmx_setup_cr0_shadow(vmcs) vmx_setup_cr_shadow(0, (vmcs)) -#define vmx_setup_cr4_shadow(vmcs) vmx_setup_cr_shadow(4, (vmcs)) +#define vmx_setup_cr0_shadow(vmcs,init) vmx_setup_cr_shadow(0, (vmcs), (init)) +#define vmx_setup_cr4_shadow(vmcs,init) vmx_setup_cr_shadow(4, (vmcs), (init)) static void * vmx_vminit(struct vm *vm) @@ -784,11 +782,17 @@ vmx_vminit(struct vm *vm) if (error != 0) panic("vmcs_set_msr_save error %d", error); - error = vmx_setup_cr0_shadow(&vmx->vmcs[i]); + /* + * Set up the CR0/4 shadows, and init the read shadow + * to the power-on register value from the Intel Sys Arch. + * CR0 - 0x60000010 + * CR4 - 0 + */ + error = vmx_setup_cr0_shadow(&vmx->vmcs[i], 0x60000010); if (error != 0) panic("vmx_setup_cr0_shadow %d", error); - error = vmx_setup_cr4_shadow(&vmx->vmcs[i]); + error = vmx_setup_cr4_shadow(&vmx->vmcs[i], 0); if (error != 0) panic("vmx_setup_cr4_shadow %d", error); } @@ -1079,7 +1083,7 @@ cantinject: static int vmx_emulate_cr_access(struct vmx *vmx, int vcpu, uint64_t exitqual) { - int error, cr, vmcs_guest_cr; + int error, cr, vmcs_guest_cr, vmcs_shadow_cr; uint64_t regval, ones_mask, zeros_mask; const struct vmxctx *vmxctx; @@ -1156,11 +1160,20 @@ vmx_emulate_cr_access(struct vmx *vmx, i ones_mask = cr0_ones_mask; zeros_mask = cr0_zeros_mask; vmcs_guest_cr = VMCS_GUEST_CR0; + vmcs_shadow_cr = VMCS_CR0_SHADOW; } else { ones_mask = cr4_ones_mask; zeros_mask = cr4_zeros_mask; vmcs_guest_cr = VMCS_GUEST_CR4; + vmcs_shadow_cr = VMCS_CR4_SHADOW; + } + + error = vmwrite(vmcs_shadow_cr, regval); + if (error) { + panic("vmx_emulate_cr_access: error %d writing cr%d shadow", + error, cr); } + regval |= ones_mask; regval &= ~zeros_mask; error = vmwrite(vmcs_guest_cr, regval); @@ -1615,6 +1628,27 @@ vmxctx_setreg(struct vmxctx *vmxctx, int } static int +vmx_shadow_reg(int reg) +{ + int shreg; + + shreg = -1; + + switch (reg) { + case VM_REG_GUEST_CR0: + shreg = VMCS_CR0_SHADOW; + break; + case VM_REG_GUEST_CR4: + shreg = VMCS_CR4_SHADOW; + break; + default: + break; + } + + return (shreg); +} + +static int vmx_getreg(void *arg, int vcpu, int reg, uint64_t *retval) { int running, hostcpu; @@ -1633,7 +1667,7 @@ vmx_getreg(void *arg, int vcpu, int reg, static int vmx_setreg(void *arg, int vcpu, int reg, uint64_t val) { - int error, hostcpu, running; + int error, hostcpu, running, shadow; uint64_t ctls; struct vmx *vmx = arg; @@ -1663,6 +1697,15 @@ vmx_setreg(void *arg, int vcpu, int reg, vmcs_setreg(&vmx->vmcs[vcpu], running, VMCS_IDENT(VMCS_ENTRY_CTLS), ctls); } + + shadow = vmx_shadow_reg(reg); + if (shadow > 0) { + /* + * Store the unmodified value in the shadow + */ + error = vmcs_setreg(&vmx->vmcs[vcpu], running, + VMCS_IDENT(shadow), val); + } } return (error); From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 02:57:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8C97429B; Thu, 1 Aug 2013 02:57:05 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6079122B5; Thu, 1 Aug 2013 02:57:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r712v5gB013257; Thu, 1 Aug 2013 02:57:05 GMT (envelope-from markj@svn.freebsd.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r712v5SB013255; Thu, 1 Aug 2013 02:57:05 GMT (envelope-from markj@svn.freebsd.org) Message-Id: <201308010257.r712v5SB013255@svn.freebsd.org> From: Mark Johnston Date: Thu, 1 Aug 2013 02:57:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253850 - head/usr.bin/truss X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 02:57:05 -0000 Author: markj Date: Thu Aug 1 02:57:04 2013 New Revision: 253850 URL: http://svnweb.freebsd.org/changeset/base/253850 Log: Properly print arguments to vfork(2) and rfork(2). PR: 180976 Submitted by: Yuri (original patch) MFC after: 1 week Modified: head/usr.bin/truss/syscall.h head/usr.bin/truss/syscalls.c Modified: head/usr.bin/truss/syscall.h ============================================================================== --- head/usr.bin/truss/syscall.h Thu Aug 1 01:18:51 2013 (r253849) +++ head/usr.bin/truss/syscall.h Thu Aug 1 02:57:04 2013 (r253850) @@ -40,7 +40,7 @@ enum Argtype { None = 1, Hex, Octal, Int Fd_set, Sigaction, Fcntl, Mprot, Mmapflags, Whence, Readlinkres, Umtx, Sigset, Sigprocmask, Kevent, Sockdomain, Socktype, Open, Fcntlflag, Rusage, BinString, Shutdown, Resource, Rlimit, Timeval2, - Pathconf }; + Pathconf, Rforkflags }; #define ARG_MASK 0xff #define OUT 0x100 Modified: head/usr.bin/truss/syscalls.c ============================================================================== --- head/usr.bin/truss/syscalls.c Thu Aug 1 01:18:51 2013 (r253849) +++ head/usr.bin/truss/syscalls.c Thu Aug 1 02:57:04 2013 (r253850) @@ -93,6 +93,9 @@ static struct syscall syscalls[] = { { .name = "fcntl", .ret_type = 1, .nargs = 3, .args = { { Int, 0 } , { Fcntl, 1 }, { Fcntlflag | OUT, 2 } } }, { .name = "fork", .ret_type = 1, .nargs = 0 }, + { .name = "vfork", .ret_type = 1, .nargs = 0 }, + { .name = "rfork", .ret_type = 1, .nargs = 1, + .args = { { Rforkflags, 0 } } }, { .name = "getegid", .ret_type = 1, .nargs = 0 }, { .name = "geteuid", .ret_type = 1, .nargs = 0 }, { .name = "getgid", .ret_type = 1, .nargs = 0 }, @@ -369,6 +372,11 @@ static struct xlat pathconf_arg[] = { XEND }; +static struct xlat rfork_flags[] = { + X(RFPROC) X(RFNOWAIT) X(RFFDG) X(RFCFDG) X(RFTHREAD) X(RFMEM) + X(RFSIGSHARE) X(RFTSIGZMB) X(RFLINUXTHPN) XEND +}; + #undef X #undef XEND @@ -906,6 +914,9 @@ print_arg(struct syscall_args *sc, unsig case Pathconf: tmp = strdup(xlookup(pathconf_arg, args[sc->offset])); break; + case Rforkflags: + tmp = strdup(xlookup_bits(rfork_flags, args[sc->offset])); + break; case Sockaddr: { struct sockaddr_storage ss; char addr[64]; From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 04:11:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 31BD43E2; Thu, 1 Aug 2013 04:11:00 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0001E2632; Thu, 1 Aug 2013 04:10:59 +0000 (UTC) Received: from jre-mbp.elischer.org (etroy.elischer.org [121.45.226.51]) (authenticated bits=0) by vps1.elischer.org (8.14.7/8.14.6) with ESMTP id r714Asfc036570 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 31 Jul 2013 21:10:56 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <51F9DFC8.4020408@freebsd.org> Date: Thu, 01 Aug 2013 12:10:48 +0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r253825 - in head/sys: dev/wi modules modules/wi powerpc/powermac References: <201307310113.r6V1DUKY044876@svn.freebsd.org> <1375279659.45247.148.camel@revolution.hippie.lan> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Justin Hibbits , src-committers@freebsd.org, Ian Lepore , svn-src-all@freebsd.org, Sergey Kandaurov , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 04:11:00 -0000 On 8/1/13 2:09 AM, Adrian Chadd wrote: > On 31 July 2013 07:07, Ian Lepore wrote: > >> I'm more concerned about the 201 files in the base that say I have to >> give Mr. Paul credit in any product documentation and advertising >> materials (the marketing department is going to love that one, huh?). That's why apple put out a little brochure with each iphone that has MY NAME IN IT! :-) Honestly I think it's a pain and we have been trying to reduce it but it's not that easy. you can't take rights away from someone without asking them. > Welcome to licencing terms hell. This is why there have been > occasional sprints in "fixing" the licence terms to be more > consistent. > >> How many other such one-off requirements are buried in the license >> blocks of the source that I had no idea existed and am failing to comply >> with? > That's what well written perl scripts to extract / process copyright > notices are for. > > > > -adrian > From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 04:50:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F4226D8F; Thu, 1 Aug 2013 04:50:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E1E8D274C; Thu, 1 Aug 2013 04:50:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r714okt1049077; Thu, 1 Aug 2013 04:50:46 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r714okRX049076; Thu, 1 Aug 2013 04:50:46 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308010450.r714okRX049076@svn.freebsd.org> From: Hiroki Sato Date: Thu, 1 Aug 2013 04:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253852 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 04:50:47 -0000 Author: hrs Date: Thu Aug 1 04:50:46 2013 New Revision: 253852 URL: http://svnweb.freebsd.org/changeset/base/253852 Log: Fix boundary check of sockaddr array. Reported by: uqs Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Thu Aug 1 03:43:52 2013 (r253851) +++ head/sbin/route/route.c Thu Aug 1 04:50:46 2013 (r253852) @@ -1146,6 +1146,8 @@ getaddr(int idx, char *str, struct hoste char *q; #endif + if (idx < 0 || idx >= RTAX_MAX) + usage("internal error"); if (af == 0) { #if defined(INET) af = AF_INET; @@ -1162,9 +1164,6 @@ getaddr(int idx, char *str, struct hoste hpp = NULL; #endif rtm_addrs |= (1 << idx); - - if (idx > RTAX_MAX) - usage("internal error"); sa = (struct sockaddr *)&so[idx]; sa->sa_family = af; sa->sa_len = aflen; From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 04:52:23 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4C85BF03; Thu, 1 Aug 2013 04:52:23 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 003212758; Thu, 1 Aug 2013 04:52:21 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r714q3V9048429 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Aug 2013 13:52:13 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r714q2uX057545; Thu, 1 Aug 2013 13:52:02 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Thu, 01 Aug 2013 13:51:56 +0900 (JST) Message-Id: <20130801.135156.1110859998150839575.hrs@allbsd.org> To: uqs@FreeBSD.org Subject: Re: svn commit: r253504 - head/sbin/route From: Hiroki Sato In-Reply-To: <20130724130046.GD9092@acme.spoerlein.net> References: <201307201646.r6KGkpM6054344@svn.freebsd.org> <20130724130046.GD9092@acme.spoerlein.net> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Thu_Aug__1_13_51_56_2013_060)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Thu, 01 Aug 2013 13:52:13 +0900 (JST) X-Spam-Status: No, score=-90.0 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,MIMEQENC,QENCPTR1,QENCPTR2,RCVD_IN_PBL,SPF_SOFTFAIL, USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 04:52:23 -0000 ----Security_Multipart(Thu_Aug__1_13_51_56_2013_060)-- Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Ulrich Sp=F6rlein wrote in <20130724130046.GD9092@acme.spoerlein.net>: uq> On Sat, 2013-07-20 at 16:46:51 +0000, Hiroki Sato wrote: uq> > Author: hrs uq> > Date: Sat Jul 20 16:46:51 2013 uq> > New Revision: 253504 uq> > URL: http://svnweb.freebsd.org/changeset/base/253504 uq> > = uq> > Log: uq> > - Simplify getaddr() and print_getmsg() by using RTAX_* instead= of RTA_* uq> > as the argument. uq> > - Reduce unnecessary loop in print_getmsg(). uq> > = uq> > Modified: uq> > head/sbin/route/route.c uq> > = uq> > Modified: head/sbin/route/route.c uq> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D uq> > --- head/sbin/route/route.c Sat Jul 20 15:58:43 2013 (r253503) uq> > +++ head/sbin/route/route.c Sat Jul 20 16:46:51 2013 (r253504) uq> > @@ -1105,7 +1105,7 @@ inet6_makenetandmask(struct sockaddr_in6 uq> > * returning 1 if a host address, 0 if a network address. uq> > */ uq> > static int uq> > -getaddr(int which, char *str, struct hostent **hpp, int nrflags)= uq> > +getaddr(int idx, char *str, struct hostent **hpp, int nrflags) uq> > { uq> > struct sockaddr *sa; uq> > #if defined(INET) uq> > @@ -1130,36 +1130,16 @@ getaddr(int which, char *str, struct hos uq> > aflen =3D sizeof(struct sockaddr_dl); uq> > #endif uq> > } uq> > - rtm_addrs |=3D which; uq> > + rtm_addrs |=3D (1 << idx); uq> > = uq> > - switch (which) { uq> > - case RTA_DST: uq> > - sa =3D (struct sockaddr *)&so[RTAX_DST]; uq> > - break; uq> > - case RTA_GATEWAY: uq> > - sa =3D (struct sockaddr *)&so[RTAX_GATEWAY]; uq> > - break; uq> > - case RTA_NETMASK: uq> > - sa =3D (struct sockaddr *)&so[RTAX_NETMASK]; uq> > - break; uq> > - case RTA_GENMASK: uq> > - sa =3D (struct sockaddr *)&so[RTAX_GENMASK]; uq> > - break; uq> > - case RTA_IFA: uq> > - sa =3D (struct sockaddr *)&so[RTAX_IFA]; uq> > - break; uq> > - case RTA_IFP: uq> > - sa =3D (struct sockaddr *)&so[RTAX_IFP]; uq> > - break; uq> > - default: uq> > + if (idx > RTAX_MAX) uq> > usage("internal error"); uq> > - /*NOTREACHED*/ uq> > - } uq> > + sa =3D (struct sockaddr *)&so[idx]; uq> = uq> Coverity Scan flags this as an out-of-bounds write. RTAX_MAX is 8, = so uq> idx can be up to 8 (inclusive) in the check above. Do you want to c= heck uq> for idx >=3D RTAX_MAX maybe? idx is also signed ... uq> = uq> Coverity CID is 1054779, btw. Sorry for the delay. Thank you for pointing out it. Yes, the check was wrong by one. Fixed in r253852. -- Hiroki ----Security_Multipart(Thu_Aug__1_13_51_56_2013_060)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlH56WwACgkQTyzT2CeTzy25QwCgqPupVuyMx+IPixqiigNUL9Kc 4LwAoL7riDpIAhcih8VMIXaOwbCVoSyw =B9Ox -----END PGP SIGNATURE----- ----Security_Multipart(Thu_Aug__1_13_51_56_2013_060)---- From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 05:50:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B6C3A92B; Thu, 1 Aug 2013 05:50:43 +0000 (UTC) (envelope-from jlh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 435CB2A76; Thu, 1 Aug 2013 05:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r715ohIw067424; Thu, 1 Aug 2013 05:50:43 GMT (envelope-from jlh@svn.freebsd.org) Received: (from jlh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r715og8s067422; Thu, 1 Aug 2013 05:50:42 GMT (envelope-from jlh@svn.freebsd.org) Message-Id: <201308010550.r715og8s067422@svn.freebsd.org> From: Jeremie Le Hen Date: Thu, 1 Aug 2013 05:50:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253853 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 05:50:43 -0000 Author: jlh Date: Thu Aug 1 05:50:42 2013 New Revision: 253853 URL: http://svnweb.freebsd.org/changeset/base/253853 Log: Include /usr/local/etc/libmap.d/ by default. PR: 180568 Reviewed by: bapt Obtained from: kib MFC after: 3 days Added: head/etc/libmap.conf (contents, props changed) Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Aug 1 04:50:46 2013 (r253852) +++ head/etc/Makefile Thu Aug 1 05:50:42 2013 (r253853) @@ -22,6 +22,7 @@ BIN1= crontab \ hosts.equiv \ inetd.conf \ libalias.conf \ + libmap.conf \ login.access \ login.conf \ mac.conf \ Added: head/etc/libmap.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/libmap.conf Thu Aug 1 05:50:42 2013 (r253853) @@ -0,0 +1,2 @@ +# $FreeBSD$ +includedir /usr/local/etc/libmap.d From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 05:59:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B241B3F; Thu, 1 Aug 2013 05:59:29 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 18F4A2AB5; Thu, 1 Aug 2013 05:59:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r715xSp6068445; Thu, 1 Aug 2013 05:59:28 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r715xSff068444; Thu, 1 Aug 2013 05:59:28 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201308010559.r715xSff068444@svn.freebsd.org> From: Peter Grehan Date: Thu, 1 Aug 2013 05:59:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253854 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 05:59:29 -0000 Author: grehan Date: Thu Aug 1 05:59:28 2013 New Revision: 253854 URL: http://svnweb.freebsd.org/changeset/base/253854 Log: Moved clearing of vmm_initialized to avoid the case of unloading the module while VMs existed. This would result in EBUSY, but would prevent further operations on VMs resulting in the module being impossible to unload. Submitted by: Tycho Nightingale (tycho.nightingale plurisbusnetworks.com) Reviewed by: grehan, neel Modified: head/sys/amd64/vmm/vmm.c Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Thu Aug 1 05:50:42 2013 (r253853) +++ head/sys/amd64/vmm/vmm.c Thu Aug 1 05:59:28 2013 (r253854) @@ -224,8 +224,13 @@ vmm_handler(module_t mod, int what, void iommu_cleanup(); vmm_ipi_cleanup(); error = VMM_CLEANUP(); + /* + * Something bad happened - prevent new + * VMs from being created + */ + if (error) + vmm_initialized = 0; } - vmm_initialized = 0; break; default: error = 0; From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 08:35:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2D81D811; Thu, 1 Aug 2013 08:35:02 +0000 (UTC) (envelope-from philip@rincewind.paeps.cx) Received: from rincewind.paeps.cx (rincewind.paeps.cx [IPv6:2a01:4f8:162:1261::1]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AD07521F3; Thu, 1 Aug 2013 08:35:01 +0000 (UTC) Received: by rincewind.paeps.cx (Postfix, from userid 1001) id 069B511E6; Thu, 1 Aug 2013 10:34:59 +0200 (CEST) Date: Thu, 1 Aug 2013 10:34:59 +0200 From: Philip Paeps To: Adrian Chadd Subject: Re: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... Message-ID: <20130801083459.GI59509@rincewind.paeps.cx> Mail-Followup-To: Adrian Chadd , "David E. O'Brien" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201307292026.r6TKQRRb021717@svn.freebsd.org> <20130731104009.GG59509@rincewind.paeps.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-PGP-Fingerprint: 356B AE02 4763 F739 2FA2 E438 2649 E628 C5D3 4D05 X-Date: Today is Pungenday, the 67th day of Confusion in the YOLD 3179 X-Phase-of-Moon: The Moon is Waning Crescent (26% of Full) X-Philip-Conspiracy: There is no conspiracy User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "David E. O'Brien" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 08:35:02 -0000 On 2013-07-31 11:15:55 (-0700), Adrian Chadd wrote: > On 31 July 2013 03:40, Philip Paeps wrote: > >> * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" option. > >> The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise yarrow. > > > > I would really prefer to see this logic reversed. Of course, we expect > > people to read UPDATING, but disabling functionality that has been > > enabled by default "forever" without any warning, especially in a > > security-related context is not cool. Please change YARROW_RNG to > > RNG_NO_YARROW or something similar and keep it in by default. If you > > think there's a really good reason to kick support out by default, there > > are mailing lists to discuss this. > > I'm 100% against this. I'm getting extremely fed up with the "default > is on" bloat that is everywhere in our sub-systems. David is actually > _tidying things up_ by making optional devices be standalone devices - > that way they show up as very simple to include and expand when making > modules of things. Otherwise you turn this into a single, monolithic > module that has compile options.. and that sucks. I'm absolutely not against "removing bloat" in general. This particular change, however, potentially leaves anyone who builds a custom kernel ("to remove bloat") and doesn't have a hardware PRNG without any PRNG. We don't make changes like that without warning people. While everyone should read UPDATING, many people only read it when stuff (visibly) breaks, which could cause this change to slip under the radar for them. > David's way is clean, simple and architecturally well-designed. It's > how it should've been done in the first place. Sure. I agree. I read through the random_adaptors code and I like the design and couldn't see any immediate issues. The reasons I wanted this backed out for now, are firstly that we have a policy that changes affecting random should be reviewed by secteam before being committed and secondly that I don't feel we should potentially be leaving a large group of people without any functional random. As soon as secteam can do a more thorough review of the random_adaptors code, it should definitely come back. It's an architectural change in the right direction. I am a lot less sure about removing Yarrow by default, but that's something we can discuss as a separate issue - it doesn't block the architectural improvement as far as I'm concerned. > > I'd really like to see this get some more review. > > I'd like to see the architectural changes needed for a cleanup like > this take place, rather than getting lost in discussion. I think we are enthusiastically agreeing with each other for the most part. :) I also want the architectural improvement and I'm all in favour of removing bloat. > For the MIPS boards I hack on/for, I don't have any guaranteed random > number generator. So it's Yarrow or bust. So we need to "properly > seed" things as best as we can before any hardware random number > generators are loaded. The same problem exists for i386/amd64 with > hardware PRNGs.. we should ensure yarrow is properly seeded here. Right. And had you not seen this discussion, when would you have noticed that Yarrow was gone? How long would you have run with poor random before you found the entry in UPDATING that told you that you needed to add an option to your kernel configuration? I agree that this change is generally good. I just want to see it more thoroughly reviewed by secteam, and a discussion about whether we want Yarrow to be default, and if not, when we throw that switch. Philip -- Philip Paeps Senior Reality Engineer Ministry of Information From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 09:42:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CDAE381B; Thu, 1 Aug 2013 09:42:17 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB04D25AF; Thu, 1 Aug 2013 09:42:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r719gH4b036124; Thu, 1 Aug 2013 09:42:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r719gHgF036123; Thu, 1 Aug 2013 09:42:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308010942.r719gHgF036123@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Aug 2013 09:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253855 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 09:42:17 -0000 Author: mav Date: Thu Aug 1 09:42:17 2013 New Revision: 253855 URL: http://svnweb.freebsd.org/changeset/base/253855 Log: MFC r253754: Partially close race between calls of orphan() method from GEOM and close() method from ZFS core, that reliably causes use-after-free panic if SSD vdev detached during inititial erase. Approved by: re (delphij) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 1 05:59:28 2013 (r253854) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 1 09:42:17 2013 (r253855) @@ -69,6 +69,8 @@ vdev_geom_orphan(struct g_consumer *cp) g_topology_assert(); vd = cp->private; + if (vd == NULL) + return; /* * Orphan callbacks occur from the GEOM event thread. @@ -689,6 +691,7 @@ vdev_geom_close(vdev_t *vd) return; vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; + cp->private = NULL; /* XXX locking */ g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 09:48:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6E9B7E35; Thu, 1 Aug 2013 09:48:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5B4D5261D; Thu, 1 Aug 2013 09:48:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r719mDjR036894; Thu, 1 Aug 2013 09:48:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r719mD3D036893; Thu, 1 Aug 2013 09:48:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201308010948.r719mD3D036893@svn.freebsd.org> From: Alexander Motin Date: Thu, 1 Aug 2013 09:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r253856 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 09:48:13 -0000 Author: mav Date: Thu Aug 1 09:48:12 2013 New Revision: 253856 URL: http://svnweb.freebsd.org/changeset/base/253856 Log: MFC r253754: Partially close race between calls of orphan() method from GEOM and close() method from ZFS core, that reliably causes use-after-free panic if SSD vdev detached during inititial erase. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 1 09:42:17 2013 (r253855) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Aug 1 09:48:12 2013 (r253856) @@ -69,6 +69,8 @@ vdev_geom_orphan(struct g_consumer *cp) g_topology_assert(); vd = cp->private; + if (vd == NULL) + return; /* * Orphan callbacks occur from the GEOM event thread. @@ -689,6 +691,7 @@ vdev_geom_close(vdev_t *vd) return; vd->vdev_tsd = NULL; vd->vdev_delayed_close = B_FALSE; + cp->private = NULL; /* XXX locking */ g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL); } From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 10:06:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 389D9629; Thu, 1 Aug 2013 10:06:20 +0000 (UTC) (envelope-from ganbold@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C1CB26F6; Thu, 1 Aug 2013 10:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71A6JN7044320; Thu, 1 Aug 2013 10:06:19 GMT (envelope-from ganbold@svn.freebsd.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71A6JCr044317; Thu, 1 Aug 2013 10:06:19 GMT (envelope-from ganbold@svn.freebsd.org) Message-Id: <201308011006.r71A6JCr044317@svn.freebsd.org> From: Ganbold Tsagaankhuu Date: Thu, 1 Aug 2013 10:06:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253857 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 10:06:20 -0000 Author: ganbold (doc committer) Date: Thu Aug 1 10:06:19 2013 New Revision: 253857 URL: http://svnweb.freebsd.org/changeset/base/253857 Log: Add identification for Cortex-A7 (R0) cores. Reviewed by: cognet@ Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Thu Aug 1 09:48:12 2013 (r253856) +++ head/sys/arm/arm/cpufunc.c Thu Aug 1 10:06:19 2013 (r253857) @@ -1476,7 +1476,8 @@ set_cpufuncs() } #endif /* CPU_ARM1136 || CPU_ARM1176 */ #ifdef CPU_CORTEXA - if (cputype == CPU_ID_CORTEXA8R1 || + if (cputype == CPU_ID_CORTEXA7 || + cputype == CPU_ID_CORTEXA8R1 || cputype == CPU_ID_CORTEXA8R2 || cputype == CPU_ID_CORTEXA8R3 || cputype == CPU_ID_CORTEXA9R1 || Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Thu Aug 1 09:48:12 2013 (r253856) +++ head/sys/arm/arm/identcpu.c Thu Aug 1 10:06:19 2013 (r253857) @@ -236,6 +236,8 @@ const struct cpuidtab cpuids[] = { { CPU_ID_ARM1026EJS, CPU_CLASS_ARM10EJ, "ARM1026EJ-S", generic_steppings }, + { CPU_ID_CORTEXA7, CPU_CLASS_CORTEXA, "Cortex A7", + generic_steppings }, { CPU_ID_CORTEXA8R1, CPU_CLASS_CORTEXA, "Cortex A8-r1", generic_steppings }, { CPU_ID_CORTEXA8R2, CPU_CLASS_CORTEXA, "Cortex A8-r2", Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Thu Aug 1 09:48:12 2013 (r253856) +++ head/sys/arm/include/armreg.h Thu Aug 1 10:06:19 2013 (r253857) @@ -147,6 +147,7 @@ #define CPU_ID_ARM1136JS 0x4107b360 #define CPU_ID_ARM1136JSR1 0x4117b360 #define CPU_ID_ARM1176JZS 0x410fb760 +#define CPU_ID_CORTEXA7 0x410fc070 #define CPU_ID_CORTEXA8R1 0x411fc080 #define CPU_ID_CORTEXA8R2 0x412fc080 #define CPU_ID_CORTEXA8R3 0x413fc080 From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 12:05:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AE3B06FE; Thu, 1 Aug 2013 12:05:23 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9B0532DC0; Thu, 1 Aug 2013 12:05:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71C5NQa081511; Thu, 1 Aug 2013 12:05:23 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71C5NgM081510; Thu, 1 Aug 2013 12:05:23 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201308011205.r71C5NgM081510@svn.freebsd.org> From: Michael Tuexen Date: Thu, 1 Aug 2013 12:05:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253858 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 12:05:23 -0000 Author: tuexen Date: Thu Aug 1 12:05:23 2013 New Revision: 253858 URL: http://svnweb.freebsd.org/changeset/base/253858 Log: Micro-optimization suggested in https://bugzilla.mozilla.org/show_bug.cgi?id=898234 by pchang9. While there simplify the code. MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Thu Aug 1 10:06:19 2013 (r253857) +++ head/sys/netinet/sctp_usrreq.c Thu Aug 1 12:05:23 2013 (r253858) @@ -3942,7 +3942,6 @@ sctp_setopt(struct socket *so, int optna sctp_hmaclist_t *hmaclist; uint16_t hmacid; uint32_t i; - size_t found; SCTP_CHECK_AND_CAST(shmac, optval, struct sctp_hmacalgo, optsize); if (optsize < sizeof(struct sctp_hmacalgo) + shmac->shmac_number_of_idents * sizeof(uint16_t)) { @@ -3966,14 +3965,14 @@ sctp_setopt(struct socket *so, int optna goto sctp_set_hmac_done; } } - found = 0; for (i = 0; i < hmaclist->num_algo; i++) { if (hmaclist->hmac[i] == SCTP_AUTH_HMAC_ID_SHA1) { /* already in list */ - found = 1; + break; } } - if (!found) { + if (i == hmaclist->num_algo) { + /* not found in list */ sctp_free_hmaclist(hmaclist); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EINVAL); error = EINVAL; From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 12:55:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E20F19F9; Thu, 1 Aug 2013 12:55:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CF62120C7; Thu, 1 Aug 2013 12:55:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71Ctf1Y095962; Thu, 1 Aug 2013 12:55:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71CtfWb095961; Thu, 1 Aug 2013 12:55:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201308011255.r71CtfWb095961@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 1 Aug 2013 12:55:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253859 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 12:55:42 -0000 Author: kib Date: Thu Aug 1 12:55:41 2013 New Revision: 253859 URL: http://svnweb.freebsd.org/changeset/base/253859 Log: Remove unused malloc type. Requested by: alc MFC after: 1 week Modified: head/sys/kern/kern_malloc.c Modified: head/sys/kern/kern_malloc.c ============================================================================== --- head/sys/kern/kern_malloc.c Thu Aug 1 12:05:23 2013 (r253858) +++ head/sys/kern/kern_malloc.c Thu Aug 1 12:55:41 2013 (r253859) @@ -116,8 +116,6 @@ MALLOC_DEFINE(M_IP6NDP, "ip6ndp", "IPv6 static void kmeminit(void *); SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_FIRST, kmeminit, NULL); -static MALLOC_DEFINE(M_FREE, "free", "should be on free list"); - static struct malloc_type *kmemstatistics; static vm_offset_t kmembase; static vm_offset_t kmemlimit; From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 13:18:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 93FAF1E5; Thu, 1 Aug 2013 13:18:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 80B7C21E4; Thu, 1 Aug 2013 13:18:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71DImY2002785; Thu, 1 Aug 2013 13:18:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71DIl9O002780; Thu, 1 Aug 2013 13:18:47 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308011318.r71DIl9O002780@svn.freebsd.org> From: Marius Strobl Date: Thu, 1 Aug 2013 13:18:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253860 - in stable/9/sys: amd64/conf i386/conf ia64/conf sparc64/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 13:18:48 -0000 Author: marius Date: Thu Aug 1 13:18:47 2013 New Revision: 253860 URL: http://svnweb.freebsd.org/changeset/base/253860 Log: MFC: r249410 (partial) Remove ctl(4) from GENERIC. With ctl(4) being built as a module and automatically loaded by ctladm(8), this makes CTL work out of the box. Note that unlike the original r249410, this commit does not remove the kern.cam.ctl.disable tunable for POLA reasons. PR: 174671, 175694, 179112 Reviewed by: ken (original version) Sponsored by: FreeBSD Foundation (original version) Approved by: re (hrs) Modified: stable/9/sys/amd64/conf/GENERIC stable/9/sys/i386/conf/GENERIC stable/9/sys/i386/conf/PAE stable/9/sys/ia64/conf/GENERIC stable/9/sys/sparc64/conf/GENERIC Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/conf/GENERIC ============================================================================== --- stable/9/sys/amd64/conf/GENERIC Thu Aug 1 12:55:41 2013 (r253859) +++ stable/9/sys/amd64/conf/GENERIC Thu Aug 1 13:18:47 2013 (r253860) @@ -124,7 +124,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID Modified: stable/9/sys/i386/conf/GENERIC ============================================================================== --- stable/9/sys/i386/conf/GENERIC Thu Aug 1 12:55:41 2013 (r253859) +++ stable/9/sys/i386/conf/GENERIC Thu Aug 1 13:18:47 2013 (r253860) @@ -131,7 +131,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # RAID controllers interfaced to the SCSI subsystem device amr # AMI MegaRAID Modified: stable/9/sys/i386/conf/PAE ============================================================================== --- stable/9/sys/i386/conf/PAE Thu Aug 1 12:55:41 2013 (r253859) +++ stable/9/sys/i386/conf/PAE Thu Aug 1 13:18:47 2013 (r253860) @@ -39,8 +39,6 @@ nodevice ncv nodevice nsp nodevice stg -nodevice ctl - nodevice asr nodevice dpt nodevice mly Modified: stable/9/sys/ia64/conf/GENERIC ============================================================================== --- stable/9/sys/ia64/conf/GENERIC Thu Aug 1 12:55:41 2013 (r253859) +++ stable/9/sys/ia64/conf/GENERIC Thu Aug 1 13:18:47 2013 (r253860) @@ -100,7 +100,7 @@ device da # Direct Access (ie disk) device pass # Passthrough (direct ATA/SCSI access) device sa # Sequential Access (ie tape) device ses # Enclosure Services (SES and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # RAID controllers device aac # Adaptec FSA RAID Modified: stable/9/sys/sparc64/conf/GENERIC ============================================================================== --- stable/9/sys/sparc64/conf/GENERIC Thu Aug 1 12:55:41 2013 (r253859) +++ stable/9/sys/sparc64/conf/GENERIC Thu Aug 1 13:18:47 2013 (r253860) @@ -107,7 +107,7 @@ device sa # Sequential Access (tape et device cd # CD device pass # Passthrough device (direct ATA/SCSI access) device ses # SCSI Environmental Services (and SAF-TE) -device ctl # CAM Target Layer +#device ctl # CAM Target Layer # RAID controllers #device amr # AMI MegaRAID From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 14:23:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7E353B64; Thu, 1 Aug 2013 14:23:34 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0493225EF; Thu, 1 Aug 2013 14:23:33 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.7/8.14.7) with ESMTP id r71ENPEk035193; Thu, 1 Aug 2013 18:23:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.7/8.14.7/Submit) id r71ENP97035192; Thu, 1 Aug 2013 18:23:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 1 Aug 2013 18:23:25 +0400 From: Gleb Smirnoff To: Hiroki Sato Subject: Re: svn commit: r253841 - head/sys/netinet6 Message-ID: <20130801142324.GG20104@FreeBSD.org> References: <201307311624.r6VGOob5022079@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201307311624.r6VGOob5022079@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 14:23:34 -0000 On Wed, Jul 31, 2013 at 04:24:50PM +0000, Hiroki Sato wrote: H> Author: hrs H> Date: Wed Jul 31 16:24:49 2013 H> New Revision: 253841 H> URL: http://svnweb.freebsd.org/changeset/base/253841 H> H> Log: H> Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable H> interfaces. This eliminates unnecessary IPv6 processing for non-IPv6 H> interfaces. H> H> MFC after: 3 days H> H> Modified: H> head/sys/netinet6/in6.c H> head/sys/netinet6/in6_ifattach.c H> head/sys/netinet6/nd6.c H> H> Modified: head/sys/netinet6/in6.c H> ============================================================================== H> --- head/sys/netinet6/in6.c Wed Jul 31 15:55:01 2013 (r253840) H> +++ head/sys/netinet6/in6.c Wed Jul 31 16:24:49 2013 (r253841) H> @@ -2746,6 +2746,13 @@ in6_domifattach(struct ifnet *ifp) H> { H> struct in6_ifextra *ext; H> H> + /* There are not IPv6-capable interfaces. */ H> + switch (ifp->if_type) { H> + case IFT_PFLOG: H> + case IFT_PFSYNC: H> + case IFT_USB: H> + return (NULL); H> + } All three should just disappear as interfaces :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 16:04:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0A681197; Thu, 1 Aug 2013 16:04:49 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3E9E2C73; Thu, 1 Aug 2013 16:04:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71G4mRo052518; Thu, 1 Aug 2013 16:04:48 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71G4mOY052517; Thu, 1 Aug 2013 16:04:48 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201308011604.r71G4mOY052517@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Thu, 1 Aug 2013 16:04:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253861 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 16:04:49 -0000 Author: pfg Date: Thu Aug 1 16:04:48 2013 New Revision: 253861 URL: http://svnweb.freebsd.org/changeset/base/253861 Log: Add license for the half MD4 algorithm used in ext2_half_md4(). The htree implementation uses code derived from the RSA Data Security, Inc. MD4 Message-Digest Algorithm. Add a proper licensing statement for the code and clarify the corresponding comments. Approved by: core (hrs) Modified: head/sys/fs/ext2fs/ext2_hash.c Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Thu Aug 1 13:18:47 2013 (r253860) +++ head/sys/fs/ext2fs/ext2_hash.c Thu Aug 1 16:04:48 2013 (r253861) @@ -27,6 +27,30 @@ * $FreeBSD$ */ +/* + * The following notice applies to the code in ext2_half_md4(): + * + * Copyright (C) 1990-2, RSA Data Security, Inc. All rights reserved. + * + * License to copy and use this software is granted provided that it + * is identified as the "RSA Data Security, Inc. MD4 Message-Digest + * Algorithm" in all material mentioning or referencing this software + * or this function. + * + * License is also granted to make and use derivative works provided + * that such works are identified as "derived from the RSA Data + * Security, Inc. MD4 Message-Digest Algorithm" in all material + * mentioning or referencing the derived work. + * + * RSA Data Security, Inc. makes no representations concerning either + * the merchantability of this software or the suitability of this + * software for any particular purpose. It is provided "as is" + * without express or implied warranty of any kind. + * + * These notices must be retained in any copies of any part of this + * documentation and/or software. + */ + #include #include #include @@ -69,13 +93,13 @@ /* * MD4 basic transformation. It transforms state based on block. * - * This is a half md4 algorithm because in Linux it uses this algorithm in dir - * index. This function is copied from kern/md4c.c file and is modified as - * necessary. + * This is a half md4 algorithm since Linux uses this algorithm for dir + * index. This function is derived from the RSA Data Security, Inc. MD4 + * Message-Digest Algorithm and was modified as necessary. * * The return value of this function is uint32_t in Linux, but actually we don't - * need to check this value. So in our version this function don't return any - * values. + * need to check this value, so in our version this function doesn't return any + * value. */ static void ext2_half_md4(uint32_t hash[4], uint32_t data[8]) From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 16:18:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1E419709; Thu, 1 Aug 2013 16:18:41 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 074E72D4E; Thu, 1 Aug 2013 16:18:41 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:a5d2:4d9:866a:808] (unknown [IPv6:2601:9:4d00:119:a5d2:4d9:866a:808]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 1FF0C3982B; Thu, 1 Aug 2013 09:18:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253841 - head/sys/netinet6 From: Rui Paulo In-Reply-To: <20130801142324.GG20104@FreeBSD.org> Date: Thu, 1 Aug 2013 09:18:39 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <97527D06-7783-4441-BA50-702DEE0B9076@FreeBSD.org> References: <201307311624.r6VGOob5022079@svn.freebsd.org> <20130801142324.GG20104@FreeBSD.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 16:18:41 -0000 On 1 Aug 2013, at 07:23, Gleb Smirnoff wrote: > On Wed, Jul 31, 2013 at 04:24:50PM +0000, Hiroki Sato wrote: > H> Author: hrs > H> Date: Wed Jul 31 16:24:49 2013 > H> New Revision: 253841 > H> URL: http://svnweb.freebsd.org/changeset/base/253841 > H>=20 > H> Log: > H> Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for = IPv6-capable > H> interfaces. This eliminates unnecessary IPv6 processing for = non-IPv6 > H> interfaces. > H> =20 > H> MFC after: 3 days > H>=20 > H> Modified: > H> head/sys/netinet6/in6.c > H> head/sys/netinet6/in6_ifattach.c > H> head/sys/netinet6/nd6.c > H>=20 > H> Modified: head/sys/netinet6/in6.c > H> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > H> --- head/sys/netinet6/in6.c Wed Jul 31 15:55:01 2013 = (r253840) > H> +++ head/sys/netinet6/in6.c Wed Jul 31 16:24:49 2013 = (r253841) > H> @@ -2746,6 +2746,13 @@ in6_domifattach(struct ifnet *ifp) > H> { > H> struct in6_ifextra *ext; > H> =20 > H> + /* There are not IPv6-capable interfaces. */ > H> + switch (ifp->if_type) { > H> + case IFT_PFLOG: > H> + case IFT_PFSYNC: > H> + case IFT_USB: > H> + return (NULL); > H> + } >=20 > All three should just disappear as interfaces :) What? Why? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 16:28:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E4E6AB32; Thu, 1 Aug 2013 16:28:49 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A4DED2DD4; Thu, 1 Aug 2013 16:28:49 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=dhcp170-36-red.yandex.net) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1V4vnC-000Plo-40; Thu, 01 Aug 2013 20:31:58 +0400 Message-ID: <51FA8C73.4070808@FreeBSD.org> Date: Thu, 01 Aug 2013 20:27:31 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130418 Thunderbird/17.0.5 MIME-Version: 1.0 To: Rui Paulo Subject: Re: svn commit: r253841 - head/sys/netinet6 References: <201307311624.r6VGOob5022079@svn.freebsd.org> <20130801142324.GG20104@FreeBSD.org> <97527D06-7783-4441-BA50-702DEE0B9076@FreeBSD.org> In-Reply-To: <97527D06-7783-4441-BA50-702DEE0B9076@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Hiroki Sato X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 16:28:50 -0000 On 01.08.2013 20:18, Rui Paulo wrote: > On 1 Aug 2013, at 07:23, Gleb Smirnoff wrote: > >> On Wed, Jul 31, 2013 at 04:24:50PM +0000, Hiroki Sato wrote: >> H> Author: hrs >> H> Date: Wed Jul 31 16:24:49 2013 >> H> New Revision: 253841 >> H> URL: http://svnweb.freebsd.org/changeset/base/253841 >> H> >> H> Log: >> H> Allocate in6_ifextra (ifp->if_afdata[AF_INET6]) only for IPv6-capable >> H> interfaces. This eliminates unnecessary IPv6 processing for non-IPv6 >> H> interfaces. >> H> >> H> MFC after: 3 days >> H> >> H> Modified: >> H> head/sys/netinet6/in6.c >> H> head/sys/netinet6/in6_ifattach.c >> H> head/sys/netinet6/nd6.c >> H> >> H> Modified: head/sys/netinet6/in6.c >> H> ============================================================================== >> H> --- head/sys/netinet6/in6.c Wed Jul 31 15:55:01 2013 (r253840) >> H> +++ head/sys/netinet6/in6.c Wed Jul 31 16:24:49 2013 (r253841) >> H> @@ -2746,6 +2746,13 @@ in6_domifattach(struct ifnet *ifp) >> H> { >> H> struct in6_ifextra *ext; >> H> >> H> + /* There are not IPv6-capable interfaces. */ >> H> + switch (ifp->if_type) { >> H> + case IFT_PFLOG: >> H> + case IFT_PFSYNC: >> H> + case IFT_USB: >> H> + return (NULL); >> H> + } >> >> All three should just disappear as interfaces :) > > What? Why? Because thay aren't really interfaces. All they need is BPF. There is a cleaner approach described here: http://lists.freebsd.org/pipermail/freebsd-net/2012-December/034031.html > > -- > Rui Paulo > > From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 16:55:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 49FF910F; Thu, 1 Aug 2013 16:55:37 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 3095E2EF7; Thu, 1 Aug 2013 16:55:36 +0000 (UTC) Received: from [IPv6:2620:149:4:f01:588d:2e90:8e05:7108] (unknown [IPv6:2620:149:4:f01:588d:2e90:8e05:7108]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 51CF33982B; Thu, 1 Aug 2013 09:55:35 -0700 (PDT) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1791\)) Subject: Re: svn commit: r253841 - head/sys/netinet6 From: Rui Paulo In-Reply-To: <51FA8C73.4070808@FreeBSD.org> Date: Thu, 1 Aug 2013 09:55:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201307311624.r6VGOob5022079@svn.freebsd.org> <20130801142324.GG20104@FreeBSD.org> <97527D06-7783-4441-BA50-702DEE0B9076@FreeBSD.org> <51FA8C73.4070808@FreeBSD.org> To: Alexander V. Chernikov X-Mailer: Apple Mail (2.1791) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org, Hiroki Sato X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 16:55:37 -0000 On 1 Aug 2013, at 09:27, Alexander V. Chernikov = wrote: > Because thay aren't really interfaces. All they need is BPF. > There is a cleaner approach described here: = http://lists.freebsd.org/pipermail/freebsd-net/2012-December/034031.html I don't agree with this patch as-is, but I'll need to spend some time = writing an email... To be continued later. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 18:06:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7DBBFFD6; Thu, 1 Aug 2013 18:06:59 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4FD10221B; Thu, 1 Aug 2013 18:06:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71I6x2q088691; Thu, 1 Aug 2013 18:06:59 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71I6xpd088690; Thu, 1 Aug 2013 18:06:59 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308011806.r71I6xpd088690@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 1 Aug 2013 18:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253862 - head/sys/boot/ficl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 18:06:59 -0000 Author: marcel Date: Thu Aug 1 18:06:58 2013 New Revision: 253862 URL: http://svnweb.freebsd.org/changeset/base/253862 Log: Fix the build of the testmain target. This target compiles a Forth interpreter that can be run on the system and as such cannot be compiled against libbstand. On the one hand this means we need to include the usual headers for system interfaces that we use and on the the other hand we can only use standard system interfaces. While here, define local variables only when needed to make this WARNS=2 clean on amd64. PR: 172542 Obtained from: peterj@ Pointed out by: Jan Beich Modified: head/sys/boot/ficl/loader.c Modified: head/sys/boot/ficl/loader.c ============================================================================== --- head/sys/boot/ficl/loader.c Thu Aug 1 16:04:48 2013 (r253861) +++ head/sys/boot/ficl/loader.c Thu Aug 1 18:06:58 2013 (r253862) @@ -33,7 +33,13 @@ *******************************************************************/ #ifdef TESTMAIN +#include +#include +#include +#include +#include #include +#include #else #include #endif @@ -135,9 +141,9 @@ void ficlGetenv(FICL_VM *pVM) { #ifndef TESTMAIN - char *name; + char *name, *value; #endif - char *namep, *value; + char *namep; int names; #if FICL_ROBUST > 1 @@ -243,9 +249,9 @@ void ficlFindfile(FICL_VM *pVM) { #ifndef TESTMAIN - char *name; + char *name, *type; #endif - char *type, *namep, *typep; + char *namep, *typep; struct preloaded_file* fp; int names, types; @@ -511,6 +517,14 @@ static void pfread(FICL_VM *pVM) */ static void pfreaddir(FICL_VM *pVM) { +#ifdef TESTMAIN + static union { + struct dirent dirent; + char buf[512]; + } u; + off_t off; + int len; +#endif struct dirent *d; int fd; @@ -519,7 +533,20 @@ static void pfreaddir(FICL_VM *pVM) #endif fd = stackPopINT(pVM->pStack); +#if TESTMAIN + /* + * The readdirfd() function is specific to the loader environment. + * We do the best we can to make freaddir work, but it's not at + * all guaranteed. + */ + off = lseek(fd, 0LL, SEEK_CUR); + len = getdents(fd, u.buf, sizeof(u.buf)); + d = (len != -1) ? &u.dirent : NULL; + if (d != NULL) + lseek(fd, off + d->d_reclen, SEEK_SET); +#else d = readdirfd(fd); +#endif if (d != NULL) { stackPushPtr(pVM->pStack, d->d_name); stackPushINT(pVM->pStack, strlen(d->d_name)); From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 20:10:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 21AE3310; Thu, 1 Aug 2013 20:10:18 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0006C285D; Thu, 1 Aug 2013 20:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71KAHfs024849; Thu, 1 Aug 2013 20:10:17 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71KAHUf024848; Thu, 1 Aug 2013 20:10:17 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201308012010.r71KAHUf024848@svn.freebsd.org> From: Jack F Vogel Date: Thu, 1 Aug 2013 20:10:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253865 - head/sys/dev/ixgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 20:10:18 -0000 Author: jfv Date: Thu Aug 1 20:10:16 2013 New Revision: 253865 URL: http://svnweb.freebsd.org/changeset/base/253865 Log: A number of important fixes: - mbuf reused after an RX_COPY optimized operation can sometimes have a bogus cached address, resulting in TCP hangs. Add critical save points to the cached address. Thanks to Michael and the team at Verisign for finding this problem. - A couple more spots where the rxbuf->flags member should be cleared just to be sure no incorrect RX_COPY state is left around. Thanks to Adrian for tracking these down. - Remove the rearm_queues function from the driver, this was found to be responsible for some out-of-order packets by Verisign, and was always a bandaid, with the other fixes in this delta the bandaid can finally be removed. - In the other/link interrupt handler the entire state of the EICS register was being writen back into EICR (which clears causes and thus re-enables those interrupts), this was wrong, so now mask off the queue portion of the register value, so we only clear the other/link interrupt we intend. Marc from Verisign found this. - Make the SFP+ unsupported option tuneable now, by customer request. - Finally, just a couple of minor DEBUG string fixes. I want to call out and thank all the participants in the 10G community/Intel calls for helping track down these problems and make the driver better for everyone! MFC after: 3 days, these are critical fixes for 9.2! Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Thu Aug 1 19:37:11 2013 (r253864) +++ head/sys/dev/ixgbe/ixgbe.c Thu Aug 1 20:10:16 2013 (r253865) @@ -45,7 +45,7 @@ int ixgbe_display_debug_stat /********************************************************************* * Driver version *********************************************************************/ -char ixgbe_driver_version[] = "2.5.13"; +char ixgbe_driver_version[] = "2.5.15"; /********************************************************************* * PCI Device ID Table @@ -297,6 +297,7 @@ TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd); ** doing so you are on your own :) */ static int allow_unsupported_sfp = FALSE; +TUNABLE_INT("hw.ixgbe.unsupported_sfp", &allow_unsupported_sfp); /* ** HW RSC control: @@ -1071,7 +1072,7 @@ ixgbe_init_locked(struct adapter *adapte u32 rxdctl, rxctrl; mtx_assert(&adapter->core_mtx, MA_OWNED); - INIT_DEBUGOUT("ixgbe_init: begin"); + INIT_DEBUGOUT("ixgbe_init_locked: begin"); hw->adapter_stopped = FALSE; ixgbe_stop_adapter(hw); callout_stop(&adapter->timer); @@ -1382,23 +1383,6 @@ ixgbe_disable_queue(struct adapter *adap } } -static inline void -ixgbe_rearm_queues(struct adapter *adapter, u64 queues) -{ - u32 mask; - - if (adapter->hw.mac.type == ixgbe_mac_82598EB) { - mask = (IXGBE_EIMS_RTX_QUEUE & queues); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS, mask); - } else { - mask = (queues & 0xFFFFFFFF); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(0), mask); - mask = (queues >> 32); - IXGBE_WRITE_REG(&adapter->hw, IXGBE_EICS_EX(1), mask); - } -} - - static void ixgbe_handle_que(void *context, int pending) { @@ -1506,6 +1490,10 @@ ixgbe_msix_que(void *arg) bool more; u32 newitr = 0; + /* Protect against spurious interrupts */ + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + return; + ixgbe_disable_queue(adapter, que->msix); ++que->irqs; @@ -1592,6 +1580,8 @@ ixgbe_msix_link(void *arg) /* First get the cause */ reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS); + /* Be sure the queue bits are not cleared */ + reg_eicr = ~IXGBE_EICR_RTX_QUEUE; /* Clear interrupt with write */ IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr); @@ -2067,7 +2057,6 @@ ixgbe_local_timer(void *arg) goto watchdog; out: - ixgbe_rearm_queues(adapter, adapter->que_mask); callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter); return; @@ -3201,7 +3190,7 @@ ixgbe_free_transmit_buffers(struct tx_ri struct ixgbe_tx_buf *tx_buffer; int i; - INIT_DEBUGOUT("free_transmit_ring: begin"); + INIT_DEBUGOUT("ixgbe_free_transmit_ring: begin"); if (txr->tx_buffers == NULL) return; @@ -4005,11 +3994,13 @@ ixgbe_setup_receive_ring(struct rx_ring addr = PNMB(slot + sj, &paddr); netmap_load_map(rxr->ptag, rxbuf->pmap, addr); - /* Update descriptor */ + /* Update descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(paddr); + rxbuf->addr = htole64(paddr); continue; } #endif /* DEV_NETMAP */ + rxbuf->flags = 0; rxbuf->buf = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, adapter->rx_mbuf_sz); if (rxbuf->buf == NULL) { @@ -4026,8 +4017,9 @@ ixgbe_setup_receive_ring(struct rx_ring goto fail; bus_dmamap_sync(rxr->ptag, rxbuf->pmap, BUS_DMASYNC_PREREAD); - /* Update descriptor */ + /* Update the descriptor and the cached value */ rxr->rx_base[j].read.pkt_addr = htole64(seg[0].ds_addr); + rxbuf->addr = htole64(seg[0].ds_addr); } @@ -4244,6 +4236,8 @@ ixgbe_free_receive_structures(struct ada { struct rx_ring *rxr = adapter->rx_rings; + INIT_DEBUGOUT("ixgbe_free_receive_structures: begin"); + for (int i = 0; i < adapter->num_queues; i++, rxr++) { struct lro_ctrl *lro = &rxr->lro; ixgbe_free_receive_buffers(rxr); @@ -4268,7 +4262,7 @@ ixgbe_free_receive_buffers(struct rx_rin struct adapter *adapter = rxr->adapter; struct ixgbe_rx_buf *rxbuf; - INIT_DEBUGOUT("free_receive_structures: begin"); + INIT_DEBUGOUT("ixgbe_free_receive_buffers: begin"); /* Cleanup any existing buffers */ if (rxr->rx_buffers != NULL) { @@ -4358,6 +4352,8 @@ ixgbe_rx_discard(struct rx_ring *rxr, in m_free(rbuf->buf); rbuf->buf = NULL; } + + rbuf->flags = 0; return; } From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 21:45:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC930203; Thu, 1 Aug 2013 21:45:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D92762CA4; Thu, 1 Aug 2013 21:45:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71LjU7K054574; Thu, 1 Aug 2013 21:45:30 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71LjU7W054572; Thu, 1 Aug 2013 21:45:30 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308012145.r71LjU7W054572@svn.freebsd.org> From: Adrian Chadd Date: Thu, 1 Aug 2013 21:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253866 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 21:45:31 -0000 Author: adrian Date: Thu Aug 1 21:45:30 2013 New Revision: 253866 URL: http://svnweb.freebsd.org/changeset/base/253866 Log: iwn(4) debugging improvements. * Add in some new register debugging under IWN_DEBUG_REGISTER * Make IWN_DEBUG an option now for building. I'll chase this up with a commit to 'options' soon. Submitted by: Cedric GROSS Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Aug 1 20:10:16 2013 (r253865) +++ head/sys/dev/iwn/if_iwn.c Thu Aug 1 21:45:30 2013 (r253866) @@ -160,7 +160,9 @@ static void iwn5000_ict_reset(struct iwn static int iwn_read_eeprom(struct iwn_softc *, uint8_t macaddr[IEEE80211_ADDR_LEN]); static void iwn4965_read_eeprom(struct iwn_softc *); +#ifdef IWN_DEBUG static void iwn4965_print_power_group(struct iwn_softc *, int); +#endif static void iwn5000_read_eeprom(struct iwn_softc *); static uint32_t iwn_eeprom_channel_flags(struct iwn_eeprom_chan *); static void iwn_read_eeprom_band(struct iwn_softc *, int); @@ -320,9 +322,12 @@ static void iwn_set_channel(struct ieee8 static void iwn_scan_curchan(struct ieee80211_scan_state *, unsigned long); static void iwn_scan_mindwell(struct ieee80211_scan_state *); static void iwn_hw_reset(void *, int); +#ifdef IWN_DEBUG +static char *iwn_get_csr_string(int); +static void iwn_debug_register(struct iwn_softc *); +#endif -#define IWN_DEBUG -#ifdef IWN_DEBUG +#ifdef IWN_DEBUG enum { IWN_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ IWN_DEBUG_RECV = 0x00000002, /* basic recv operation */ @@ -339,6 +344,7 @@ enum { IWN_DEBUG_CMD = 0x00001000, /* cmd submission */ IWN_DEBUG_TXRATE = 0x00002000, /* TX rate debugging */ IWN_DEBUG_PWRSAVE = 0x00004000, /* Power save operations */ + IWN_DEBUG_REGISTER = 0x20000000, /* print chipset register */ IWN_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ IWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ IWN_DEBUG_ANY = 0xffffffff @@ -924,6 +930,8 @@ iwn_detach(device_t dev) struct ieee80211com *ic; int qid; + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); + if (ifp != NULL) { ic = ifp->if_l2com; @@ -961,7 +969,7 @@ iwn_detach(device_t dev) if (ifp != NULL) if_free(ifp); - DPRINTF(sc, IWN_DEBUG_TRACE, "->%s done\n", __func__); + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n", __func__); IWN_LOCK_DESTROY(sc); return 0; } @@ -3202,8 +3210,6 @@ iwn_notif_intr(struct iwn_softc *sc) } case IWN_STATE_CHANGED: { - uint32_t *status = (uint32_t *)(desc + 1); - /* * State change allows hardware switch change to be * noted. However, we handle this in iwn_intr as we @@ -3211,32 +3217,37 @@ iwn_notif_intr(struct iwn_softc *sc) */ bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); +#ifdef IWN_DEBUG + uint32_t *status = (uint32_t *)(desc + 1); DPRINTF(sc, IWN_DEBUG_INTR, "state changed to %x\n", le32toh(*status)); +#endif break; } case IWN_START_SCAN: { - struct iwn_start_scan *scan = - (struct iwn_start_scan *)(desc + 1); - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); +#ifdef IWN_DEBUG + struct iwn_start_scan *scan = + (struct iwn_start_scan *)(desc + 1); DPRINTF(sc, IWN_DEBUG_ANY, "%s: scanning channel %d status %x\n", __func__, scan->chan, le32toh(scan->status)); +#endif break; } case IWN_STOP_SCAN: { - struct iwn_stop_scan *scan = - (struct iwn_stop_scan *)(desc + 1); - bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); +#ifdef IWN_DEBUG + struct iwn_stop_scan *scan = + (struct iwn_stop_scan *)(desc + 1); DPRINTF(sc, IWN_DEBUG_STATE, "scan finished nchan=%d status=%d chan=%d\n", scan->nchan, scan->status, scan->chan); +#endif IWN_UNLOCK(sc); ieee80211_scan_next(vap); @@ -3416,6 +3427,9 @@ iwn_intr(void *arg) if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) { device_printf(sc->sc_dev, "%s: fatal firmware error\n", __func__); +#ifdef IWN_DEBUG + iwn_debug_register(sc); +#endif /* Dump firmware error log and stop. */ iwn_fatal_intr(sc); ifp->if_flags &= ~IFF_UP; @@ -7467,3 +7481,85 @@ iwn_hw_reset(void *arg0, int pending) iwn_init(sc); ieee80211_notify_radio(ic, 1); } +#ifdef IWN_DEBUG +#define IWN_DESC(x) case x: return #x +#define COUNTOF(array) (sizeof(array) / sizeof(array[0])) + +/* + * Transate CSR code to string + */ +static char *iwn_get_csr_string(int csr) +{ + switch (csr) { + IWN_DESC(IWN_HW_IF_CONFIG); + IWN_DESC(IWN_INT_COALESCING); + IWN_DESC(IWN_INT); + IWN_DESC(IWN_INT_MASK); + IWN_DESC(IWN_FH_INT); + IWN_DESC(IWN_GPIO_IN); + IWN_DESC(IWN_RESET); + IWN_DESC(IWN_GP_CNTRL); + IWN_DESC(IWN_HW_REV); + IWN_DESC(IWN_EEPROM); + IWN_DESC(IWN_EEPROM_GP); + IWN_DESC(IWN_OTP_GP); + IWN_DESC(IWN_GIO); + IWN_DESC(IWN_GP_UCODE); + IWN_DESC(IWN_GP_DRIVER); + IWN_DESC(IWN_UCODE_GP1); + IWN_DESC(IWN_UCODE_GP2); + IWN_DESC(IWN_LED); + IWN_DESC(IWN_DRAM_INT_TBL); + IWN_DESC(IWN_GIO_CHICKEN); + IWN_DESC(IWN_ANA_PLL); + IWN_DESC(IWN_HW_REV_WA); + IWN_DESC(IWN_DBG_HPET_MEM); + default: + return "UNKNOWN CSR"; + } +} + +/* + * This function print firmware register + */ +static void +iwn_debug_register(struct iwn_softc *sc) +{ + int i; + static const uint32_t csr_tbl[] = { + IWN_HW_IF_CONFIG, + IWN_INT_COALESCING, + IWN_INT, + IWN_INT_MASK, + IWN_FH_INT, + IWN_GPIO_IN, + IWN_RESET, + IWN_GP_CNTRL, + IWN_HW_REV, + IWN_EEPROM, + IWN_EEPROM_GP, + IWN_OTP_GP, + IWN_GIO, + IWN_GP_UCODE, + IWN_GP_DRIVER, + IWN_UCODE_GP1, + IWN_UCODE_GP2, + IWN_LED, + IWN_DRAM_INT_TBL, + IWN_GIO_CHICKEN, + IWN_ANA_PLL, + IWN_HW_REV_WA, + IWN_DBG_HPET_MEM, + }; + DPRINTF(sc, IWN_DEBUG_REGISTER, + "CSR values: (2nd byte of IWN_INT_COALESCING is IWN_INT_PERIODIC)%s", + "\n"); + for (i = 0; i < COUNTOF(csr_tbl); i++){ + DPRINTF(sc, IWN_DEBUG_REGISTER," %10s: 0x%08x ", + iwn_get_csr_string(csr_tbl[i]), IWN_READ(sc, csr_tbl[i])); + if ((i+1) % 3 == 0) + DPRINTF(sc, IWN_DEBUG_REGISTER,"%s","\n"); + } + DPRINTF(sc, IWN_DEBUG_REGISTER,"%s","\n"); +} +#endif Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Thu Aug 1 20:10:16 2013 (r253865) +++ head/sys/dev/iwn/if_iwnreg.h Thu Aug 1 21:45:30 2013 (r253866) @@ -62,6 +62,7 @@ #define IWN_INT 0x008 #define IWN_INT_MASK 0x00c #define IWN_FH_INT 0x010 +#define IWN_GPIO_IN 0x018 /* read external chip pins */ #define IWN_RESET 0x020 #define IWN_GP_CNTRL 0x024 #define IWN_HW_REV 0x028 @@ -69,8 +70,12 @@ #define IWN_EEPROM_GP 0x030 #define IWN_OTP_GP 0x034 #define IWN_GIO 0x03c +#define IWN_GP_UCODE 0x048 #define IWN_GP_DRIVER 0x050 +#define IWN_UCODE_GP1 0x054 +#define IWN_UCODE_GP1_SET 0x058 #define IWN_UCODE_GP1_CLR 0x05c +#define IWN_UCODE_GP2 0x060 #define IWN_LED 0x094 #define IWN_DRAM_INT_TBL 0x0a0 #define IWN_SHADOW_REG_CTRL 0x0a8 @@ -79,6 +84,7 @@ #define IWN_HW_REV_WA 0x22c #define IWN_DBG_HPET_MEM 0x240 #define IWN_DBG_LINK_PWR_MGMT 0x250 +/* Need nic_lock for use above */ #define IWN_MEM_RADDR 0x40c #define IWN_MEM_WADDR 0x410 #define IWN_MEM_WDATA 0x418 From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 21:50:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D3ECB3C3; Thu, 1 Aug 2013 21:50:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BB0182CD6; Thu, 1 Aug 2013 21:50:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71LoDhL055138; Thu, 1 Aug 2013 21:50:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71LoDK3055137; Thu, 1 Aug 2013 21:50:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308012150.r71LoDK3055137@svn.freebsd.org> From: Adrian Chadd Date: Thu, 1 Aug 2013 21:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253867 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 21:50:13 -0000 Author: adrian Date: Thu Aug 1 21:50:13 2013 New Revision: 253867 URL: http://svnweb.freebsd.org/changeset/base/253867 Log: Add IWN_DEBUG as an option for if_iwn. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Aug 1 21:45:30 2013 (r253866) +++ head/sys/conf/options Thu Aug 1 21:50:13 2013 (r253867) @@ -829,6 +829,9 @@ MWL_DIAGAPI opt_mwl.h MWL_AGGR_SIZE opt_mwl.h MWL_TX_NODROP opt_mwl.h +# Options for the Intel 802.11n wireless driver +IWN_DEBUG opt_iwn.h + # dcons options DCONS_BUF_SIZE opt_dcons.h DCONS_POLL_HZ opt_dcons.h From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 21:50:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD70A506; Thu, 1 Aug 2013 21:50:50 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AA6E92CDE; Thu, 1 Aug 2013 21:50:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71LooIU056694; Thu, 1 Aug 2013 21:50:50 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71LooV5056693; Thu, 1 Aug 2013 21:50:50 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308012150.r71LooV5056693@svn.freebsd.org> From: Adrian Chadd Date: Thu, 1 Aug 2013 21:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253868 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 21:50:50 -0000 Author: adrian Date: Thu Aug 1 21:50:50 2013 New Revision: 253868 URL: http://svnweb.freebsd.org/changeset/base/253868 Log: Now that conf/options knows about if_iwn.h, add it to if_iwn.c. This allows for IWN_DEBUG (and maybe more stuff later) to be a build time configure option. Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Aug 1 21:50:13 2013 (r253867) +++ head/sys/dev/iwn/if_iwn.c Thu Aug 1 21:50:50 2013 (r253868) @@ -27,6 +27,7 @@ __FBSDID("$FreeBSD$"); #include "opt_wlan.h" +#include "opt_iwn.h" #include #include From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 21:51:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 90F57658; Thu, 1 Aug 2013 21:51:36 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8CD8C2CEC; Thu, 1 Aug 2013 21:51:35 +0000 (UTC) Received: by mail-ea0-f177.google.com with SMTP id f15so1262129eak.22 for ; Thu, 01 Aug 2013 14:51:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ew3cWrfhzPOemJr17AnnfdYaORSsZMEYU8Zg1TofOxY=; b=d4S1W5OfGKcuBiQS2LalvreH72zrYOQqQfG2PzepcMhA+oQuMkD+j5N+64CrYQDaoe q8fw1agnyktbigW6kkZtIevn9WPCf8330ctEbvyjP9RvtuyUO7fNgzbNqCXP/0IydRNC ucLlBV3ePvbCLtPYqSRXOVudByTfeA/rGV7LSKxtw5DaOXBSfZZx3nUjoGsGqdb2Ge/D WUYKlhsDJEwrk9XOjr5kaMcZWZnCBffhlzc+YbHOVdu2ycdx7AREiSy7Yl5K6aekC+sj UadhibsRPlo83v5Ea+cwOAVjNGui8YII+Fd3QdzOLnIx73IPXQ/FBAzqN139ZG/txWsM S8PA== MIME-Version: 1.0 X-Received: by 10.14.1.70 with SMTP id 46mr3155051eec.82.1375393893683; Thu, 01 Aug 2013 14:51:33 -0700 (PDT) Sender: hiren.panchasara@gmail.com Received: by 10.14.105.137 with HTTP; Thu, 1 Aug 2013 14:51:33 -0700 (PDT) In-Reply-To: <201308012145.r71LjU7W054572@svn.freebsd.org> References: <201308012145.r71LjU7W054572@svn.freebsd.org> Date: Thu, 1 Aug 2013 14:51:33 -0700 X-Google-Sender-Auth: xPNnP45AzuCWk6BU8dsko0dlJwM Message-ID: Subject: Re: svn commit: r253866 - head/sys/dev/iwn From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 21:51:36 -0000 On Thu, Aug 1, 2013 at 2:45 PM, Adrian Chadd wrote: > Author: adrian > Date: Thu Aug 1 21:45:30 2013 > New Revision: 253866 > URL: http://svnweb.freebsd.org/changeset/base/253866 > > Log: > iwn(4) debugging improvements. > > * Add in some new register debugging under IWN_DEBUG_REGISTER > * Make IWN_DEBUG an option now for building. I'll chase this up > with a commit to 'options' soon. > > Submitted by: Cedric GROSS > > Modified: > head/sys/dev/iwn/if_iwn.c > head/sys/dev/iwn/if_iwnreg.h > > Modified: head/sys/dev/iwn/if_iwn.c > ============================================================================== > --- head/sys/dev/iwn/if_iwn.c Thu Aug 1 20:10:16 2013 (r253865) > +++ head/sys/dev/iwn/if_iwn.c Thu Aug 1 21:45:30 2013 (r253866) > @@ -160,7 +160,9 @@ static void iwn5000_ict_reset(struct iwn > static int iwn_read_eeprom(struct iwn_softc *, > uint8_t macaddr[IEEE80211_ADDR_LEN]); > static void iwn4965_read_eeprom(struct iwn_softc *); > +#ifdef IWN_DEBUG > static void iwn4965_print_power_group(struct iwn_softc *, int); > +#endif > static void iwn5000_read_eeprom(struct iwn_softc *); > static uint32_t iwn_eeprom_channel_flags(struct iwn_eeprom_chan *); > static void iwn_read_eeprom_band(struct iwn_softc *, int); > @@ -320,9 +322,12 @@ static void iwn_set_channel(struct ieee8 > static void iwn_scan_curchan(struct ieee80211_scan_state *, unsigned long); > static void iwn_scan_mindwell(struct ieee80211_scan_state *); > static void iwn_hw_reset(void *, int); > +#ifdef IWN_DEBUG > +static char *iwn_get_csr_string(int); > +static void iwn_debug_register(struct iwn_softc *); > +#endif > > -#define IWN_DEBUG > -#ifdef IWN_DEBUG > +#ifdef IWN_DEBUG > enum { > IWN_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ > IWN_DEBUG_RECV = 0x00000002, /* basic recv operation */ > @@ -339,6 +344,7 @@ enum { > IWN_DEBUG_CMD = 0x00001000, /* cmd submission */ > IWN_DEBUG_TXRATE = 0x00002000, /* TX rate debugging */ > IWN_DEBUG_PWRSAVE = 0x00004000, /* Power save operations */ > + IWN_DEBUG_REGISTER = 0x20000000, /* print chipset register */ > IWN_DEBUG_TRACE = 0x40000000, /* Print begin and start driver function */ > IWN_DEBUG_FATAL = 0x80000000, /* fatal errors */ > IWN_DEBUG_ANY = 0xffffffff > @@ -924,6 +930,8 @@ iwn_detach(device_t dev) > struct ieee80211com *ic; > int qid; > > + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__); > + > if (ifp != NULL) { > ic = ifp->if_l2com; > > @@ -961,7 +969,7 @@ iwn_detach(device_t dev) > if (ifp != NULL) > if_free(ifp); > > - DPRINTF(sc, IWN_DEBUG_TRACE, "->%s done\n", __func__); > + DPRINTF(sc, IWN_DEBUG_TRACE, "->%s: end\n", __func__); > IWN_LOCK_DESTROY(sc); > return 0; > } > @@ -3202,8 +3210,6 @@ iwn_notif_intr(struct iwn_softc *sc) > } > case IWN_STATE_CHANGED: > { > - uint32_t *status = (uint32_t *)(desc + 1); > - > /* > * State change allows hardware switch change to be > * noted. However, we handle this in iwn_intr as we > @@ -3211,32 +3217,37 @@ iwn_notif_intr(struct iwn_softc *sc) > */ > bus_dmamap_sync(sc->rxq.data_dmat, data->map, > BUS_DMASYNC_POSTREAD); > +#ifdef IWN_DEBUG > + uint32_t *status = (uint32_t *)(desc + 1); > DPRINTF(sc, IWN_DEBUG_INTR, "state changed to %x\n", > le32toh(*status)); > +#endif > break; > } > case IWN_START_SCAN: > { > - struct iwn_start_scan *scan = > - (struct iwn_start_scan *)(desc + 1); > - > bus_dmamap_sync(sc->rxq.data_dmat, data->map, > BUS_DMASYNC_POSTREAD); > +#ifdef IWN_DEBUG > + struct iwn_start_scan *scan = > + (struct iwn_start_scan *)(desc + 1); > DPRINTF(sc, IWN_DEBUG_ANY, > "%s: scanning channel %d status %x\n", > __func__, scan->chan, le32toh(scan->status)); > +#endif > break; > } > case IWN_STOP_SCAN: > { > - struct iwn_stop_scan *scan = > - (struct iwn_stop_scan *)(desc + 1); > - > bus_dmamap_sync(sc->rxq.data_dmat, data->map, > BUS_DMASYNC_POSTREAD); > +#ifdef IWN_DEBUG > + struct iwn_stop_scan *scan = > + (struct iwn_stop_scan *)(desc + 1); > DPRINTF(sc, IWN_DEBUG_STATE, > "scan finished nchan=%d status=%d chan=%d\n", > scan->nchan, scan->status, scan->chan); > +#endif > > IWN_UNLOCK(sc); > ieee80211_scan_next(vap); > @@ -3416,6 +3427,9 @@ iwn_intr(void *arg) > if (r1 & (IWN_INT_SW_ERR | IWN_INT_HW_ERR)) { > device_printf(sc->sc_dev, "%s: fatal firmware error\n", > __func__); > +#ifdef IWN_DEBUG > + iwn_debug_register(sc); > +#endif > /* Dump firmware error log and stop. */ > iwn_fatal_intr(sc); > ifp->if_flags &= ~IFF_UP; > @@ -7467,3 +7481,85 @@ iwn_hw_reset(void *arg0, int pending) > iwn_init(sc); > ieee80211_notify_radio(ic, 1); > } > +#ifdef IWN_DEBUG > +#define IWN_DESC(x) case x: return #x > +#define COUNTOF(array) (sizeof(array) / sizeof(array[0])) > + > +/* > + * Transate CSR code to string Minor typo you can fix in next commit: s/Transate/Translate/ cheers, Hiren > + */ > +static char *iwn_get_csr_string(int csr) > +{ > + switch (csr) { > + IWN_DESC(IWN_HW_IF_CONFIG); > + IWN_DESC(IWN_INT_COALESCING); > + IWN_DESC(IWN_INT); > + IWN_DESC(IWN_INT_MASK); > + IWN_DESC(IWN_FH_INT); > + IWN_DESC(IWN_GPIO_IN); > + IWN_DESC(IWN_RESET); > + IWN_DESC(IWN_GP_CNTRL); > + IWN_DESC(IWN_HW_REV); > + IWN_DESC(IWN_EEPROM); > + IWN_DESC(IWN_EEPROM_GP); > + IWN_DESC(IWN_OTP_GP); > + IWN_DESC(IWN_GIO); > + IWN_DESC(IWN_GP_UCODE); > + IWN_DESC(IWN_GP_DRIVER); > + IWN_DESC(IWN_UCODE_GP1); > + IWN_DESC(IWN_UCODE_GP2); > + IWN_DESC(IWN_LED); > + IWN_DESC(IWN_DRAM_INT_TBL); > + IWN_DESC(IWN_GIO_CHICKEN); > + IWN_DESC(IWN_ANA_PLL); > + IWN_DESC(IWN_HW_REV_WA); > + IWN_DESC(IWN_DBG_HPET_MEM); > + default: > + return "UNKNOWN CSR"; > + } > +} > + > +/* > + * This function print firmware register > + */ > +static void > +iwn_debug_register(struct iwn_softc *sc) > +{ > + int i; > + static const uint32_t csr_tbl[] = { > + IWN_HW_IF_CONFIG, > + IWN_INT_COALESCING, > + IWN_INT, > + IWN_INT_MASK, > + IWN_FH_INT, > + IWN_GPIO_IN, > + IWN_RESET, > + IWN_GP_CNTRL, > + IWN_HW_REV, > + IWN_EEPROM, > + IWN_EEPROM_GP, > + IWN_OTP_GP, > + IWN_GIO, > + IWN_GP_UCODE, > + IWN_GP_DRIVER, > + IWN_UCODE_GP1, > + IWN_UCODE_GP2, > + IWN_LED, > + IWN_DRAM_INT_TBL, > + IWN_GIO_CHICKEN, > + IWN_ANA_PLL, > + IWN_HW_REV_WA, > + IWN_DBG_HPET_MEM, > + }; > + DPRINTF(sc, IWN_DEBUG_REGISTER, > + "CSR values: (2nd byte of IWN_INT_COALESCING is IWN_INT_PERIODIC)%s", > + "\n"); > + for (i = 0; i < COUNTOF(csr_tbl); i++){ > + DPRINTF(sc, IWN_DEBUG_REGISTER," %10s: 0x%08x ", > + iwn_get_csr_string(csr_tbl[i]), IWN_READ(sc, csr_tbl[i])); > + if ((i+1) % 3 == 0) > + DPRINTF(sc, IWN_DEBUG_REGISTER,"%s","\n"); > + } > + DPRINTF(sc, IWN_DEBUG_REGISTER,"%s","\n"); > +} > +#endif > > Modified: head/sys/dev/iwn/if_iwnreg.h > ============================================================================== > --- head/sys/dev/iwn/if_iwnreg.h Thu Aug 1 20:10:16 2013 (r253865) > +++ head/sys/dev/iwn/if_iwnreg.h Thu Aug 1 21:45:30 2013 (r253866) > @@ -62,6 +62,7 @@ > #define IWN_INT 0x008 > #define IWN_INT_MASK 0x00c > #define IWN_FH_INT 0x010 > +#define IWN_GPIO_IN 0x018 /* read external chip pins */ > #define IWN_RESET 0x020 > #define IWN_GP_CNTRL 0x024 > #define IWN_HW_REV 0x028 > @@ -69,8 +70,12 @@ > #define IWN_EEPROM_GP 0x030 > #define IWN_OTP_GP 0x034 > #define IWN_GIO 0x03c > +#define IWN_GP_UCODE 0x048 > #define IWN_GP_DRIVER 0x050 > +#define IWN_UCODE_GP1 0x054 > +#define IWN_UCODE_GP1_SET 0x058 > #define IWN_UCODE_GP1_CLR 0x05c > +#define IWN_UCODE_GP2 0x060 > #define IWN_LED 0x094 > #define IWN_DRAM_INT_TBL 0x0a0 > #define IWN_SHADOW_REG_CTRL 0x0a8 > @@ -79,6 +84,7 @@ > #define IWN_HW_REV_WA 0x22c > #define IWN_DBG_HPET_MEM 0x240 > #define IWN_DBG_LINK_PWR_MGMT 0x250 > +/* Need nic_lock for use above */ > #define IWN_MEM_RADDR 0x40c > #define IWN_MEM_WADDR 0x410 > #define IWN_MEM_WDATA 0x418 From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 22:48:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8D90D374; Thu, 1 Aug 2013 22:48:17 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5062F3E; Thu, 1 Aug 2013 22:48:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71MmH17072773; Thu, 1 Aug 2013 22:48:17 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71MmH3U072772; Thu, 1 Aug 2013 22:48:17 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308012248.r71MmH3U072772@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 1 Aug 2013 22:48:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253870 - head/tools/tools/cxgbetool X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 22:48:17 -0000 Author: np Date: Thu Aug 1 22:48:17 2013 New Revision: 253870 URL: http://svnweb.freebsd.org/changeset/base/253870 Log: Teach cxgbetool to display T5 congestion manager context. Modified: head/tools/tools/cxgbetool/cxgbetool.c Modified: head/tools/tools/cxgbetool/cxgbetool.c ============================================================================== --- head/tools/tools/cxgbetool/cxgbetool.c Thu Aug 1 22:09:57 2013 (r253869) +++ head/tools/tools/cxgbetool/cxgbetool.c Thu Aug 1 22:48:17 2013 (r253870) @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define max(x, y) ((x) > (y) ? (x) : (y)) static const char *progname, *nexus; +static int chip_id; /* 4 for T4, 5 for T5 */ struct reg_info { const char *name; @@ -125,6 +126,7 @@ real_doit(unsigned long cmd, void *data, rc = errno; return (rc); } + chip_id = nexus[1] - '0'; } rc = ioctl(fd, cmd, data); @@ -1365,6 +1367,15 @@ show_sge_context(const struct t4_sge_con FIELD("CngChMap:", 0, 3), { NULL } }; + static struct field_desc t5_conm[] = { + FIELD1("CngMPSEnable:", 21), + FIELD("CngTPMode:", 19, 20), + FIELD1("CngDBPHdr:", 18), + FIELD1("CngDBPData:", 17), + FIELD1("CngIMSG:", 16), + FIELD("CngChMap:", 0, 15), + { NULL } + }; if (p->mem_id == SGE_CONTEXT_EGRESS) show_struct(p->data, 6, (p->data[0] & 2) ? fl : egress); @@ -1373,7 +1384,7 @@ show_sge_context(const struct t4_sge_con else if (p->mem_id == SGE_CONTEXT_INGRESS) show_struct(p->data, 5, ingress); else if (p->mem_id == SGE_CONTEXT_CNM) - show_struct(p->data, 1, conm); + show_struct(p->data, 1, chip_id == 5 ? t5_conm : conm); } #undef FIELD From owner-svn-src-all@FreeBSD.ORG Thu Aug 1 23:38:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A79EFF81; Thu, 1 Aug 2013 23:38:30 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93E742164; Thu, 1 Aug 2013 23:38:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r71NcU50087618; Thu, 1 Aug 2013 23:38:30 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r71NcUCb087617; Thu, 1 Aug 2013 23:38:30 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308012338.r71NcUCb087617@svn.freebsd.org> From: Navdeep Parhar Date: Thu, 1 Aug 2013 23:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253873 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Aug 2013 23:38:30 -0000 Author: np Date: Thu Aug 1 23:38:30 2013 New Revision: 253873 URL: http://svnweb.freebsd.org/changeset/base/253873 Log: Set up congestion manager context properly for T5 based cards. MFC after: 3 days (will check with re@) Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Aug 1 23:20:31 2013 (r253872) +++ head/sys/dev/cxgbe/t4_sge.c Thu Aug 1 23:38:30 2013 (r253873) @@ -1872,6 +1872,22 @@ alloc_iq_fl(struct port_info *pi, struct iq->flags |= IQ_HAS_FL; } + if (is_t5(sc) && cong >= 0) { + uint32_t param, val; + + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | + V_FW_PARAMS_PARAM_YZ(iq->cntxt_id); + val = cong ? cong | 2 << 19 : 1 << 19; + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + if (rc != 0) { + /* report error but carry on */ + device_printf(sc->dev, + "failed to set congestion manager context for " + "ingress queue %d: %d\n", iq->cntxt_id, rc); + } + } + /* Enable IQ interrupts */ atomic_store_rel_int(&iq->state, IQS_IDLE); t4_write_reg(sc, MYPF_REG(A_SGE_PF_GTS), V_SEINTARM(iq->intr_params) | From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 03:46:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 14EC9D51; Fri, 2 Aug 2013 03:46:46 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 01CEC227B; Fri, 2 Aug 2013 03:46:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r723kjAN062571; Fri, 2 Aug 2013 03:46:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r723kjMU062569; Fri, 2 Aug 2013 03:46:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308020346.r723kjMU062569@svn.freebsd.org> From: Hiroki Sato Date: Fri, 2 Aug 2013 03:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253878 - in stable/9: share/man/man4 sys/net X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 03:46:46 -0000 Author: hrs Date: Fri Aug 2 03:46:45 2013 New Revision: 253878 URL: http://svnweb.freebsd.org/changeset/base/253878 Log: MFC 253751 and 253843: - Relax the restriction on the member interfaces with LLAs. Two or more LLAs on the member interfaces are actually harmless when the parent interface does not have a LLA. - Add net.link.bridge.allow_llz_overlap. This is a knob to allow LLAs on a bridge and the member interfaces at the same time. The default is 0. Approved by: re (marius) Modified: stable/9/share/man/man4/bridge.4 stable/9/sys/net/if_bridge.c Directory Properties: stable/9/share/man/man4/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/share/man/man4/bridge.4 ============================================================================== --- stable/9/share/man/man4/bridge.4 Fri Aug 2 00:20:04 2013 (r253877) +++ stable/9/share/man/man4/bridge.4 Fri Aug 2 03:46:45 2013 (r253878) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 3, 2013 +.Dd July 27, 2013 .Dt IF_BRIDGE 4 .Os .Sh NAME @@ -185,7 +185,7 @@ and applications use both of them. .Pp To prevent this situation, .Nm -checks whether an link-local scoped IPv6 address is configured on +checks whether a link-local scoped IPv6 address is configured on a member interface to be added and the .Nm interface. @@ -194,13 +194,13 @@ When the interface has IPv6 addresses, IPv6 addresses on the member interface will be automatically removed before the interface is added. -When both -.Nm -interface and the existing member interfaces do not have one, -adding an interface with IPv6 addresses as a new member interface is allowed. -These means only one interface in the link-local scope zone where the -.Nm -interface forms can have link-local scoped IPv6 addresses. +.Pp +This behavior can be disabled by setting +.Xr sysctl 8 +variable +.Va net.link.bridge.allow_llz_overlap +to +.Li 1 . .Pp Note that .Li ACCEPT_RTADV Modified: stable/9/sys/net/if_bridge.c ============================================================================== --- stable/9/sys/net/if_bridge.c Fri Aug 2 00:20:04 2013 (r253877) +++ stable/9/sys/net/if_bridge.c Fri Aug 2 03:46:45 2013 (r253878) @@ -384,6 +384,12 @@ SYSCTL_INT(_net_link_bridge, OID_AUTO, i &bridge_inherit_mac, 0, "Inherit MAC address from the first bridge member"); +static VNET_DEFINE(int, allow_llz_overlap) = 0; +#define V_allow_llz_overlap VNET(allow_llz_overlap) +SYSCTL_VNET_INT(_net_link_bridge, OID_AUTO, allow_llz_overlap, CTLFLAG_RW, + &VNET_NAME(allow_llz_overlap), 0, "Allow overlap of link-local scope " + "zones of a bridge interface and the member interfaces"); + struct bridge_control { int (*bc_func)(struct bridge_softc *, void *); int bc_argsize; @@ -1064,7 +1070,8 @@ bridge_ioctl_add(struct bridge_softc *sc */ /* Check if the parent interface has a link-local scope addr. */ - if (in6ifa_llaonifp(sc->sc_ifp) != NULL) { + if (V_allow_llz_overlap == 0 && + in6ifa_llaonifp(sc->sc_ifp) != NULL) { /* * If any, remove all inet6 addresses from the member * interfaces. @@ -1093,32 +1100,6 @@ bridge_ioctl_add(struct bridge_softc *sc "IPv6 address scope violation.\n", ifs->if_xname); } - } else { - struct in6_ifaddr *ia6_m, *ia6_s; - /* - * If not, check whether one of the existing member - * interfaces have inet6 address. If any, remove - * inet6 addresses on the interface to be added. - */ - ia6_m = NULL; - BRIDGE_XLOCK(sc); - LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { - ia6_m = in6ifa_llaonifp(bif->bif_ifp); - if (ia6_m != NULL) - break; - } - BRIDGE_XDROP(sc); - ia6_s = in6ifa_llaonifp(ifs); - - if (ia6_m != NULL && ia6_s != NULL) { - BRIDGE_UNLOCK(sc); - in6_ifdetach(ifs); - BRIDGE_LOCK(sc); - if_printf(sc->sc_ifp, "IPv6 addresses on %s have " - "been removed before adding it as a member " - "to prevent IPv6 address scope violation.\n", - ifs->if_xname); - } } #endif /* Allow the first Ethernet member to define the MTU */ From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 05:24:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 76493AA1; Fri, 2 Aug 2013 05:24:01 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62FF024DA; Fri, 2 Aug 2013 05:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r725O1Nj093055; Fri, 2 Aug 2013 05:24:01 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r725NvDn093014; Fri, 2 Aug 2013 05:23:57 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308020523.r725NvDn093014@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 2 Aug 2013 05:23:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253879 - in vendor/NetBSD/bmake/dist: . mk unit-tests X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 05:24:01 -0000 Author: sjg Date: Fri Aug 2 05:23:57 2013 New Revision: 253879 URL: http://svnweb.freebsd.org/changeset/base/253879 Log: Import bmake-20130730 - allows folk to supress job tokens. Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/compat.c vendor/NetBSD/bmake/dist/configure vendor/NetBSD/bmake/dist/configure.in vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/job.h vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.1 vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/init.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/lib.mk vendor/NetBSD/bmake/dist/mk/meta2deps.py vendor/NetBSD/bmake/dist/mk/own.mk vendor/NetBSD/bmake/dist/mk/prog.mk vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/unit-tests/Makefile.in vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/ChangeLog Fri Aug 2 05:23:57 2013 (r253879) @@ -1,3 +1,36 @@ +2013-07-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130730 + Merge with NetBSD make, pick up + o Allow suppression of --- job -- tokens by setting + .MAKE.JOB.PREFIX empty. + +2013-07-16 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130716 + Merge with NetBSD make, pick up + o number of gmake compatability tweaks + -w for gmake style entering/leaving messages + if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. + handle MAKEFLAGS containing only letters. + o when overriding a GLOBAL variable on the command line, + delete it from GLOBAL context so -V doesn't show the wrong + value. + +2013-07-06 Simon J. Gerraty + + * configure.in: We don't need MAKE_LEVEL_SAFE anymore. + + * Makefile (MAKE_VERSION): 20130706 + Merge with NetBSD make, pick up + o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is + true so that CompatRunCommand() can use it, to ensure + consistent behavior with jobs mode. + o use MAKE_LEVEL_ENV to define the variable to propagate + .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). + o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of + paths to ignore. + 2013-06-04 Simon J. Gerraty * Makefile (MAKE_VERSION): 20130604 Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/Makefile Fri Aug 2 05:23:57 2013 (r253879) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.14 2013/06/05 04:03:22 sjg Exp $ +# $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130604 +MAKE_VERSION= 20130730 PROG= bmake Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/bmake.1 Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd March 30, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2115,6 +2125,13 @@ for Sprite at Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called .Dq customs . +.Pp +Historically the target/dependency +.Dq FRC +has been used to FoRCe rebuilding (since the target/dependency +does not exist... unless someone creates an +.Dq FRC +file). .Sh BUGS The make Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Fri Aug 2 05:23:57 2013 (r253879) @@ -4,7 +4,7 @@ NNAAMMEE bbmmaakkee -- maintain program dependencies SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] + bbmmaakkee [--BBeeiikkNNnnqqrrssttWWwwXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] [_t_a_r_g_e_t _._._.] @@ -122,6 +122,9 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. + _w Print entering and leaving directory messages, pre and + post processing. + _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -469,7 +472,8 @@ VVAARRIIAABBLLEE AASSSSIIGG _._M_A_K_E_._J_O_B_._P_R_E_F_I_X If bbmmaakkee is run with _j then output for each target is prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. + which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. If + _._M_A_K_E_._J_O_B_._P_R_E_F_I_X is empty, no token is printed. For example: .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] would produce tokens like `---make[1234] target ---' mak- @@ -551,6 +555,12 @@ VVAARRIIAABBLLEE AASSSSIIGG to process the meta files to extract dependency informa- tion. + _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_H_S + Provides a list of path prefixes that should be ignored; + because the contents are expected to change over time. + The default list includes: `_/_d_e_v _/_e_t_c _/_p_r_o_c _/_t_m_p _/_v_a_r_/_r_u_n + _/_v_a_r_/_t_m_p' + _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -818,7 +828,7 @@ VVAARRIIAABBLLEE AASSSSIIGG period. For example. ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - However a single character varaiable is often more readable: + However a single character variable is often more readable: ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} ::UU_n_e_w_v_a_l @@ -1351,6 +1361,10 @@ HHIISSTTOORRYY Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called ``customs''. + Historically the target/dependency ``FRC'' has been used to FoRCe + rebuilding (since the target/dependency does not exist... unless someone + creates an ``FRC'' file). + BBUUGGSS The make syntax is difficult to parse without actually acting of the data. For instance finding the end of a variable use should involve @@ -1360,4 +1374,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 March 30, 2013 NetBSD 5.1 +NetBSD 5.1 July 30, 2013 NetBSD 5.1 Modified: vendor/NetBSD/bmake/dist/compat.c ============================================================================== --- vendor/NetBSD/bmake/dist/compat.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/compat.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -332,18 +332,23 @@ again: * We need to pass the command off to the shell, typically * because the command contains a "meta" character. */ - static const char *shargv[4]; + static const char *shargv[5]; + int shargc; - shargv[0] = shellPath; + shargc = 0; + shargv[shargc++] = shellPath; /* * The following work for any of the builtin shell specs. */ + if (shellErrFlag) { + shargv[shargc++] = shellErrFlag; + } if (DEBUG(SHELL)) - shargv[1] = "-xc"; + shargv[shargc++] = "-xc"; else - shargv[1] = "-c"; - shargv[2] = cmd; - shargv[3] = NULL; + shargv[shargc++] = "-c"; + shargv[shargc++] = cmd; + shargv[shargc++] = NULL; av = shargv; argc = 0; bp = NULL; Modified: vendor/NetBSD/bmake/dist/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/NetBSD/bmake/dist/configure.in ============================================================================== --- vendor/NetBSD/bmake/dist/configure.in Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/configure.in Fri Aug 2 05:23:57 2013 (r253879) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ +dnl $Id: configure.in,v 1.49 2013/07/06 18:25:19 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130706], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute @@ -79,15 +79,6 @@ dnl Executable suffix - normally empty; AC_SUBST(ac_exe_suffix)dnl dnl -dnl Check if /bin/sh will pass .MAKE.LEVEL -echo $ECHO_N "checking if sh will pass .MAKE. variables... $ECHO_C" >&6 -ok=`env .MAKE.LEVEL=1 /bin/sh -c env | grep LEVEL=` -case "$ok" in -"") echo no >&6; CPPFLAGS="${CPPFLAGS} -DNEED_MAKE_LEVEL_SAFE";; -*) echo yes >&6;; -esac - -dnl dnl AC_C_CROSS dnl Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/job.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $ */ +/* $NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -313,6 +313,7 @@ static Shell *commandShell = &shells[DEF const char *shellPath = NULL, /* full pathname of * executable image */ *shellName = NULL; /* last component of shell */ +char *shellErrFlag = NULL; static const char *shellArgv = NULL; /* Custom shell args */ @@ -344,7 +345,7 @@ static Job childExitJob; /* child exit p #define TARG_FMT "%s %s ---\n" /* Default format */ #define MESSAGE(fp, gn) \ - if (maxJobs != 1) \ + if (maxJobs != 1 && targPrefix && *targPrefix) \ (void)fprintf(fp, TARG_FMT, targPrefix, gn->name) static sigset_t caught_signals; /* Set of signals we handle */ @@ -2152,6 +2153,24 @@ Shell_Init(void) if (commandShell->echo == NULL) { commandShell->echo = ""; } + if (commandShell->hasErrCtl && *commandShell->exit) { + if (shellErrFlag && + strcmp(commandShell->exit, &shellErrFlag[1]) != 0) { + free(shellErrFlag); + shellErrFlag = NULL; + } + if (!shellErrFlag) { + int n = strlen(commandShell->exit) + 2; + + shellErrFlag = bmake_malloc(n); + if (shellErrFlag) { + snprintf(shellErrFlag, n, "-%s", commandShell->exit); + } + } + } else if (shellErrFlag) { + free(shellErrFlag); + shellErrFlag = NULL; + } } /*- @@ -2496,6 +2515,8 @@ Job_ParseShell(char *line) commandShell = bmake_malloc(sizeof(Shell)); *commandShell = newShell; } + /* this will take care of shellErrFlag */ + Shell_Init(); } if (commandShell->echoOn && commandShell->echoOff) { Modified: vendor/NetBSD/bmake/dist/job.h ============================================================================== --- vendor/NetBSD/bmake/dist/job.h Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/job.h Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ +/* $NetBSD: job.h,v 1.42 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -243,6 +243,7 @@ typedef struct Shell { extern const char *shellPath; extern const char *shellName; +extern char *shellErrFlag; extern int jobTokensRunning; /* tokens currently "out" */ extern int maxJobs; /* Max jobs we can run */ Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/main.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ +/* $NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -117,17 +117,18 @@ __RCSID("$NetBSD: main.c,v 1.210 2013/03 #include #include #include -#include #include #include #include "wait.h" #include #include +#include #include #include #include #include +#include #include "make.h" #include "hash.h" @@ -163,6 +164,7 @@ Boolean noRecursiveExecute; /* -N flag Boolean keepgoing; /* -k flag */ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ +Boolean enterFlag; /* -w flag */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -184,6 +186,7 @@ char curdir[MAXPATHLEN + 1]; /* Startup char *progname; /* the program name */ char *makeDependfile; pid_t myPid; +int makelevel; Boolean forceJobs = FALSE; @@ -198,6 +201,38 @@ Boolean forceJobs = FALSE; extern Lst parseIncPath; +/* + * For compatibility with the POSIX version of MAKEFLAGS that includes + * all the options with out -, convert flags to -f -l -a -g -s. + */ +static char * +explode(const char *flags) +{ + size_t len; + char *nf, *st; + const char *f; + + if (flags == NULL) + return NULL; + + for (f = flags; *f; f++) + if (!isalpha((unsigned char)*f)) + break; + + if (*f) + return bmake_strdup(flags); + + len = strlen(flags); + st = nf = bmake_malloc(len * 3 + 1); + while (*flags) { + *nf++ = '-'; + *nf++ = *flags++; + *nf++ = ' '; + } + *nf = '\0'; + return st; +} + static void parse_debug_options(const char *argvalue) { @@ -350,7 +385,7 @@ MainParseArgs(int argc, char **argv) Boolean inOption, dashDash = FALSE; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ -#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrst" +#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstw" /* Can't actually use getopt(3) because rescanning is not portable */ getopt_def = OPTFLAGS; @@ -558,6 +593,10 @@ rearg: touchFlag = TRUE; Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL); break; + case 'w': + enterFlag = TRUE; + Var_Append(MAKEFLAGS, "-w", VAR_GLOBAL); + break; case '-': dashDash = TRUE; break; @@ -796,7 +835,7 @@ main(int argc, char **argv) Lst targs; /* target nodes to create -- passed to Make_Init */ Boolean outOfDate = FALSE; /* FALSE if all targets up to date */ struct stat sb, sa; - char *p1, *path, *pwd; + char *p1, *path; char mdpath[MAXPATHLEN]; #ifdef FORCE_MACHINE const char *machine = FORCE_MACHINE; @@ -963,26 +1002,30 @@ main(int argc, char **argv) Var_Set(MAKEOVERRIDES, "", VAR_GLOBAL, 0); Var_Set("MFLAGS", "", VAR_GLOBAL, 0); Var_Set(".ALLTARGETS", "", VAR_GLOBAL, 0); + /* some makefiles need to know this */ + Var_Set(MAKE_LEVEL ".ENV", MAKE_LEVEL_ENV, VAR_CMD, 0); /* * Set some other useful macros */ { - char tmp[64]; - const char *ep; + char tmp[64], *ep; - if (!(ep = getenv(MAKE_LEVEL))) { -#ifdef MAKE_LEVEL_SAFE - if (!(ep = getenv(MAKE_LEVEL_SAFE))) -#endif - ep = "0"; - } - Var_Set(MAKE_LEVEL, ep, VAR_GLOBAL, 0); + makelevel = ((ep = getenv(MAKE_LEVEL_ENV)) && *ep) ? atoi(ep) : 0; + if (makelevel < 0) + makelevel = 0; + snprintf(tmp, sizeof(tmp), "%d", makelevel); + Var_Set(MAKE_LEVEL, tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", myPid); Var_Set(".MAKE.PID", tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", getppid()); Var_Set(".MAKE.PPID", tmp, VAR_GLOBAL, 0); } + if (makelevel > 0) { + char pn[1024]; + snprintf(pn, sizeof(pn), "%s[%d]", progname, makelevel); + progname = bmake_strdup(pn); + } Job_SetPrefix(); #ifdef USE_META @@ -994,7 +1037,9 @@ main(int argc, char **argv) * in a different format). */ #ifdef POSIX - Main_ParseArgLine(getenv("MAKEFLAGS")); + p1 = explode(getenv("MAKEFLAGS")); + Main_ParseArgLine(p1); + free(p1); #else Main_ParseArgLine(getenv("MAKE")); #endif @@ -1011,6 +1056,9 @@ main(int argc, char **argv) MainParseArgs(argc, argv); + if (enterFlag) + printf("%s: Entering directory `%s'\n", progname, curdir); + /* * Verify that cwd is sane. */ @@ -1032,15 +1080,19 @@ main(int argc, char **argv) * MAKEOBJDIRPREFIX is set or MAKEOBJDIR contains a transform. */ #ifndef NO_PWD_OVERRIDE - if (!ignorePWD && - (pwd = getenv("PWD")) != NULL && - getenv("MAKEOBJDIRPREFIX") == NULL) { - const char *makeobjdir = getenv("MAKEOBJDIR"); - - if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { - if (stat(pwd, &sb) == 0 && sa.st_ino == sb.st_ino && - sa.st_dev == sb.st_dev) - (void)strncpy(curdir, pwd, MAXPATHLEN); + if (!ignorePWD) { + char *pwd; + + if ((pwd = getenv("PWD")) != NULL && + getenv("MAKEOBJDIRPREFIX") == NULL) { + const char *makeobjdir = getenv("MAKEOBJDIR"); + + if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { + if (stat(pwd, &sb) == 0 && + sa.st_ino == sb.st_ino && + sa.st_dev == sb.st_dev) + (void)strncpy(curdir, pwd, MAXPATHLEN); + } } } #endif @@ -1328,6 +1380,9 @@ main(int argc, char **argv) Trace_Log(MAKEEND, 0); + if (enterFlag) + printf("%s: Leaving directory `%s'\n", progname, curdir); + Suff_End(); Targ_End(); Arch_End(); @@ -1756,8 +1811,12 @@ execError(const char *af, const char *av static void usage(void) { + char *p; + if ((p = strchr(progname, '[')) != NULL) + *p = '\0'; + (void)fprintf(stderr, -"usage: %s [-BeikNnqrstWX] \n\ +"usage: %s [-BeikNnqrstWwX] \n\ [-C directory] [-D variable] [-d flags] [-f makefile]\n\ [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]\n\ [-V variable] [variable=value] [target ...]\n", progname); Modified: vendor/NetBSD/bmake/dist/make.1 ============================================================================== --- vendor/NetBSD/bmake/dist/make.1 Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/make.1 Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.215 2013/05/22 19:35:11 christos Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd May 22, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2114,7 +2124,7 @@ machines using a daemon called Historically the target/dependency .Dq FRC has been used to FoRCe rebuilding (since the target/dependency -does not exist... unless someone creates an +does not exist... unless someone creates an .Dq FRC file). .Sh BUGS Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/make.h Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ +/* $NetBSD: make.h,v 1.91 2013/06/18 20:06:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -442,9 +442,8 @@ extern pid_t myPid; #define MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE" #define MAKE_DEPENDFILE ".MAKE.DEPENDFILE" /* .depend */ #define MAKE_MODE ".MAKE.MODE" - -#ifdef NEED_MAKE_LEVEL_SAFE -# define MAKE_LEVEL_SAFE "_MAKE_LEVEL" /* some shells will not pass .MAKE. */ +#ifndef MAKE_LEVEL_ENV +# define MAKE_LEVEL_ENV "MAKELEVEL" #endif /* Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/meta.c Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.30 2013/05/16 21:56:56 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.32 2013/06/25 00:20:54 sjg Exp $ */ /* * Implement 'meta' mode. @@ -55,7 +55,12 @@ #endif static BuildMon Mybm; /* for compat */ -static Lst metaBailiwick; /* our scope of control */ +static Lst metaBailiwick; /* our scope of control */ +static Lst metaIgnorePaths; /* paths we deliberately ignore */ + +#ifndef MAKE_META_IGNORE_PATHS +#define MAKE_META_IGNORE_PATHS ".MAKE.META.IGNORE_PATHS" +#endif Boolean useMeta = FALSE; static Boolean useFilemon = FALSE; @@ -607,6 +612,17 @@ meta_mode_init(const char *make_mode) if (cp) { str2Lst_Append(metaBailiwick, cp, NULL); } + /* + * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS} + */ + metaIgnorePaths = Lst_Init(FALSE); + Var_Append(MAKE_META_IGNORE_PATHS, + "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL); + cp = Var_Subst(NULL, + "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0); + if (cp) { + str2Lst_Append(metaIgnorePaths, cp, NULL); + } } /* @@ -1110,20 +1126,15 @@ meta_oodate(GNode *gn, Boolean oodate) * be part of the dependencies because * they are _expected_ to change. */ - if (strncmp(p, "/tmp/", 5) == 0 || - (tmplen > 0 && strncmp(p, tmpdir, tmplen) == 0)) - break; - - if (strncmp(p, "/var/", 5) == 0) - break; - - /* Ignore device files. */ - if (strncmp(p, "/dev/", 5) == 0) - break; - - /* Ignore /etc/ files. */ - if (strncmp(p, "/etc/", 5) == 0) + if (*p == '/' && + Lst_ForEach(metaIgnorePaths, prefix_match, p)) { +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: ignoring: %s\n", + p); +#endif break; + } if ((cp = strrchr(p, '/'))) { cp++; Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Fri Aug 2 05:23:57 2013 (r253879) @@ -1,3 +1,18 @@ +2013-07-26 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130726 + some updates from Juniper and FreeBSD + o meta2deps.py: indicate file and line number when we hit parse + errors + also allow @file to provide huge list of .meta files. + * meta2deps.py: add try_parse() to cleanup the above. + +2013-07-16 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130716 + * own.mk: add GPROG as an option + * prog.mk: honor MK_GPROF==yes + 2013-05-10 Simon J. Gerraty * install-mk (MK_VERSION): 20130505 Modified: vendor/NetBSD/bmake/dist/mk/init.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/init.mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/init.mk Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.8 2012/11/11 22:37:02 sjg Exp $ +# $Id: init.mk,v 1.9 2013/07/18 05:46:24 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -36,6 +36,12 @@ COPTS += ${COPTS.${.IMPSRC:T}} CPPFLAGS += ${CPPFLAGS.${.IMPSRC:T}} CPUFLAGS += ${CPUFLAGS.${.IMPSRC:T}} +CC_PG?= -pg +CXX_PG?= ${CC_PG} +CC_PIC?= -DPIC +CXX_PIC?= ${CC_PIC} +PROFFLAGS?= -DGPROF -DPROF + .if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" # this tells lib.mk and prog.mk to not actually build anything _SKIP_BUILD = not building at level 0 Modified: vendor/NetBSD/bmake/dist/mk/install-mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/install-mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/install-mk Fri Aug 2 05:23:57 2013 (r253879) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.90 2013/05/11 05:16:26 sjg Exp $ +# $Id: install-mk,v 1.92 2013/07/27 05:37:37 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20130505 +MK_VERSION=20130726 OWNER= GROUP= MODE=444 Modified: vendor/NetBSD/bmake/dist/mk/lib.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/lib.mk Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/lib.mk Fri Aug 2 05:23:57 2013 (r253879) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.48 2012/11/12 04:08:18 sjg Exp $ +# $Id: lib.mk,v 1.49 2013/07/18 05:46:24 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -146,9 +146,6 @@ LD_shared=${SHLIB_SHFLAGS} MKPICLIB?= yes # sys.mk can override these -CC_PG?=-pg -CC_PIC?=-DPIC - LD_X?=-X LD_x?=-x LD_r?=-r @@ -284,7 +281,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version .if (${LD_X} == "") .c.po: - ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} .cc.po .C.po: ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} @@ -293,14 +290,14 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.po: - @echo ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.po .C.po: - @echo ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} - @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.cc} ${CXX_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.cc} ${CXX_PG} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o @@ -319,7 +316,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET} .S.po .s.po: - ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.so: @@ -335,8 +332,8 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version @rm -f ${.TARGET}.o .S.po .s.po: - @echo ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o Modified: vendor/NetBSD/bmake/dist/mk/meta2deps.py ============================================================================== --- vendor/NetBSD/bmake/dist/mk/meta2deps.py Fri Aug 2 03:46:45 2013 (r253878) +++ vendor/NetBSD/bmake/dist/mk/meta2deps.py Fri Aug 2 05:23:57 2013 (r253879) @@ -35,7 +35,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.13 2013/05/11 05:16:26 sjg Exp $ + $Id: meta2deps.py,v 1.15 2013/07/29 20:41:23 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -77,7 +77,7 @@ def resolve(path, cwd, last_dir=None, de """ if path.endswith('/.'): path = path[0:-2] - if path[0] == '/': + if len(path) > 0 and path[0] == '/': return path if path == '.': return cwd @@ -107,10 +107,12 @@ def abspath(path, cwd, last_dir=None, de this gets called a lot, so we try to avoid calling realpath until we know we have something. """ - path = resolve(path, cwd, last_dir, debug, debug_out) - if path and (path.find('./') > 0 or - path.endswith('/..') or - os.path.islink(path)): + rpath = resolve(path, cwd, last_dir, debug, debug_out) + if rpath: + path = rpath + if (path.find('./') > 0 or + path.endswith('/..') or + os.path.islink(path)): return os.path.realpath(path) return path @@ -191,6 +193,7 @@ class MetaFile: self.curdir = getv(conf, 'CURDIR') self.reldir = getv(conf, 'RELDIR') self.dpdeps = getv(conf, 'DPDEPS') + self.line = 0 if not self.conf: # some of the steps below we want to do only once @@ -254,7 +257,7 @@ class MetaFile: self.cwd = os.getcwd() # make sure this is initialized if name: *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 05:25:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AA010BD9; Fri, 2 Aug 2013 05:25:11 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E88D24E6; Fri, 2 Aug 2013 05:25:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r725PBSx093315; Fri, 2 Aug 2013 05:25:11 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r725PBwR093314; Fri, 2 Aug 2013 05:25:11 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308020525.r725PBwR093314@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 2 Aug 2013 05:25:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253880 - vendor/NetBSD/bmake/20130730 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 05:25:11 -0000 Author: sjg Date: Fri Aug 2 05:25:11 2013 New Revision: 253880 URL: http://svnweb.freebsd.org/changeset/base/253880 Log: Tag bmake-20130730 Added: vendor/NetBSD/bmake/20130730/ - copied from r253879, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 06:25:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9758A91E; Fri, 2 Aug 2013 06:25:32 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 838D82670; Fri, 2 Aug 2013 06:25:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r726PW8J012046; Fri, 2 Aug 2013 06:25:32 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r726PTkY012023; Fri, 2 Aug 2013 06:25:29 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201308020625.r726PTkY012023@svn.freebsd.org> From: "Simon J. Gerraty" Date: Fri, 2 Aug 2013 06:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 06:25:32 -0000 Author: sjg Date: Fri Aug 2 06:25:28 2013 New Revision: 253883 URL: http://svnweb.freebsd.org/changeset/base/253883 Log: Merge bmake-20130730 Main feature of interest is .MAKE.JOB.PREFIX= to suppress --- job --- tokens. Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/Makefile head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/compat.c head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/job.c head/contrib/bmake/job.h head/contrib/bmake/main.c head/contrib/bmake/make.1 head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/init.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/lib.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/own.mk head/contrib/bmake/mk/prog.mk head/contrib/bmake/parse.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/config.h head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/ChangeLog Fri Aug 2 06:25:28 2013 (r253883) @@ -1,3 +1,36 @@ +2013-07-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130730 + Merge with NetBSD make, pick up + o Allow suppression of --- job -- tokens by setting + .MAKE.JOB.PREFIX empty. + +2013-07-16 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130716 + Merge with NetBSD make, pick up + o number of gmake compatability tweaks + -w for gmake style entering/leaving messages + if .MAKE.LEVEL > 0 indicate it in progname "make[1]" etc. + handle MAKEFLAGS containing only letters. + o when overriding a GLOBAL variable on the command line, + delete it from GLOBAL context so -V doesn't show the wrong + value. + +2013-07-06 Simon J. Gerraty + + * configure.in: We don't need MAKE_LEVEL_SAFE anymore. + + * Makefile (MAKE_VERSION): 20130706 + Merge with NetBSD make, pick up + o Shell_Init(): export shellErrFlag if commandShell hasErrCtl is + true so that CompatRunCommand() can use it, to ensure + consistent behavior with jobs mode. + o use MAKE_LEVEL_ENV to define the variable to propagate + .MAKE.LEVEL - currently set to MAKELEVEL (same as gmake). + o meta.c: use .MAKE.META.IGNORE_PATHS to allow customization of + paths to ignore. + 2013-06-04 Simon J. Gerraty * Makefile (MAKE_VERSION): 20130604 Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/Makefile Fri Aug 2 06:25:28 2013 (r253883) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.14 2013/06/05 04:03:22 sjg Exp $ +# $Id: Makefile,v 1.17 2013/07/30 19:13:53 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130604 +MAKE_VERSION= 20130730 PROG= bmake Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/bmake.1 Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd March 30, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2115,6 +2125,13 @@ for Sprite at Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called .Dq customs . +.Pp +Historically the target/dependency +.Dq FRC +has been used to FoRCe rebuilding (since the target/dependency +does not exist... unless someone creates an +.Dq FRC +file). .Sh BUGS The make Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/bmake.cat1 Fri Aug 2 06:25:28 2013 (r253883) @@ -4,7 +4,7 @@ NNAAMMEE bbmmaakkee -- maintain program dependencies SSYYNNOOPPSSIISS - bbmmaakkee [--BBeeiikkNNnnqqrrssttWWXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] + bbmmaakkee [--BBeeiikkNNnnqqrrssttWWwwXX] [--CC _d_i_r_e_c_t_o_r_y] [--DD _v_a_r_i_a_b_l_e] [--dd _f_l_a_g_s] [--ff _m_a_k_e_f_i_l_e] [--II _d_i_r_e_c_t_o_r_y] [--JJ _p_r_i_v_a_t_e] [--jj _m_a_x___j_o_b_s] [--mm _d_i_r_e_c_t_o_r_y] [--TT _f_i_l_e] [--VV _v_a_r_i_a_b_l_e] [_v_a_r_i_a_b_l_e_=_v_a_l_u_e] [_t_a_r_g_e_t _._._.] @@ -122,6 +122,9 @@ DDEESSCCRRIIPPTTIIOONN _v Print debugging information about variable assignment. + _w Print entering and leaving directory messages, pre and + post processing. + _x Run shell commands with --xx so the actual commands are printed as they are executed. @@ -469,7 +472,8 @@ VVAARRIIAABBLLEE AASSSSIIGG _._M_A_K_E_._J_O_B_._P_R_E_F_I_X If bbmmaakkee is run with _j then output for each target is prefixed with a token `--- target ---' the first part of - which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. + which can be controlled via _._M_A_K_E_._J_O_B_._P_R_E_F_I_X. If + _._M_A_K_E_._J_O_B_._P_R_E_F_I_X is empty, no token is printed. For example: .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] would produce tokens like `---make[1234] target ---' mak- @@ -551,6 +555,12 @@ VVAARRIIAABBLLEE AASSSSIIGG to process the meta files to extract dependency informa- tion. + _._M_A_K_E_._M_E_T_A_._I_G_N_O_R_E___P_A_T_H_S + Provides a list of path prefixes that should be ignored; + because the contents are expected to change over time. + The default list includes: `_/_d_e_v _/_e_t_c _/_p_r_o_c _/_t_m_p _/_v_a_r_/_r_u_n + _/_v_a_r_/_t_m_p' + _._M_A_K_E_._M_E_T_A_._P_R_E_F_I_X Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -818,7 +828,7 @@ VVAARRIIAABBLLEE AASSSSIIGG period. For example. ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} - However a single character varaiable is often more readable: + However a single character variable is often more readable: ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} ::UU_n_e_w_v_a_l @@ -1351,6 +1361,10 @@ HHIISSTTOORRYY Berkeley. It was designed to be a parallel distributed make running jobs on different machines using a daemon called ``customs''. + Historically the target/dependency ``FRC'' has been used to FoRCe + rebuilding (since the target/dependency does not exist... unless someone + creates an ``FRC'' file). + BBUUGGSS The make syntax is difficult to parse without actually acting of the data. For instance finding the end of a variable use should involve @@ -1360,4 +1374,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 March 30, 2013 NetBSD 5.1 +NetBSD 5.1 July 30, 2013 NetBSD 5.1 Modified: head/contrib/bmake/compat.c ============================================================================== --- head/contrib/bmake/compat.c Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/compat.c Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $ */ +/* $NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"; +static char rcsid[] = "$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)compat.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: compat.c,v 1.91 2013/01/25 02:01:10 sjg Exp $"); +__RCSID("$NetBSD: compat.c,v 1.92 2013/07/05 22:14:56 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -332,18 +332,23 @@ again: * We need to pass the command off to the shell, typically * because the command contains a "meta" character. */ - static const char *shargv[4]; + static const char *shargv[5]; + int shargc; - shargv[0] = shellPath; + shargc = 0; + shargv[shargc++] = shellPath; /* * The following work for any of the builtin shell specs. */ + if (shellErrFlag) { + shargv[shargc++] = shellErrFlag; + } if (DEBUG(SHELL)) - shargv[1] = "-xc"; + shargv[shargc++] = "-xc"; else - shargv[1] = "-c"; - shargv[2] = cmd; - shargv[3] = NULL; + shargv[shargc++] = "-c"; + shargv[shargc++] = cmd; + shargv[shargc++] = NULL; av = shargv; argc = 0; bp = NULL; Modified: head/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/configure.in Fri Aug 2 06:25:28 2013 (r253883) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ +dnl $Id: configure.in,v 1.49 2013/07/06 18:25:19 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130706], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute @@ -79,15 +79,6 @@ dnl Executable suffix - normally empty; AC_SUBST(ac_exe_suffix)dnl dnl -dnl Check if /bin/sh will pass .MAKE.LEVEL -echo $ECHO_N "checking if sh will pass .MAKE. variables... $ECHO_C" >&6 -ok=`env .MAKE.LEVEL=1 /bin/sh -c env | grep LEVEL=` -case "$ok" in -"") echo no >&6; CPPFLAGS="${CPPFLAGS} -DNEED_MAKE_LEVEL_SAFE";; -*) echo yes >&6;; -esac - -dnl dnl AC_C_CROSS dnl Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/job.c Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $ */ +/* $NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.173 2013/06/05 03:59:43 sjg Exp $"); +__RCSID("$NetBSD: job.c,v 1.175 2013/07/30 19:09:57 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -313,6 +313,7 @@ static Shell *commandShell = &shells[DEF const char *shellPath = NULL, /* full pathname of * executable image */ *shellName = NULL; /* last component of shell */ +char *shellErrFlag = NULL; static const char *shellArgv = NULL; /* Custom shell args */ @@ -344,7 +345,7 @@ static Job childExitJob; /* child exit p #define TARG_FMT "%s %s ---\n" /* Default format */ #define MESSAGE(fp, gn) \ - if (maxJobs != 1) \ + if (maxJobs != 1 && targPrefix && *targPrefix) \ (void)fprintf(fp, TARG_FMT, targPrefix, gn->name) static sigset_t caught_signals; /* Set of signals we handle */ @@ -2152,6 +2153,24 @@ Shell_Init(void) if (commandShell->echo == NULL) { commandShell->echo = ""; } + if (commandShell->hasErrCtl && *commandShell->exit) { + if (shellErrFlag && + strcmp(commandShell->exit, &shellErrFlag[1]) != 0) { + free(shellErrFlag); + shellErrFlag = NULL; + } + if (!shellErrFlag) { + int n = strlen(commandShell->exit) + 2; + + shellErrFlag = bmake_malloc(n); + if (shellErrFlag) { + snprintf(shellErrFlag, n, "-%s", commandShell->exit); + } + } + } else if (shellErrFlag) { + free(shellErrFlag); + shellErrFlag = NULL; + } } /*- @@ -2496,6 +2515,8 @@ Job_ParseShell(char *line) commandShell = bmake_malloc(sizeof(Shell)); *commandShell = newShell; } + /* this will take care of shellErrFlag */ + Shell_Init(); } if (commandShell->echoOn && commandShell->echoOff) { Modified: head/contrib/bmake/job.h ============================================================================== --- head/contrib/bmake/job.h Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/job.h Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ +/* $NetBSD: job.h,v 1.42 2013/07/05 22:14:56 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -243,6 +243,7 @@ typedef struct Shell { extern const char *shellPath; extern const char *shellName; +extern char *shellErrFlag; extern int jobTokensRunning; /* tokens currently "out" */ extern int maxJobs; /* Max jobs we can run */ Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/main.c Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ +/* $NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); +__RCSID("$NetBSD: main.c,v 1.222 2013/07/18 15:31:49 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -117,17 +117,18 @@ __RCSID("$NetBSD: main.c,v 1.210 2013/03 #include #include #include -#include #include #include #include "wait.h" #include #include +#include #include #include #include #include +#include #include "make.h" #include "hash.h" @@ -163,6 +164,7 @@ Boolean noRecursiveExecute; /* -N flag Boolean keepgoing; /* -k flag */ Boolean queryFlag; /* -q flag */ Boolean touchFlag; /* -t flag */ +Boolean enterFlag; /* -w flag */ Boolean ignoreErrors; /* -i flag */ Boolean beSilent; /* -s flag */ Boolean oldVars; /* variable substitution style */ @@ -184,6 +186,7 @@ char curdir[MAXPATHLEN + 1]; /* Startup char *progname; /* the program name */ char *makeDependfile; pid_t myPid; +int makelevel; Boolean forceJobs = FALSE; @@ -198,6 +201,38 @@ Boolean forceJobs = FALSE; extern Lst parseIncPath; +/* + * For compatibility with the POSIX version of MAKEFLAGS that includes + * all the options with out -, convert flags to -f -l -a -g -s. + */ +static char * +explode(const char *flags) +{ + size_t len; + char *nf, *st; + const char *f; + + if (flags == NULL) + return NULL; + + for (f = flags; *f; f++) + if (!isalpha((unsigned char)*f)) + break; + + if (*f) + return bmake_strdup(flags); + + len = strlen(flags); + st = nf = bmake_malloc(len * 3 + 1); + while (*flags) { + *nf++ = '-'; + *nf++ = *flags++; + *nf++ = ' '; + } + *nf = '\0'; + return st; +} + static void parse_debug_options(const char *argvalue) { @@ -350,7 +385,7 @@ MainParseArgs(int argc, char **argv) Boolean inOption, dashDash = FALSE; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ -#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrst" +#define OPTFLAGS "BC:D:I:J:NST:V:WXd:ef:ij:km:nqrstw" /* Can't actually use getopt(3) because rescanning is not portable */ getopt_def = OPTFLAGS; @@ -558,6 +593,10 @@ rearg: touchFlag = TRUE; Var_Append(MAKEFLAGS, "-t", VAR_GLOBAL); break; + case 'w': + enterFlag = TRUE; + Var_Append(MAKEFLAGS, "-w", VAR_GLOBAL); + break; case '-': dashDash = TRUE; break; @@ -797,9 +836,6 @@ main(int argc, char **argv) Boolean outOfDate = FALSE; /* FALSE if all targets up to date */ struct stat sb, sa; char *p1, *path; -#ifndef NO_PWD_OVERRIDE - char *pwd; -#endif char mdpath[MAXPATHLEN]; #ifdef FORCE_MACHINE const char *machine = FORCE_MACHINE; @@ -966,26 +1002,30 @@ main(int argc, char **argv) Var_Set(MAKEOVERRIDES, "", VAR_GLOBAL, 0); Var_Set("MFLAGS", "", VAR_GLOBAL, 0); Var_Set(".ALLTARGETS", "", VAR_GLOBAL, 0); + /* some makefiles need to know this */ + Var_Set(MAKE_LEVEL ".ENV", MAKE_LEVEL_ENV, VAR_CMD, 0); /* * Set some other useful macros */ { - char tmp[64]; - const char *ep; + char tmp[64], *ep; - if (!(ep = getenv(MAKE_LEVEL))) { -#ifdef MAKE_LEVEL_SAFE - if (!(ep = getenv(MAKE_LEVEL_SAFE))) -#endif - ep = "0"; - } - Var_Set(MAKE_LEVEL, ep, VAR_GLOBAL, 0); + makelevel = ((ep = getenv(MAKE_LEVEL_ENV)) && *ep) ? atoi(ep) : 0; + if (makelevel < 0) + makelevel = 0; + snprintf(tmp, sizeof(tmp), "%d", makelevel); + Var_Set(MAKE_LEVEL, tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", myPid); Var_Set(".MAKE.PID", tmp, VAR_GLOBAL, 0); snprintf(tmp, sizeof(tmp), "%u", getppid()); Var_Set(".MAKE.PPID", tmp, VAR_GLOBAL, 0); } + if (makelevel > 0) { + char pn[1024]; + snprintf(pn, sizeof(pn), "%s[%d]", progname, makelevel); + progname = bmake_strdup(pn); + } Job_SetPrefix(); #ifdef USE_META @@ -997,7 +1037,9 @@ main(int argc, char **argv) * in a different format). */ #ifdef POSIX - Main_ParseArgLine(getenv("MAKEFLAGS")); + p1 = explode(getenv("MAKEFLAGS")); + Main_ParseArgLine(p1); + free(p1); #else Main_ParseArgLine(getenv("MAKE")); #endif @@ -1014,6 +1056,9 @@ main(int argc, char **argv) MainParseArgs(argc, argv); + if (enterFlag) + printf("%s: Entering directory `%s'\n", progname, curdir); + /* * Verify that cwd is sane. */ @@ -1035,15 +1080,19 @@ main(int argc, char **argv) * MAKEOBJDIRPREFIX is set or MAKEOBJDIR contains a transform. */ #ifndef NO_PWD_OVERRIDE - if (!ignorePWD && - (pwd = getenv("PWD")) != NULL && - getenv("MAKEOBJDIRPREFIX") == NULL) { - const char *makeobjdir = getenv("MAKEOBJDIR"); - - if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { - if (stat(pwd, &sb) == 0 && sa.st_ino == sb.st_ino && - sa.st_dev == sb.st_dev) - (void)strncpy(curdir, pwd, MAXPATHLEN); + if (!ignorePWD) { + char *pwd; + + if ((pwd = getenv("PWD")) != NULL && + getenv("MAKEOBJDIRPREFIX") == NULL) { + const char *makeobjdir = getenv("MAKEOBJDIR"); + + if (makeobjdir == NULL || !strchr(makeobjdir, '$')) { + if (stat(pwd, &sb) == 0 && + sa.st_ino == sb.st_ino && + sa.st_dev == sb.st_dev) + (void)strncpy(curdir, pwd, MAXPATHLEN); + } } } #endif @@ -1331,6 +1380,9 @@ main(int argc, char **argv) Trace_Log(MAKEEND, 0); + if (enterFlag) + printf("%s: Leaving directory `%s'\n", progname, curdir); + Suff_End(); Targ_End(); Arch_End(); @@ -1759,8 +1811,12 @@ execError(const char *af, const char *av static void usage(void) { + char *p; + if ((p = strchr(progname, '[')) != NULL) + *p = '\0'; + (void)fprintf(stderr, -"usage: %s [-BeikNnqrstWX] \n\ +"usage: %s [-BeikNnqrstWwX] \n\ [-C directory] [-D variable] [-d flags] [-f makefile]\n\ [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]\n\ [-V variable] [variable=value] [target ...]\n", progname); Modified: head/contrib/bmake/make.1 ============================================================================== --- head/contrib/bmake/make.1 Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/make.1 Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.215 2013/05/22 19:35:11 christos Exp $ +.\" $NetBSD: make.1,v 1.220 2013/07/30 19:09:57 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd May 22, 2013 +.Dd July 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -37,7 +37,7 @@ .Nd maintain program dependencies .Sh SYNOPSIS .Nm -.Op Fl BeikNnqrstWX +.Op Fl BeikNnqrstWwX .Op Fl C Ar directory .Op Fl D Ar variable .Op Fl d Ar flags @@ -209,6 +209,8 @@ Force the option to print raw values of variables. .It Ar v Print debugging information about variable assignment. +.It Ar w +Print entering and leaving directory messages, pre and post processing. .It Ar x Run shell commands with .Fl x @@ -743,6 +745,9 @@ then output for each target is prefixed .Ql --- target --- the first part of which can be controlled via .Va .MAKE.JOB.PREFIX . +If +.Va .MAKE.JOB.PREFIX +is empty, no token is printed. .br For example: .Li .MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}] @@ -856,6 +861,11 @@ In "meta" mode, this variable contains a used (updated or not). This list can be used to process the meta files to extract dependency information. +.It Va .MAKE.META.IGNORE_PATHS +Provides a list of path prefixes that should be ignored; +because the contents are expected to change over time. +The default list includes: +.Ql Pa /dev /etc /proc /tmp /var/run /var/tmp .It Va .MAKE.META.PREFIX Defines the message printed for each meta file updated in "meta verbose" mode. The default value is: @@ -877,7 +887,7 @@ is modified. .It Va .MAKE.PATH_FILEMON If .Nm -was built with +was built with .Xr filemon 4 support, this is set to the path of the device node. This allows makefiles to test for this support. @@ -1298,7 +1308,7 @@ should start and end with a period. For example. .Dl ${LINKS:@.LINK.@${LN} ${TARGET} ${.LINK.}@} .Pp -However a single character varaiable is often more readable: +However a single character variable is often more readable: .Dl ${MAKE_PRINT_VAR_ON_ERROR:@v@$v='${$v}'${.newline}@} .It Cm \&:U Ns Ar newval If the variable is undefined @@ -1321,7 +1331,7 @@ The path of the node which has the same is the value. If no such node exists or its path is null, then the name of the variable is used. -In order for this modifier to work, the name (node) must at least have +In order for this modifier to work, the name (node) must at least have appeared on the rhs of a dependency. .Sm off .It Cm \&:\&! Ar cmd Cm \&! @@ -2114,7 +2124,7 @@ machines using a daemon called Historically the target/dependency .Dq FRC has been used to FoRCe rebuilding (since the target/dependency -does not exist... unless someone creates an +does not exist... unless someone creates an .Dq FRC file). .Sh BUGS Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/make.h Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ +/* $NetBSD: make.h,v 1.91 2013/06/18 20:06:09 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -442,9 +442,8 @@ extern pid_t myPid; #define MAKEFILE_PREFERENCE ".MAKE.MAKEFILE_PREFERENCE" #define MAKE_DEPENDFILE ".MAKE.DEPENDFILE" /* .depend */ #define MAKE_MODE ".MAKE.MODE" - -#ifdef NEED_MAKE_LEVEL_SAFE -# define MAKE_LEVEL_SAFE "_MAKE_LEVEL" /* some shells will not pass .MAKE. */ +#ifndef MAKE_LEVEL_ENV +# define MAKE_LEVEL_ENV "MAKELEVEL" #endif /* Modified: head/contrib/bmake/meta.c ============================================================================== --- head/contrib/bmake/meta.c Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/meta.c Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.30 2013/05/16 21:56:56 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.32 2013/06/25 00:20:54 sjg Exp $ */ /* * Implement 'meta' mode. @@ -55,7 +55,12 @@ #endif static BuildMon Mybm; /* for compat */ -static Lst metaBailiwick; /* our scope of control */ +static Lst metaBailiwick; /* our scope of control */ +static Lst metaIgnorePaths; /* paths we deliberately ignore */ + +#ifndef MAKE_META_IGNORE_PATHS +#define MAKE_META_IGNORE_PATHS ".MAKE.META.IGNORE_PATHS" +#endif Boolean useMeta = FALSE; static Boolean useFilemon = FALSE; @@ -607,6 +612,17 @@ meta_mode_init(const char *make_mode) if (cp) { str2Lst_Append(metaBailiwick, cp, NULL); } + /* + * We ignore any paths that start with ${.MAKE.META.IGNORE_PATHS} + */ + metaIgnorePaths = Lst_Init(FALSE); + Var_Append(MAKE_META_IGNORE_PATHS, + "/dev /etc /proc /tmp /var/run /var/tmp ${TMPDIR}", VAR_GLOBAL); + cp = Var_Subst(NULL, + "${" MAKE_META_IGNORE_PATHS ":O:u:tA}", VAR_GLOBAL, 0); + if (cp) { + str2Lst_Append(metaIgnorePaths, cp, NULL); + } } /* @@ -1110,20 +1126,15 @@ meta_oodate(GNode *gn, Boolean oodate) * be part of the dependencies because * they are _expected_ to change. */ - if (strncmp(p, "/tmp/", 5) == 0 || - (tmplen > 0 && strncmp(p, tmpdir, tmplen) == 0)) - break; - - if (strncmp(p, "/var/", 5) == 0) - break; - - /* Ignore device files. */ - if (strncmp(p, "/dev/", 5) == 0) - break; - - /* Ignore /etc/ files. */ - if (strncmp(p, "/etc/", 5) == 0) + if (*p == '/' && + Lst_ForEach(metaIgnorePaths, prefix_match, p)) { +#ifdef DEBUG_META_MODE + if (DEBUG(META)) + fprintf(debug_file, "meta_oodate: ignoring: %s\n", + p); +#endif break; + } if ((cp = strrchr(p, '/'))) { cp++; Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/mk/ChangeLog Fri Aug 2 06:25:28 2013 (r253883) @@ -1,3 +1,18 @@ +2013-07-26 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130726 + some updates from Juniper and FreeBSD + o meta2deps.py: indicate file and line number when we hit parse + errors + also allow @file to provide huge list of .meta files. + * meta2deps.py: add try_parse() to cleanup the above. + +2013-07-16 Simon J. Gerraty + + * install-mk (MK_VERSION): 20130716 + * own.mk: add GPROG as an option + * prog.mk: honor MK_GPROF==yes + 2013-05-10 Simon J. Gerraty * install-mk (MK_VERSION): 20130505 Modified: head/contrib/bmake/mk/init.mk ============================================================================== --- head/contrib/bmake/mk/init.mk Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/mk/init.mk Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -# $Id: init.mk,v 1.8 2012/11/11 22:37:02 sjg Exp $ +# $Id: init.mk,v 1.9 2013/07/18 05:46:24 sjg Exp $ # # @(#) Copyright (c) 2002, Simon J. Gerraty # @@ -36,6 +36,12 @@ COPTS += ${COPTS.${.IMPSRC:T}} CPPFLAGS += ${CPPFLAGS.${.IMPSRC:T}} CPUFLAGS += ${CPUFLAGS.${.IMPSRC:T}} +CC_PG?= -pg +CXX_PG?= ${CC_PG} +CC_PIC?= -DPIC +CXX_PIC?= ${CC_PIC} +PROFFLAGS?= -DGPROF -DPROF + .if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" # this tells lib.mk and prog.mk to not actually build anything _SKIP_BUILD = not building at level 0 Modified: head/contrib/bmake/mk/install-mk ============================================================================== --- head/contrib/bmake/mk/install-mk Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/mk/install-mk Fri Aug 2 06:25:28 2013 (r253883) @@ -55,7 +55,7 @@ # Simon J. Gerraty # RCSid: -# $Id: install-mk,v 1.90 2013/05/11 05:16:26 sjg Exp $ +# $Id: install-mk,v 1.92 2013/07/27 05:37:37 sjg Exp $ # # @(#) Copyright (c) 1994 Simon J. Gerraty # @@ -70,7 +70,7 @@ # sjg@crufty.net # -MK_VERSION=20130505 +MK_VERSION=20130726 OWNER= GROUP= MODE=444 Modified: head/contrib/bmake/mk/lib.mk ============================================================================== --- head/contrib/bmake/mk/lib.mk Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/mk/lib.mk Fri Aug 2 06:25:28 2013 (r253883) @@ -1,4 +1,4 @@ -# $Id: lib.mk,v 1.48 2012/11/12 04:08:18 sjg Exp $ +# $Id: lib.mk,v 1.49 2013/07/18 05:46:24 sjg Exp $ .if !target(__${.PARSEFILE}__) __${.PARSEFILE}__: @@ -146,9 +146,6 @@ LD_shared=${SHLIB_SHFLAGS} MKPICLIB?= yes # sys.mk can override these -CC_PG?=-pg -CC_PIC?=-DPIC - LD_X?=-X LD_x?=-x LD_r?=-r @@ -284,7 +281,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version .if (${LD_X} == "") .c.po: - ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} .cc.po .C.po: ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} @@ -293,14 +290,14 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.S} ${PICFLAG} ${CC_PIC} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.po: - @echo ${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.c} ${CC_PG} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.c} ${CC_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o .cc.po .C.po: - @echo ${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET} - @${COMPILE.cc} -pg ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.cc} ${CXX_PG} ${PROFFLAGS} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.cc} ${CXX_PG} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o @@ -319,7 +316,7 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version ${COMPILE.cc} ${PICFLAG} ${CC_PIC} ${.IMPSRC} -o ${.TARGET} .S.po .s.po: - ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} .else .c.so: @@ -335,8 +332,8 @@ SHLIB_AGE != . ${.CURDIR}/shlib_version @rm -f ${.TARGET}.o .S.po .s.po: - @echo ${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} - @${COMPILE.S} -DGPROF -DPROF ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o + @echo ${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET} + @${COMPILE.S} ${PROFFLAGS} ${CFLAGS:M-[ID]*} ${AINC} ${.IMPSRC} -o ${.TARGET}.o @${LD} ${LD_X} ${LD_r} ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o Modified: head/contrib/bmake/mk/meta2deps.py ============================================================================== --- head/contrib/bmake/mk/meta2deps.py Fri Aug 2 05:52:53 2013 (r253882) +++ head/contrib/bmake/mk/meta2deps.py Fri Aug 2 06:25:28 2013 (r253883) @@ -35,7 +35,7 @@ We only pay attention to a subset of the """ RCSid: - $Id: meta2deps.py,v 1.13 2013/05/11 05:16:26 sjg Exp $ + $Id: meta2deps.py,v 1.15 2013/07/29 20:41:23 sjg Exp $ Copyright (c) 2011-2013, Juniper Networks, Inc. All rights reserved. @@ -77,7 +77,7 @@ def resolve(path, cwd, last_dir=None, de """ if path.endswith('/.'): path = path[0:-2] - if path[0] == '/': + if len(path) > 0 and path[0] == '/': return path if path == '.': return cwd @@ -107,10 +107,12 @@ def abspath(path, cwd, last_dir=None, de this gets called a lot, so we try to avoid calling realpath until we know we have something. """ - path = resolve(path, cwd, last_dir, debug, debug_out) - if path and (path.find('./') > 0 or - path.endswith('/..') or - os.path.islink(path)): + rpath = resolve(path, cwd, last_dir, debug, debug_out) + if rpath: + path = rpath + if (path.find('./') > 0 or + path.endswith('/..') or + os.path.islink(path)): return os.path.realpath(path) return path @@ -191,6 +193,7 @@ class MetaFile: self.curdir = getv(conf, 'CURDIR') self.reldir = getv(conf, 'RELDIR') self.dpdeps = getv(conf, 'DPDEPS') + self.line = 0 if not self.conf: # some of the steps below we want to do only once @@ -254,7 +257,7 @@ class MetaFile: self.cwd = os.getcwd() # make sure this is initialized *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 08:06:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3C00FB56; Fri, 2 Aug 2013 08:06:00 +0000 (UTC) (envelope-from fabien.thomas@netasq.com) Received: from work.netasq.com (gwlille.netasq.com [91.212.116.1]) by mx1.freebsd.org (Postfix) with ESMTP id 2A18E2A33; Fri, 2 Aug 2013 08:05:58 +0000 (UTC) Received: from work.netasq.com (localhost [127.0.0.1]) by work.netasq.com (Postfix) with ESMTP id BC57C270630D; Fri, 2 Aug 2013 10:05:57 +0200 (CEST) Received: from fabient.netasq.com (unknown [91.212.116.2]) by work.netasq.com (Postfix) with ESMTPSA id 8C74527062B7; Fri, 2 Aug 2013 10:05:57 +0200 (CEST) Subject: Re: svn commit: r253779 - in head: . share/man/man4 sys/amd64/conf sys/arm/conf sys/conf sys/dev/random sys/i386/conf sys/ia64/conf sys/mips/conf sys/modules sys/modules/random sys/pc98/conf sys/powerp... Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: multipart/signed; boundary="Apple-Mail=_E0AA719C-1150-414D-968A-113B19AA18EA"; protocol="application/pkcs7-signature"; micalg=sha1 From: Fabien Thomas In-Reply-To: <201307292026.r6TKQRRb021717@svn.freebsd.org> Date: Fri, 2 Aug 2013 10:05:57 +0200 Message-Id: <5E61D610-3322-4240-9978-CB277C7161F5@netasq.com> References: <201307292026.r6TKQRRb021717@svn.freebsd.org> To: David E. O'Brien X-Mailer: Apple Mail (2.1283) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 08:06:00 -0000 --Apple-Mail=_E0AA719C-1150-414D-968A-113B19AA18EA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Le 29 juil. 2013 =E0 22:26, David E. O'Brien a =E9crit : > Author: obrien > Date: Mon Jul 29 20:26:27 2013 > New Revision: 253779 > URL: http://svnweb.freebsd.org/changeset/base/253779 >=20 > Log: > Decouple yarrow from random(4) device. >=20 > * Make Yarrow an optional kernel component -- enabled by "YARROW_RNG" = option. > The files sha2.c, hash.c, randomdev_soft.c and yarrow.c comprise = yarrow. >=20 > * random(4) device doesn't really depend on rijndael-*. Yarrow, = however, does. >=20 > * Add random_adaptors.[ch] which is basically a store of = random_adaptor's. > random_adaptor is basically an adapter that plugs in to random(4). > random_adaptor can only be plugged in to random(4) very early in = bootup. > Unplugging random_adaptor from random(4) is not supported, and is = probably a > bad idea anyway, due to potential loss of entropy pools. > We currently have 3 random_adaptors: > + yarrow > + rdrand (ivy.c) > + nehemeiah >=20 > * Remove platform dependent logic from probe.c, and move it into > corresponding registration routines of each random_adaptor = provider. > probe.c doesn't do anything other than picking a specific = random_adaptor > from a list of registered ones. >=20 > * If the kernel doesn't have any random_adaptor adapters present then = the > creation of /dev/random is postponed until next random_adaptor is = kldload'ed. >=20 > * Fix randomdev_soft.c to refer to its own random_adaptor, instead of = a > system wide one. >=20 We need to have very good random by default. Even selecting HW random automatically is not very good. HW random is = difficult to trust. Why not having a good default software random seeded by automatically = detected HW random ? After that the user can choose to bypass the software random a feed = directly by the HW random source. > Submitted by: arthurmesh@gmail.com, obrien > Obtained from: Juniper Networks > Reviewed by: obrien >=20 > Modified: > head/UPDATING > head/share/man/man4/random.4 > head/sys/amd64/conf/GENERIC > head/sys/arm/conf/AC100 > head/sys/arm/conf/ARMADAXP > head/sys/arm/conf/ARNDALE > head/sys/arm/conf/ATMEL > head/sys/arm/conf/AVILA > head/sys/arm/conf/BEAGLEBONE > head/sys/arm/conf/BWCT > head/sys/arm/conf/CAMBRIA > head/sys/arm/conf/CNS11XXNAS > head/sys/arm/conf/CRB > head/sys/arm/conf/CUBIEBOARD > head/sys/arm/conf/DB-78XXX > head/sys/arm/conf/DB-88F5XXX > head/sys/arm/conf/DB-88F6XXX > head/sys/arm/conf/DOCKSTAR > head/sys/arm/conf/DREAMPLUG-1001 > head/sys/arm/conf/EA3250 > head/sys/arm/conf/EB9200 > head/sys/arm/conf/EFIKA_MX > head/sys/arm/conf/EP80219 > head/sys/arm/conf/ETHERNUT5 > head/sys/arm/conf/GUMSTIX > head/sys/arm/conf/HL200 > head/sys/arm/conf/HL201 > head/sys/arm/conf/IQ31244 > head/sys/arm/conf/KB920X > head/sys/arm/conf/LN2410SBC > head/sys/arm/conf/NSLU > head/sys/arm/conf/PANDABOARD > head/sys/arm/conf/QILA9G20 > head/sys/arm/conf/RPI-B > head/sys/arm/conf/SAM9260EK > head/sys/arm/conf/SAM9G20EK > head/sys/arm/conf/SAM9X25EK > head/sys/arm/conf/SHEEVAPLUG > head/sys/arm/conf/SN9G45 > head/sys/arm/conf/TS7800 > head/sys/arm/conf/VERSATILEPB > head/sys/arm/conf/ZEDBOARD > head/sys/conf/NOTES > head/sys/conf/files > head/sys/conf/options > head/sys/dev/random/ivy.c > head/sys/dev/random/nehemiah.c > head/sys/dev/random/probe.c > head/sys/dev/random/randomdev.c > head/sys/dev/random/randomdev.h > head/sys/dev/random/randomdev_soft.c > head/sys/dev/random/randomdev_soft.h > head/sys/dev/random/yarrow.c > head/sys/i386/conf/GENERIC > head/sys/i386/conf/XBOX > head/sys/i386/conf/XEN > head/sys/ia64/conf/GENERIC > head/sys/mips/conf/AR71XX_BASE > head/sys/mips/conf/AR724X_BASE > head/sys/mips/conf/AR91XX_BASE > head/sys/mips/conf/AR933X_BASE > head/sys/mips/conf/BERI_TEMPLATE > head/sys/mips/conf/DIR-825 > head/sys/mips/conf/GXEMUL > head/sys/mips/conf/OCTEON1 > head/sys/mips/conf/PB92 > head/sys/mips/conf/RT305X > head/sys/mips/conf/XLR64 > head/sys/mips/conf/XLRN32 > head/sys/mips/conf/std.SWARM > head/sys/mips/conf/std.XLP > head/sys/modules/Makefile > head/sys/modules/random/Makefile > head/sys/pc98/conf/GENERIC > head/sys/powerpc/conf/GENERIC > head/sys/powerpc/conf/GENERIC64 > head/sys/powerpc/conf/MPC85XX > head/sys/powerpc/conf/WII > head/sys/sparc64/conf/GENERIC > head/tools/tools/sysdoc/sysdoc.sh > head/tools/tools/sysdoc/tunables.mdoc >=20 > Modified: head/UPDATING > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/UPDATING Mon Jul 29 19:50:30 2013 (r253778) > +++ head/UPDATING Mon Jul 29 20:26:27 2013 (r253779) > @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 > disable the most expensive debugging functionality run > "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +20130729: > + random(4) and actual RNG implementations (aka, adaptors) have = been > + further decoupled. If you are running a custom kernel, you may > + need to explicitly enable at least one RNG adaptor in your = kernel > + config. For example, to use Yarrow, add "options YARROW_RNG" to > + your kernel config. For hardware backed RNGs, use either > + "RDRAND_RNG" or "PADLOCK_RNG" options. > + If you use random.ko via 'random_load=3D"YES"' in = /boot/loader.conf > + instead of "device random", you will need to change that to > + 'yarrow_rng_load=3D"YES"', 'rdrand_rng_load=3D"YES"', or > + 'padlock_rng_load=3D"YES"'. random.ko will be loaded = automatically > + as a dependency module. > + > 20130726: > Behavior of devfs rules path matching has been changed. > Pattern is now always matched against fully qualified devfs >=20 > Modified: head/share/man/man4/random.4 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/share/man/man4/random.4 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/share/man/man4/random.4 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -23,7 +23,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd September 7, 2012 > +.Dd July 29, 2013 > .Dt RANDOM 4 > .Os > .Sh NAME > @@ -43,6 +43,13 @@ The device will probe for > certain hardware entropy sources, > and use these in preference to the fallback, > which is a generator implemented in software. > +If the kernel environment MIB's > +.Va hw.nehemiah_rng_enable > +or > +.Va hw.ivy_rng_enable > +are set to > +.Dq Li 0 , > +the associated hardware entropy source will be ignored. > .Pp > If the device is using > the software generator, > @@ -74,6 +81,7 @@ device, use the command line: > .Pp > which results in something like: > .Bd -literal -offset indent > +kern.random.adaptors: yarrow > kern.random.sys.seeded: 1 > kern.random.sys.harvest.ethernet: 1 > kern.random.sys.harvest.point_to_point: 1 > @@ -89,7 +97,9 @@ kern.random.yarrow.slowoverthresh: 2 > (These would not be seen if a > hardware generator is present.) > .Pp > -All settings are read/write. > +Other than > +.Dl kern.random.adaptors > +all settings are read/write. > .Pp > The > .Va kern.random.sys.seeded >=20 > Modified: head/sys/amd64/conf/GENERIC > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/amd64/conf/GENERIC Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/amd64/conf/GENERIC Mon Jul 29 20:26:27 2013 = (r253779) > @@ -295,6 +295,7 @@ device loop # Network = loopback > device random # Entropy device > options PADLOCK_RNG # VIA Padlock RNG > options RDRAND_RNG # Intel Bull Mountain RNG > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. >=20 > Modified: head/sys/arm/conf/AC100 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/AC100 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/AC100 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -61,6 +61,7 @@ options MUTEX_DEBUG >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device md >=20 > Modified: head/sys/arm/conf/ARMADAXP > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/ARMADAXP Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/ARMADAXP Mon Jul 29 20:26:27 2013 = (r253779) > @@ -61,6 +61,7 @@ options KDB_TRACE >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device md >=20 > Modified: head/sys/arm/conf/ARNDALE > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/ARNDALE Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/ARNDALE Mon Jul 29 20:26:27 2013 = (r253779) > @@ -88,6 +88,7 @@ options ROOTDEVNAME=3D\"ufs:/dev/da0\" >=20 > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device md > device gpio >=20 > Modified: head/sys/arm/conf/ATMEL > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/ATMEL Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/ATMEL Mon Jul 29 20:26:27 2013 = (r253779) > @@ -134,6 +134,7 @@ device geom_map # GEOM partition = mappin > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > device vlan # 802.1Q VLAN support > device tun # Packet tunnel. >=20 > Modified: head/sys/arm/conf/AVILA > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/AVILA Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/AVILA Mon Jul 29 20:26:27 2013 = (r253779) > @@ -107,6 +107,7 @@ device if_bridge >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Wireless NIC cards > device wlan # 802.11 support >=20 > Modified: head/sys/arm/conf/BEAGLEBONE > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/BEAGLEBONE Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/BEAGLEBONE Mon Jul 29 20:26:27 2013 = (r253779) > @@ -90,6 +90,7 @@ device pty > device snp > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # I2C support > device iicbus >=20 > Modified: head/sys/arm/conf/BWCT > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/BWCT Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/BWCT Mon Jul 29 20:26:27 2013 = (r253779) > @@ -68,6 +68,7 @@ options NO_FFS_SNAPSHOT > options NO_SWAPPING > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device ether > device vlan > device uart >=20 > Modified: head/sys/arm/conf/CAMBRIA > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/CAMBRIA Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/CAMBRIA Mon Jul 29 20:26:27 2013 = (r253779) > @@ -110,6 +110,7 @@ device if_bridge >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Wireless NIC cards > device wlan # 802.11 support >=20 > Modified: head/sys/arm/conf/CNS11XXNAS > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/CNS11XXNAS Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/CNS11XXNAS Mon Jul 29 20:26:27 2013 = (r253779) > @@ -102,6 +102,7 @@ device loop >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > #options ARM_USE_SMALL_ALLOC >=20 >=20 > Modified: head/sys/arm/conf/CRB > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/CRB Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/CRB Mon Jul 29 20:26:27 2013 = (r253779) > @@ -105,6 +105,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > device iopwdog > options ARM_USE_SMALL_ALLOC >=20 > Modified: head/sys/arm/conf/CUBIEBOARD > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/CUBIEBOARD Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/CUBIEBOARD Mon Jul 29 20:26:27 2013 = (r253779) > @@ -92,6 +92,7 @@ device pty > device snp > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # I2C support > #device iicbus > @@ -130,4 +131,3 @@ device miibus > options FDT > options FDT_DTB_STATIC > makeoptions FDT_DTS_FILE=3Dcubieboard.dts > - >=20 > Modified: head/sys/arm/conf/DB-78XXX > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/DB-78XXX Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/DB-78XXX Mon Jul 29 20:26:27 2013 = (r253779) > @@ -55,6 +55,7 @@ device pci > device loop > device md > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart >=20 > Modified: head/sys/arm/conf/DB-88F5XXX > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/DB-88F5XXX Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/DB-88F5XXX Mon Jul 29 20:26:27 2013 = (r253779) > @@ -54,6 +54,7 @@ device pci > device md > device loop > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart >=20 > Modified: head/sys/arm/conf/DB-88F6XXX > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/DB-88F6XXX Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/DB-88F6XXX Mon Jul 29 20:26:27 2013 = (r253779) > @@ -55,6 +55,7 @@ device pci > device loop > device md > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart >=20 > Modified: head/sys/arm/conf/DOCKSTAR > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/DOCKSTAR Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/DOCKSTAR Mon Jul 29 20:26:27 2013 = (r253779) > @@ -46,6 +46,7 @@ options KDB > # Pseudo devices > device md > device random > +options YARROW_RNG # Yarrow software RNG > device loop >=20 > # Serial ports >=20 > Modified: head/sys/arm/conf/DREAMPLUG-1001 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/DREAMPLUG-1001 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/DREAMPLUG-1001 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -62,6 +62,7 @@ device loop #Network = loopback > device md #Memory/malloc disk > device pty #BSD-style compatibility = pseudo ttys > device random #Entropy device > +options YARROW_RNG # Yarrow software RNG > device tun #Packet tunnel. > device ether #Required for all = ethernet devices > device vlan #802.1Q VLAN support >=20 > Modified: head/sys/arm/conf/EA3250 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/EA3250 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/EA3250 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -54,6 +54,7 @@ device loop > device md > device pty > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart >=20 > Modified: head/sys/arm/conf/EB9200 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/EB9200 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/EB9200 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -60,6 +60,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart >=20 > Modified: head/sys/arm/conf/EFIKA_MX > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/EFIKA_MX Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/EFIKA_MX Mon Jul 29 20:26:27 2013 = (r253779) > @@ -96,6 +96,7 @@ device bpf # Berkeley = packet filter > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. >=20 > Modified: head/sys/arm/conf/EP80219 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/EP80219 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/EP80219 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -101,6 +101,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > options ARM_USE_SMALL_ALLOC > # Floppy drives >=20 > Modified: head/sys/arm/conf/ETHERNUT5 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/ETHERNUT5 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/ETHERNUT5 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -126,6 +126,7 @@ device geom_map # GEOM partition = mappin > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. >=20 > Modified: head/sys/arm/conf/GUMSTIX > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/GUMSTIX Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/GUMSTIX Mon Jul 29 20:26:27 2013 = (r253779) > @@ -88,3 +88,4 @@ options DDB #Enable the = kernel debugg >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > Modified: head/sys/arm/conf/HL200 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/HL200 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/HL200 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -65,6 +65,7 @@ options RWLOCK_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart >=20 > Modified: head/sys/arm/conf/HL201 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/HL201 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/HL201 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -67,6 +67,7 @@ options RWLOCK_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart > @@ -129,4 +130,3 @@ device pass # Passthrough = device (dire > #device wlan_tkip # 802.11 TKIP support > #device wlan_amrr # AMRR transmit rate control = algorithm > options ROOTDEVNAME=3D\"ufs:da0s1a\" > - >=20 > Modified: head/sys/arm/conf/IQ31244 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/IQ31244 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/IQ31244 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -106,6 +106,7 @@ options DDB #Enable the = kernel debugg > options XSCALE_CACHE_READ_WRITE_ALLOCATE > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > options ARM_USE_SMALL_ALLOC > # Floppy drives >=20 > Modified: head/sys/arm/conf/KB920X > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/KB920X Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/KB920X Mon Jul 29 20:26:27 2013 = (r253779) > @@ -66,6 +66,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device ether > device uart >=20 > Modified: head/sys/arm/conf/LN2410SBC > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/LN2410SBC Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/LN2410SBC Mon Jul 29 20:26:27 2013 = (r253779) > @@ -62,6 +62,7 @@ options SX_NOINLINE > options NO_FFS_SNAPSHOT > options NO_SWAPPING > device random > +options YARROW_RNG # Yarrow software RNG >=20 > device loop > device ether > @@ -83,4 +84,3 @@ device ohci > device umass > device scbus # SCSI bus (required for da) > device da # Direct Access (disks) > - >=20 > Modified: head/sys/arm/conf/NSLU > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/NSLU Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/NSLU Mon Jul 29 20:26:27 2013 = (r253779) > @@ -105,6 +105,7 @@ device loop >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > #options ARM_USE_SMALL_ALLOC >=20 >=20 > Modified: head/sys/arm/conf/PANDABOARD > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/PANDABOARD Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/PANDABOARD Mon Jul 29 20:26:27 2013 = (r253779) > @@ -110,6 +110,7 @@ device md > #options MD_ROOT_SIZE=3D7560 >=20 > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # USB support > device usb >=20 > Modified: head/sys/arm/conf/QILA9G20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/QILA9G20 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/QILA9G20 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -77,6 +77,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether >=20 > Modified: head/sys/arm/conf/RPI-B > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/RPI-B Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/RPI-B Mon Jul 29 20:26:27 2013 = (r253779) > @@ -86,6 +86,7 @@ options INVARIANT_SUPPORT #Extra sanity >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # USB support > device usb >=20 > Modified: head/sys/arm/conf/SAM9260EK > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/SAM9260EK Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/SAM9260EK Mon Jul 29 20:26:27 2013 = (r253779) > @@ -134,6 +134,7 @@ device mmcsd # MMC/SD memory = card > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG > device ether # Ethernet support > #device vlan # 802.1Q VLAN support > #device tun # Packet tunnel. >=20 > Modified: head/sys/arm/conf/SAM9G20EK > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/SAM9G20EK Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/SAM9G20EK Mon Jul 29 20:26:27 2013 = (r253779) > @@ -76,6 +76,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether >=20 > Modified: head/sys/arm/conf/SAM9X25EK > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/SAM9X25EK Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/SAM9X25EK Mon Jul 29 20:26:27 2013 = (r253779) > @@ -77,6 +77,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device pty > device loop > device bpf > @@ -150,4 +151,3 @@ device miibus > #device wlan_ccmp # 802.11 CCMP support > #device wlan_tkip # 802.11 TKIP support > #device wlan_amrr # AMRR transmit rate control = algorithm > - >=20 > Modified: head/sys/arm/conf/SHEEVAPLUG > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/SHEEVAPLUG Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/SHEEVAPLUG Mon Jul 29 20:26:27 2013 = (r253779) > @@ -45,6 +45,7 @@ options KDB >=20 > # Pseudo devices > device random > +options YARROW_RNG # Yarrow software RNG > device loop >=20 > # Serial ports >=20 > Modified: head/sys/arm/conf/SN9G45 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/SN9G45 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/SN9G45 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -76,6 +76,7 @@ options NO_SWAPPING > #options DIAGNOSTIC >=20 > device random > +options YARROW_RNG # Yarrow software RNG > device loop > device bpf > device ether >=20 > Modified: head/sys/arm/conf/TS7800 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/TS7800 Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/TS7800 Mon Jul 29 20:26:27 2013 = (r253779) > @@ -48,6 +48,7 @@ device pci > device md > device loop > device random > +options YARROW_RNG # Yarrow software RNG >=20 > # Serial ports > device uart >=20 > Modified: head/sys/arm/conf/VERSATILEPB > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/VERSATILEPB Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/VERSATILEPB Mon Jul 29 20:26:27 2013 = (r253779) > @@ -94,6 +94,7 @@ options INVARIANT_SUPPORT #Extra sanity >=20 > device md > device random # Entropy device > +options YARROW_RNG # Yarrow software RNG >=20 > # Flattened Device Tree > options FDT >=20 > Modified: head/sys/arm/conf/ZEDBOARD > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/conf/ZEDBOARD Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/arm/conf/ZEDBOARD Mon Jul 29 20:26:27 2013 = (r253779) > @@ -66,6 +66,7 @@ options KDB >=20 > device loop > device random > +options YARROW_RNG # Yarrow software RNG > device ether > device if_cgem # Zynq-7000 gig ethernet = device > device mii >=20 > Modified: head/sys/conf/NOTES > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/NOTES Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/conf/NOTES Mon Jul 29 20:26:27 2013 = (r253779) > @@ -1132,6 +1132,9 @@ options VFS_AIO > # Cryptographically secure random number generator; /dev/random > device random >=20 > +# Yarrow software RNG adapter for random > +options YARROW_RNG > + > # The system memory devices; /dev/mem, /dev/kmem > device mem >=20 >=20 > Modified: head/sys/conf/files > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/files Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/conf/files Mon Jul 29 20:26:27 2013 = (r253779) > @@ -540,8 +540,8 @@ crypto/des/des_ecb.c optional crypto = |=20 > crypto/des/des_setkey.c optional crypto | ipsec | netsmb > crypto/rc4/rc4.c optional netgraph_mppc_encryption | = kgssapi > crypto/rijndael/rijndael-alg-fst.c optional crypto | geom_bde | \ > - ipsec | random | wlan_ccmp > -crypto/rijndael/rijndael-api-fst.c optional geom_bde | random > + ipsec | yarrow_rng | wlan_ccmp > +crypto/rijndael/rijndael-api-fst.c optional geom_bde | yarrow_rng > crypto/rijndael/rijndael-api.c optional crypto | ipsec | = wlan_ccmp > crypto/sha1.c optional carp | crypto | ipsec | \ > netgraph_mppc_encryption | sctp > @@ -2030,11 +2030,12 @@ rt2860.fw optional = rt2860fw | ralfw \ > no-obj no-implicit-rule = \ > clean "rt2860.fw" > dev/random/harvest.c standard > -dev/random/hash.c optional random > +dev/random/hash.c optional yarrow_rng > dev/random/probe.c optional random > +dev/random/random_adaptors.c standard > dev/random/randomdev.c optional random > -dev/random/randomdev_soft.c optional random > -dev/random/yarrow.c optional random > +dev/random/randomdev_soft.c optional yarrow_rng > +dev/random/yarrow.c optional yarrow_rng > dev/rc/rc.c optional rc > dev/re/if_re.c optional re > dev/rndtest/rndtest.c optional rndtest >=20 > Modified: head/sys/conf/options > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/options Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/conf/options Mon Jul 29 20:26:27 2013 = (r253779) > @@ -905,3 +905,6 @@ RACCT opt_global.h >=20 > # Resource Limits > RCTL opt_global.h > + > +# Software random number generators for random(4) > +YARROW_RNG opt_dontuse.h >=20 > Modified: head/sys/dev/random/ivy.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/ivy.c Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/ivy.c Mon Jul 29 20:26:27 2013 = (r253779) > @@ -28,16 +28,19 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#include "opt_cpu.h" > - > -#ifdef RDRAND_RNG > - > #include > #include > +#include > #include > +#include > #include > #include > #include > + > +#include > +#include > + > +#include > #include >=20 > #define RETRY_COUNT 10 > @@ -46,7 +49,7 @@ static void random_ivy_init(void); > static void random_ivy_deinit(void); > static int random_ivy_read(void *, int); >=20 > -struct random_systat random_ivy =3D { > +struct random_adaptor random_ivy =3D { > .ident =3D "Hardware, Intel IvyBridge+ RNG", > .init =3D random_ivy_init, > .deinit =3D random_ivy_deinit, > @@ -114,4 +117,32 @@ random_ivy_read(void *buf, int c) > return (c - count); > } >=20 > +static int > +rdrand_modevent(module_t mod, int type, void *unused) > +{ > + > + switch (type) { > + case MOD_LOAD: > + if (cpu_feature2 & CPUID2_RDRAND) { > + random_adaptor_register("rdrand", &random_ivy); > + EVENTHANDLER_INVOKE(random_adaptor_attach, = &random_ivy); > + return (0); > + } else { > +#ifndef KLD_MODULE > + if (bootverbose) > #endif > + printf( > + "%s: RDRAND feature is not present on this = CPU\n", > + random_ivy.ident); > +#ifdef KLD_MODULE > + return (ENXIO); > +#else > + return (0); > +#endif > + } > + } > + > + return (EINVAL); > +} > + > +RANDOM_ADAPTOR_MODULE(random_rdrand, rdrand_modevent, 1); >=20 > Modified: head/sys/dev/random/nehemiah.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/nehemiah.c Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/nehemiah.c Mon Jul 29 20:26:27 2013 = (r253779) > @@ -28,19 +28,20 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#include "opt_cpu.h" > - > -#ifdef PADLOCK_RNG > - > #include > #include > #include > #include > +#include > #include > #include > +#include >=20 > #include > +#include > +#include >=20 > +#include > #include >=20 > #define RANDOM_BLOCK_SIZE 256 > @@ -50,7 +51,7 @@ static void random_nehemiah_init(void); > static void random_nehemiah_deinit(void); > static int random_nehemiah_read(void *, int); >=20 > -struct random_systat random_nehemiah =3D { > +struct random_adaptor random_nehemiah =3D { > .ident =3D "Hardware, VIA Nehemiah", > .init =3D random_nehemiah_init, > .deinit =3D random_nehemiah_deinit, > @@ -208,4 +209,33 @@ random_nehemiah_read(void *buf, int c) > return (c); > } >=20 > +static int > +nehemiah_modevent(module_t mod, int type, void *unused) > +{ > + > + switch (type) { > + case MOD_LOAD: > + if (via_feature_rng & VIA_HAS_RNG) { > + random_adaptor_register("nehemiah", = &random_nehemiah); > + EVENTHANDLER_INVOKE(random_adaptor_attach, > + &random_nehemiah); > + return (0); > + } else { > +#ifndef KLD_MODULE > + if (bootverbose) > #endif > + printf( > + "%s: VIA RNG feature is not present on this = CPU\n", > + random_nehemiah.ident); > +#ifdef KLD_MODULE > + return (ENXIO); > +#else > + return (0); > +#endif > + } > + } > + > + return (EINVAL); > +} > + > +RANDOM_ADAPTOR_MODULE(nehemiah, nehemiah_modevent, 1); >=20 > Modified: head/sys/dev/random/probe.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/probe.c Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/probe.c Mon Jul 29 20:26:27 2013 = (r253779) > @@ -28,66 +28,35 @@ > #include > __FBSDID("$FreeBSD$"); >=20 > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > +#if defined(__amd64__) || defined(__i386__) > #include "opt_cpu.h" > #endif >=20 > -#include > #include > #include > #include > -#include > -#include > #include > -#include > - > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#include > -#include > -#include > -#include > -#endif >=20 > +#include > #include > -#include > - > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#ifdef PADLOCK_RNG > -extern struct random_systat random_nehemiah; > -#endif > -#ifdef RDRAND_RNG > -extern struct random_systat random_ivy; > -#endif > -#endif >=20 > void > -random_ident_hardware(struct random_systat **systat) > +random_ident_hardware(struct random_adaptor **adaptor) > { > + struct random_adaptor *tmp; > + int enable; >=20 > - /* Set default to software */ > - *systat =3D &random_yarrow; > + /* Set default to software (yarrow) */ > + *adaptor =3D random_adaptor_get("yarrow"); >=20 > /* Then go looking for hardware */ > -#if defined(__amd64__) || (defined(__i386__) && !defined(PC98)) > -#ifdef PADLOCK_RNG > - if (via_feature_rng & VIA_HAS_RNG) { > - int enable; > - > - enable =3D 1; > - TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); > - if (enable) > - *systat =3D &random_nehemiah; > - } > -#endif > -#ifdef RDRAND_RNG > - if (cpu_feature2 & CPUID2_RDRAND) { > - int enable; > - > - enable =3D 1; > - TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); > - if (enable) > - *systat =3D &random_ivy; > - } > -#endif > -#endif > + enable =3D 1; > + TUNABLE_INT_FETCH("hw.nehemiah_rng_enable", &enable); > + if (enable && (tmp =3D random_adaptor_get("nehemiah"))) > + *adaptor =3D tmp; > + > + enable =3D 1; > + TUNABLE_INT_FETCH("hw.ivy_rng_enable", &enable); > + if (enable && (tmp =3D random_adaptor_get("rdrand"))) > + *adaptor =3D tmp; > } >=20 > Modified: head/sys/dev/random/randomdev.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/randomdev.c Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/randomdev.c Mon Jul 29 20:26:27 2013 = (r253779) > @@ -70,12 +70,15 @@ static struct cdevsw random_cdevsw =3D { > .d_name =3D "random", > }; >=20 > -struct random_systat *random_systat; > +static struct random_adaptor *random_adaptor; > +static eventhandler_tag attach_tag; > +static int random_inited; > + >=20 > /* For use with make_dev(9)/destroy_dev(9). */ > static struct cdev *random_dev; >=20 > -/* Used to fake out unused random calls in random_systat */ > +/* Used to fake out unused random calls in random_adaptor */ > void > random_null_func(void) > { > @@ -88,8 +91,8 @@ random_close(struct cdev *dev __unused,=20 > { > if ((flags & FWRITE) && (priv_check(td, PRIV_RANDOM_RESEED) =3D=3D= 0) > && (securelevel_gt(td->td_ucred, 0) =3D=3D 0)) { > - (*random_systat->reseed)(); > - random_systat->seeded =3D 1; > + (*random_adaptor->reseed)(); > + random_adaptor->seeded =3D 1; > arc4rand(NULL, 0, 1); /* Reseed arc4random as well. */ > } >=20 > @@ -104,8 +107,8 @@ random_read(struct cdev *dev __unused, s > void *random_buf; >=20 > /* Blocking logic */ > - if (!random_systat->seeded) > - error =3D (*random_systat->block)(flag); > + if (!random_adaptor->seeded) > + error =3D (*random_adaptor->block)(flag); >=20 > /* The actual read */ > if (!error) { > @@ -114,7 +117,7 @@ random_read(struct cdev *dev __unused, s >=20 > while (uio->uio_resid > 0 && !error) { > c =3D MIN(uio->uio_resid, PAGE_SIZE); > - c =3D (*random_systat->read)(random_buf, c); > + c =3D (*random_adaptor->read)(random_buf, c); > error =3D uiomove(random_buf, c, uio); > } >=20 > @@ -139,7 +142,7 @@ random_write(struct cdev *dev __unused,=20 > error =3D uiomove(random_buf, c, uio); > if (error) > break; > - (*random_systat->write)(random_buf, c); > + (*random_adaptor->write)(random_buf, c); > } >=20 > free(random_buf, M_TEMP); > @@ -172,14 +175,37 @@ random_poll(struct cdev *dev __unused, i > int revents =3D 0; >=20 > if (events & (POLLIN | POLLRDNORM)) { > - if (random_systat->seeded) > + if (random_adaptor->seeded) > revents =3D events & (POLLIN | POLLRDNORM); > else > - revents =3D (*random_systat->poll) (events,td); > + revents =3D (*random_adaptor->poll) (events,td); > } > return (revents); > } >=20 > +static void > +random_initialize(void *p, struct random_adaptor *s) > +{ > + if (random_inited) { > + printf("random: <%s> already initialized\n", > + random_adaptor->ident); > + return; > + } > + > + random_adaptor =3D s; > + > + (s->init)(); > + > + printf("random: <%s> initialized\n", s->ident); > + > + random_dev =3D make_dev_credf(MAKEDEV_ETERNAL_KLD, = &random_cdevsw, > + RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, "random"); > + make_dev_alias(random_dev, "urandom"); /* XXX Deprecated */ > + > + /* mark random(4) as initialized, to avoid being called again */ > + random_inited =3D 1; > +} > + > /* ARGSUSED */ > static int > random_modevent(module_t mod __unused, int type, void *data __unused) > @@ -188,23 +214,29 @@ random_modevent(module_t mod __unused, i >=20 > switch (type) { > case MOD_LOAD: > - random_ident_hardware(&random_systat); > - (*random_systat->init)(); > + random_ident_hardware(&random_adaptor); >=20 > - if (bootverbose) > - printf("random: \n", > - random_systat->ident); > - > - random_dev =3D make_dev_credf(MAKEDEV_ETERNAL_KLD, = &random_cdevsw, > - RANDOM_MINOR, NULL, UID_ROOT, GID_WHEEL, 0666, = "random"); > - make_dev_alias(random_dev, "urandom"); /* XXX = Deprecated */ > + if (random_adaptor =3D=3D NULL) { > + printf( > + "random: No random adaptor attached, postponing = initialization\n"); > + attach_tag =3D = EVENTHANDLER_REGISTER(random_adaptor_attach, > + random_initialize, NULL, = EVENTHANDLER_PRI_ANY); > + } else { > + random_initialize(NULL, random_adaptor); > + } >=20 > break; >=20 > case MOD_UNLOAD: > - (*random_systat->deinit)(); > - > - destroy_dev(random_dev); > + if (random_adaptor !=3D NULL) { > + (*random_adaptor->deinit)(); > + destroy_dev(random_dev); > + } > + /* Unregister the event handler */ > + if (attach_tag !=3D NULL) { > + EVENTHANDLER_DEREGISTER(random_adaptor_attach, > + attach_tag); > + } >=20 > break; >=20 >=20 > Modified: head/sys/dev/random/randomdev.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/randomdev.h Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/randomdev.h Mon Jul 29 20:26:27 2013 = (r253779) > @@ -38,7 +38,7 @@ typedef void random_write_func_t(void *, > typedef int random_poll_func_t(int, struct thread *); > typedef void random_reseed_func_t(void); >=20 > -struct random_systat { > +struct random_adaptor { > struct selinfo rsel; > const char *ident; > int seeded; > @@ -51,7 +51,5 @@ struct random_systat { > random_reseed_func_t *reseed; > }; >=20 > -extern struct random_systat *random_systat; > - > -extern void random_ident_hardware(struct random_systat **); > +extern void random_ident_hardware(struct random_adaptor **); > extern void random_null_func(void); >=20 > Modified: head/sys/dev/random/randomdev_soft.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/dev/random/randomdev_soft.c Mon Jul 29 19:50:30 2013 = (r253778) > +++ head/sys/dev/random/randomdev_soft.c Mon Jul 29 20:26:27 2013 = (r253779) > @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > #include > @@ -50,6 +51,7 @@ __FBSDID("$FreeBSD$"); > #include > #include >=20 > +#include > #include > #include >=20 > @@ -63,7 +65,7 @@ static int random_yarrow_poll(int event, > static int random_yarrow_block(int flag); > static void random_yarrow_flush_reseed(void); >=20 > -struct random_systat random_yarrow =3D { > +struct random_adaptor random_yarrow =3D { > .ident =3D "Software, Yarrow", > .init =3D random_yarrow_init, > .deinit =3D random_yarrow_deinit, > @@ -103,7 +105,7 @@ static int random_kthread_control =3D 0; > static struct proc *random_kthread_proc; >=20 > /* List for the dynamic sysctls */ > -struct sysctl_ctx_list random_clist; > +static struct sysctl_ctx_list random_clist; >=20 > /* ARGSUSED */ > static int > @@ -120,25 +122,20 @@ random_yarrow_init(void) > { > int error, i; > struct harvest *np; > - struct sysctl_oid *random_o, *random_sys_o, = *random_sys_harvest_o; > + struct sysctl_oid *random_sys_o, *random_sys_harvest_o; > enum esource e; >=20 > - random_o =3D SYSCTL_ADD_NODE(&random_clist, > - SYSCTL_STATIC_CHILDREN(_kern), > - OID_AUTO, "random", CTLFLAG_RW, 0, > - "Software Random Number Generator"); > - > - random_yarrow_init_alg(&random_clist, random_o); > + random_yarrow_init_alg(&random_clist); >=20 > random_sys_o =3D SYSCTL_ADD_NODE(&random_clist, > - SYSCTL_CHILDREN(random_o), > + SYSCTL_STATIC_CHILDREN(_kern_random), > OID_AUTO, "sys", CTLFLAG_RW, 0, > "Entropy Device Parameters"); >=20 > SYSCTL_ADD_PROC(&random_clist, > SYSCTL_CHILDREN(random_sys_o), > OID_AUTO, "seeded", CTLTYPE_INT | CTLFLAG_RW, > - &random_systat->seeded, 1, random_check_boolean, "I", > + &random_yarrow.seeded, 1, random_check_boolean, "I", > "Seeded State"); >=20 > random_sys_harvest_o =3D SYSCTL_ADD_NODE(&random_clist, > @@ -362,10 +359,10 @@ random_yarrow_write(void *buf, int count > void > random_yarrow_unblock(void) > { > - if (!random_systat->seeded) { > - random_systat->seeded =3D 1; > - selwakeuppri(&random_systat->rsel, PUSER); > - wakeup(random_systat); > + if (!random_yarrow.seeded) { > + random_yarrow.seeded =3D 1; > + selwakeuppri(&random_yarrow.rsel, PUSER); > + wakeup(&random_yarrow); > } > (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, > ARC4_ENTR_HAVE); > @@ -377,10 +374,10 @@ random_yarrow_poll(int events, struct th >=20 > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** --Apple-Mail=_E0AA719C-1150-414D-968A-113B19AA18EA Content-Disposition: attachment; filename=smime.p7s Content-Type: application/pkcs7-signature; name=smime.p7s Content-Transfer-Encoding: base64 MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIEozCCBJ8w ggOHoAMCAQICCnDGsUgWa/KQbDEwDQYJKoZIhvcNAQEFBQAwgZExCzAJBgNVBAYTAkZSMQ0wCwYD VQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwGA1UEChMlTkVUQVNRIC0g U2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNRIENlcnRpZmljYXRp b24gQXV0aG9yaXR5MB4XDTEzMDEyODA4MzIxNloXDTE0MDEyODA4MzIxNlowgdIxCzAJBgNVBAYT AkZSMQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNjcTEuMCwGA1UEChMl TkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UECxMeTkVUQVNRIENl cnRpZmljYXRpb24gQXV0aG9yaXR5MRYwFAYDVQQDEw1GYWJpZW4gVEhPTUFTMScwJQYJKoZIhvcN AQkBFhhmYWJpZW4udGhvbWFzQG5ldGFzcS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK AoIBAQDGPW4/ExE5oultT1iyLXENhI+hSiMCOcV5alYZ9jSvbg51lnJaqrl4iMIKGSOtaKiiiICd WNMZLFviDvf8faW5fwvTy9RRaJoFKrKnSvl0Suy/cImRnGJQIj6587gpxLeeGoXXTKgMaVNWNsjT kh3aikBZy/3RLqiD7bEHMpq8nYtl9czn74DiXu2XQcmeCLVj5xZsj+Se6smKnuM8lkvi/rhUn52S +OkXgHFJwrfd/6OUMOt+aT/rWnsRGVxSsBG8l0p4d+5hHC5Lyt9d1r6gMYOXo6wwprcPzBr46dBA H4edS6pIJ0TmmMCsBbODy/Co0jkputL6e/SchgIQQqljAgMBAAGjgbUwgbIwHQYDVR0OBBYEFDWp SkuB9wp6x//Lis7oxL5I882dMB8GA1UdIwQYMBaAFCcq6x3ZRNo6F3NqCSAgySWo+X+yMAkGA1Ud EwQCMAAwDgYDVR0PAQH/BAQDAgPoMCMGA1UdEQQcMBqBGGZhYmllbi50aG9tYXNAbmV0YXNxLmNv bTARBglghkgBhvhCAQEEBAMCBLAwHQYDVR0lBBYwFAYIKwYBBQUHAwQGCCsGAQUFBwMCMA0GCSqG SIb3DQEBBQUAA4IBAQBZ8Uh40v1su4Vpbb/eJzgoILfhCuABDIE7oGS2Aucequ1CD6LSpiu7NFQs pdORJHu5yteRB8Hclz9ADXqUQj2t+HOu93YiJngKUEIom1569ZILH5ocST22/TT5sHp182ZR72T5 JPwjNDIh+RSvOn1rouMBnUiFjRhlMMCjDJRUcmpIFVaiRFF2SesxmI2TX+kOJKBWEnCGEmJPuSpW MDzDF3uD/G/NsxG4CuzM0jL67rs2hX8kFYwgA9qativSyLVBuET8bzkSQcbDieX10uLE0gwKjCO4 GghNJEf2zTy5PoaofSJY85EsQosJJHfEezMsiyAHCeXu700q6XQ1xeEeMYIDkzCCA48CAQEwgaAw gZExCzAJBgNVBAYTAkZSMQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQnQXNj cTEuMCwGA1UEChMlTkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUGA1UE CxMeTkVUQVNRIENlcnRpZmljYXRpb24gQXV0aG9yaXR5AgpwxrFIFmvykGwxMAkGBSsOAwIaBQCg ggHHMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTEzMDgwMjA4MDU1 N1owIwYJKoZIhvcNAQkEMRYEFHJwHbGvvqIL6yttC/yGQGRGiuzOMIGxBgkrBgEEAYI3EAQxgaMw gaAwgZExCzAJBgNVBAYTAkZSMQ0wCwYDVQQIEwROb3JkMRowGAYDVQQHExFWaWxsZW5ldXZlIGQn QXNjcTEuMCwGA1UEChMlTkVUQVNRIC0gU2VjdXJlIEludGVybmV0IENvbm5lY3Rpdml0eTEnMCUG A1UECxMeTkVUQVNRIENlcnRpZmljYXRpb24gQXV0aG9yaXR5AgpwxrFIFmvykGwxMIGzBgsqhkiG 9w0BCRACCzGBo6CBoDCBkTELMAkGA1UEBhMCRlIxDTALBgNVBAgTBE5vcmQxGjAYBgNVBAcTEVZp bGxlbmV1dmUgZCdBc2NxMS4wLAYDVQQKEyVORVRBU1EgLSBTZWN1cmUgSW50ZXJuZXQgQ29ubmVj dGl2aXR5MScwJQYDVQQLEx5ORVRBU1EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkCCnDGsUgWa/KQ bDEwDQYJKoZIhvcNAQEBBQAEggEAnQ9yhfoZhNrXbyXeYYbki6h3oQULo34YvzuZg6KWEaFqT458 Dr9Z5TG61KoWt6VZ8FQVTHVbD002dMN0zazIvFV5DYC4i9xiQCBODLIV0QbRGhq8Gm9y1nFhs7Af rDj1zcTkFgriKVotrYsH25g1AnHdR/bjion91hG0Z73A9xmbed1j5Jji6o3UiQB8YIbu7JP0OV/o lHIRTVFsUDc0Z3HpeIyYDnJCsWfx1RAYIlicaIKmIz5w8sr2j7DLPlxWUjLnpP8wF0wJRMOvBPfC +PfFUPcLEMLgyEbp0giG9L8hedehalEq7LOmK0YB5WTTZHfR9/PjZmmjFPPAXOvdgQAAAAAAAA== --Apple-Mail=_E0AA719C-1150-414D-968A-113B19AA18EA-- From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 13:06:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE79631A; Fri, 2 Aug 2013 13:06:49 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ABFA4261A; Fri, 2 Aug 2013 13:06:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72D6nGx031003; Fri, 2 Aug 2013 13:06:49 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72D6n3Y031002; Fri, 2 Aug 2013 13:06:49 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201308021306.r72D6n3Y031002@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 2 Aug 2013 13:06:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253885 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 13:06:49 -0000 Author: glebius Date: Fri Aug 2 13:06:49 2013 New Revision: 253885 URL: http://svnweb.freebsd.org/changeset/base/253885 Log: Remove extra zeroing after M_ZERO allocation. Modified: head/sys/kern/vfs_aio.c Modified: head/sys/kern/vfs_aio.c ============================================================================== --- head/sys/kern/vfs_aio.c Fri Aug 2 06:31:09 2013 (r253884) +++ head/sys/kern/vfs_aio.c Fri Aug 2 13:06:49 2013 (r253885) @@ -1595,8 +1595,6 @@ aio_aqueue(struct thread *td, struct aio } aiocbe = uma_zalloc(aiocb_zone, M_WAITOK | M_ZERO); - aiocbe->inputcharge = 0; - aiocbe->outputcharge = 0; knlist_init_mtx(&aiocbe->klist, AIO_MTX(ki)); error = ops->copyin(job, &aiocbe->uaiocb); From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 14:14:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 845CC42F; Fri, 2 Aug 2013 14:14:24 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62A662893; Fri, 2 Aug 2013 14:14:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72EENZs051364; Fri, 2 Aug 2013 14:14:23 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72EENmb051361; Fri, 2 Aug 2013 14:14:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201308021414.r72EENmb051361@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 2 Aug 2013 14:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253886 - in head: . usr.bin/find X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 14:14:24 -0000 Author: jilles Date: Fri Aug 2 14:14:23 2013 New Revision: 253886 URL: http://svnweb.freebsd.org/changeset/base/253886 Log: find: Allow -delete to delete files given as arguments. Formerly, a command like find dir1/dir2 -delete would delete everything under dir1/dir2 but not dir1/dir2 itself. When -L is not specified and "." can be opened, the fts(3) code underlying find(1) is careful to avoid following symlinks or being dropped in different locations by moving the directory fts is currently traversing. If a problematic concurrent modification is detected, fts will not enter the directory or abort. Files found in the search are returned via the current working directory and a pathname not containing a slash. For paranoia, find(1) verifies this when -delete is used. However, it is too paranoid about the root of the traversal. It is already assumed that the initial pathname does not refer to directories or symlinks that might be replaced by untrusted users; otherwise, the whole traversal would be unsafe. Therefore, it is not necessary to do the check for fts_level == FTS_ROOTLEVEL. Deleting the pathnames given as arguments can be prevented without error messages using -mindepth 1 or by changing directory and passing "." as argument to find. This works in the old as well as the new version of find. Tested by: Kurt Lidl Reviewed by: jhb Modified: head/UPDATING head/usr.bin/find/function.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Fri Aug 2 13:06:49 2013 (r253885) +++ head/UPDATING Fri Aug 2 14:14:23 2013 (r253886) @@ -31,6 +31,19 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130802: + find -delete can now delete the pathnames given as arguments, + instead of only files found below them or if the pathname did + not contain any slashes. Formerly, the following error message + would result: + + find: -delete: : relative path potentially not safe + + Deleting the pathnames given as arguments can be prevented + without error messages using -mindepth 1 or by changing + directory and passing "." as argument to find. This works in the + old as well as the new version of find. + 20130726: Behavior of devfs rules path matching has been changed. Pattern is now always matched against fully qualified devfs Modified: head/usr.bin/find/function.c ============================================================================== --- head/usr.bin/find/function.c Fri Aug 2 13:06:49 2013 (r253885) +++ head/usr.bin/find/function.c Fri Aug 2 14:14:23 2013 (r253886) @@ -442,7 +442,8 @@ f_delete(PLAN *plan __unused, FTSENT *en errx(1, "-delete: forbidden when symlinks are followed"); /* Potentially unsafe - do not accept relative paths whatsoever */ - if (strchr(entry->fts_accpath, '/') != NULL) + if (entry->fts_level > FTS_ROOTLEVEL && + strchr(entry->fts_accpath, '/') != NULL) errx(1, "-delete: %s: relative path potentially not safe", entry->fts_accpath); From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 14:44:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D6C65F80; Fri, 2 Aug 2013 14:44:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C31D92A61; Fri, 2 Aug 2013 14:44:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72EiBVo059772; Fri, 2 Aug 2013 14:44:11 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72EiBk2059771; Fri, 2 Aug 2013 14:44:11 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201308021444.r72EiBk2059771@svn.freebsd.org> From: Hiroki Sato Date: Fri, 2 Aug 2013 14:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253887 - head/sys/dev/filemon X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 14:44:11 -0000 Author: hrs Date: Fri Aug 2 14:44:11 2013 New Revision: 253887 URL: http://svnweb.freebsd.org/changeset/base/253887 Log: Add p_candebug() check to FILEMON_SET_PID ioctl. Discussed with: sjg MFC after: 3 days Modified: head/sys/dev/filemon/filemon.c Modified: head/sys/dev/filemon/filemon.c ============================================================================== --- head/sys/dev/filemon/filemon.c Fri Aug 2 14:14:23 2013 (r253886) +++ head/sys/dev/filemon/filemon.c Fri Aug 2 14:44:11 2013 (r253887) @@ -150,6 +150,7 @@ filemon_ioctl(struct cdev *dev, u_long c { int error = 0; struct filemon *filemon; + struct proc *p; devfs_get_cdevpriv((void **) &filemon); @@ -163,7 +164,13 @@ filemon_ioctl(struct cdev *dev, u_long c /* Set the monitored process ID. */ case FILEMON_SET_PID: - filemon->pid = *((pid_t *)data); + p = pfind(*((pid_t *)data)); + if (p == NULL) + return (EINVAL); + error = p_candebug(curthread, p); + if (error == 0) + filemon->pid = p->p_pid; + PROC_UNLOCK(p); break; default: From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 15:22:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7D53EB83; Fri, 2 Aug 2013 15:22:23 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3ECDC2C30; Fri, 2 Aug 2013 15:22:23 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 0E1C41203CA; Fri, 2 Aug 2013 17:22:05 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id E399B28494; Fri, 2 Aug 2013 17:22:04 +0200 (CEST) Date: Fri, 2 Aug 2013 17:22:04 +0200 From: Jilles Tjoelker To: Hiroki Sato Subject: Re: svn commit: r253887 - head/sys/dev/filemon Message-ID: <20130802152204.GA1880@stack.nl> References: <201308021444.r72EiBk2059771@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201308021444.r72EiBk2059771@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, sjg@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 15:22:23 -0000 On Fri, Aug 02, 2013 at 02:44:11PM +0000, Hiroki Sato wrote: > Author: hrs > Date: Fri Aug 2 14:44:11 2013 > New Revision: 253887 > URL: http://svnweb.freebsd.org/changeset/base/253887 > Log: > Add p_candebug() check to FILEMON_SET_PID ioctl. > Discussed with: sjg > MFC after: 3 days > Modified: > head/sys/dev/filemon/filemon.c > Modified: head/sys/dev/filemon/filemon.c > ============================================================================== > --- head/sys/dev/filemon/filemon.c Fri Aug 2 14:14:23 2013 (r253886) > +++ head/sys/dev/filemon/filemon.c Fri Aug 2 14:44:11 2013 (r253887) > @@ -150,6 +150,7 @@ filemon_ioctl(struct cdev *dev, u_long c > { > int error = 0; > struct filemon *filemon; > + struct proc *p; > > devfs_get_cdevpriv((void **) &filemon); > > @@ -163,7 +164,13 @@ filemon_ioctl(struct cdev *dev, u_long c > > /* Set the monitored process ID. */ > case FILEMON_SET_PID: > - filemon->pid = *((pid_t *)data); > + p = pfind(*((pid_t *)data)); > + if (p == NULL) > + return (EINVAL); > + error = p_candebug(curthread, p); > + if (error == 0) > + filemon->pid = p->p_pid; > + PROC_UNLOCK(p); > break; > > default: You can simplify the code using the fairly new pget(). This will also fix the incorrect errno when the process does not exist (should be [ESRCH]). This change is a step in the right direction but is incomplete. Although the check protects currently running processes, I do not see how it prevents tracing a process that gets the same PID again after the original target process has exited. This not only leaks sensitive information but may also prevent tracing by the legitimate owner of the process (because only one filemon will write events for a process). This could be fixed by setting filemon->pid = -1 in filemon_wrapper_sys_exit() and not allowing P_WEXIT and zombies in FILEMON_SET_PID (PGET_NOTWEXIT disallows both). An [EBUSY] when there is already a filemon monitoring the process may also be useful (or writing copies of the events to all attached filemons). -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 17:13:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D15EF86C; Fri, 2 Aug 2013 17:13:29 +0000 (UTC) (envelope-from ache@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BEB262178; Fri, 2 Aug 2013 17:13:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72HDTtF006560; Fri, 2 Aug 2013 17:13:29 GMT (envelope-from ache@svn.freebsd.org) Received: (from ache@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72HDT0j006559; Fri, 2 Aug 2013 17:13:29 GMT (envelope-from ache@svn.freebsd.org) Message-Id: <201308021713.r72HDT0j006559@svn.freebsd.org> From: "Andrey A. Chernov" Date: Fri, 2 Aug 2013 17:13:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253888 - stable/9/usr.bin/grep/regex X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 17:13:29 -0000 Author: ache Date: Fri Aug 2 17:13:29 2013 New Revision: 253888 URL: http://svnweb.freebsd.org/changeset/base/253888 Log: MFC r253810 grep -i does not work for simple patterns and single byte locales, like LANG=ru_RU.KOI8-R grep -i Fix it. Approved by: re (delphij,kib) Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- stable/9/usr.bin/grep/regex/tre-fastmatch.c Fri Aug 2 14:44:11 2013 (r253887) +++ stable/9/usr.bin/grep/regex/tre-fastmatch.c Fri Aug 2 17:13:29 2013 (r253888) @@ -395,7 +395,7 @@ static int fastcmp(const fastmatch_t *fg if (p == NULL) \ return REG_ESPACE; \ for (unsigned int i = 0; i < plen; i++) \ - p[i] = tolower(pat[i]); \ + p[i] = tolower((unsigned char)pat[i]); \ _CALC_BMGS(arr, p, plen); \ xfree(p); \ } \ @@ -1030,7 +1030,7 @@ fastcmp(const fastmatch_t *fg, const voi continue; /* Compare */ - if (fg->icase ? (tolower(pat_byte[i]) == tolower(str_byte[i])) + if (fg->icase ? (tolower((unsigned char)pat_byte[i]) == tolower((unsigned char)str_byte[i])) : (pat_byte[i] == str_byte[i])) continue; } From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 17:44:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 135AC128; Fri, 2 Aug 2013 17:44:20 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F3DC422DE; Fri, 2 Aug 2013 17:44:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72HiJIF015639; Fri, 2 Aug 2013 17:44:19 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72HiJuL015638; Fri, 2 Aug 2013 17:44:19 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308021744.r72HiJuL015638@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 2 Aug 2013 17:44:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253889 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 17:44:20 -0000 Author: np Date: Fri Aug 2 17:44:19 2013 New Revision: 253889 URL: http://svnweb.freebsd.org/changeset/base/253889 Log: Fix previous commit (r253873). "cong" has one bit per channel but the congestion channel map has 1 nibble per channel. So bits wxyz need to be blown up into 000w000x000y000z. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Fri Aug 2 17:13:29 2013 (r253888) +++ head/sys/dev/cxgbe/t4_sge.c Fri Aug 2 17:44:19 2013 (r253889) @@ -1878,7 +1878,16 @@ alloc_iq_fl(struct port_info *pi, struct param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DMAQ) | V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DMAQ_CONM_CTXT) | V_FW_PARAMS_PARAM_YZ(iq->cntxt_id); - val = cong ? cong | 2 << 19 : 1 << 19; + if (cong == 0) + val = 1 << 19; + else { + val = 2 << 19; + for (i = 0; i < 4; i++) { + if (cong & (1 << i)) + val |= 1 << (i << 2); + } + } + rc = -t4_set_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); if (rc != 0) { /* report error but carry on */ From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 18:05:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 08383569; Fri, 2 Aug 2013 18:05:43 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D191C23C5; Fri, 2 Aug 2013 18:05:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72I5gov021842; Fri, 2 Aug 2013 18:05:42 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72I5grG021841; Fri, 2 Aug 2013 18:05:42 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201308021805.r72I5grG021841@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 2 Aug 2013 18:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253890 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 18:05:43 -0000 Author: np Date: Fri Aug 2 18:05:42 2013 New Revision: 253890 URL: http://svnweb.freebsd.org/changeset/base/253890 Log: Display temperature sensor data. Shows -1 if sensor not available on the card. # sysctl dev.t4nex.0.temperature # sysctl dev.t5nex.0.temperature Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Aug 2 17:44:19 2013 (r253889) +++ head/sys/dev/cxgbe/t4_main.c Fri Aug 2 18:05:42 2013 (r253890) @@ -379,6 +379,7 @@ static int sysctl_holdoff_pktc_idx(SYSCT static int sysctl_qsize_rxq(SYSCTL_HANDLER_ARGS); static int sysctl_qsize_txq(SYSCTL_HANDLER_ARGS); static int sysctl_handle_t4_reg64(SYSCTL_HANDLER_ARGS); +static int sysctl_temperature(SYSCTL_HANDLER_ARGS); #ifdef SBUF_DRAIN static int sysctl_cctrl(SYSCTL_HANDLER_ARGS); static int sysctl_cim_ibq_obq(SYSCTL_HANDLER_ARGS); @@ -4223,6 +4224,10 @@ t4_sysctls(struct adapter *sc) SYSCTL_ADD_INT(ctx, children, OID_AUTO, "nfilters", CTLFLAG_RD, NULL, sc->tids.nftids, "number of filters"); + SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "temperature", CTLTYPE_INT | + CTLFLAG_RD, sc, 0, sysctl_temperature, "A", + "chip temperature (in Celsius)"); + t4_sge_sysctls(sc, ctx, children); #ifdef SBUF_DRAIN @@ -4865,6 +4870,31 @@ sysctl_handle_t4_reg64(SYSCTL_HANDLER_AR return (sysctl_handle_64(oidp, &val, 0, req)); } +static int +sysctl_temperature(SYSCTL_HANDLER_ARGS) +{ + struct adapter *sc = arg1; + int rc, t; + uint32_t param, val; + + rc = begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4temp"); + if (rc) + return (rc); + param = V_FW_PARAMS_MNEM(FW_PARAMS_MNEM_DEV) | + V_FW_PARAMS_PARAM_X(FW_PARAMS_PARAM_DEV_DIAG) | + V_FW_PARAMS_PARAM_Y(FW_PARAM_DEV_DIAG_TMP); + rc = -t4_query_params(sc, sc->mbox, sc->pf, 0, 1, ¶m, &val); + end_synchronized_op(sc, 0); + if (rc) + return (rc); + + /* unknown is returned as 0 but we display -1 in that case */ + t = val == 0 ? -1 : val; + + rc = sysctl_handle_int(oidp, &t, 0, req); + return (rc); +} + #ifdef SBUF_DRAIN static int sysctl_cctrl(SYSCTL_HANDLER_ARGS) From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 19:12:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C016D8F8; Fri, 2 Aug 2013 19:12:13 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB4A22687; Fri, 2 Aug 2013 19:12:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72JCD7j068911; Fri, 2 Aug 2013 19:12:13 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72JCD4r068904; Fri, 2 Aug 2013 19:12:13 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201308021912.r72JCD4r068904@svn.freebsd.org> From: Peter Wemm Date: Fri, 2 Aug 2013 19:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253893 - in vendor/serf/dist: . auth buckets build X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:12:13 -0000 Author: peter Date: Fri Aug 2 19:12:12 2013 New Revision: 253893 URL: http://svnweb.freebsd.org/changeset/base/253893 Log: Import serf-1.3.0 Added: vendor/serf/dist/SConstruct vendor/serf/dist/auth/auth_spnego.c vendor/serf/dist/auth/auth_spnego.h vendor/serf/dist/auth/auth_spnego_gss.c vendor/serf/dist/auth/auth_spnego_sspi.c vendor/serf/dist/build/check.py (contents, props changed) vendor/serf/dist/build/serf.pc.in Deleted: vendor/serf/dist/Makefile.in vendor/serf/dist/auth/auth_kerb.c vendor/serf/dist/auth/auth_kerb.h vendor/serf/dist/auth/auth_kerb_gss.c vendor/serf/dist/auth/auth_kerb_sspi.c vendor/serf/dist/build/apr_common.m4 vendor/serf/dist/build/config.guess vendor/serf/dist/build/config.sub vendor/serf/dist/build/find_apr.m4 vendor/serf/dist/build/find_apu.m4 vendor/serf/dist/build/get-version.sh vendor/serf/dist/build/install.sh vendor/serf/dist/build/serf.def vendor/serf/dist/buildconf vendor/serf/dist/config.layout vendor/serf/dist/configure vendor/serf/dist/configure.in vendor/serf/dist/serf.mak vendor/serf/dist/serf.pc.in vendor/serf/dist/serfmake Modified: vendor/serf/dist/CHANGES vendor/serf/dist/README vendor/serf/dist/auth/auth.c vendor/serf/dist/auth/auth.h vendor/serf/dist/auth/auth_basic.c vendor/serf/dist/auth/auth_digest.c vendor/serf/dist/buckets/aggregate_buckets.c vendor/serf/dist/buckets/buckets.c vendor/serf/dist/buckets/dechunk_buckets.c vendor/serf/dist/buckets/headers_buckets.c vendor/serf/dist/buckets/limit_buckets.c vendor/serf/dist/buckets/request_buckets.c vendor/serf/dist/buckets/response_buckets.c vendor/serf/dist/buckets/simple_buckets.c vendor/serf/dist/buckets/ssl_buckets.c vendor/serf/dist/build/gen_def.py vendor/serf/dist/context.c vendor/serf/dist/incoming.c vendor/serf/dist/outgoing.c vendor/serf/dist/serf.h vendor/serf/dist/serf_bucket_types.h vendor/serf/dist/serf_bucket_util.h vendor/serf/dist/serf_private.h vendor/serf/dist/ssltunnel.c Modified: vendor/serf/dist/CHANGES ============================================================================== --- vendor/serf/dist/CHANGES Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/CHANGES Fri Aug 2 19:12:12 2013 (r253893) @@ -1,4 +1,20 @@ -Serf 1.2.1 [2013-06-03, from /tags/1.2.1] +Serf 1.3.0 [2013-07-23, from /tags/1.3.0] + Fix issue 83: use PATH rather than URI within an ssltunnel (r1952) + Fix issue 108: improved error reporting from the underlying socket (r1951) + NEW: Switch to the SCons build system; retire serfmake, serf.mak, autotools + Improved Basic and Digest authentication: + - remember credentials on a per-server basis + - properly manage authentication realms + - continue functioning when a server sets KeepAlive: off + Windows: add support for NTLM authentication + Improved 2617 compliance: always use strongest authentication (r1968,1971) + Fixed bugs with proxy authentication and SSL tunneling through a proxy + Fixed bugs the response parser (r2032,r2036) + SSL connection performance improvements + Huge expansion of the test suite + + +Serf 1.2.1 [2013-06-03, from /tags/1.2.1, r1906] Fix issue 95: add gssapi switches to configure (r1864, r1900) Fix issue 97: skip mmap bucket if APR_HAS_MMAP is undefined (r1877) Fix issue 100: building against an old Windows Platform SDK (r1881) @@ -19,7 +35,7 @@ Serf 1.2.0 [2013-02-22, from /tags/1.2.0 Fixed issue 93: cleanup-after-fork interferes with parent (r1714) Fixed most of issue 89: Support REAL SPNEGO authentication Enable Negotiate/Kerberos support for proxy servers. - Return error when C-L, chunked, gzip encoded response bodies where + Return error when C-L, chunked, gzip encoded response bodies were truncated (due to aborted connection) (r1688) Add a logging mechanism that can be enabled at compile-time. Don't lookup server address if a proxy was configured. (r1706) Modified: vendor/serf/dist/README ============================================================================== --- vendor/serf/dist/README Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/README Fri Aug 2 19:12:12 2013 (r253893) @@ -14,25 +14,67 @@ kept to a minimum to provide high perfor ---- -Quick guide for the impatient +1. INSTALL - (Unix) - % ./configure - % make - % make install +1.1. SCons build system ----- +serf uses SCons 2.x for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not +have permissions, then you can download and install the "local" +version into your home directory. When installed privately, simply +create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. + +Fetch the scons-local package: + http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz + + +1.2 Building serf + +To build serf: + +$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix + +The switches are recorded into .saved_config, so they only need to be +specified the first time scons is run. + +PREFIX should specify where serf should be installed. PREFIX defaults to +/usr/local. + +The default for the other three switches (APR, APU, OPENSSL) is /usr. + +The build system looks for apr-1-config at $APR/bin/apr-1-config, or +the path should indicate apr-1-config itself. Similarly for the path +to apu-1-config. + +OPENSSL should specify the root of the install (eg. /opt/local). The +includes will be found OPENSSL/include and libraries at OPENSSL/lib. + +If you wish to use VPATH-style builds (where objects are created in a +distinct directory from the source), you can use: + +$ scons -Y /path/to/serf/source + +At any point, the current settings can be examined: + +$ scons --help + + +1.3 Running the test suite + +$ scons check + + +1.4 Installing serf -Building serf from a Subversion checkout (non-packaged releases) +$ scons install -We suggest that you try out 'serfmake'. +Note that the PREFIX variable should have been specified in a previous +invocation of scons (and saved into .saved_config), or it can be +specified on the install command line: - % ./serfmake --prefix=/usr/local/serf --with-apr=/usr/local/apr install +$ scons PREFIX=/some/path install -If you want to use the autoconf build system and are using a Subversion -checkout, you need to run buildconf and have APR and APR-util sources handy. - % ./buildconf --with-apr=/path/to/apr --with-apr-util=/path/to/apr-util - (By default, buildconf will look in . and ../ for apr and apr-util.) +1.4 Cleaning up the build -Then, you can use ./configure, make, etc. +$ scons -c Added: vendor/serf/dist/SConstruct ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/dist/SConstruct Fri Aug 2 19:12:12 2013 (r253893) @@ -0,0 +1,438 @@ +# -*- python -*- +# +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import os +import re + +HEADER_FILES = ['serf.h', + 'serf_bucket_types.h', + 'serf_bucket_util.h', + ] + +# where we save the configuration variables +SAVED_CONFIG = '.saved_config' + +# Variable class that does no validation on the input +def _converter(val): + """ + """ + if val == 'none': + val = [] + else: + val = val.split(',') + return val + +def RawListVariable(key, help, default): + """ + The input parameters describe a 'raw string list' option. This class + accepts a comma separated list and converts it to a space separated + list. + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +# default directories +if sys.platform == 'win32': + default_libdir='..' + default_prefix='Debug' +else: + default_libdir='/usr' + default_prefix='/usr/local' + +opts = Variables(files=[SAVED_CONFIG]) +opts.AddVariables( + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, + PathVariable.PathIsDir), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('APU', + "Path to apu-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('OPENSSL', + "Path to OpenSSL's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('ZLIB', + "Path to zlib's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('GSSAPI', + "Path to GSSAPI's install area", + None, + None), + BoolVariable('DEBUG', + "Enable debugging info and strict compile warnings", + False), + BoolVariable('APR_STATIC', + "Enable using a static compiled APR", + False), + RawListVariable('CC', "Command name or path of the C compiler", None), + RawListVariable('CFLAGS', "Extra flags for the C compiler (comma separated)", + None), + RawListVariable('LIBS', "Extra libraries passed to the linker, " + "e.g. -l (comma separated)", None), + RawListVariable('LINKFLAGS', "Extra flags for the linker (comma separated)", + None), + RawListVariable('CPPFLAGS', "Extra flags for the C preprocessor " + "(comma separated)", None), + ) + +if sys.platform == 'win32': + opts.AddVariables( + # By default SCons builds for the host platform on Windows, when using + # a supported compiler (E.g. VS2010/VS2012). Allow overriding + + # Note that Scons 1.3 only supports this on Windows and only when + # constructing Environment(). Later changes to TARGET_ARCH are ignored + EnumVariable('TARGET_ARCH', + "Platform to build for (x86|x64|win32|x86_64)", + 'x86', + allowed_values=('x86', 'x86_64', 'ia64'), + map={'X86' : 'x86', + 'win32': 'x86', + 'Win32': 'x86', + 'x64' : 'x86_64', + 'X64' : 'x86_64' + }), + + EnumVariable('MSVC_VERSION', + "Visual C++ to use for building (E.g. 11.0, 9.0)", + None, + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + ), + + # We always documented that we handle an install layout, but in fact we + # hardcoded source layouts. Allow disabling this behavior. + # ### Fix default? + BoolVariable('SOURCE_LAYOUT', + "Assume a source layout instead of install layout", + True), + ) + +env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], + ) + +env.Append(BUILDERS = { + 'GenDef' : + Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', + suffix='.def', src_suffix='.h') + }) + +match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' + 'SERF_MINOR_VERSION ([0-9]+).*' + 'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) +MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +env.Append(MAJOR=str(MAJOR)) + +# Calling external programs is okay if we're not cleaning or printing help. +# (cleaning: no sense in fetching information; help: we may not know where +# they are) +CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help')) + + +# HANDLING OF OPTION VARIABLES + +unknown = opts.UnknownVariables() +if unknown: + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) + +apr = str(env['APR']) +apu = str(env['APU']) +zlib = str(env['ZLIB']) +gssapi = env.get('GSSAPI', None) + +if gssapi and os.path.isdir(gssapi): + krb5_config = os.path.join(gssapi, 'bin', 'krb5-config') + if os.path.isfile(krb5_config): + gssapi = krb5_config + env['GSSAPI'] = krb5_config + +debug = env.get('DEBUG', None) +aprstatic = env.get('APR_STATIC', None) + +Help(opts.GenerateHelpText(env)) +opts.Save(SAVED_CONFIG, env) + + +# PLATFORM-SPECIFIC BUILD TWEAKS + +thisdir = os.getcwd() +libdir = '$PREFIX/lib' +incdir = '$PREFIX/include/serf-$MAJOR' + +LIBNAME = 'libserf-${MAJOR}' +if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME +else: + LIBNAMESTATIC = 'serf-${MAJOR}' + +env.Append(RPATH=libdir, + PDB='${TARGET.filebase}.pdb') + +if sys.platform == 'darwin': +# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + # 'man ld' says positive non-zero for the first number, so we add one. + # Mac's interpretation of compatibility is the same as our MINOR version. + env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) + env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + +if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') + env.Append(CCFLAGS=[ + '-Wdeclaration-after-statement', + '-Wmissing-prototypes', + ]) + + ### -Wall is not available on Solaris + if sys.platform != 'sunos5': + env.Append(CCFLAGS='-Wall') + + if debug: + env.Append(CCFLAGS='-g') + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') + + ### works for Mac OS. probably needs to change + env.Append(LIBS=['ssl', 'crypto', 'z', ]) + + if sys.platform == 'sunos5': + env.Append(LIBS='m') +else: + # Warning level 4, no unused argument warnings + env.Append(CCFLAGS=['/W4', '/wd4100']) + + # Choose runtime and optimization + if debug: + # Disable optimizations for debugging, use debug DLL runtime + env.Append(CCFLAGS=['/Od', '/MDd']) + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + # Optimize for speed, use DLL runtime + env.Append(CCFLAGS=['/O2', '/MD']) + env.Append(CPPDEFINES='NDEBUG') + +# PLAN THE BUILD +SHARED_SOURCES = [] +if sys.platform == 'win32': + env.GenDef(['serf.h','serf_bucket_types.h', 'serf_bucket_util.h']) + SHARED_SOURCES.append(['serf.def']) + +SOURCES = Glob('*.c') + Glob('buckets/*.c') + Glob('auth/*.c') + +lib_static = env.StaticLibrary(LIBNAMESTATIC, SOURCES) +lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES) + +if aprstatic: + env.Append(CPPDEFINES=['APR_DECLARE_STATIC', 'APU_DECLARE_STATIC']) + +if sys.platform == 'win32': + env.Append(LIBS=['user32.lib', 'advapi32.lib', 'gdi32.lib', 'ws2_32.lib', + 'crypt32.lib', 'mswsock.lib', 'rpcrt4.lib', 'secur32.lib']) + + # Get apr/apu information into our build + env.Append(CPPDEFINES=['WIN32','WIN32_LEAN_AND_MEAN','NOUSER', + 'NOGDI', 'NONLS','NOCRYPT']) + + if env.get('TARGET_ARCH', None) == 'x86_64': + env.Append(CPPDEFINES=['WIN64']) + + if aprstatic: + apr_libs='apr-1.lib' + apu_libs='aprutil-1.lib' + else: + apr_libs='libapr-1.lib' + apu_libs='libaprutil-1.lib' + + env.Append(LIBS=[apr_libs, apu_libs]) + if not env.get('SOURCE_LAYOUT', None): + env.Append(LIBPATH=['$APR/lib', '$APU/lib'], + CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1']) + elif aprstatic: + env.Append(LIBPATH=['$APR/LibR','$APU/LibR'], + CPPPATH=['$APR/include', '$APU/include']) + else: + env.Append(LIBPATH=['$APR/Release','$APU/Release'], + CPPPATH=['$APR/include', '$APU/include']) + + # zlib + env.Append(LIBS='zlib.lib') + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') + else: + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') + + # openssl + env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') + elif 0: # opensslstatic: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') + else: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') +else: + if os.path.isdir(apr): + apr = os.path.join(apr, 'bin', 'apr-1-config') + env['APR'] = apr + if os.path.isdir(apu): + apu = os.path.join(apu, 'bin', 'apu-1-config') + env['APU'] = apu + + ### we should use --cc, but that is giving some scons error about an implict + ### dependency upon gcc. probably ParseConfig doesn't know what to do with + ### the apr-1-config output + if CALLOUT_OKAY: + env.ParseConfig('$APR --cflags --cppflags --ldflags --includes' + ' --link-ld --libs') + env.ParseConfig('$APU --ldflags --includes --link-ld --libs') + + ### there is probably a better way to run/capture output. + ### env.ParseConfig() may be handy for getting this stuff into the build + if CALLOUT_OKAY: + apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip() + apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip() + else: + apr_libs = '' + apu_libs = '' + + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') + + +# If build with gssapi, get its information and define SERF_HAVE_GSSAPI +if gssapi and CALLOUT_OKAY: + env.ParseConfig('$GSSAPI --libs gssapi') + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') +if sys.platform == 'win32': + env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) + +# On Solaris, the -R values that APR describes never make it into actual +# RPATH flags. We'll manually map all directories in LIBPATH into new +# flags to set RPATH values. +if sys.platform == 'sunos5': + for d in env['LIBPATH']: + env.Append(RPATH=d) + +# Set up the construction of serf-*.pc +# TODO: add gssapi libs +pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), + env.File('build/serf.pc.in'), + SUBST_DICT = { + '@MAJOR@': str(MAJOR), + '@PREFIX@': '$PREFIX', + '@INCLUDE_SUBDIR@': 'serf-%d' % (MAJOR,), + '@VERSION@': '%d.%d.%d' % (MAJOR, MINOR, PATCH), + '@LIBS@': '%s %s -lz' % (apu_libs, apr_libs), + }) + +env.Default(lib_static, lib_shared, pkgconfig) + +if CALLOUT_OKAY: + conf = Configure(env) + + ### some configuration stuffs + + env = conf.Finish() + + +# INSTALLATION STUFF + +install_static = env.Install(libdir, lib_static) +install_shared = env.Install(libdir, lib_shared) + +if sys.platform == 'darwin': + install_shared_path = install_shared[0].abspath + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (install_shared_path, + install_shared_path))) + ### construct shared lib symlinks. this also means install the lib + ### as libserf-2.1.0.0.dylib, then add the symlinks. + ### note: see InstallAs + +env.Alias('install-lib', [install_static, install_shared, + ]) +env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) +env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), + pkgconfig)) +env.Alias('install', ['install-lib', 'install-inc', 'install-pc', ]) + + +# TESTS +### make move to a separate scons file in the test/ subdir? + +tenv = env.Clone() + +TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', + 'test_all', 'serf_bwtp' ] +if sys.platform == 'win32': + TEST_EXES = [ os.path.join('test', '%s.exe' % (prog)) for prog in TEST_PROGRAMS ] +else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] + +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + +# Find the (dynamic) library in this directory +tenv.Replace(RPATH=thisdir) +tenv.Prepend(LIBS=[LIBNAMESTATIC, ], + LIBPATH=[thisdir, ]) + +testall_files = [ + 'test/test_all.c', + 'test/CuTest.c', + 'test/test_util.c', + 'test/test_context.c', + 'test/test_buckets.c', + 'test/test_auth.c', + 'test/mock_buckets.c', + 'test/test_ssl.c', + 'test/server/test_server.c', + 'test/server/test_sslserver.c', + ] + +for proggie in TEST_EXES: + if 'test_all' in proggie: + tenv.Program(proggie, testall_files ) + else: + tenv.Program(target = proggie, source = [proggie.replace('.exe','') + '.c']) + + +# HANDLE CLEANING + +if env.GetOption('clean'): + # When we're cleaning, we want the dependency tree to include "everything" + # that could be built. Thus, include all of the tests. + env.Default('check') Modified: vendor/serf/dist/auth/auth.c ============================================================================== --- vendor/serf/dist/auth/auth.c Fri Aug 2 19:10:46 2013 (r253892) +++ vendor/serf/dist/auth/auth.c Fri Aug 2 19:12:12 2013 (r253893) @@ -20,6 +20,7 @@ #include #include #include +#include static apr_status_t default_auth_response_handler(peer_t peer, @@ -32,30 +33,42 @@ default_auth_response_handler(peer_t pee return APR_SUCCESS; } +/* These authentication schemes are in order of decreasing security, the topmost + scheme will be used first when the server supports it. + + Each set of handlers should support both server (401) and proxy (407) + authentication. + + Use lower case for the scheme names to enable case insensitive matching. + */ static const serf__authn_scheme_t serf_authn_schemes[] = { +#ifdef SERF_HAVE_SPNEGO { - 401, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "Negotiate", + "negotiate", + SERF_AUTHN_NEGOTIATE, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#ifdef WIN32 { - 407, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "NTLM", + "ntlm", + SERF_AUTHN_NTLM, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#endif /* #ifdef WIN32 */ +#endif /* SERF_HAVE_SPNEGO */ { - 401, "Digest", + "digest", SERF_AUTHN_DIGEST, serf__init_digest, serf__init_digest_connection, @@ -64,37 +77,15 @@ static const serf__authn_scheme_t serf_a serf__validate_response_digest_auth, }, { - 407, - "Digest", - SERF_AUTHN_DIGEST, - serf__init_digest, - serf__init_digest_connection, - serf__handle_digest_auth, - serf__setup_request_digest_auth, - serf__validate_response_digest_auth, - }, -#ifdef SERF_HAVE_KERB - { - 401, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, - }, - { - 407, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, + "Basic", + "basic", + SERF_AUTHN_BASIC, + serf__init_basic, + serf__init_basic_connection, + serf__handle_basic_auth, + serf__setup_request_basic_auth, + default_auth_response_handler, }, -#endif /* ADD NEW AUTHENTICATION IMPLEMENTATIONS HERE (as they're written) */ /* sentinel */ @@ -102,21 +93,6 @@ static const serf__authn_scheme_t serf_a }; -/** - * Baton passed to the response header callback function - */ -typedef struct { - int code; - apr_status_t status; - const char *header; - serf_request_t *request; - serf_bucket_t *response; - void *baton; - apr_pool_t *pool; - const serf__authn_scheme_t *scheme; - const char *last_scheme_name; -} auth_baton_t; - /* Reads and discards all bytes in the response body. */ static apr_status_t discard_body(serf_bucket_t *response) { @@ -142,99 +118,128 @@ static apr_status_t discard_body(serf_bu * * Returns a non-0 value of a matching handler was found. */ -static int handle_auth_header(void *baton, - const char *key, - const char *header) +static int handle_auth_headers(int code, + void *baton, + apr_hash_t *hdrs, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) { - auth_baton_t *ab = baton; - int scheme_found = FALSE; - const char *auth_name; - const char *auth_attr; - const serf__authn_scheme_t *scheme = NULL; - serf_connection_t *conn = ab->request->conn; + const serf__authn_scheme_t *scheme; + serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + apr_status_t status; - /* We're only interested in xxxx-Authenticate headers. */ - if (strcmp(key, ab->header) != 0) - return 0; - - /* Extract the authentication scheme name, and prepare for reading - the attributes. */ - auth_attr = strchr(header, ' '); - if (auth_attr) { - auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); - ++auth_attr; - } - else - auth_name = header; - - ab->last_scheme_name = auth_name; + status = SERF_ERROR_AUTHN_NOT_SUPPORTED; /* Find the matching authentication handler. Note that we don't reuse the auth scheme stored in the context, as that may have changed. (ex. fallback from ntlm to basic.) */ - for (scheme = serf_authn_schemes; scheme->code != 0; ++scheme) { - if (! (ab->code == scheme->code && - ctx->authn_types & scheme->type)) + for (scheme = serf_authn_schemes; scheme->name != 0; ++scheme) { + const char *auth_hdr; + serf__auth_handler_func_t handler; + serf__authn_info_t *authn_info; + + if (! (ctx->authn_types & scheme->type)) continue; serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, "Client supports: %s\n", scheme->name); - if (strcmp(auth_name, scheme->name) == 0) { - serf__auth_handler_func_t handler = scheme->handle_func; - apr_status_t status = 0; - - serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, - "... matched: %s\n", scheme->name); - /* If this is the first time we use this scheme on this connection, - make sure to initialize the authentication handler first. */ - if (ab->code == 401 && ctx->authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->authn_info.scheme = scheme; - else - ctx->authn_info.scheme = NULL; - } - } - else if (ab->code == 407 && ctx->proxy_authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->proxy_authn_info.scheme = scheme; - else - ctx->proxy_authn_info.scheme = NULL; - } - } + auth_hdr = apr_hash_get(hdrs, scheme->key, APR_HASH_KEY_STRING); + + if (!auth_hdr) + continue; + + /* Found a matching scheme */ + status = APR_SUCCESS; + + handler = scheme->handle_func; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "... matched: %s\n", scheme->name); + + if (code == 401) { + authn_info = serf__get_authn_info_for_server(conn); + } else { + authn_info = &ctx->proxy_authn_info; + } + /* If this is the first time we use this scheme on this context and/or + this connection, make sure to initialize the authentication handler + first. */ + if (authn_info->scheme != scheme) { + status = scheme->init_ctx_func(code, ctx, ctx->pool); if (!status) { - scheme_found = TRUE; - ab->scheme = scheme; - status = handler(ab->code, ab->request, ab->response, - header, auth_attr, ab->baton, ctx->pool); + status = scheme->init_conn_func(scheme, code, conn, + conn->pool); + if (!status) + authn_info->scheme = scheme; + else + authn_info->scheme = NULL; } + } - /* If the authentication fails, cache the error for now. Try the - next available scheme. If there's none raise the error. */ - if (status) { - scheme_found = FALSE; - scheme = NULL; + if (!status) { + const char *auth_attr = strchr(auth_hdr, ' '); + if (auth_attr) { + auth_attr++; } - /* Let the caller now if the authentication setup was succesful - or not. */ - ab->status = status; - break; + status = handler(code, request, response, + auth_hdr, auth_attr, baton, ctx->pool); } + + if (status == APR_SUCCESS) + break; + + /* No success authenticating with this scheme, try the next. + If no more authn schemes are found the status of this scheme will be + returned. + */ + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "%s authentication failed.\n", scheme->name); } - /* If a matching scheme handler was found, we can stop iterating - over the response headers - so return a non-0 value. */ - return scheme_found; + return status; +} + +/** + * Baton passed to the store_header_in_dict callback function + */ +typedef struct { + const char *header; + apr_pool_t *pool; + apr_hash_t *hdrs; +} auth_baton_t; + +static int store_header_in_dict(void *baton, + const char *key, + const char *header) +{ + auth_baton_t *ab = baton; + const char *auth_attr; + char *auth_name, *c; + + /* We're only interested in xxxx-Authenticate headers. */ + if (strcmp(key, ab->header) != 0) + return 0; + + /* Extract the authentication scheme name. */ + auth_attr = strchr(header, ' '); + if (auth_attr) { + auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); + } + else + auth_name = apr_pstrmemdup(ab->pool, header, strlen(header)); + + /* Convert scheme name to lower case to enable case insensitive matching. */ + for (c = auth_name; *c != '\0'; c++) + *c = (char)apr_tolower(*c); + + apr_hash_set(ab->hdrs, auth_name, APR_HASH_KEY_STRING, + apr_pstrdup(ab->pool, header)); + + return 0; } /* Dispatch authentication handling. This function matches the possible @@ -252,11 +257,7 @@ static apr_status_t dispatch_auth(int co auth_baton_t ab = { 0 }; const char *auth_hdr; - ab.code = code; - ab.status = APR_SUCCESS; - ab.request = request; - ab.response = response; - ab.baton = baton; + ab.hdrs = apr_hash_make(pool); ab.pool = pool; /* Before iterating over all authn headers, check if there are any. */ @@ -275,8 +276,8 @@ static apr_status_t dispatch_auth(int co "%s authz required. Response header(s): %s\n", code == 401 ? "Server" : "Proxy", auth_hdr); - /* Iterate over all headers. Try to find a matching authentication scheme - handler. + + /* Store all WWW- or Proxy-Authenticate headers in a dictionary. Note: it is possible to have multiple Authentication: headers. We do not want to combine them (per normal header combination rules) as that @@ -285,15 +286,13 @@ static apr_status_t dispatch_auth(int co work with. */ serf_bucket_headers_do(hdrs, - handle_auth_header, + store_header_in_dict, &ab); - if (ab.status != APR_SUCCESS) - return ab.status; - if (!ab.scheme || ab.scheme->name == NULL) { - /* No matching authentication found. */ - return SERF_ERROR_AUTHN_NOT_SUPPORTED; - } + /* Iterate over all authentication schemes, in order of decreasing + security. Try to find a authentication schema the server support. */ + return handle_auth_headers(code, baton, ab.hdrs, + request, response, pool); } return APR_SUCCESS; @@ -356,28 +355,41 @@ apr_status_t serf__handle_auth_response( /* Requeue the request with the necessary auth headers. */ /* ### Application doesn't know about this request! */ - serf_connection_priority_request_create(request->conn, - request->setup, - request->setup_baton); + if (request->ssltunnel) { + serf__ssltunnel_request_create(request->conn, + request->setup, + request->setup_baton); + } else { + serf_connection_priority_request_create(request->conn, + request->setup, + request->setup_baton); + } return APR_EOF; } else { - /* Validate the response authn headers if needed. */ serf__validate_response_func_t validate_resp; serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + serf__authn_info_t *authn_info; apr_status_t resp_status = APR_SUCCESS; - - if (ctx->authn_info.scheme) { - validate_resp = ctx->authn_info.scheme->validate_response_func; + + + /* Validate the response server authn headers. */ + authn_info = serf__get_authn_info_for_server(conn); + if (authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(HOST, sl.code, conn, request, response, pool); } - if (!resp_status && ctx->proxy_authn_info.scheme) { - validate_resp = ctx->proxy_authn_info.scheme->validate_response_func; + + /* Validate the response proxy authn headers. */ + authn_info = &ctx->proxy_authn_info; + if (!resp_status && authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(PROXY, sl.code, conn, request, response, pool); } + if (resp_status) { /* If there was an error in the final step of the authentication, consider the reponse body as invalid and discard it. */ @@ -419,3 +431,42 @@ void serf__encode_auth_header(const char apr_base64_encode(ptr, data, data_len); } + +const char *serf__construct_realm(peer_t peer, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 19:14:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 70503A59; Fri, 2 Aug 2013 19:14:26 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5BC1C269B; Fri, 2 Aug 2013 19:14:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72JEQu1069209; Fri, 2 Aug 2013 19:14:26 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72JEPrl069204; Fri, 2 Aug 2013 19:14:25 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201308021914.r72JEPrl069204@svn.freebsd.org> From: Peter Wemm Date: Fri, 2 Aug 2013 19:14:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r253894 - in vendor/serf/serf-1.3.0: . auth buckets build X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:14:26 -0000 Author: peter Date: Fri Aug 2 19:14:25 2013 New Revision: 253894 URL: http://svnweb.freebsd.org/changeset/base/253894 Log: Tag serf 1.3.0 Added: vendor/serf/serf-1.3.0/ - copied from r253891, vendor/serf/dist/ vendor/serf/serf-1.3.0/SConstruct - copied unchanged from r253893, vendor/serf/dist/SConstruct vendor/serf/serf-1.3.0/auth/auth_spnego.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego.c vendor/serf/serf-1.3.0/auth/auth_spnego.h - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego.h vendor/serf/serf-1.3.0/auth/auth_spnego_gss.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego_gss.c vendor/serf/serf-1.3.0/auth/auth_spnego_sspi.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_spnego_sspi.c vendor/serf/serf-1.3.0/build/check.py - copied unchanged from r253893, vendor/serf/dist/build/check.py vendor/serf/serf-1.3.0/build/serf.pc.in - copied unchanged from r253893, vendor/serf/dist/build/serf.pc.in Replaced: vendor/serf/serf-1.3.0/CHANGES - copied unchanged from r253893, vendor/serf/dist/CHANGES vendor/serf/serf-1.3.0/README - copied unchanged from r253893, vendor/serf/dist/README vendor/serf/serf-1.3.0/auth/auth.c - copied unchanged from r253893, vendor/serf/dist/auth/auth.c vendor/serf/serf-1.3.0/auth/auth.h - copied unchanged from r253893, vendor/serf/dist/auth/auth.h vendor/serf/serf-1.3.0/auth/auth_basic.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_basic.c vendor/serf/serf-1.3.0/auth/auth_digest.c - copied unchanged from r253893, vendor/serf/dist/auth/auth_digest.c vendor/serf/serf-1.3.0/buckets/aggregate_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/aggregate_buckets.c vendor/serf/serf-1.3.0/buckets/buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/buckets.c vendor/serf/serf-1.3.0/buckets/dechunk_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/dechunk_buckets.c vendor/serf/serf-1.3.0/buckets/headers_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/headers_buckets.c vendor/serf/serf-1.3.0/buckets/limit_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/limit_buckets.c vendor/serf/serf-1.3.0/buckets/request_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/request_buckets.c vendor/serf/serf-1.3.0/buckets/response_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/response_buckets.c vendor/serf/serf-1.3.0/buckets/simple_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/simple_buckets.c vendor/serf/serf-1.3.0/buckets/ssl_buckets.c - copied unchanged from r253893, vendor/serf/dist/buckets/ssl_buckets.c vendor/serf/serf-1.3.0/build/gen_def.py - copied unchanged from r253893, vendor/serf/dist/build/gen_def.py vendor/serf/serf-1.3.0/context.c - copied unchanged from r253893, vendor/serf/dist/context.c vendor/serf/serf-1.3.0/incoming.c - copied unchanged from r253893, vendor/serf/dist/incoming.c vendor/serf/serf-1.3.0/outgoing.c - copied unchanged from r253893, vendor/serf/dist/outgoing.c vendor/serf/serf-1.3.0/serf.h - copied unchanged from r253893, vendor/serf/dist/serf.h vendor/serf/serf-1.3.0/serf_bucket_types.h - copied unchanged from r253893, vendor/serf/dist/serf_bucket_types.h vendor/serf/serf-1.3.0/serf_bucket_util.h - copied unchanged from r253893, vendor/serf/dist/serf_bucket_util.h vendor/serf/serf-1.3.0/serf_private.h - copied unchanged from r253893, vendor/serf/dist/serf_private.h vendor/serf/serf-1.3.0/ssltunnel.c - copied unchanged from r253893, vendor/serf/dist/ssltunnel.c Deleted: vendor/serf/serf-1.3.0/Makefile.in vendor/serf/serf-1.3.0/auth/auth_kerb.c vendor/serf/serf-1.3.0/auth/auth_kerb.h vendor/serf/serf-1.3.0/auth/auth_kerb_gss.c vendor/serf/serf-1.3.0/auth/auth_kerb_sspi.c vendor/serf/serf-1.3.0/build/apr_common.m4 vendor/serf/serf-1.3.0/build/config.guess vendor/serf/serf-1.3.0/build/config.sub vendor/serf/serf-1.3.0/build/find_apr.m4 vendor/serf/serf-1.3.0/build/find_apu.m4 vendor/serf/serf-1.3.0/build/get-version.sh vendor/serf/serf-1.3.0/build/install.sh vendor/serf/serf-1.3.0/build/serf.def vendor/serf/serf-1.3.0/buildconf vendor/serf/serf-1.3.0/config.layout vendor/serf/serf-1.3.0/configure vendor/serf/serf-1.3.0/configure.in vendor/serf/serf-1.3.0/serf.mak vendor/serf/serf-1.3.0/serf.pc.in vendor/serf/serf-1.3.0/serfmake Copied: vendor/serf/serf-1.3.0/CHANGES (from r253893, vendor/serf/dist/CHANGES) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/CHANGES Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/CHANGES) @@ -0,0 +1,214 @@ +Serf 1.3.0 [2013-07-23, from /tags/1.3.0] + Fix issue 83: use PATH rather than URI within an ssltunnel (r1952) + Fix issue 108: improved error reporting from the underlying socket (r1951) + NEW: Switch to the SCons build system; retire serfmake, serf.mak, autotools + Improved Basic and Digest authentication: + - remember credentials on a per-server basis + - properly manage authentication realms + - continue functioning when a server sets KeepAlive: off + Windows: add support for NTLM authentication + Improved 2617 compliance: always use strongest authentication (r1968,1971) + Fixed bugs with proxy authentication and SSL tunneling through a proxy + Fixed bugs the response parser (r2032,r2036) + SSL connection performance improvements + Huge expansion of the test suite + + +Serf 1.2.1 [2013-06-03, from /tags/1.2.1, r1906] + Fix issue 95: add gssapi switches to configure (r1864, r1900) + Fix issue 97: skip mmap bucket if APR_HAS_MMAP is undefined (r1877) + Fix issue 100: building against an old Windows Platform SDK (r1881) + Fix issue 102: digest authentication failures (r1885) + Improve error return values in SSPI authentication (r1804) + Ensure serf-1.pc is constructed by serfmake (r1865) + Optimize SPNego authentication processing (r1868) + Reject certs that application does not like (r1794) + Fix possible endless loop in serf_linebuf_fetch() (r1816) + Windows build: dereference INTDIR in serf.mak (r1882) + + +Serf 1.2.0 [2013-02-22, from /tags/1.2.0, r1726] + Fixed issue 94: Serf can enter an infinite loop when server aborts conn. + Fixed issue 91: Serf doesn't handle an incoming 408 Timeout Request + Fixed issue 80: Serf is not handling Negotiate authentication correctly + Fixed issue 77: Endless loop if server doesn't accept Negotiate authn + Fixed issue 93: cleanup-after-fork interferes with parent (r1714) + Fixed most of issue 89: Support REAL SPNEGO authentication + Enable Negotiate/Kerberos support for proxy servers. + Return error when C-L, chunked, gzip encoded response bodies were + truncated (due to aborted connection) (r1688) + Add a logging mechanism that can be enabled at compile-time. + Don't lookup server address if a proxy was configured. (r1706) + Fix an off-by-one in buffer sizing (r1695) + Disable SSL compression by default + API to enable it (r1692) + New serf_connection_get_latency() for estimated network latency (r1689) + New error code and RFC compliance for the HTTPS tunnel (r1701, r1644) + Handle EINTR when a user suspends and then backgrounds the app (r1708) + Minor fixes and test suite improvements. + + +Serf 1.1.1 [2012-10-04, from /tags/1.1.1, r1657] + Fixed issue 86: ensure requeued requests are correctly handled. + This fixes: + - infinite loop with multiple connection resets or SIGPIPE errors + - "connection" hang where we would not re-queue requests that are + held after we re-connect + Fixed issue 74: test_all goes in an endless loop + Fix memleak when conn. is closed explicitly/due to pool cleanups (r1623) + Windows: Fix https connection aborts (r1628..-30,-33,-34,-37) + Add new error codes for the SSL bucket + + +Serf 1.1.0 [2012-06-07, from /tags/1.1.0, r1617] + New: serf_bucket_request_set_CL() for C-L based, non-chunked requests + New: serf_ssl_server_cert_chain_callback_set() for full-chain validation + + +Serf 1.0.3 [2012-03-20, from /tags/1.0.3, r1586] + Map more OpenSSL errors into SERF_SSL_CERT_UNKNOWNCA (r1573) + + +Serf 1.0.2 + Not released. + + +Serf 1.0.1 [2012-02-15, from /tags/1.0.1, r1569] + FreeBSD fixes in the test suite (r1560, r1565) + Minor build fixes + + +Serf 1.0.0 [2011-07-15, from /tags/1.0.0, r1540] + Fixed issue 38: enable builds using non-GNU make + Fixed issue 49: support SSL tunnels for HTTPS via a proxy + Fixed issue 56: allow Subject Alternative Name, and enable SNI + Fixed issue 61: include order dependencies + Fixed issue 66: improved error reporting when creating install dirs + Fixed issue 71: handle ECONNREFUSED on Windows + Fixed issue 79: destroy the APR allocator, if we create one + Fixed issue 81: build failed on APR 0.9.x + Major performance improvements and bug fixes for SSL buckets/handling (r1462) + Add a new "iovec" bucket type (r1434) + Minimize network packet writes based on ra_serf analysis (r1467, r1471) + Fix out of order issue with multiple priority requests (r1469) + Work around broken WSAPoll() impl on Windows introduced in APR 1.4.0 (r1506) + Fix 100% CPU usage with many pipelined requests (r1456) + Corrected contents of build/serf.def; it now includes bucket types (r1512) + Removed "snapshot" feature from buckets (r1503) + Various improvements to the test system + Various memory leak fixes + + +Serf 0.7.2 [2011-03-12, from /tags/0.7.2, r1452] + Actually disable Nagle when creating a connection (r1441) + Return error when app asks for HTTPS over proxy connection (r1433) + + +Serf 0.7.1 [2011-01-25, from /tags/0.7.1, r1432] + Fix memory leak when using SSL (r1408, r1416) + Fix build for blank apr-util directory (r1421) + + +Serf 0.7.0 [2010-08-25, from /tags/0.7.0, r1407] + Fix double free abort when destroying request buckets + Fix test server in unit test framework to avoid random test failures + Allow older Serf programs which don't use the new authn framework to still + handle authn without forcing them to switch to the new framework. (r1401) + Remove the SERF_DECLARE macros, preferring a .DEF file for Windows + Barrier buckets now pass read_iovec to their wrapped bucket + Fix HTTP header parsing to allow for empty header values + + +Serf 0.6.1 [2010-05-14, from /tags/0.6.1, r1370] + Generally: this release fixes problems with the 0.4.0 packaging + Small compilation fix in outgoing.c for Windows builds + + +Serf 0.6.0 + Not released. + + +Serf 0.5.0 + Not released. + + +Serf 0.4.0 + WITHDRAWN: this release misstated itself as 0.5.0; use a later release + + Provide authn framework, supporting Basic, Digest, Kerberos (SSPI, GSS), + along with proxy authn using Basic or Digest + Added experimental listener framework, along with test_server.c + Improvements and fixes to SSL support, including connection setup changes + Experimental support for unrequested, arriving ("async") responses + Experimental BWTP support using the async arrival feature + Headers are combined on read (not write), to ease certian classes of parsing + Experimental feature on aggregate buckets for a callback-on-empty + Fix the bucket allocator for when APR is using its pool debugging features + Proxy support in the serf_get testing utility + Fix to include the port number in the Host header + serf_get propagates errors from the response, instead of aborting (Issue 52) + Added serf_lib_version() for runtime version tests + + +Serf 0.3.1 [2010-02-14, from /tags/0.3.1, r1322] + Fix loss of error on request->setup() callback. (Issue 47) + Support APR 2.x. (Issue 48) + Fixed slowdown in aggregate bucket with millions of child buckets + Avoid hang in apr_pollset_poll() by unclosed connections after fork() + + +Serf 0.3.0 [2009-01-26, from /tags/0.3.0, r1217] + Support LTFLAGS override as a config-time env. variable (Issue 44) + Fix CUTest test harness compilation on Solaris (Issue 43) + Fix small race condition in OpenSSL initialization (Issue 39) + Handle content streams larger than 4GB on 32-bit OSes (Issue 41) + Fix test_ssl.c compilation with mingw+msys + Fix conn close segfault by explicitly closing conn when pool is destroyed + Expose the depth of the SSL certificate so the validator can use that info + Fix socket address family issue when opening a connection to a proxy + Provide new API to take snapshots of buckets + Implement snapshot API for simple and aggregate buckets + Build with bundled apr and apr-util VPATH builds + Build with bundled OpenSSL builds + + +Serf 0.2.0 [2008-06-06, from /tags/0.2.0, r1189] + Enable use of external event loop: serf_create_context_ex + Enable adding new requests at the beginning of the request queue + Handle 'Connection:close' headers + Enable limiting the number of outstanding requests + Add readline function to simple buckets + Concatenate repeated headers using comma as separator, as per RFC 2616, + section 4.2. (Issue 29) + Add proxy server support + Add progress feedback support. (Issue 11) + Provide new API to simplify use of proxy and progress feedback support + Add callback to validate SSL server certificates. (Issue 31) + Add new test framework + Send current version string in the test programs (Issue 21) + Bugfixes: + Fix segfault with epoll when removing a NULL socket + Reset OpenSSL thread-safety callbacks when apr_terminate() called + Do not remove the socket from the pollset on pool cleanup + Do not issue double close on skt w/second one being close(-1) (Issue 33) + + +Serf 0.1.2 [2007-06-18, from /tags/0.1.2, r1115] + Enable thread-safety with OpenSSL (Issue 19) + Teach serfmake to install headers into include/serf-0 + Be more tolerant when servers close the connection without telling us + Do not open the connection until we have requests to deliver + Fix serfmake to produce the library that corresponds to the minor version + Fix a memory leak with the socket bucket (Issue 14) + Fix uninitialized branch in serf_spider (Issue 15) + + +Serf 0.1.1 [2007-05-12, from /tags/0.1.1, r1105] + Add SSL client certificate support + Implement optimized iovec reads for header buckets + Fix up 'make clean' and 'make distclean' (Issues 9, 10) + Add SERF_VERSION_AT_LEAST macro + Remove abort() calls (Issue 13) + + +Serf 0.1.0 [2006-12-14, from /tags/0.1.0, r1087] + Initial packaged release Copied: vendor/serf/serf-1.3.0/README (from r253893, vendor/serf/dist/README) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/README Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/README) @@ -0,0 +1,80 @@ +Welcome to serf, a high-performance asynchronous HTTP client library. + +The serf library is a C-based HTTP client library built upon the Apache +Portable Runtime (APR) library. It multiplexes connections, running the +read/write communication asynchronously. Memory copies and transformations are +kept to a minimum to provide high performance operation. + + * Status: http://code.google.com/p/serf/wiki/ + * Site: http://code.google.com/p/serf/ + * Code: http://serf.googlecode.com/svn/ + * Issues: http://code.google.com/p/serf/issues/list + * Mail: serf-dev@googlegroups.com + * People: Justin Erenkrantz, Greg Stein + +---- + +1. INSTALL + +1.1. SCons build system + +serf uses SCons 2.x for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not +have permissions, then you can download and install the "local" +version into your home directory. When installed privately, simply +create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. + +Fetch the scons-local package: + http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz + + +1.2 Building serf + +To build serf: + +$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix + +The switches are recorded into .saved_config, so they only need to be +specified the first time scons is run. + +PREFIX should specify where serf should be installed. PREFIX defaults to +/usr/local. + +The default for the other three switches (APR, APU, OPENSSL) is /usr. + +The build system looks for apr-1-config at $APR/bin/apr-1-config, or +the path should indicate apr-1-config itself. Similarly for the path +to apu-1-config. + +OPENSSL should specify the root of the install (eg. /opt/local). The +includes will be found OPENSSL/include and libraries at OPENSSL/lib. + +If you wish to use VPATH-style builds (where objects are created in a +distinct directory from the source), you can use: + +$ scons -Y /path/to/serf/source + +At any point, the current settings can be examined: + +$ scons --help + + +1.3 Running the test suite + +$ scons check + + +1.4 Installing serf + +$ scons install + +Note that the PREFIX variable should have been specified in a previous +invocation of scons (and saved into .saved_config), or it can be +specified on the install command line: + +$ scons PREFIX=/some/path install + + +1.4 Cleaning up the build + +$ scons -c Copied: vendor/serf/serf-1.3.0/SConstruct (from r253893, vendor/serf/dist/SConstruct) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/SConstruct Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/SConstruct) @@ -0,0 +1,438 @@ +# -*- python -*- +# +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import os +import re + +HEADER_FILES = ['serf.h', + 'serf_bucket_types.h', + 'serf_bucket_util.h', + ] + +# where we save the configuration variables +SAVED_CONFIG = '.saved_config' + +# Variable class that does no validation on the input +def _converter(val): + """ + """ + if val == 'none': + val = [] + else: + val = val.split(',') + return val + +def RawListVariable(key, help, default): + """ + The input parameters describe a 'raw string list' option. This class + accepts a comma separated list and converts it to a space separated + list. + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +# default directories +if sys.platform == 'win32': + default_libdir='..' + default_prefix='Debug' +else: + default_libdir='/usr' + default_prefix='/usr/local' + +opts = Variables(files=[SAVED_CONFIG]) +opts.AddVariables( + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, + PathVariable.PathIsDir), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('APU', + "Path to apu-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('OPENSSL', + "Path to OpenSSL's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('ZLIB', + "Path to zlib's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('GSSAPI', + "Path to GSSAPI's install area", + None, + None), + BoolVariable('DEBUG', + "Enable debugging info and strict compile warnings", + False), + BoolVariable('APR_STATIC', + "Enable using a static compiled APR", + False), + RawListVariable('CC', "Command name or path of the C compiler", None), + RawListVariable('CFLAGS', "Extra flags for the C compiler (comma separated)", + None), + RawListVariable('LIBS', "Extra libraries passed to the linker, " + "e.g. -l (comma separated)", None), + RawListVariable('LINKFLAGS', "Extra flags for the linker (comma separated)", + None), + RawListVariable('CPPFLAGS', "Extra flags for the C preprocessor " + "(comma separated)", None), + ) + +if sys.platform == 'win32': + opts.AddVariables( + # By default SCons builds for the host platform on Windows, when using + # a supported compiler (E.g. VS2010/VS2012). Allow overriding + + # Note that Scons 1.3 only supports this on Windows and only when + # constructing Environment(). Later changes to TARGET_ARCH are ignored + EnumVariable('TARGET_ARCH', + "Platform to build for (x86|x64|win32|x86_64)", + 'x86', + allowed_values=('x86', 'x86_64', 'ia64'), + map={'X86' : 'x86', + 'win32': 'x86', + 'Win32': 'x86', + 'x64' : 'x86_64', + 'X64' : 'x86_64' + }), + + EnumVariable('MSVC_VERSION', + "Visual C++ to use for building (E.g. 11.0, 9.0)", + None, + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + ), + + # We always documented that we handle an install layout, but in fact we + # hardcoded source layouts. Allow disabling this behavior. + # ### Fix default? + BoolVariable('SOURCE_LAYOUT', + "Assume a source layout instead of install layout", + True), + ) + +env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], + ) + +env.Append(BUILDERS = { + 'GenDef' : + Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', + suffix='.def', src_suffix='.h') + }) + +match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' + 'SERF_MINOR_VERSION ([0-9]+).*' + 'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) +MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +env.Append(MAJOR=str(MAJOR)) + +# Calling external programs is okay if we're not cleaning or printing help. +# (cleaning: no sense in fetching information; help: we may not know where +# they are) +CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help')) + + +# HANDLING OF OPTION VARIABLES + +unknown = opts.UnknownVariables() +if unknown: + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) + +apr = str(env['APR']) +apu = str(env['APU']) +zlib = str(env['ZLIB']) +gssapi = env.get('GSSAPI', None) + +if gssapi and os.path.isdir(gssapi): + krb5_config = os.path.join(gssapi, 'bin', 'krb5-config') + if os.path.isfile(krb5_config): + gssapi = krb5_config + env['GSSAPI'] = krb5_config + +debug = env.get('DEBUG', None) +aprstatic = env.get('APR_STATIC', None) + +Help(opts.GenerateHelpText(env)) +opts.Save(SAVED_CONFIG, env) + + +# PLATFORM-SPECIFIC BUILD TWEAKS + +thisdir = os.getcwd() +libdir = '$PREFIX/lib' +incdir = '$PREFIX/include/serf-$MAJOR' + +LIBNAME = 'libserf-${MAJOR}' +if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME +else: + LIBNAMESTATIC = 'serf-${MAJOR}' + +env.Append(RPATH=libdir, + PDB='${TARGET.filebase}.pdb') + +if sys.platform == 'darwin': +# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + # 'man ld' says positive non-zero for the first number, so we add one. + # Mac's interpretation of compatibility is the same as our MINOR version. + env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) + env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + +if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') + env.Append(CCFLAGS=[ + '-Wdeclaration-after-statement', + '-Wmissing-prototypes', + ]) + + ### -Wall is not available on Solaris + if sys.platform != 'sunos5': + env.Append(CCFLAGS='-Wall') + + if debug: + env.Append(CCFLAGS='-g') + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') + + ### works for Mac OS. probably needs to change + env.Append(LIBS=['ssl', 'crypto', 'z', ]) + + if sys.platform == 'sunos5': + env.Append(LIBS='m') +else: + # Warning level 4, no unused argument warnings + env.Append(CCFLAGS=['/W4', '/wd4100']) + + # Choose runtime and optimization + if debug: + # Disable optimizations for debugging, use debug DLL runtime + env.Append(CCFLAGS=['/Od', '/MDd']) + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + # Optimize for speed, use DLL runtime + env.Append(CCFLAGS=['/O2', '/MD']) + env.Append(CPPDEFINES='NDEBUG') + +# PLAN THE BUILD +SHARED_SOURCES = [] +if sys.platform == 'win32': + env.GenDef(['serf.h','serf_bucket_types.h', 'serf_bucket_util.h']) + SHARED_SOURCES.append(['serf.def']) + +SOURCES = Glob('*.c') + Glob('buckets/*.c') + Glob('auth/*.c') + +lib_static = env.StaticLibrary(LIBNAMESTATIC, SOURCES) +lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES) + +if aprstatic: + env.Append(CPPDEFINES=['APR_DECLARE_STATIC', 'APU_DECLARE_STATIC']) + +if sys.platform == 'win32': + env.Append(LIBS=['user32.lib', 'advapi32.lib', 'gdi32.lib', 'ws2_32.lib', + 'crypt32.lib', 'mswsock.lib', 'rpcrt4.lib', 'secur32.lib']) + + # Get apr/apu information into our build + env.Append(CPPDEFINES=['WIN32','WIN32_LEAN_AND_MEAN','NOUSER', + 'NOGDI', 'NONLS','NOCRYPT']) + + if env.get('TARGET_ARCH', None) == 'x86_64': + env.Append(CPPDEFINES=['WIN64']) + + if aprstatic: + apr_libs='apr-1.lib' + apu_libs='aprutil-1.lib' + else: + apr_libs='libapr-1.lib' + apu_libs='libaprutil-1.lib' + + env.Append(LIBS=[apr_libs, apu_libs]) + if not env.get('SOURCE_LAYOUT', None): + env.Append(LIBPATH=['$APR/lib', '$APU/lib'], + CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1']) + elif aprstatic: + env.Append(LIBPATH=['$APR/LibR','$APU/LibR'], + CPPPATH=['$APR/include', '$APU/include']) + else: + env.Append(LIBPATH=['$APR/Release','$APU/Release'], + CPPPATH=['$APR/include', '$APU/include']) + + # zlib + env.Append(LIBS='zlib.lib') + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') + else: + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') + + # openssl + env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') + elif 0: # opensslstatic: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') + else: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') +else: + if os.path.isdir(apr): + apr = os.path.join(apr, 'bin', 'apr-1-config') + env['APR'] = apr + if os.path.isdir(apu): + apu = os.path.join(apu, 'bin', 'apu-1-config') + env['APU'] = apu + + ### we should use --cc, but that is giving some scons error about an implict + ### dependency upon gcc. probably ParseConfig doesn't know what to do with + ### the apr-1-config output + if CALLOUT_OKAY: + env.ParseConfig('$APR --cflags --cppflags --ldflags --includes' + ' --link-ld --libs') + env.ParseConfig('$APU --ldflags --includes --link-ld --libs') + + ### there is probably a better way to run/capture output. + ### env.ParseConfig() may be handy for getting this stuff into the build + if CALLOUT_OKAY: + apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip() + apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip() + else: + apr_libs = '' + apu_libs = '' + + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') + + +# If build with gssapi, get its information and define SERF_HAVE_GSSAPI +if gssapi and CALLOUT_OKAY: + env.ParseConfig('$GSSAPI --libs gssapi') + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') +if sys.platform == 'win32': + env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) + +# On Solaris, the -R values that APR describes never make it into actual +# RPATH flags. We'll manually map all directories in LIBPATH into new +# flags to set RPATH values. +if sys.platform == 'sunos5': + for d in env['LIBPATH']: + env.Append(RPATH=d) + +# Set up the construction of serf-*.pc +# TODO: add gssapi libs +pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), + env.File('build/serf.pc.in'), + SUBST_DICT = { + '@MAJOR@': str(MAJOR), + '@PREFIX@': '$PREFIX', + '@INCLUDE_SUBDIR@': 'serf-%d' % (MAJOR,), + '@VERSION@': '%d.%d.%d' % (MAJOR, MINOR, PATCH), + '@LIBS@': '%s %s -lz' % (apu_libs, apr_libs), + }) + +env.Default(lib_static, lib_shared, pkgconfig) + +if CALLOUT_OKAY: + conf = Configure(env) + + ### some configuration stuffs + + env = conf.Finish() + + +# INSTALLATION STUFF + +install_static = env.Install(libdir, lib_static) +install_shared = env.Install(libdir, lib_shared) + +if sys.platform == 'darwin': + install_shared_path = install_shared[0].abspath + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (install_shared_path, + install_shared_path))) + ### construct shared lib symlinks. this also means install the lib + ### as libserf-2.1.0.0.dylib, then add the symlinks. + ### note: see InstallAs + +env.Alias('install-lib', [install_static, install_shared, + ]) +env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) +env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), + pkgconfig)) +env.Alias('install', ['install-lib', 'install-inc', 'install-pc', ]) + + +# TESTS +### make move to a separate scons file in the test/ subdir? + +tenv = env.Clone() + +TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', + 'test_all', 'serf_bwtp' ] +if sys.platform == 'win32': + TEST_EXES = [ os.path.join('test', '%s.exe' % (prog)) for prog in TEST_PROGRAMS ] +else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] + +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + +# Find the (dynamic) library in this directory +tenv.Replace(RPATH=thisdir) +tenv.Prepend(LIBS=[LIBNAMESTATIC, ], + LIBPATH=[thisdir, ]) + +testall_files = [ + 'test/test_all.c', + 'test/CuTest.c', + 'test/test_util.c', + 'test/test_context.c', + 'test/test_buckets.c', + 'test/test_auth.c', + 'test/mock_buckets.c', + 'test/test_ssl.c', + 'test/server/test_server.c', + 'test/server/test_sslserver.c', + ] + +for proggie in TEST_EXES: + if 'test_all' in proggie: + tenv.Program(proggie, testall_files ) + else: + tenv.Program(target = proggie, source = [proggie.replace('.exe','') + '.c']) + + +# HANDLE CLEANING + +if env.GetOption('clean'): + # When we're cleaning, we want the dependency tree to include "everything" + # that could be built. Thus, include all of the tests. + env.Default('check') Copied: vendor/serf/serf-1.3.0/auth/auth.c (from r253893, vendor/serf/dist/auth/auth.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/serf/serf-1.3.0/auth/auth.c Fri Aug 2 19:14:25 2013 (r253894, copy of r253893, vendor/serf/dist/auth/auth.c) @@ -0,0 +1,472 @@ +/* Copyright 2009 Justin Erenkrantz and Greg Stein + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "serf.h" +#include "serf_private.h" +#include "auth.h" + +#include +#include +#include +#include + +static apr_status_t +default_auth_response_handler(peer_t peer, + int code, + serf_connection_t *conn, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) +{ + return APR_SUCCESS; +} + +/* These authentication schemes are in order of decreasing security, the topmost + scheme will be used first when the server supports it. + + Each set of handlers should support both server (401) and proxy (407) + authentication. + + Use lower case for the scheme names to enable case insensitive matching. + */ +static const serf__authn_scheme_t serf_authn_schemes[] = { +#ifdef SERF_HAVE_SPNEGO + { + "Negotiate", + "negotiate", + SERF_AUTHN_NEGOTIATE, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, + }, +#ifdef WIN32 + { + "NTLM", + "ntlm", + SERF_AUTHN_NTLM, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, + }, +#endif /* #ifdef WIN32 */ +#endif /* SERF_HAVE_SPNEGO */ + { + "Digest", + "digest", + SERF_AUTHN_DIGEST, + serf__init_digest, + serf__init_digest_connection, + serf__handle_digest_auth, + serf__setup_request_digest_auth, + serf__validate_response_digest_auth, + }, + { + "Basic", + "basic", + SERF_AUTHN_BASIC, + serf__init_basic, + serf__init_basic_connection, + serf__handle_basic_auth, + serf__setup_request_basic_auth, + default_auth_response_handler, + }, + /* ADD NEW AUTHENTICATION IMPLEMENTATIONS HERE (as they're written) */ + + /* sentinel */ + { 0 } +}; + + +/* Reads and discards all bytes in the response body. */ +static apr_status_t discard_body(serf_bucket_t *response) +{ + apr_status_t status; + const char *data; + apr_size_t len; + + while (1) { + status = serf_bucket_read(response, SERF_READ_ALL_AVAIL, &data, &len); + + if (status) { + return status; + } + + /* feed me */ + } +} + +/** + * handle_auth_header is called for each header in the response. It filters + * out the Authenticate headers (WWW or Proxy depending on what's needed) and + * tries to find a matching scheme handler. + * + * Returns a non-0 value of a matching handler was found. + */ +static int handle_auth_headers(int code, + void *baton, + apr_hash_t *hdrs, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) +{ + const serf__authn_scheme_t *scheme; + serf_connection_t *conn = request->conn; + serf_context_t *ctx = conn->ctx; + apr_status_t status; + + status = SERF_ERROR_AUTHN_NOT_SUPPORTED; + + /* Find the matching authentication handler. + Note that we don't reuse the auth scheme stored in the context, + as that may have changed. (ex. fallback from ntlm to basic.) */ + for (scheme = serf_authn_schemes; scheme->name != 0; ++scheme) { + const char *auth_hdr; + serf__auth_handler_func_t handler; + serf__authn_info_t *authn_info; + + if (! (ctx->authn_types & scheme->type)) + continue; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "Client supports: %s\n", scheme->name); + + auth_hdr = apr_hash_get(hdrs, scheme->key, APR_HASH_KEY_STRING); + + if (!auth_hdr) + continue; + + /* Found a matching scheme */ + status = APR_SUCCESS; + + handler = scheme->handle_func; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "... matched: %s\n", scheme->name); + + if (code == 401) { + authn_info = serf__get_authn_info_for_server(conn); + } else { + authn_info = &ctx->proxy_authn_info; + } + /* If this is the first time we use this scheme on this context and/or + this connection, make sure to initialize the authentication handler + first. */ + if (authn_info->scheme != scheme) { + status = scheme->init_ctx_func(code, ctx, ctx->pool); + if (!status) { + status = scheme->init_conn_func(scheme, code, conn, + conn->pool); + if (!status) + authn_info->scheme = scheme; + else + authn_info->scheme = NULL; + } + } + + if (!status) { + const char *auth_attr = strchr(auth_hdr, ' '); + if (auth_attr) { + auth_attr++; + } + + status = handler(code, request, response, + auth_hdr, auth_attr, baton, ctx->pool); + } + + if (status == APR_SUCCESS) + break; + + /* No success authenticating with this scheme, try the next. + If no more authn schemes are found the status of this scheme will be + returned. + */ + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "%s authentication failed.\n", scheme->name); + } + + return status; +} + +/** + * Baton passed to the store_header_in_dict callback function + */ +typedef struct { + const char *header; + apr_pool_t *pool; + apr_hash_t *hdrs; +} auth_baton_t; + +static int store_header_in_dict(void *baton, + const char *key, + const char *header) +{ + auth_baton_t *ab = baton; + const char *auth_attr; + char *auth_name, *c; + + /* We're only interested in xxxx-Authenticate headers. */ + if (strcmp(key, ab->header) != 0) + return 0; + + /* Extract the authentication scheme name. */ + auth_attr = strchr(header, ' '); + if (auth_attr) { + auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); + } + else + auth_name = apr_pstrmemdup(ab->pool, header, strlen(header)); + + /* Convert scheme name to lower case to enable case insensitive matching. */ + for (c = auth_name; *c != '\0'; c++) + *c = (char)apr_tolower(*c); + + apr_hash_set(ab->hdrs, auth_name, APR_HASH_KEY_STRING, + apr_pstrdup(ab->pool, header)); + + return 0; +} + +/* Dispatch authentication handling. This function matches the possible + authentication mechanisms with those available. Server and proxy + authentication are evaluated separately. */ +static apr_status_t dispatch_auth(int code, + serf_request_t *request, + serf_bucket_t *response, + void *baton, + apr_pool_t *pool) +{ + serf_bucket_t *hdrs; + + if (code == 401 || code == 407) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 19:21:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EFFA5E73; Fri, 2 Aug 2013 19:21:47 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DAFE126DE; Fri, 2 Aug 2013 19:21:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72JLlmZ072120; Fri, 2 Aug 2013 19:21:47 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72JLlLp072113; Fri, 2 Aug 2013 19:21:47 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <201308021921.r72JLlLp072113@svn.freebsd.org> From: Peter Wemm Date: Fri, 2 Aug 2013 19:21:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253895 - in head: contrib/serf contrib/serf/auth contrib/serf/buckets contrib/serf/build usr.bin/svn/lib/libserf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 19:21:48 -0000 Author: peter Date: Fri Aug 2 19:21:46 2013 New Revision: 253895 URL: http://svnweb.freebsd.org/changeset/base/253895 Log: Update serf 1.2.1 -> 1.3.0 for svn Added: head/contrib/serf/SConstruct - copied unchanged from r253894, vendor/serf/dist/SConstruct head/contrib/serf/auth/auth_spnego.c - copied unchanged from r253894, vendor/serf/dist/auth/auth_spnego.c head/contrib/serf/auth/auth_spnego.h - copied unchanged from r253894, vendor/serf/dist/auth/auth_spnego.h head/contrib/serf/auth/auth_spnego_gss.c - copied unchanged from r253894, vendor/serf/dist/auth/auth_spnego_gss.c head/contrib/serf/auth/auth_spnego_sspi.c - copied unchanged from r253894, vendor/serf/dist/auth/auth_spnego_sspi.c head/contrib/serf/build/check.py - copied unchanged from r253894, vendor/serf/dist/build/check.py head/contrib/serf/build/serf.pc.in - copied unchanged from r253894, vendor/serf/dist/build/serf.pc.in Deleted: head/contrib/serf/Makefile.in head/contrib/serf/auth/auth_kerb.c head/contrib/serf/auth/auth_kerb.h head/contrib/serf/auth/auth_kerb_gss.c head/contrib/serf/auth/auth_kerb_sspi.c head/contrib/serf/build/apr_common.m4 head/contrib/serf/build/config.guess head/contrib/serf/build/config.sub head/contrib/serf/build/find_apr.m4 head/contrib/serf/build/find_apu.m4 head/contrib/serf/build/get-version.sh head/contrib/serf/build/install.sh head/contrib/serf/build/serf.def head/contrib/serf/buildconf head/contrib/serf/config.layout head/contrib/serf/configure head/contrib/serf/configure.in head/contrib/serf/serf.mak head/contrib/serf/serf.pc.in head/contrib/serf/serfmake Modified: head/contrib/serf/CHANGES head/contrib/serf/README head/contrib/serf/auth/auth.c head/contrib/serf/auth/auth.h head/contrib/serf/auth/auth_basic.c head/contrib/serf/auth/auth_digest.c head/contrib/serf/buckets/aggregate_buckets.c head/contrib/serf/buckets/buckets.c head/contrib/serf/buckets/dechunk_buckets.c head/contrib/serf/buckets/headers_buckets.c head/contrib/serf/buckets/limit_buckets.c head/contrib/serf/buckets/request_buckets.c head/contrib/serf/buckets/response_buckets.c head/contrib/serf/buckets/simple_buckets.c head/contrib/serf/buckets/ssl_buckets.c head/contrib/serf/build/gen_def.py head/contrib/serf/context.c head/contrib/serf/incoming.c head/contrib/serf/outgoing.c head/contrib/serf/serf.h head/contrib/serf/serf_bucket_types.h head/contrib/serf/serf_bucket_util.h head/contrib/serf/serf_private.h head/contrib/serf/ssltunnel.c head/usr.bin/svn/lib/libserf/Makefile Directory Properties: head/contrib/serf/ (props changed) Modified: head/contrib/serf/CHANGES ============================================================================== --- head/contrib/serf/CHANGES Fri Aug 2 19:14:25 2013 (r253894) +++ head/contrib/serf/CHANGES Fri Aug 2 19:21:46 2013 (r253895) @@ -1,4 +1,20 @@ -Serf 1.2.1 [2013-06-03, from /tags/1.2.1] +Serf 1.3.0 [2013-07-23, from /tags/1.3.0] + Fix issue 83: use PATH rather than URI within an ssltunnel (r1952) + Fix issue 108: improved error reporting from the underlying socket (r1951) + NEW: Switch to the SCons build system; retire serfmake, serf.mak, autotools + Improved Basic and Digest authentication: + - remember credentials on a per-server basis + - properly manage authentication realms + - continue functioning when a server sets KeepAlive: off + Windows: add support for NTLM authentication + Improved 2617 compliance: always use strongest authentication (r1968,1971) + Fixed bugs with proxy authentication and SSL tunneling through a proxy + Fixed bugs the response parser (r2032,r2036) + SSL connection performance improvements + Huge expansion of the test suite + + +Serf 1.2.1 [2013-06-03, from /tags/1.2.1, r1906] Fix issue 95: add gssapi switches to configure (r1864, r1900) Fix issue 97: skip mmap bucket if APR_HAS_MMAP is undefined (r1877) Fix issue 100: building against an old Windows Platform SDK (r1881) @@ -19,7 +35,7 @@ Serf 1.2.0 [2013-02-22, from /tags/1.2.0 Fixed issue 93: cleanup-after-fork interferes with parent (r1714) Fixed most of issue 89: Support REAL SPNEGO authentication Enable Negotiate/Kerberos support for proxy servers. - Return error when C-L, chunked, gzip encoded response bodies where + Return error when C-L, chunked, gzip encoded response bodies were truncated (due to aborted connection) (r1688) Add a logging mechanism that can be enabled at compile-time. Don't lookup server address if a proxy was configured. (r1706) Modified: head/contrib/serf/README ============================================================================== --- head/contrib/serf/README Fri Aug 2 19:14:25 2013 (r253894) +++ head/contrib/serf/README Fri Aug 2 19:21:46 2013 (r253895) @@ -14,25 +14,67 @@ kept to a minimum to provide high perfor ---- -Quick guide for the impatient +1. INSTALL - (Unix) - % ./configure - % make - % make install +1.1. SCons build system ----- +serf uses SCons 2.x for its build system. If it is not installed on +your system, then you can install it onto your system. If you do not +have permissions, then you can download and install the "local" +version into your home directory. When installed privately, simply +create a symlink for 'scons' in your PATH to /path/to/scons/scons.py. + +Fetch the scons-local package: + http://prdownloads.sourceforge.net/scons/scons-local-2.0.1.tar.gz + + +1.2 Building serf + +To build serf: + +$ scons APR=/path/to/apr APU=/path/to/apu OPENSSL=/openssl/base PREFIX=/path/to/prefix + +The switches are recorded into .saved_config, so they only need to be +specified the first time scons is run. + +PREFIX should specify where serf should be installed. PREFIX defaults to +/usr/local. + +The default for the other three switches (APR, APU, OPENSSL) is /usr. + +The build system looks for apr-1-config at $APR/bin/apr-1-config, or +the path should indicate apr-1-config itself. Similarly for the path +to apu-1-config. + +OPENSSL should specify the root of the install (eg. /opt/local). The +includes will be found OPENSSL/include and libraries at OPENSSL/lib. + +If you wish to use VPATH-style builds (where objects are created in a +distinct directory from the source), you can use: + +$ scons -Y /path/to/serf/source + +At any point, the current settings can be examined: + +$ scons --help + + +1.3 Running the test suite + +$ scons check + + +1.4 Installing serf -Building serf from a Subversion checkout (non-packaged releases) +$ scons install -We suggest that you try out 'serfmake'. +Note that the PREFIX variable should have been specified in a previous +invocation of scons (and saved into .saved_config), or it can be +specified on the install command line: - % ./serfmake --prefix=/usr/local/serf --with-apr=/usr/local/apr install +$ scons PREFIX=/some/path install -If you want to use the autoconf build system and are using a Subversion -checkout, you need to run buildconf and have APR and APR-util sources handy. - % ./buildconf --with-apr=/path/to/apr --with-apr-util=/path/to/apr-util - (By default, buildconf will look in . and ../ for apr and apr-util.) +1.4 Cleaning up the build -Then, you can use ./configure, make, etc. +$ scons -c Copied: head/contrib/serf/SConstruct (from r253894, vendor/serf/dist/SConstruct) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/serf/SConstruct Fri Aug 2 19:21:46 2013 (r253895, copy of r253894, vendor/serf/dist/SConstruct) @@ -0,0 +1,438 @@ +# -*- python -*- +# +# Copyright 2011-2012 Justin Erenkrantz and Greg Stein +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import sys +import os +import re + +HEADER_FILES = ['serf.h', + 'serf_bucket_types.h', + 'serf_bucket_util.h', + ] + +# where we save the configuration variables +SAVED_CONFIG = '.saved_config' + +# Variable class that does no validation on the input +def _converter(val): + """ + """ + if val == 'none': + val = [] + else: + val = val.split(',') + return val + +def RawListVariable(key, help, default): + """ + The input parameters describe a 'raw string list' option. This class + accepts a comma separated list and converts it to a space separated + list. + """ + return (key, '%s' % (help), default, None, lambda val: _converter(val)) + +# default directories +if sys.platform == 'win32': + default_libdir='..' + default_prefix='Debug' +else: + default_libdir='/usr' + default_prefix='/usr/local' + +opts = Variables(files=[SAVED_CONFIG]) +opts.AddVariables( + PathVariable('PREFIX', + 'Directory to install under', + default_prefix, + PathVariable.PathIsDir), + PathVariable('APR', + "Path to apr-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('APU', + "Path to apu-1-config, or to APR's install area", + default_libdir, + PathVariable.PathAccept), + PathVariable('OPENSSL', + "Path to OpenSSL's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('ZLIB', + "Path to zlib's install area", + default_libdir, + PathVariable.PathIsDir), + PathVariable('GSSAPI', + "Path to GSSAPI's install area", + None, + None), + BoolVariable('DEBUG', + "Enable debugging info and strict compile warnings", + False), + BoolVariable('APR_STATIC', + "Enable using a static compiled APR", + False), + RawListVariable('CC', "Command name or path of the C compiler", None), + RawListVariable('CFLAGS', "Extra flags for the C compiler (comma separated)", + None), + RawListVariable('LIBS', "Extra libraries passed to the linker, " + "e.g. -l (comma separated)", None), + RawListVariable('LINKFLAGS', "Extra flags for the linker (comma separated)", + None), + RawListVariable('CPPFLAGS', "Extra flags for the C preprocessor " + "(comma separated)", None), + ) + +if sys.platform == 'win32': + opts.AddVariables( + # By default SCons builds for the host platform on Windows, when using + # a supported compiler (E.g. VS2010/VS2012). Allow overriding + + # Note that Scons 1.3 only supports this on Windows and only when + # constructing Environment(). Later changes to TARGET_ARCH are ignored + EnumVariable('TARGET_ARCH', + "Platform to build for (x86|x64|win32|x86_64)", + 'x86', + allowed_values=('x86', 'x86_64', 'ia64'), + map={'X86' : 'x86', + 'win32': 'x86', + 'Win32': 'x86', + 'x64' : 'x86_64', + 'X64' : 'x86_64' + }), + + EnumVariable('MSVC_VERSION', + "Visual C++ to use for building (E.g. 11.0, 9.0)", + None, + allowed_values=('12.0', '11.0', '10.0', '9.0', '8.0', '6.0') + ), + + # We always documented that we handle an install layout, but in fact we + # hardcoded source layouts. Allow disabling this behavior. + # ### Fix default? + BoolVariable('SOURCE_LAYOUT', + "Assume a source layout instead of install layout", + True), + ) + +env = Environment(variables=opts, + tools=('default', 'textfile',), + CPPPATH=['.', ], + ) + +env.Append(BUILDERS = { + 'GenDef' : + Builder(action = sys.executable + ' build/gen_def.py $SOURCES > $TARGET', + suffix='.def', src_suffix='.h') + }) + +match = re.search('SERF_MAJOR_VERSION ([0-9]+).*' + 'SERF_MINOR_VERSION ([0-9]+).*' + 'SERF_PATCH_VERSION ([0-9]+)', + env.File('serf.h').get_contents(), + re.DOTALL) +MAJOR, MINOR, PATCH = [int(x) for x in match.groups()] +env.Append(MAJOR=str(MAJOR)) + +# Calling external programs is okay if we're not cleaning or printing help. +# (cleaning: no sense in fetching information; help: we may not know where +# they are) +CALLOUT_OKAY = not (env.GetOption('clean') or env.GetOption('help')) + + +# HANDLING OF OPTION VARIABLES + +unknown = opts.UnknownVariables() +if unknown: + print 'Unknown variables:', ', '.join(unknown.keys()) + Exit(1) + +apr = str(env['APR']) +apu = str(env['APU']) +zlib = str(env['ZLIB']) +gssapi = env.get('GSSAPI', None) + +if gssapi and os.path.isdir(gssapi): + krb5_config = os.path.join(gssapi, 'bin', 'krb5-config') + if os.path.isfile(krb5_config): + gssapi = krb5_config + env['GSSAPI'] = krb5_config + +debug = env.get('DEBUG', None) +aprstatic = env.get('APR_STATIC', None) + +Help(opts.GenerateHelpText(env)) +opts.Save(SAVED_CONFIG, env) + + +# PLATFORM-SPECIFIC BUILD TWEAKS + +thisdir = os.getcwd() +libdir = '$PREFIX/lib' +incdir = '$PREFIX/include/serf-$MAJOR' + +LIBNAME = 'libserf-${MAJOR}' +if sys.platform != 'win32': + LIBNAMESTATIC = LIBNAME +else: + LIBNAMESTATIC = 'serf-${MAJOR}' + +env.Append(RPATH=libdir, + PDB='${TARGET.filebase}.pdb') + +if sys.platform == 'darwin': +# linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,)) + env.Append(LINKFLAGS='-Wl,-install_name,%s/%s.dylib' % (thisdir, LIBNAME,)) + # 'man ld' says positive non-zero for the first number, so we add one. + # Mac's interpretation of compatibility is the same as our MINOR version. + env.Append(LINKFLAGS='-Wl,-compatibility_version,%d' % (MINOR+1,)) + env.Append(LINKFLAGS='-Wl,-current_version,%d.%d' % (MINOR+1, PATCH,)) + +if sys.platform != 'win32': + ### gcc only. figure out appropriate test / better way to check these + ### flags, and check for gcc. + env.Append(CFLAGS='-std=c89') + env.Append(CCFLAGS=[ + '-Wdeclaration-after-statement', + '-Wmissing-prototypes', + ]) + + ### -Wall is not available on Solaris + if sys.platform != 'sunos5': + env.Append(CCFLAGS='-Wall') + + if debug: + env.Append(CCFLAGS='-g') + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + env.Append(CCFLAGS='-O2') + env.Append(CPPDEFINES='NDEBUG') + + ### works for Mac OS. probably needs to change + env.Append(LIBS=['ssl', 'crypto', 'z', ]) + + if sys.platform == 'sunos5': + env.Append(LIBS='m') +else: + # Warning level 4, no unused argument warnings + env.Append(CCFLAGS=['/W4', '/wd4100']) + + # Choose runtime and optimization + if debug: + # Disable optimizations for debugging, use debug DLL runtime + env.Append(CCFLAGS=['/Od', '/MDd']) + env.Append(CPPDEFINES=['DEBUG', '_DEBUG']) + else: + # Optimize for speed, use DLL runtime + env.Append(CCFLAGS=['/O2', '/MD']) + env.Append(CPPDEFINES='NDEBUG') + +# PLAN THE BUILD +SHARED_SOURCES = [] +if sys.platform == 'win32': + env.GenDef(['serf.h','serf_bucket_types.h', 'serf_bucket_util.h']) + SHARED_SOURCES.append(['serf.def']) + +SOURCES = Glob('*.c') + Glob('buckets/*.c') + Glob('auth/*.c') + +lib_static = env.StaticLibrary(LIBNAMESTATIC, SOURCES) +lib_shared = env.SharedLibrary(LIBNAME, SOURCES + SHARED_SOURCES) + +if aprstatic: + env.Append(CPPDEFINES=['APR_DECLARE_STATIC', 'APU_DECLARE_STATIC']) + +if sys.platform == 'win32': + env.Append(LIBS=['user32.lib', 'advapi32.lib', 'gdi32.lib', 'ws2_32.lib', + 'crypt32.lib', 'mswsock.lib', 'rpcrt4.lib', 'secur32.lib']) + + # Get apr/apu information into our build + env.Append(CPPDEFINES=['WIN32','WIN32_LEAN_AND_MEAN','NOUSER', + 'NOGDI', 'NONLS','NOCRYPT']) + + if env.get('TARGET_ARCH', None) == 'x86_64': + env.Append(CPPDEFINES=['WIN64']) + + if aprstatic: + apr_libs='apr-1.lib' + apu_libs='aprutil-1.lib' + else: + apr_libs='libapr-1.lib' + apu_libs='libaprutil-1.lib' + + env.Append(LIBS=[apr_libs, apu_libs]) + if not env.get('SOURCE_LAYOUT', None): + env.Append(LIBPATH=['$APR/lib', '$APU/lib'], + CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1']) + elif aprstatic: + env.Append(LIBPATH=['$APR/LibR','$APU/LibR'], + CPPPATH=['$APR/include', '$APU/include']) + else: + env.Append(LIBPATH=['$APR/Release','$APU/Release'], + CPPPATH=['$APR/include', '$APU/include']) + + # zlib + env.Append(LIBS='zlib.lib') + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$ZLIB/include', + LIBPATH='$ZLIB/lib') + else: + env.Append(CPPPATH='$ZLIB', + LIBPATH='$ZLIB') + + # openssl + env.Append(LIBS=['libeay32.lib', 'ssleay32.lib']) + if not env.get('SOURCE_LAYOUT', None): + env.Append(CPPPATH='$OPENSSL/include/openssl', + LIBPATH='$OPENSSL/lib') + elif 0: # opensslstatic: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32') + else: + env.Append(CPPPATH='$OPENSSL/inc32', + LIBPATH='$OPENSSL/out32dll') +else: + if os.path.isdir(apr): + apr = os.path.join(apr, 'bin', 'apr-1-config') + env['APR'] = apr + if os.path.isdir(apu): + apu = os.path.join(apu, 'bin', 'apu-1-config') + env['APU'] = apu + + ### we should use --cc, but that is giving some scons error about an implict + ### dependency upon gcc. probably ParseConfig doesn't know what to do with + ### the apr-1-config output + if CALLOUT_OKAY: + env.ParseConfig('$APR --cflags --cppflags --ldflags --includes' + ' --link-ld --libs') + env.ParseConfig('$APU --ldflags --includes --link-ld --libs') + + ### there is probably a better way to run/capture output. + ### env.ParseConfig() may be handy for getting this stuff into the build + if CALLOUT_OKAY: + apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip() + apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip() + else: + apr_libs = '' + apu_libs = '' + + env.Append(CPPPATH='$OPENSSL/include') + env.Append(LIBPATH='$OPENSSL/lib') + + +# If build with gssapi, get its information and define SERF_HAVE_GSSAPI +if gssapi and CALLOUT_OKAY: + env.ParseConfig('$GSSAPI --libs gssapi') + env.Append(CPPDEFINES='SERF_HAVE_GSSAPI') +if sys.platform == 'win32': + env.Append(CPPDEFINES=['SERF_HAVE_SSPI']) + +# On Solaris, the -R values that APR describes never make it into actual +# RPATH flags. We'll manually map all directories in LIBPATH into new +# flags to set RPATH values. +if sys.platform == 'sunos5': + for d in env['LIBPATH']: + env.Append(RPATH=d) + +# Set up the construction of serf-*.pc +# TODO: add gssapi libs +pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,), + env.File('build/serf.pc.in'), + SUBST_DICT = { + '@MAJOR@': str(MAJOR), + '@PREFIX@': '$PREFIX', + '@INCLUDE_SUBDIR@': 'serf-%d' % (MAJOR,), + '@VERSION@': '%d.%d.%d' % (MAJOR, MINOR, PATCH), + '@LIBS@': '%s %s -lz' % (apu_libs, apr_libs), + }) + +env.Default(lib_static, lib_shared, pkgconfig) + +if CALLOUT_OKAY: + conf = Configure(env) + + ### some configuration stuffs + + env = conf.Finish() + + +# INSTALLATION STUFF + +install_static = env.Install(libdir, lib_static) +install_shared = env.Install(libdir, lib_shared) + +if sys.platform == 'darwin': + install_shared_path = install_shared[0].abspath + env.AddPostAction(install_shared, ('install_name_tool -id %s %s' + % (install_shared_path, + install_shared_path))) + ### construct shared lib symlinks. this also means install the lib + ### as libserf-2.1.0.0.dylib, then add the symlinks. + ### note: see InstallAs + +env.Alias('install-lib', [install_static, install_shared, + ]) +env.Alias('install-inc', env.Install(incdir, HEADER_FILES)) +env.Alias('install-pc', env.Install(os.path.join(libdir, 'pkgconfig'), + pkgconfig)) +env.Alias('install', ['install-lib', 'install-inc', 'install-pc', ]) + + +# TESTS +### make move to a separate scons file in the test/ subdir? + +tenv = env.Clone() + +TEST_PROGRAMS = [ 'serf_get', 'serf_response', 'serf_request', 'serf_spider', + 'test_all', 'serf_bwtp' ] +if sys.platform == 'win32': + TEST_EXES = [ os.path.join('test', '%s.exe' % (prog)) for prog in TEST_PROGRAMS ] +else: + TEST_EXES = [ os.path.join('test', '%s' % (prog)) for prog in TEST_PROGRAMS ] + +env.AlwaysBuild(env.Alias('check', TEST_EXES, sys.executable + ' build/check.py', + ENV={'PATH' : os.environ['PATH']})) + +# Find the (dynamic) library in this directory +tenv.Replace(RPATH=thisdir) +tenv.Prepend(LIBS=[LIBNAMESTATIC, ], + LIBPATH=[thisdir, ]) + +testall_files = [ + 'test/test_all.c', + 'test/CuTest.c', + 'test/test_util.c', + 'test/test_context.c', + 'test/test_buckets.c', + 'test/test_auth.c', + 'test/mock_buckets.c', + 'test/test_ssl.c', + 'test/server/test_server.c', + 'test/server/test_sslserver.c', + ] + +for proggie in TEST_EXES: + if 'test_all' in proggie: + tenv.Program(proggie, testall_files ) + else: + tenv.Program(target = proggie, source = [proggie.replace('.exe','') + '.c']) + + +# HANDLE CLEANING + +if env.GetOption('clean'): + # When we're cleaning, we want the dependency tree to include "everything" + # that could be built. Thus, include all of the tests. + env.Default('check') Modified: head/contrib/serf/auth/auth.c ============================================================================== --- head/contrib/serf/auth/auth.c Fri Aug 2 19:14:25 2013 (r253894) +++ head/contrib/serf/auth/auth.c Fri Aug 2 19:21:46 2013 (r253895) @@ -20,6 +20,7 @@ #include #include #include +#include static apr_status_t default_auth_response_handler(peer_t peer, @@ -32,30 +33,42 @@ default_auth_response_handler(peer_t pee return APR_SUCCESS; } +/* These authentication schemes are in order of decreasing security, the topmost + scheme will be used first when the server supports it. + + Each set of handlers should support both server (401) and proxy (407) + authentication. + + Use lower case for the scheme names to enable case insensitive matching. + */ static const serf__authn_scheme_t serf_authn_schemes[] = { +#ifdef SERF_HAVE_SPNEGO { - 401, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "Negotiate", + "negotiate", + SERF_AUTHN_NEGOTIATE, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#ifdef WIN32 { - 407, - "Basic", - SERF_AUTHN_BASIC, - serf__init_basic, - serf__init_basic_connection, - serf__handle_basic_auth, - serf__setup_request_basic_auth, - default_auth_response_handler, + "NTLM", + "ntlm", + SERF_AUTHN_NTLM, + serf__init_spnego, + serf__init_spnego_connection, + serf__handle_spnego_auth, + serf__setup_request_spnego_auth, + serf__validate_response_spnego_auth, }, +#endif /* #ifdef WIN32 */ +#endif /* SERF_HAVE_SPNEGO */ { - 401, "Digest", + "digest", SERF_AUTHN_DIGEST, serf__init_digest, serf__init_digest_connection, @@ -64,37 +77,15 @@ static const serf__authn_scheme_t serf_a serf__validate_response_digest_auth, }, { - 407, - "Digest", - SERF_AUTHN_DIGEST, - serf__init_digest, - serf__init_digest_connection, - serf__handle_digest_auth, - serf__setup_request_digest_auth, - serf__validate_response_digest_auth, - }, -#ifdef SERF_HAVE_KERB - { - 401, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, - }, - { - 407, - "Negotiate", - SERF_AUTHN_NEGOTIATE, - serf__init_kerb, - serf__init_kerb_connection, - serf__handle_kerb_auth, - serf__setup_request_kerb_auth, - serf__validate_response_kerb_auth, + "Basic", + "basic", + SERF_AUTHN_BASIC, + serf__init_basic, + serf__init_basic_connection, + serf__handle_basic_auth, + serf__setup_request_basic_auth, + default_auth_response_handler, }, -#endif /* ADD NEW AUTHENTICATION IMPLEMENTATIONS HERE (as they're written) */ /* sentinel */ @@ -102,21 +93,6 @@ static const serf__authn_scheme_t serf_a }; -/** - * Baton passed to the response header callback function - */ -typedef struct { - int code; - apr_status_t status; - const char *header; - serf_request_t *request; - serf_bucket_t *response; - void *baton; - apr_pool_t *pool; - const serf__authn_scheme_t *scheme; - const char *last_scheme_name; -} auth_baton_t; - /* Reads and discards all bytes in the response body. */ static apr_status_t discard_body(serf_bucket_t *response) { @@ -142,99 +118,128 @@ static apr_status_t discard_body(serf_bu * * Returns a non-0 value of a matching handler was found. */ -static int handle_auth_header(void *baton, - const char *key, - const char *header) +static int handle_auth_headers(int code, + void *baton, + apr_hash_t *hdrs, + serf_request_t *request, + serf_bucket_t *response, + apr_pool_t *pool) { - auth_baton_t *ab = baton; - int scheme_found = FALSE; - const char *auth_name; - const char *auth_attr; - const serf__authn_scheme_t *scheme = NULL; - serf_connection_t *conn = ab->request->conn; + const serf__authn_scheme_t *scheme; + serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + apr_status_t status; - /* We're only interested in xxxx-Authenticate headers. */ - if (strcmp(key, ab->header) != 0) - return 0; - - /* Extract the authentication scheme name, and prepare for reading - the attributes. */ - auth_attr = strchr(header, ' '); - if (auth_attr) { - auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); - ++auth_attr; - } - else - auth_name = header; - - ab->last_scheme_name = auth_name; + status = SERF_ERROR_AUTHN_NOT_SUPPORTED; /* Find the matching authentication handler. Note that we don't reuse the auth scheme stored in the context, as that may have changed. (ex. fallback from ntlm to basic.) */ - for (scheme = serf_authn_schemes; scheme->code != 0; ++scheme) { - if (! (ab->code == scheme->code && - ctx->authn_types & scheme->type)) + for (scheme = serf_authn_schemes; scheme->name != 0; ++scheme) { + const char *auth_hdr; + serf__auth_handler_func_t handler; + serf__authn_info_t *authn_info; + + if (! (ctx->authn_types & scheme->type)) continue; serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, "Client supports: %s\n", scheme->name); - if (strcmp(auth_name, scheme->name) == 0) { - serf__auth_handler_func_t handler = scheme->handle_func; - apr_status_t status = 0; - - serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, - "... matched: %s\n", scheme->name); - /* If this is the first time we use this scheme on this connection, - make sure to initialize the authentication handler first. */ - if (ab->code == 401 && ctx->authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->authn_info.scheme = scheme; - else - ctx->authn_info.scheme = NULL; - } - } - else if (ab->code == 407 && ctx->proxy_authn_info.scheme != scheme) { - status = scheme->init_ctx_func(ab->code, ctx, ctx->pool); - if (!status) { - status = scheme->init_conn_func(ab->code, conn, conn->pool); - - if (!status) - ctx->proxy_authn_info.scheme = scheme; - else - ctx->proxy_authn_info.scheme = NULL; - } - } + auth_hdr = apr_hash_get(hdrs, scheme->key, APR_HASH_KEY_STRING); + + if (!auth_hdr) + continue; + + /* Found a matching scheme */ + status = APR_SUCCESS; + + handler = scheme->handle_func; + + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "... matched: %s\n", scheme->name); + + if (code == 401) { + authn_info = serf__get_authn_info_for_server(conn); + } else { + authn_info = &ctx->proxy_authn_info; + } + /* If this is the first time we use this scheme on this context and/or + this connection, make sure to initialize the authentication handler + first. */ + if (authn_info->scheme != scheme) { + status = scheme->init_ctx_func(code, ctx, ctx->pool); if (!status) { - scheme_found = TRUE; - ab->scheme = scheme; - status = handler(ab->code, ab->request, ab->response, - header, auth_attr, ab->baton, ctx->pool); + status = scheme->init_conn_func(scheme, code, conn, + conn->pool); + if (!status) + authn_info->scheme = scheme; + else + authn_info->scheme = NULL; } + } - /* If the authentication fails, cache the error for now. Try the - next available scheme. If there's none raise the error. */ - if (status) { - scheme_found = FALSE; - scheme = NULL; + if (!status) { + const char *auth_attr = strchr(auth_hdr, ' '); + if (auth_attr) { + auth_attr++; } - /* Let the caller now if the authentication setup was succesful - or not. */ - ab->status = status; - break; + status = handler(code, request, response, + auth_hdr, auth_attr, baton, ctx->pool); } + + if (status == APR_SUCCESS) + break; + + /* No success authenticating with this scheme, try the next. + If no more authn schemes are found the status of this scheme will be + returned. + */ + serf__log_skt(AUTH_VERBOSE, __FILE__, conn->skt, + "%s authentication failed.\n", scheme->name); } - /* If a matching scheme handler was found, we can stop iterating - over the response headers - so return a non-0 value. */ - return scheme_found; + return status; +} + +/** + * Baton passed to the store_header_in_dict callback function + */ +typedef struct { + const char *header; + apr_pool_t *pool; + apr_hash_t *hdrs; +} auth_baton_t; + +static int store_header_in_dict(void *baton, + const char *key, + const char *header) +{ + auth_baton_t *ab = baton; + const char *auth_attr; + char *auth_name, *c; + + /* We're only interested in xxxx-Authenticate headers. */ + if (strcmp(key, ab->header) != 0) + return 0; + + /* Extract the authentication scheme name. */ + auth_attr = strchr(header, ' '); + if (auth_attr) { + auth_name = apr_pstrmemdup(ab->pool, header, auth_attr - header); + } + else + auth_name = apr_pstrmemdup(ab->pool, header, strlen(header)); + + /* Convert scheme name to lower case to enable case insensitive matching. */ + for (c = auth_name; *c != '\0'; c++) + *c = (char)apr_tolower(*c); + + apr_hash_set(ab->hdrs, auth_name, APR_HASH_KEY_STRING, + apr_pstrdup(ab->pool, header)); + + return 0; } /* Dispatch authentication handling. This function matches the possible @@ -252,11 +257,7 @@ static apr_status_t dispatch_auth(int co auth_baton_t ab = { 0 }; const char *auth_hdr; - ab.code = code; - ab.status = APR_SUCCESS; - ab.request = request; - ab.response = response; - ab.baton = baton; + ab.hdrs = apr_hash_make(pool); ab.pool = pool; /* Before iterating over all authn headers, check if there are any. */ @@ -275,8 +276,8 @@ static apr_status_t dispatch_auth(int co "%s authz required. Response header(s): %s\n", code == 401 ? "Server" : "Proxy", auth_hdr); - /* Iterate over all headers. Try to find a matching authentication scheme - handler. + + /* Store all WWW- or Proxy-Authenticate headers in a dictionary. Note: it is possible to have multiple Authentication: headers. We do not want to combine them (per normal header combination rules) as that @@ -285,15 +286,13 @@ static apr_status_t dispatch_auth(int co work with. */ serf_bucket_headers_do(hdrs, - handle_auth_header, + store_header_in_dict, &ab); - if (ab.status != APR_SUCCESS) - return ab.status; - if (!ab.scheme || ab.scheme->name == NULL) { - /* No matching authentication found. */ - return SERF_ERROR_AUTHN_NOT_SUPPORTED; - } + /* Iterate over all authentication schemes, in order of decreasing + security. Try to find a authentication schema the server support. */ + return handle_auth_headers(code, baton, ab.hdrs, + request, response, pool); } return APR_SUCCESS; @@ -356,28 +355,41 @@ apr_status_t serf__handle_auth_response( /* Requeue the request with the necessary auth headers. */ /* ### Application doesn't know about this request! */ - serf_connection_priority_request_create(request->conn, - request->setup, - request->setup_baton); + if (request->ssltunnel) { + serf__ssltunnel_request_create(request->conn, + request->setup, + request->setup_baton); + } else { + serf_connection_priority_request_create(request->conn, + request->setup, + request->setup_baton); + } return APR_EOF; } else { - /* Validate the response authn headers if needed. */ serf__validate_response_func_t validate_resp; serf_connection_t *conn = request->conn; serf_context_t *ctx = conn->ctx; + serf__authn_info_t *authn_info; apr_status_t resp_status = APR_SUCCESS; - - if (ctx->authn_info.scheme) { - validate_resp = ctx->authn_info.scheme->validate_response_func; + + + /* Validate the response server authn headers. */ + authn_info = serf__get_authn_info_for_server(conn); + if (authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(HOST, sl.code, conn, request, response, pool); } - if (!resp_status && ctx->proxy_authn_info.scheme) { - validate_resp = ctx->proxy_authn_info.scheme->validate_response_func; + + /* Validate the response proxy authn headers. */ + authn_info = &ctx->proxy_authn_info; + if (!resp_status && authn_info->scheme) { + validate_resp = authn_info->scheme->validate_response_func; resp_status = validate_resp(PROXY, sl.code, conn, request, response, pool); } + if (resp_status) { /* If there was an error in the final step of the authentication, consider the reponse body as invalid and discard it. */ @@ -419,3 +431,42 @@ void serf__encode_auth_header(const char apr_base64_encode(ptr, data, data_len); } + +const char *serf__construct_realm(peer_t peer, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 20:32:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3FC99B99; Fri, 2 Aug 2013 20:32:27 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B6A929BC; Fri, 2 Aug 2013 20:32:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72KWQMq093146; Fri, 2 Aug 2013 20:32:26 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72KWQjQ093145; Fri, 2 Aug 2013 20:32:26 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201308022032.r72KWQjQ093145@svn.freebsd.org> From: Olivier Houchard Date: Fri, 2 Aug 2013 20:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253896 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 20:32:27 -0000 Author: cognet Date: Fri Aug 2 20:32:26 2013 New Revision: 253896 URL: http://svnweb.freebsd.org/changeset/base/253896 Log: Only receive the interrupts on the first core, to avoid duplicate interrupts. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Fri Aug 2 19:21:46 2013 (r253895) +++ head/sys/arm/arm/gic.c Fri Aug 2 20:32:26 2013 (r253896) @@ -205,7 +205,7 @@ arm_gic_attach(device_t dev) for (i = 0; i < nirqs; i += 4) { gic_d_write_4(GICD_IPRIORITYR(i >> 2), 0); - gic_d_write_4(GICD_ITARGETSR(i >> 2), 0xffffffff); + gic_d_write_4(GICD_ITARGETSR(i >> 2), 1 << 0 | 1 << 8 | 1 << 16 | 1 << 24); } /* Set all the interrupts to be in Group 0 (secure) */ From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 21:23:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EC04A2ED; Fri, 2 Aug 2013 21:23:28 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D82122B81; Fri, 2 Aug 2013 21:23:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72LNSY6008213; Fri, 2 Aug 2013 21:23:28 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72LNSVH008207; Fri, 2 Aug 2013 21:23:28 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308022123.r72LNSVH008207@svn.freebsd.org> From: Adrian Chadd Date: Fri, 2 Aug 2013 21:23:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253897 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 21:23:29 -0000 Author: adrian Date: Fri Aug 2 21:23:28 2013 New Revision: 253897 URL: http://svnweb.freebsd.org/changeset/base/253897 Log: Break out the iwn(4) device IDs into if_iwn_devid.h, as well as add IDs for new devices. * Add new device IDs * Extend the ID probe code to include the newer range of bits used by later model devices Tested: * Intel 5100, STA mode TODO: * Test on Intel 4965, just to be sure Submitted by: Cedric GROSS Added: head/sys/dev/iwn/if_iwn_devid.h (contents, props changed) Modified: head/sys/dev/iwn/if_iwn.c head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Fri Aug 2 20:32:26 2013 (r253896) +++ head/sys/dev/iwn/if_iwn.c Fri Aug 2 21:23:28 2013 (r253897) @@ -74,6 +74,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include struct iwn_ident { uint16_t vendor; @@ -82,40 +83,40 @@ struct iwn_ident { }; static const struct iwn_ident iwn_ident_table[] = { - { 0x8086, 0x0082, "Intel Centrino Advanced-N 6205" }, - { 0x8086, 0x0083, "Intel Centrino Wireless-N 1000" }, - { 0x8086, 0x0084, "Intel Centrino Wireless-N 1000" }, - { 0x8086, 0x0085, "Intel Centrino Advanced-N 6205" }, - { 0x8086, 0x0087, "Intel Centrino Advanced-N + WiMAX 6250" }, - { 0x8086, 0x0089, "Intel Centrino Advanced-N + WiMAX 6250" }, - { 0x8086, 0x008a, "Intel Centrino Wireless-N 1030" }, - { 0x8086, 0x008b, "Intel Centrino Wireless-N 1030" }, - { 0x8086, 0x0090, "Intel Centrino Advanced-N 6230" }, - { 0x8086, 0x0091, "Intel Centrino Advanced-N 6230" }, - { 0x8086, 0x0885, "Intel Centrino Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0886, "Intel Centrino Wireless-N + WiMAX 6150" }, - { 0x8086, 0x0887, "Intel Centrino Wireless-N 2230" }, - { 0x8086, 0x0888, "Intel Centrino Wireless-N 2230" }, - { 0x8086, 0x0896, "Intel Centrino Wireless-N 130" }, - { 0x8086, 0x0897, "Intel Centrino Wireless-N 130" }, - { 0x8086, 0x08ae, "Intel Centrino Wireless-N 100" }, - { 0x8086, 0x08af, "Intel Centrino Wireless-N 100" }, - { 0x8086, 0x4229, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x422b, "Intel Centrino Ultimate-N 6300" }, - { 0x8086, 0x422c, "Intel Centrino Advanced-N 6200" }, - { 0x8086, 0x422d, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4230, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4232, "Intel WiFi Link 5100" }, - { 0x8086, 0x4233, "Intel Wireless WiFi Link 4965" }, - { 0x8086, 0x4235, "Intel Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4236, "Intel Ultimate N WiFi Link 5300" }, - { 0x8086, 0x4237, "Intel WiFi Link 5100" }, - { 0x8086, 0x4238, "Intel Centrino Ultimate-N 6300" }, - { 0x8086, 0x4239, "Intel Centrino Advanced-N 6200" }, - { 0x8086, 0x423a, "Intel WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423b, "Intel WiMAX/WiFi Link 5350" }, - { 0x8086, 0x423c, "Intel WiMAX/WiFi Link 5150" }, - { 0x8086, 0x423d, "Intel WiMAX/WiFi Link 5150" }, + { 0x8086, IWN_DID_6x05_1, "Intel Centrino Advanced-N 6205" }, + { 0x8086, IWN_DID_1000_1, "Intel Centrino Wireless-N 1000" }, + { 0x8086, IWN_DID_1000_2, "Intel Centrino Wireless-N 1000" }, + { 0x8086, IWN_DID_6x05_2, "Intel Centrino Advanced-N 6205" }, + { 0x8086, IWN_DID_6050_1, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, IWN_DID_6050_2, "Intel Centrino Advanced-N + WiMAX 6250" }, + { 0x8086, IWN_DID_x030_1, "Intel Centrino Wireless-N 1030" }, + { 0x8086, IWN_DID_x030_2, "Intel Centrino Wireless-N 1030" }, + { 0x8086, IWN_DID_x030_3, "Intel Centrino Advanced-N 6230" }, + { 0x8086, IWN_DID_x030_4, "Intel Centrino Advanced-N 6230" }, + { 0x8086, IWN_DID_6150_1, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, IWN_DID_6150_2, "Intel Centrino Wireless-N + WiMAX 6150" }, + { 0x8086, IWN_DID_2x30_1, "Intel Centrino Wireless-N 2230" }, + { 0x8086, IWN_DID_2x30_2, "Intel Centrino Wireless-N 2230" }, + { 0x8086, IWN_DID_130_1, "Intel Centrino Wireless-N 130" }, + { 0x8086, IWN_DID_130_2, "Intel Centrino Wireless-N 130" }, + { 0x8086, IWN_DID_100_1, "Intel Centrino Wireless-N 100" }, + { 0x8086, IWN_DID_100_2, "Intel Centrino Wireless-N 100" }, + { 0x8086, IWN_DID_4965_1, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_6x00_1, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, IWN_DID_6x00_2, "Intel Centrino Advanced-N 6200" }, + { 0x8086, IWN_DID_4965_2, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_4965_3, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_5x00_1, "Intel WiFi Link 5100" }, + { 0x8086, IWN_DID_4965_4, "Intel Wireless WiFi Link 4965" }, + { 0x8086, IWN_DID_5x00_3, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, IWN_DID_5x00_4, "Intel Ultimate N WiFi Link 5300" }, + { 0x8086, IWN_DID_5x00_2, "Intel WiFi Link 5100" }, + { 0x8086, IWN_DID_6x00_3, "Intel Centrino Ultimate-N 6300" }, + { 0x8086, IWN_DID_6x00_4, "Intel Centrino Advanced-N 6200" }, + { 0x8086, IWN_DID_5x50_1, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, IWN_DID_5x50_2, "Intel WiMAX/WiFi Link 5350" }, + { 0x8086, IWN_DID_5x50_3, "Intel WiMAX/WiFi Link 5150" }, + { 0x8086, IWN_DID_5x50_4, "Intel WiMAX/WiFi Link 5150" }, { 0, 0, NULL } }; @@ -518,7 +519,8 @@ iwn_attach(device_t dev) IWN_LOCK_INIT(sc); /* Read hardware revision and attach. */ - sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> 4) & 0xf; + sc->hw_type = (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT) + & IWN_HW_REV_TYPE_MASK; if (sc->hw_type == IWN_HW_REV_TYPE_4965) error = iwn4965_attach(sc, pci_get_device(dev)); else Added: head/sys/dev/iwn/if_iwn_devid.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/iwn/if_iwn_devid.h Fri Aug 2 21:23:28 2013 (r253897) @@ -0,0 +1,294 @@ +/*- + * Copyright (c) 2013 Cedric GROSS + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * $FreeBSD$ + */ + +#ifndef __IF_IWN_DEVID_H__ +#define __IF_IWN_DEVID_H__ + +#define IWN_HW_REV_TYPE_SHIFT 4 +#define IWN_HW_REV_TYPE_MASK 0x1f + +/* Device revision */ +#define IWN_HW_REV_TYPE_4965 0 +#define IWN_HW_REV_TYPE_5300 2 +#define IWN_HW_REV_TYPE_5350 3 +#define IWN_HW_REV_TYPE_5150 4 +#define IWN_HW_REV_TYPE_5100 5 +#define IWN_HW_REV_TYPE_1000 6 +#define IWN_HW_REV_TYPE_6000 7 +#define IWN_HW_REV_TYPE_6050 8 +#define IWN_HW_REV_TYPE_6005 11 +#define IWN_HW_REV_TYPE_2030 12 +#define IWN_HW_REV_TYPE_2000 16 +#define IWN_HW_REV_TYPE_105 17 +#define IWN_HW_REV_TYPE_135 18 + + /* ========================================================================== + * DEVICE ID BLOCK + * ========================================================================== +*/ +/* + * -------------------------------------------------------------------------- + * Device ID for 2x30 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_2x30_1 0x0887 +#define IWN_DID_2x30_2 0x0888 +/* SubDevice ID */ +#define IWN_SDID_2x30_1 0x4062 +#define IWN_SDID_2x30_2 0x4262 +#define IWN_SDID_2x30_3 0x4462 +#define IWN_SDID_2x30_4 0x4066 +#define IWN_SDID_2x30_5 0x4266 +#define IWN_SDID_2x30_6 0x4466 +/* + * -------------------------------------------------------------------------- + * Device ID for 1000 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_1000_1 0x0083 +#define IWN_DID_1000_2 0x0084 +/* SubDevice ID */ +#define IWN_SDID_1000_1 0x1205 +#define IWN_SDID_1000_2 0x1305 +#define IWN_SDID_1000_3 0x1225 +#define IWN_SDID_1000_4 0x1325 +#define IWN_SDID_1000_5 0x1215 +#define IWN_SDID_1000_6 0x1315 +#define IWN_SDID_1000_7 0x1206 +#define IWN_SDID_1000_8 0x1306 +#define IWN_SDID_1000_9 0x1226 +#define IWN_SDID_1000_10 0x1326 +#define IWN_SDID_1000_11 0x1216 +#define IWN_SDID_1000_12 0x1316 + +/* + * -------------------------------------------------------------------------- + * Device ID for 6x00 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6x00_1 0x422B +#define IWN_DID_6x00_2 0x422C +#define IWN_DID_6x00_3 0x4238 +#define IWN_DID_6x00_4 0x4239 +/* SubDevice ID */ +#define IWN_SDID_6x00_1 0x1101 +#define IWN_SDID_6x00_2 0x1121 +#define IWN_SDID_6x00_3 0x1301 +#define IWN_SDID_6x00_4 0x1306 +#define IWN_SDID_6x00_5 0x1307 +#define IWN_SDID_6x00_6 0x1321 +#define IWN_SDID_6x00_7 0x1326 +#define IWN_SDID_6x00_8 0x1111 +#define IWN_SDID_6x00_9 0x1311 +#define IWN_SDID_6x00_10 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 6x05 series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6x05_1 0x0082 +#define IWN_DID_6x05_2 0x0085 +/* SubDevice ID */ +#define IWN_SDID_6x05_1 0x1301 +#define IWN_SDID_6x05_2 0x1306 +#define IWN_SDID_6x05_3 0x1307 +#define IWN_SDID_6x05_4 0x1321 +#define IWN_SDID_6x05_5 0x1326 +#define IWN_SDID_6x05_6 0x1311 +#define IWN_SDID_6x05_7 0x1316 +#define IWN_SDID_6x05_8 0xC020 +#define IWN_SDID_6x05_9 0xC220 +#define IWN_SDID_6x05_10 0x4820 +#define IWN_SDID_6x05_11 0x1304 +#define IWN_SDID_6x05_12 0x1305 +/* + * -------------------------------------------------------------------------- + * Device ID for 6050 WiFi/WiMax Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6050_1 0x0087 +#define IWN_DID_6050_2 0x0089 +/* SubDevice ID */ +#define IWN_SDID_6050_1 0x1301 +#define IWN_SDID_6050_2 0x1306 +#define IWN_SDID_6050_3 0x1321 +#define IWN_SDID_6050_4 0x1326 +#define IWN_SDID_6050_5 0x1311 +#define IWN_SDID_6050_6 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 6150 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6150_1 0x0885 +#define IWN_DID_6150_2 0x0886 +/* SubDevice ID */ +#define IWN_SDID_6150_1 0x1305 +#define IWN_SDID_6150_2 0x1307 +#define IWN_SDID_6150_3 0x1325 +#define IWN_SDID_6150_4 0x1327 +#define IWN_SDID_6150_5 0x1315 +#define IWN_SDID_6150_6 0x1317 +/* + * -------------------------------------------------------------------------- + * Device ID for 6035 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_6035_1 0x088E +#define IWN_DID_6035_2 0x088F +/* SubDevice ID */ +#define IWN_SDID_6035_1 0x4060 +#define IWN_SDID_6035_2 0x4260 +#define IWN_SDID_6035_3 0x4460 +#define IWN_SDID_6035_4 0x4860 +/* + * -------------------------------------------------------------------------- + * Device ID for 1030 and 6030 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_x030_1 0x008A +#define IWN_DID_x030_2 0x008B +#define IWN_DID_x030_3 0x0090 +#define IWN_DID_x030_4 0x0091 +/* SubDevice ID */ +#define IWN_SDID_x030_1 0x5305 +#define IWN_SDID_x030_2 0x5307 +#define IWN_SDID_x030_3 0x5325 +#define IWN_SDID_x030_4 0x5327 +#define IWN_SDID_x030_5 0x5315 +#define IWN_SDID_x030_6 0x5317 +#define IWN_SDID_x030_7 0x5211 +#define IWN_SDID_x030_8 0x5215 +#define IWN_SDID_x030_9 0x5216 +#define IWN_SDID_x030_10 0x5201 +#define IWN_SDID_x030_11 0x5205 +#define IWN_SDID_x030_12 0x5206 +#define IWN_SDID_x030_13 0x5207 +#define IWN_SDID_x030_14 0x5221 +#define IWN_SDID_x030_15 0x5225 +#define IWN_SDID_x030_16 0x5226 +/* + * -------------------------------------------------------------------------- + * Device ID for 130 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_130_1 0x0896 +#define IWN_DID_130_2 0x0897 +/* SubDevice ID */ +#define IWN_SDID_130_1 0x5005 +#define IWN_SDID_130_2 0x5007 +#define IWN_SDID_130_3 0x5015 +#define IWN_SDID_130_4 0x5017 +#define IWN_SDID_130_5 0x5025 +#define IWN_SDID_130_6 0x5027 + +/* + * -------------------------------------------------------------------------- + * Device ID for 100 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_100_1 0x08AE +#define IWN_DID_100_2 0x08AF +/* SubDevice ID */ +#define IWN_SDID_100_1 0x1005 +#define IWN_SDID_100_2 0x1007 +#define IWN_SDID_100_3 0x1015 +#define IWN_SDID_100_4 0x1017 +#define IWN_SDID_100_5 0x1025 +#define IWN_SDID_100_6 0x1027 + +/* + * -------------------------------------------------------------------------- + * Device ID for 5x00 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_5x00_1 0x4232 +#define IWN_DID_5x00_2 0x4237 +#define IWN_DID_5x00_3 0x4235 +#define IWN_DID_5x00_4 0x4236 +/* SubDevice ID */ +#define IWN_SDID_5x00_1 0x1201 +#define IWN_SDID_5x00_2 0x1301 +#define IWN_SDID_5x00_3 0x1204 +#define IWN_SDID_5x00_4 0x1304 +#define IWN_SDID_5x00_5 0x1205 +#define IWN_SDID_5x00_6 0x1305 +#define IWN_SDID_5x00_7 0x1206 +#define IWN_SDID_5x00_8 0x1306 +#define IWN_SDID_5x00_9 0x1221 +#define IWN_SDID_5x00_10 0x1321 +#define IWN_SDID_5x00_11 0x1224 +#define IWN_SDID_5x00_12 0x1324 +#define IWN_SDID_5x00_13 0x1225 +#define IWN_SDID_5x00_14 0x1325 +#define IWN_SDID_5x00_15 0x1226 +#define IWN_SDID_5x00_16 0x1326 +#define IWN_SDID_5x00_17 0x1211 +#define IWN_SDID_5x00_18 0x1311 +#define IWN_SDID_5x00_19 0x1214 +#define IWN_SDID_5x00_20 0x1314 +#define IWN_SDID_5x00_21 0x1215 +#define IWN_SDID_5x00_22 0x1315 +#define IWN_SDID_5x00_23 0x1216 +#define IWN_SDID_5x00_24 0x1316 +#define IWN_SDID_5x00_25 0x1021 +#define IWN_SDID_5x00_26 0x1121 +#define IWN_SDID_5x00_27 0x1024 +#define IWN_SDID_5x00_28 0x1124 +#define IWN_SDID_5x00_29 0x1001 +#define IWN_SDID_5x00_30 0x1101 +#define IWN_SDID_5x00_31 0x1004 +#define IWN_SDID_5x00_32 0x1104 +#define IWN_SDID_5x00_33 0x1011 +#define IWN_SDID_5x00_34 0x1111 +#define IWN_SDID_5x00_35 0x1014 +#define IWN_SDID_5x00_36 0x1114 +/* + * -------------------------------------------------------------------------- + * Device ID for 5x50 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_5x50_1 0x423A +#define IWN_DID_5x50_2 0x423B +#define IWN_DID_5x50_3 0x423C +#define IWN_DID_5x50_4 0x423D +/* SubDevice ID */ +#define IWN_SDID_5x50_1 0x1001 +#define IWN_SDID_5x50_2 0x1021 +#define IWN_SDID_5x50_3 0x1011 +#define IWN_SDID_5x50_4 0x1201 +#define IWN_SDID_5x50_5 0x1301 +#define IWN_SDID_5x50_6 0x1206 +#define IWN_SDID_5x50_7 0x1306 +#define IWN_SDID_5x50_8 0x1221 +#define IWN_SDID_5x50_9 0x1321 +#define IWN_SDID_5x50_10 0x1211 +#define IWN_SDID_5x50_11 0x1311 +#define IWN_SDID_5x50_12 0x1216 +#define IWN_SDID_5x50_13 0x1316 +/* + * -------------------------------------------------------------------------- + * Device ID for 4965 Series + * -------------------------------------------------------------------------- + */ +#define IWN_DID_4965_1 0x4229 +#define IWN_DID_4965_2 0x422d +#define IWN_DID_4965_3 0x4230 +#define IWN_DID_4965_4 0x4233 + +#endif /* ! __IF_IWN_DEVID_H__ */ Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Fri Aug 2 20:32:26 2013 (r253896) +++ head/sys/dev/iwn/if_iwnreg.h Fri Aug 2 21:23:28 2013 (r253897) @@ -200,19 +200,6 @@ #define IWN_GP_CNTRL_SLEEP (1 << 4) #define IWN_GP_CNTRL_RFKILL (1 << 27) -/* Possible flags for register IWN_HW_REV. */ -#define IWN_HW_REV_TYPE_SHIFT 4 -#define IWN_HW_REV_TYPE_MASK 0x000000f0 -#define IWN_HW_REV_TYPE_4965 0 -#define IWN_HW_REV_TYPE_5300 2 -#define IWN_HW_REV_TYPE_5350 3 -#define IWN_HW_REV_TYPE_5150 4 -#define IWN_HW_REV_TYPE_5100 5 -#define IWN_HW_REV_TYPE_1000 6 -#define IWN_HW_REV_TYPE_6000 7 -#define IWN_HW_REV_TYPE_6050 8 -#define IWN_HW_REV_TYPE_6005 11 - /* Possible flags for register IWN_GIO_CHICKEN. */ #define IWN_GIO_CHICKEN_L1A_NO_L0S_RX (1 << 23) #define IWN_GIO_CHICKEN_DIS_L0S_TIMER (1 << 29) From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 21:28:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1212E486; Fri, 2 Aug 2013 21:28:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D695A2BAB; Fri, 2 Aug 2013 21:28:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72LSagr008792; Fri, 2 Aug 2013 21:28:36 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72LSaPp008791; Fri, 2 Aug 2013 21:28:36 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201308022128.r72LSaPp008791@svn.freebsd.org> From: Adrian Chadd Date: Fri, 2 Aug 2013 21:28:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253898 - head/sys/dev/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 21:28:37 -0000 Author: adrian Date: Fri Aug 2 21:28:36 2013 New Revision: 253898 URL: http://svnweb.freebsd.org/changeset/base/253898 Log: Add in some definitions required for later iwn(4) device support. This also clarifies a few existing fields. Tested: * Intel 5100 Submitted by: Cedric GROSS Modified: head/sys/dev/iwn/if_iwnreg.h Modified: head/sys/dev/iwn/if_iwnreg.h ============================================================================== --- head/sys/dev/iwn/if_iwnreg.h Fri Aug 2 21:23:28 2013 (r253897) +++ head/sys/dev/iwn/if_iwnreg.h Fri Aug 2 21:28:36 2013 (r253898) @@ -18,6 +18,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#define IWN_CT_KILL_THRESHOLD 114 /* in Celsius */ +#define IWN_CT_KILL_EXIT_THRESHOLD 95 /* in Celsius */ + #define IWN_TX_RING_COUNT 256 #define IWN_TX_RING_LOMARK 192 #define IWN_TX_RING_HIMARK 224 @@ -38,6 +41,10 @@ #define IWN_ICT_SIZE 4096 #define IWN_ICT_COUNT (IWN_ICT_SIZE / sizeof (uint32_t)) +/* For cards with PAN command, default is IWN_CMD_QUEUE_NUM */ +#define IWN_CMD_QUEUE_NUM 4 +#define IWN_PAN_CMD_QUEUE 9 + /* Maximum number of DMA segments for TX. */ #define IWN_MAX_SCATTER 20 @@ -89,6 +96,7 @@ #define IWN_MEM_WADDR 0x410 #define IWN_MEM_WDATA 0x418 #define IWN_MEM_RDATA 0x41c +#define IWN_TARG_MBX_C 0x430 #define IWN_PRPH_WADDR 0x444 #define IWN_PRPH_RADDR 0x448 #define IWN_PRPH_WDATA 0x44c @@ -213,17 +221,45 @@ #define IWN_GP_DRIVER_RADIO_2X2_IPA (2 << 0) #define IWN_GP_DRIVER_CALIB_VER6 (1 << 2) #define IWN_GP_DRIVER_6050_1X2 (1 << 3) +#define IWN_GP_DRIVER_REG_BIT_RADIO_IQ_INVERT (1 << 7) /* Possible flags for register IWN_UCODE_GP1_CLR. */ #define IWN_UCODE_GP1_RFKILL (1 << 1) #define IWN_UCODE_GP1_CMD_BLOCKED (1 << 2) #define IWN_UCODE_GP1_CTEMP_STOP_RF (1 << 3) +#define IWN_UCODE_GP1_CFG_COMPLETE (1 << 5) /* Possible flags/values for register IWN_LED. */ #define IWN_LED_BSM_CTRL (1 << 5) #define IWN_LED_OFF 0x00000038 #define IWN_LED_ON 0x00000078 +#define IWN_MAX_BLINK_TBL 10 +#define IWN_LED_STATIC_ON 0 +#define IWN_LED_STATIC_OFF 1 +#define IWN_LED_SLOW_BLINK 2 +#define IWN_LED_INT_BLINK 3 +#define IWN_LED_UNIT 0x1388 /* 5 ms */ + +static const struct { + uint16_t tpt; /* Mb/s */ + uint8_t on_time; + uint8_t off_time; +} blink_tbl[] = +{ + {300, 5, 5}, + {200, 8, 8}, + {100, 11, 11}, + {70, 13, 13}, + {50, 15, 15}, + {20, 17, 17}, + {10, 19, 19}, + {5, 22, 22}, + {1, 26, 26}, + {0, 33, 33}, + /* SOLID_ON */ +}; + /* Possible flags for register IWN_DRAM_INT_TBL. */ #define IWN_DRAM_INT_TBL_WRAP_CHECK (1 << 27) #define IWN_DRAM_INT_TBL_ENABLE (1 << 31) @@ -370,14 +406,26 @@ struct iwn_rx_status { } __packed; struct iwn_rx_desc { + /* + * The first 4 bytes of the RX frame header contain both the RX frame + * size and some flags. + * Bit fields: + * 31: flag flush RB request + * 30: flag ignore TC (terminal counter) request + * 29: flag fast IRQ request + * 28-14: Reserved + * 13-00: RX frame size + */ uint32_t len; uint8_t type; #define IWN_UC_READY 1 #define IWN_ADD_NODE_DONE 24 #define IWN_TX_DONE 28 +#define IWN_REPLY_LED_CMD 72 #define IWN5000_CALIBRATION_RESULT 102 #define IWN5000_CALIBRATION_DONE 103 #define IWN_START_SCAN 130 +#define IWN_NOTIF_SCAN_RESULT 131 #define IWN_STOP_SCAN 132 #define IWN_RX_STATISTICS 156 #define IWN_BEACON_STATISTICS 157 @@ -388,11 +436,23 @@ struct iwn_rx_desc { #define IWN_RX_DONE 195 #define IWN_RX_COMPRESSED_BA 197 - uint8_t flags; - uint8_t idx; + uint8_t flags; /* 0:5 reserved, 6 abort, 7 internal */ + uint8_t idx; /* position within TX queue */ uint8_t qid; + /* 0:4 TX queue id - 5:6 reserved - 7 unsolicited RX + * or uCode-originated notification + */ } __packed; +#define IWN_RX_DESC_QID_MSK 0x1F +#define IWN_UNSOLICITED_RX_NOTIF 0x80 + +/* CARD_STATE_NOTIFICATION */ +#define IWN_STATE_CHANGE_HW_CARD_DISABLED 0x01 +#define IWN_STATE_CHANGE_SW_CARD_DISABLED 0x02 +#define IWN_STATE_CHANGE_CT_CARD_DISABLED 0x04 +#define IWN_STATE_CHANGE_RXON_CARD_DISABLED 0x10 + /* Possible RX status flags. */ #define IWN_RX_NO_CRC_ERR (1 << 0) #define IWN_RX_NO_OVFL_ERR (1 << 1) @@ -416,6 +476,7 @@ struct iwn_tx_cmd { #define IWN_CMD_LINK_QUALITY 78 #define IWN_CMD_SET_LED 72 #define IWN5000_CMD_WIMAX_COEX 90 +#define IWN_TEMP_NOTIFICATION 98 #define IWN5000_CMD_CALIB_CONFIG 101 #define IWN5000_CMD_CALIB_RESULT 102 #define IWN5000_CMD_CALIB_COMPLETE 103 @@ -432,6 +493,17 @@ struct iwn_tx_cmd { #define IWN_CMD_PHY_CALIB 176 #define IWN_CMD_BT_COEX_PRIOTABLE 204 #define IWN_CMD_BT_COEX_PROT 205 +#define IWN_CMD_BT_COEX_NOTIF 206 +/* PAN commands */ +#define IWN_CMD_WIPAN_PARAMS 0xb2 +#define IWN_CMD_WIPAN_RXON 0xb3 +#define IWN_CMD_WIPAN_RXON_TIMING 0xb4 +#define IWN_CMD_WIPAN_RXON_ASSOC 0xb6 +#define IWN_CMD_WIPAN_QOS_PARAM 0xb7 +#define IWN_CMD_WIPAN_WEPKEY 0xb8 +#define IWN_CMD_WIPAN_P2P_CHANNEL_SWITCH 0xb9 +#define IWN_CMD_WIPAN_NOA_NOTIFICATION 0xbc +#define IWN_CMD_WIPAN_DEACTIVATION_COMPLETE 0xbd uint8_t flags; uint8_t idx; @@ -439,6 +511,27 @@ struct iwn_tx_cmd { uint8_t data[136]; } __packed; +/* + * Structure for IWN_CMD_GET_STATISTICS = (0x9c) 156 + * all devices identical. + * + * This command triggers an immediate response containing uCode statistics. + * The response is in the same format as IWN_BEACON_STATISTICS (0x9d) 157. + * + * If the CLEAR_STATS configuration flag is set, uCode will clear its + * internal copy of the statistics (counters) after issuing the response. + * This flag does not affect IWN_BEACON_STATISTICS after beacons (see below). + * + * If the DISABLE_NOTIF configuration flag is set, uCode will not issue + * IWN_BEACON_STATISTICS after received beacons. This flag + * does not affect the response to the IWN_CMD_GET_STATISTICS 0x9c itself. + */ +struct iwn_statistics_cmd { + uint32_t configuration_flags; +#define IWN_STATS_CONF_CLEAR_STATS htole32(0x1) +#define IWN_STATS_CONF_DISABLE_NOTIF htole32(0x2) +} __packed; + /* Antenna flags, used in various commands. */ #define IWN_ANT_A (1 << 0) #define IWN_ANT_B (1 << 1) @@ -446,6 +539,7 @@ struct iwn_tx_cmd { /* Shortcuts. */ #define IWN_ANT_AB (IWN_ANT_A | IWN_ANT_B) #define IWN_ANT_BC (IWN_ANT_B | IWN_ANT_C) +#define IWN_ANT_AC (IWN_ANT_A | IWN_ANT_C) #define IWN_ANT_ABC (IWN_ANT_A | IWN_ANT_B | IWN_ANT_C) /* Structure for command IWN_CMD_RXON. */ @@ -461,6 +555,8 @@ struct iwn_rxon { #define IWN_MODE_STA 3 #define IWN_MODE_IBSS 4 #define IWN_MODE_MONITOR 6 +#define IWN_MODE_2STA 8 +#define IWN_MODE_P2P 9 uint8_t air; uint16_t rxchain; @@ -544,7 +640,8 @@ struct iwn_cmd_timing { uint16_t atim; uint32_t binitval; uint16_t lintval; - uint16_t reserved; + uint8_t dtim_period; + uint8_t delta_cp_bss_tbtts; } __packed; /* Structure for command IWN_CMD_ADD_NODE. */ @@ -558,6 +655,9 @@ struct iwn_node_info { uint16_t reserved2; uint8_t id; #define IWN_ID_BSS 0 +#define IWN_STA_ID 1 + +#define IWN_PAN_ID_BCAST 14 #define IWN5000_ID_BROADCAST 15 #define IWN4965_ID_BROADCAST 31 @@ -759,6 +859,11 @@ struct iwn_pmgt_cmd { #define IWN_PS_SLEEP_OVER_DTIM (1 << 2) #define IWN_PS_PCI_PMGT (1 << 3) #define IWN_PS_FAST_PD (1 << 4) +#define IWN_PS_BEACON_FILTERING (1 << 5) +#define IWN_PS_SHADOW_REG (1 << 6) +#define IWN_PS_CT_KILL (1 << 7) +#define IWN_PS_BT_SCD (1 << 8) +#define IWN_PS_ADVANCED_PM (1 << 9) uint8_t keepalive; uint8_t debug; @@ -796,6 +901,7 @@ struct iwn_scan_hdr { struct iwn_scan_chan { uint32_t flags; +#define IWN_CHAN_PASSIVE (0 << 0) #define IWN_CHAN_ACTIVE (1 << 0) #define IWN_CHAN_NPBREQS(x) (((1 << (x)) - 1) << 1) @@ -806,9 +912,25 @@ struct iwn_scan_chan { uint16_t passive; /* msecs */ } __packed; +#define IWN_SCAN_CRC_TH_DISABLED 0 +#define IWN_SCAN_CRC_TH_DEFAULT htole16(1) +#define IWN_SCAN_CRC_TH_NEVER htole16(0xffff) + /* Maximum size of a scan command. */ #define IWN_SCAN_MAXSZ (MCLBYTES - 4) +#define IWN_ACTIVE_DWELL_TIME_24 (30) /* all times in msec */ +#define IWN_ACTIVE_DWELL_TIME_52 (20) +#define IWN_ACTIVE_DWELL_FACTOR_24 (3) +#define IWN_ACTIVE_DWELL_FACTOR_52 (2) + +#define IWN_PASSIVE_DWELL_TIME_24 (20) /* all times in msec */ +#define IWN_PASSIVE_DWELL_TIME_52 (10) +#define IWN_PASSIVE_DWELL_BASE (100) +#define IWN_CHANNEL_TUNE_TIME (5) + +#define IWN_SCAN_CHAN_TIMEOUT 2 + /* Structure for command IWN_CMD_TXPOWER (4965AGN only.) */ #define IWN_RIDX_MAX 32 struct iwn4965_cmd_txpower { @@ -855,6 +977,16 @@ struct iwn_bluetooth { struct iwn6000_btcoex_config { uint8_t flags; +#define IWN_BT_FLAG_COEX6000_CHAN_INHIBITION 1 +#define IWN_BT_FLAG_COEX6000_MODE_MASK ((1 << 3) | (1 << 4) | (1 << 5 )) +#define IWN_BT_FLAG_COEX6000_MODE_SHIFT 3 +#define IWN_BT_FLAG_COEX6000_MODE_DISABLED 0 +#define IWN_BT_FLAG_COEX6000_MODE_LEGACY_2W 1 +#define IWN_BT_FLAG_COEX6000_MODE_3W 2 +#define IWN_BT_FLAG_COEX6000_MODE_4W 3 + +#define IWN_BT_FLAG_UCODE_DEFAULT (1 << 6) +#define IWN_BT_FLAG_SYNC_2_BT_DISABLE (1 << 7) uint8_t lead_time; uint8_t max_kill; uint8_t bt3_t7_timer; @@ -871,6 +1003,28 @@ struct iwn6000_btcoex_config { uint16_t rx_prio_boost; } __packed; +/* Structure for enhanced command IWN_CMD_BLUETOOTH for 2000 Series. */ +struct iwn2000_btcoex_config { + uint8_t flags; /* Cf Flags in iwn6000_btcoex_config */ + uint8_t lead_time; + uint8_t max_kill; + uint8_t bt3_t7_timer; + uint32_t kill_ack; + uint32_t kill_cts; + uint8_t sample_time; + uint8_t bt3_t2_timer; + uint16_t bt4_reaction; + uint32_t lookup_table[12]; + uint16_t bt4_decision; + uint16_t valid; + + uint32_t prio_boost; /* size change prior to iwn6000_btcoex_config */ + uint8_t reserved; /* added prior to iwn6000_btcoex_config */ + + uint8_t tx_prio_boost; + uint16_t rx_prio_boost; +} __packed; + struct iwn_btcoex_priotable { uint8_t calib_init1; uint8_t calib_init2; @@ -989,6 +1143,17 @@ struct iwn5000_phy_calib_temp_offset { uint16_t reserved; } __packed; +struct iwn5000_phy_calib_temp_offsetv2 { + uint8_t code; + uint8_t group; + uint8_t ngroups; + uint8_t isvalid; + int16_t offset_high; + int16_t offset_low; + int16_t burnt_voltage_ref; + int16_t reserved; +} __packed; + struct iwn_phy_calib_gain { uint8_t code; uint8_t group; @@ -1056,6 +1221,10 @@ struct iwn_ucode_info { } __packed; /* Structures for IWN_TX_DONE notification. */ +#define IWN_TX_STATUS_MSK 0xff +#define TX_STATUS_SUCCESS 0x01 +#define TX_STATUS_DIRECT_DONE 0x02 + #define IWN_TX_SUCCESS 0x00 #define IWN_TX_FAIL 0x80 /* all failures have 0x80 set */ #define IWN_TX_FAIL_SHORT_LIMIT 0x82 /* too many RTS retries */ @@ -1077,7 +1246,7 @@ struct iwn4965_tx_stat { } __packed; struct iwn5000_tx_stat { - uint8_t nframes; + uint8_t nframes; /* 1 no aggregation, >1 aggregation */ uint8_t btkillcnt; uint8_t rtsfailcnt; uint8_t ackfailcnt; @@ -1089,7 +1258,7 @@ struct iwn5000_tx_stat { uint16_t seq; uint16_t len; uint8_t tlc; - uint8_t ratid; + uint8_t ratid; /* tid (0:3), sta_id (4:7) */ uint8_t fc[2]; uint16_t status; uint16_t sequence; @@ -1137,6 +1306,42 @@ struct iwn_rx_stat { uint16_t chan; uint8_t phybuf[32]; uint32_t rate; +/* + * rate bit fields + * + * High-throughput (HT) rate format for bits 7:0 (bit 8 must be "1"): + * 2-0: 0) 6 Mbps + * 1) 12 Mbps + * 2) 18 Mbps + * 3) 24 Mbps + * 4) 36 Mbps + * 5) 48 Mbps + * 6) 54 Mbps + * 7) 60 Mbps + * + * 4-3: 0) Single stream (SISO) + * 1) Dual stream (MIMO) + * 2) Triple stream (MIMO) + * + * 5: Value of 0x20 in bits 7:0 indicates 6 Mbps HT40 duplicate data + * + * Legacy OFDM rate format for bits 7:0 (bit 8 must be "0", bit 9 "0"): + * 3-0: 0xD) 6 Mbps + * 0xF) 9 Mbps + * 0x5) 12 Mbps + * 0x7) 18 Mbps + * 0x9) 24 Mbps + * 0xB) 36 Mbps + * 0x1) 48 Mbps + * 0x3) 54 Mbps + * + * Legacy CCK rate format for bits 7:0 (bit 8 must be "0", bit 9 "1"): + * 6-0: 10) 1 Mbps + * 20) 2 Mbps + * 55) 5.5 Mbps + * 110) 11 Mbps + * + */ uint16_t len; uint16_t reserve3; } __packed; @@ -1359,8 +1564,18 @@ struct iwn_fw_tlv { #define IWN_FW_TLV_INIT_DATA 4 #define IWN_FW_TLV_BOOT_TEXT 5 #define IWN_FW_TLV_PBREQ_MAXLEN 6 +#define IWN_FW_TLV_PAN 7 +#define IWN_FW_TLV_RUNT_EVTLOG_PTR 8 +#define IWN_FW_TLV_RUNT_EVTLOG_SIZE 9 +#define IWN_FW_TLV_RUNT_ERRLOG_PTR 10 +#define IWN_FW_TLV_INIT_EVTLOG_PTR 11 +#define IWN_FW_TLV_INIT_EVTLOG_SIZE 12 +#define IWN_FW_TLV_INIT_ERRLOG_PTR 13 #define IWN_FW_TLV_ENH_SENS 14 #define IWN_FW_TLV_PHY_CALIB 15 +#define IWN_FW_TLV_WOWLAN_INST 16 +#define IWN_FW_TLV_WOWLAN_DATA 17 +#define IWN_FW_TLV_FLAGS 18 uint16_t alt; uint32_t len; @@ -1394,6 +1609,7 @@ struct iwn_fw_tlv { #define IWN4965_EEPROM_VOLTAGE 0x0e9 #define IWN4965_EEPROM_BANDS 0x0ea /* Indirect offsets. */ +#define IWN5000_EEPROM_NO_HT40 0x000 #define IWN5000_EEPROM_DOMAIN 0x001 #define IWN5000_EEPROM_BAND1 0x004 #define IWN5000_EEPROM_BAND2 0x013 @@ -1505,6 +1721,16 @@ static const uint32_t iwn6000_regulatory IWN5000_EEPROM_BAND7 }; +static const uint32_t iwn1000_regulatory_bands[IWN_NBANDS] = { + IWN5000_EEPROM_BAND1, + IWN5000_EEPROM_BAND2, + IWN5000_EEPROM_BAND3, + IWN5000_EEPROM_BAND4, + IWN5000_EEPROM_BAND5, + IWN5000_EEPROM_BAND6, + IWN5000_EEPROM_NO_HT40, +}; + #define IWN_CHAN_BANDS_COUNT 7 #define IWN_MAX_CHAN_PER_BAND 14 static const struct iwn_chan_band { @@ -1524,6 +1750,13 @@ static const struct iwn_chan_band { { 11, { 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157 } } }; +static const uint8_t iwn_bss_ac_to_queue[] = { + 2, 3, 1, 0, +}; + +static const uint8_t iwn_pan_ac_to_queue[] = { + 5, 4, 6, 7, +}; #define IWN1000_OTP_NBLOCKS 3 #define IWN6000_OTP_NBLOCKS 4 #define IWN6050_OTP_NBLOCKS 7 @@ -1533,6 +1766,14 @@ static const struct iwn_chan_band { #define IWN_RIDX_OFDM6 4 #define IWN4965_MAX_PWR_INDEX 107 +#define IWN_POWERSAVE_LVL_NONE 0 +#define IWN_POWERSAVE_LVL_VOIP_COMPATIBLE 1 +#define IWN_POWERSAVE_LVL_MAX 5 + +#define IWN_POWERSAVE_LVL_DEFAULT IWN_POWERSAVE_LVL_NONE + +/* DTIM value to pass in for IWN_POWERSAVE_LVL_VOIP_COMPATIBLE */ +#define IWN_POWERSAVE_DTIM_VOIP_COMPATIBLE 2 /* * RF Tx gain values from highest to lowest power (values obtained from @@ -1715,6 +1956,19 @@ static const struct iwn_sensitivity_limi 100 }; +/* Get value from linux kernel 3.2.+ in Drivers/net/wireless/iwlwifi/iwl-2000.c*/ +static const struct iwn_sensitivity_limits iwn2030_sensitivity_limits = { + 105,110, + 128,232, + 80,145, + 128,232, + 125,175, + 160,310, + 97, + 97, + 110 +}; + /* Map TID to TX scheduler's FIFO. */ static const uint8_t iwn_tid2fifo[] = { 1, 0, 0, 1, 2, 2, 3, 3, 7, 7, 7, 7, 7, 7, 7, 7, 3 From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 23:28:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BE78D27A; Fri, 2 Aug 2013 23:28:50 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id AB7C12EF8; Fri, 2 Aug 2013 23:28:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72NSo2v044963; Fri, 2 Aug 2013 23:28:50 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72NSoFK044957; Fri, 2 Aug 2013 23:28:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308022328.r72NSoFK044957@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Aug 2013 23:28:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253899 - head/sys/dev/scc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 23:28:50 -0000 Author: marius Date: Fri Aug 2 23:28:49 2013 New Revision: 253899 URL: http://svnweb.freebsd.org/changeset/base/253899 Log: - Implement iclear methods for QUICC and SAB 82532. With r253161 in place, this is is crucial at least for the latter. What happens is that attaching uart(4) to scc(4) causes the SAB 82532 to "receive" something and trigger a SER_INT_RXREADY interrupt, given that at least fast/filter interrupts are already enabled. Prior to r253161, uart_bus_ihand() was set up at this point and handled that condition, i. e. read the RX FIFO and issued a Receive Message Complete. Now, uart_bus_ihand() and uart_intr() are setup after attaching uart(4), leaving the SER_INT_RXREADY interrupt triggered during the latter to be handled by the iclear method. However, with that method not implement, this in turn causes SAB 82532 to not issue any further SER_INT_RXREADY interrupts until the RX FIFO is full again. Thus, 15 received bytes go to nowhere, given that "the other half" of the RX FIFO is used for status information. Hence, implementing sab82532_bfe_iclear() fixes things again. Potentially, the same problem exists for QUICC. - Remove unnecessary __RMAN_RESOURCE_VISIBLE. - Remove a superfluous header. - Use KOBJMETHOD_END. - Mark unused arguments as such. - Remove variables unused after initialization. Reviewed by: marcel (earlier version) Modified: head/sys/dev/scc/scc_dev_quicc.c head/sys/dev/scc/scc_dev_sab82532.c head/sys/dev/scc/scc_dev_z8530.c Modified: head/sys/dev/scc/scc_dev_quicc.c ============================================================================== --- head/sys/dev/scc/scc_dev_quicc.c Fri Aug 2 21:28:36 2013 (r253898) +++ head/sys/dev/scc/scc_dev_quicc.c Fri Aug 2 23:28:49 2013 (r253899) @@ -27,13 +27,10 @@ #include __FBSDID("$FreeBSD$"); -#define __RMAN_RESOURCE_VISIBLE - #include #include #include #include -#include #include #include #include @@ -63,7 +60,7 @@ static kobj_method_t quicc_methods[] = { KOBJMETHOD(scc_iclear, quicc_bfe_iclear), KOBJMETHOD(scc_ipend, quicc_bfe_ipend), KOBJMETHOD(scc_probe, quicc_bfe_probe), - { 0, 0 } + KOBJMETHOD_END }; struct scc_class scc_quicc_class = { @@ -77,11 +74,9 @@ struct scc_class scc_quicc_class = { }; static int -quicc_bfe_attach(struct scc_softc *sc, int reset) +quicc_bfe_attach(struct scc_softc *sc __unused, int reset __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } @@ -104,7 +99,18 @@ quicc_bfe_enabled(struct scc_softc *sc, static int quicc_bfe_iclear(struct scc_softc *sc, struct scc_chan *ch) { + struct scc_bas *bas; + uint16_t rb, st; + bas = &sc->sc_bas; + mtx_lock_spin(&sc->sc_hwmtx); + if (ch->ch_ipend & SER_INT_RXREADY) { + rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(ch->ch_nr - 1)); + st = quicc_read2(bas, rb); + (void)quicc_read4(bas, rb + 4); + quicc_write2(bas, rb, st | 0x9000); + } + mtx_unlock_spin(&sc->sc_hwmtx); return (0); } @@ -142,10 +148,8 @@ quicc_bfe_ipend(struct scc_softc *sc) } static int -quicc_bfe_probe(struct scc_softc *sc) +quicc_bfe_probe(struct scc_softc *sc __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } Modified: head/sys/dev/scc/scc_dev_sab82532.c ============================================================================== --- head/sys/dev/scc/scc_dev_sab82532.c Fri Aug 2 21:28:36 2013 (r253898) +++ head/sys/dev/scc/scc_dev_sab82532.c Fri Aug 2 23:28:49 2013 (r253899) @@ -52,7 +52,7 @@ static kobj_method_t sab82532_methods[] KOBJMETHOD(scc_iclear, sab82532_bfe_iclear), KOBJMETHOD(scc_ipend, sab82532_bfe_ipend), KOBJMETHOD(scc_probe, sab82532_bfe_probe), - { 0, 0 } + KOBJMETHOD_END }; struct scc_class scc_sab82532_class = { @@ -66,18 +66,37 @@ struct scc_class scc_sab82532_class = { }; static int -sab82532_bfe_attach(struct scc_softc *sc, int reset) +sab82532_bfe_attach(struct scc_softc *sc __unused, int reset __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } static int sab82532_bfe_iclear(struct scc_softc *sc, struct scc_chan *ch) { + struct scc_bas *bas; + int i, ofs, rbcl; + bas = &sc->sc_bas; + ofs = (ch->ch_nr - 1) * SAB_CHANLEN; + mtx_lock_spin(&sc->sc_hwmtx); + if (ch->ch_ipend & SER_INT_RXREADY) { + if (scc_getreg(bas, ofs + SAB_STAR) & SAB_STAR_RFNE) { + rbcl = scc_getreg(bas, ofs + SAB_RBCL) & 31; + if (rbcl == 0) + rbcl = 32; + for (i = 0; i < rbcl; i += 2) { + (void)scc_getreg(bas, ofs + SAB_RFIFO); + (void)scc_getreg(bas, ofs + SAB_RFIFO + 1); + } + } + while (scc_getreg(bas, ofs + SAB_STAR) & SAB_STAR_CEC) + ; + scc_setreg(bas, ofs + SAB_CMDR, SAB_CMDR_RMC); + scc_barrier(bas); + } + mtx_unlock_spin(&sc->sc_hwmtx); return (0); } @@ -124,10 +143,8 @@ sab82532_bfe_ipend(struct scc_softc *sc) } static int -sab82532_bfe_probe(struct scc_softc *sc) +sab82532_bfe_probe(struct scc_softc *sc __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } Modified: head/sys/dev/scc/scc_dev_z8530.c ============================================================================== --- head/sys/dev/scc/scc_dev_z8530.c Fri Aug 2 21:28:36 2013 (r253898) +++ head/sys/dev/scc/scc_dev_z8530.c Fri Aug 2 23:28:49 2013 (r253899) @@ -52,7 +52,7 @@ static kobj_method_t z8530_methods[] = { KOBJMETHOD(scc_iclear, z8530_bfe_iclear), KOBJMETHOD(scc_ipend, z8530_bfe_ipend), KOBJMETHOD(scc_probe, z8530_bfe_probe), - { 0, 0 } + KOBJMETHOD_END }; struct scc_class scc_z8530_class = { @@ -85,11 +85,9 @@ scc_getmreg(struct scc_bas *bas, int ch, } static int -z8530_bfe_attach(struct scc_softc *sc, int reset) +z8530_bfe_attach(struct scc_softc *sc __unused, int reset __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } @@ -189,10 +187,8 @@ z8530_bfe_ipend(struct scc_softc *sc) } static int -z8530_bfe_probe(struct scc_softc *sc) +z8530_bfe_probe(struct scc_softc *sc __unused) { - struct scc_bas *bas; - bas = &sc->sc_bas; return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 23:30:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D39933C7; Fri, 2 Aug 2013 23:30:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A61F92F06; Fri, 2 Aug 2013 23:30:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72NUXvr046975; Fri, 2 Aug 2013 23:30:33 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72NUWj5046971; Fri, 2 Aug 2013 23:30:32 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308022330.r72NUWj5046971@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Aug 2013 23:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253900 - head/sys/dev/scc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 23:30:33 -0000 Author: marius Date: Fri Aug 2 23:30:32 2013 New Revision: 253900 URL: http://svnweb.freebsd.org/changeset/base/253900 Log: - Use NULL instead of 0 for pointers. - Remove unnecessary __RMAN_RESOURCE_VISIBLE. Modified: head/sys/dev/scc/scc_bfe_ebus.c head/sys/dev/scc/scc_bfe_macio.c head/sys/dev/scc/scc_bfe_quicc.c head/sys/dev/scc/scc_bfe_sbus.c Modified: head/sys/dev/scc/scc_bfe_ebus.c ============================================================================== --- head/sys/dev/scc/scc_bfe_ebus.c Fri Aug 2 23:28:49 2013 (r253899) +++ head/sys/dev/scc/scc_bfe_ebus.c Fri Aug 2 23:30:32 2013 (r253900) @@ -94,4 +94,4 @@ static driver_t scc_ebus_driver = { sizeof(struct scc_softc), }; -DRIVER_MODULE(scc, ebus, scc_ebus_driver, scc_devclass, 0, 0); +DRIVER_MODULE(scc, ebus, scc_ebus_driver, scc_devclass, NULL, NULL); Modified: head/sys/dev/scc/scc_bfe_macio.c ============================================================================== --- head/sys/dev/scc/scc_bfe_macio.c Fri Aug 2 23:28:49 2013 (r253899) +++ head/sys/dev/scc/scc_bfe_macio.c Fri Aug 2 23:30:32 2013 (r253900) @@ -90,4 +90,4 @@ static driver_t scc_macio_driver = { sizeof(struct scc_softc), }; -DRIVER_MODULE(scc, macio, scc_macio_driver, scc_devclass, 0, 0); +DRIVER_MODULE(scc, macio, scc_macio_driver, scc_devclass, NULL, NULL); Modified: head/sys/dev/scc/scc_bfe_quicc.c ============================================================================== --- head/sys/dev/scc/scc_bfe_quicc.c Fri Aug 2 23:28:49 2013 (r253899) +++ head/sys/dev/scc/scc_bfe_quicc.c Fri Aug 2 23:30:32 2013 (r253900) @@ -27,8 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#define __RMAN_RESOURCE_VISIBLE - #include #include #include @@ -98,4 +96,4 @@ static driver_t scc_quicc_driver = { sizeof(struct scc_softc), }; -DRIVER_MODULE(scc, quicc, scc_quicc_driver, scc_devclass, 0, 0); +DRIVER_MODULE(scc, quicc, scc_quicc_driver, scc_devclass, NULL, NULL); Modified: head/sys/dev/scc/scc_bfe_sbus.c ============================================================================== --- head/sys/dev/scc/scc_bfe_sbus.c Fri Aug 2 23:28:49 2013 (r253899) +++ head/sys/dev/scc/scc_bfe_sbus.c Fri Aug 2 23:30:32 2013 (r253900) @@ -90,5 +90,5 @@ static driver_t scc_sbus_driver = { sizeof(struct scc_softc), }; -DRIVER_MODULE(scc, fhc, scc_sbus_driver, scc_devclass, 0, 0); -DRIVER_MODULE(scc, sbus, scc_sbus_driver, scc_devclass, 0, 0); +DRIVER_MODULE(scc, fhc, scc_sbus_driver, scc_devclass, NULL, NULL); +DRIVER_MODULE(scc, sbus, scc_sbus_driver, scc_devclass, NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 23:31:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C561C4FD; Fri, 2 Aug 2013 23:31:28 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B1CF72F0A; Fri, 2 Aug 2013 23:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72NVSUt047117; Fri, 2 Aug 2013 23:31:28 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72NVSxd047116; Fri, 2 Aug 2013 23:31:28 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201308022331.r72NVSxd047116@svn.freebsd.org> From: Steven Hartland Date: Fri, 2 Aug 2013 23:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253901 - stable/9/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 23:31:28 -0000 Author: smh Date: Fri Aug 2 23:31:28 2013 New Revision: 253901 URL: http://svnweb.freebsd.org/changeset/base/253901 Log: MFC r253818: Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to pthread_join prior to fd close. Approved by: re (delphij) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) stable/9/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Aug 2 23:30:32 2013 (r253900) +++ stable/9/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Aug 2 23:31:28 2013 (r253901) @@ -1576,8 +1576,8 @@ zfs_send(zfs_handle_t *zhp, const char * if (tid != 0) { if (err != 0) (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } if (sdd.cleanup_fd != -1) { @@ -1613,8 +1613,8 @@ err_out: VERIFY(0 == close(sdd.cleanup_fd)); if (tid != 0) { (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } return (err); } From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 23:31:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id ED52C62F; Fri, 2 Aug 2013 23:31:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DB40D2F0F; Fri, 2 Aug 2013 23:31:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72NVpYm047189; Fri, 2 Aug 2013 23:31:51 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72NVpAr047187; Fri, 2 Aug 2013 23:31:51 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308022331.r72NVpAr047187@svn.freebsd.org> From: Marius Strobl Date: Fri, 2 Aug 2013 23:31:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253902 - head/sys/dev/scc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 23:31:52 -0000 Author: marius Date: Fri Aug 2 23:31:51 2013 New Revision: 253902 URL: http://svnweb.freebsd.org/changeset/base/253902 Log: Const'ify scc_driver_name. Modified: head/sys/dev/scc/scc_bfe.h head/sys/dev/scc/scc_core.c Modified: head/sys/dev/scc/scc_bfe.h ============================================================================== --- head/sys/dev/scc/scc_bfe.h Fri Aug 2 23:31:28 2013 (r253901) +++ head/sys/dev/scc/scc_bfe.h Fri Aug 2 23:31:51 2013 (r253902) @@ -136,7 +136,7 @@ struct scc_softc { }; extern devclass_t scc_devclass; -extern char scc_driver_name[]; +extern const char scc_driver_name[]; int scc_bfe_attach(device_t dev, u_int ipc); int scc_bfe_detach(device_t dev); Modified: head/sys/dev/scc/scc_core.c ============================================================================== --- head/sys/dev/scc/scc_core.c Fri Aug 2 23:31:28 2013 (r253901) +++ head/sys/dev/scc/scc_core.c Fri Aug 2 23:31:51 2013 (r253902) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); #include "scc_if.h" devclass_t scc_devclass; -char scc_driver_name[] = "scc"; +const char scc_driver_name[] = "scc"; static MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); From owner-svn-src-all@FreeBSD.ORG Fri Aug 2 23:33:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 339EB777; Fri, 2 Aug 2013 23:33:41 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 20A1A2F18; Fri, 2 Aug 2013 23:33:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r72NXeRI047508; Fri, 2 Aug 2013 23:33:40 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r72NXeWf047507; Fri, 2 Aug 2013 23:33:40 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201308022333.r72NXeWf047507@svn.freebsd.org> From: Steven Hartland Date: Fri, 2 Aug 2013 23:33:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r253903 - stable/8/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Aug 2013 23:33:41 -0000 Author: smh Date: Fri Aug 2 23:33:40 2013 New Revision: 253903 URL: http://svnweb.freebsd.org/changeset/base/253903 Log: MFC r253818: Fix zfs send -D hang after processing requiring a CTRL+C to interrupt due to pthread_join prior to fd close. Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Aug 2 23:31:51 2013 (r253902) +++ stable/8/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c Fri Aug 2 23:33:40 2013 (r253903) @@ -1576,8 +1576,8 @@ zfs_send(zfs_handle_t *zhp, const char * if (tid != 0) { if (err != 0) (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } if (sdd.cleanup_fd != -1) { @@ -1613,8 +1613,8 @@ err_out: VERIFY(0 == close(sdd.cleanup_fd)); if (tid != 0) { (void) pthread_cancel(tid); - (void) pthread_join(tid, NULL); (void) close(pipefd[0]); + (void) pthread_join(tid, NULL); } return (err); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 03:16:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B67CF250; Sat, 3 Aug 2013 03:16:42 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8946C2554; Sat, 3 Aug 2013 03:16:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r733Ggtk017719; Sat, 3 Aug 2013 03:16:42 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r733Ggno017718; Sat, 3 Aug 2013 03:16:42 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201308030316.r733Ggno017718@svn.freebsd.org> From: Peter Grehan Date: Sat, 3 Aug 2013 03:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253909 - head/sys/amd64/vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 03:16:42 -0000 Author: grehan Date: Sat Aug 3 03:16:42 2013 New Revision: 253909 URL: http://svnweb.freebsd.org/changeset/base/253909 Log: Follow-up commit to fix CR0 issues. Maintain architectural state on CR vmexits by guaranteeing that EFER, CR0 and the VMCS entry controls are all in sync when transitioning to IA-32e mode. Submitted by: Tycho Nightingale (tycho.nightingale plurisbusnetworks.com) Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sat Aug 3 00:55:18 2013 (r253908) +++ head/sys/amd64/vmm/intel/vmx.c Sat Aug 3 03:16:42 2013 (r253909) @@ -1084,7 +1084,7 @@ static int vmx_emulate_cr_access(struct vmx *vmx, int vcpu, uint64_t exitqual) { int error, cr, vmcs_guest_cr, vmcs_shadow_cr; - uint64_t regval, ones_mask, zeros_mask; + uint64_t crval, regval, ones_mask, zeros_mask; const struct vmxctx *vmxctx; /* We only handle mov to %cr0 or %cr4 at this time */ @@ -1174,14 +1174,48 @@ vmx_emulate_cr_access(struct vmx *vmx, i error, cr); } - regval |= ones_mask; - regval &= ~zeros_mask; - error = vmwrite(vmcs_guest_cr, regval); + crval = regval | ones_mask; + crval &= ~zeros_mask; + error = vmwrite(vmcs_guest_cr, crval); if (error) { panic("vmx_emulate_cr_access: error %d writing cr%d", error, cr); } + if (cr == 0 && regval & CR0_PG) { + uint64_t efer, entry_ctls; + + /* + * If CR0.PG is 1 and EFER.LME is 1 then EFER.LMA and + * the "IA-32e mode guest" bit in VM-entry control must be + * equal. + */ + error = vmread(VMCS_GUEST_IA32_EFER, &efer); + if (error) { + panic("vmx_emulate_cr_access: error %d efer read", + error); + } + if (efer & EFER_LME) { + efer |= EFER_LMA; + error = vmwrite(VMCS_GUEST_IA32_EFER, efer); + if (error) { + panic("vmx_emulate_cr_access: error %d" + " efer write", error); + } + error = vmread(VMCS_ENTRY_CTLS, &entry_ctls); + if (error) { + panic("vmx_emulate_cr_access: error %d" + " entry ctls read", error); + } + entry_ctls |= VM_ENTRY_GUEST_LMA; + error = vmwrite(VMCS_ENTRY_CTLS, entry_ctls); + if (error) { + panic("vmx_emulate_cr_access: error %d" + " entry ctls write", error); + } + } + } + return (HANDLED); } From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 04:25:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4C69A9FC; Sat, 3 Aug 2013 04:25:26 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 396E12743; Sat, 3 Aug 2013 04:25:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r734PQWZ038178; Sat, 3 Aug 2013 04:25:26 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r734PQ4m038177; Sat, 3 Aug 2013 04:25:26 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308030425.r734PQ4m038177@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 3 Aug 2013 04:25:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253910 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 04:25:26 -0000 Author: marcel Date: Sat Aug 3 04:25:25 2013 New Revision: 253910 URL: http://svnweb.freebsd.org/changeset/base/253910 Log: Add a tunable for the default timeout. Modified: head/sys/kern/vfs_mountroot.c Modified: head/sys/kern/vfs_mountroot.c ============================================================================== --- head/sys/kern/vfs_mountroot.c Sat Aug 3 03:16:42 2013 (r253909) +++ head/sys/kern/vfs_mountroot.c Sat Aug 3 04:25:25 2013 (r253910) @@ -119,6 +119,7 @@ static int root_mount_complete; /* By default wait up to 3 seconds for devices to appear. */ static int root_mount_timeout = 3; +TUNABLE_INT("vfs.mountroot.timeout", &root_mount_timeout); struct root_hold_token * root_mount_hold(const char *identifier) From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 05:46:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 22A9299; Sat, 3 Aug 2013 05:46:39 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 01C1228A1; Sat, 3 Aug 2013 05:46:39 +0000 (UTC) Received: from [IPv6:2601:9:4d00:119:d86:55cb:af7c:98ff] (unknown [IPv6:2601:9:4d00:119:d86:55cb:af7c:98ff]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id E3FA93981E; Fri, 2 Aug 2013 22:46:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1375508798; bh=0TMSK+hQQEESufMW/0twWE8X+HrEMvYA0hNXFFAGGGk=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=SUJfLuHgKLyADAeQjvEJEAJkbkM/q+xrFYOD8EQW4A111L8+296u8YisTk/nsyUEx TNQaxTeDBVnzTBHtbafKx3WsbKNx5gHUazmvk/3VPfmD7x4TG13cdW4Qb6l2+gXzcr kWkyk6BNhByDOARorMOjrMB5Zkr2Pnh5W6GwQjL8= Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests From: Rui Paulo In-Reply-To: <201308020625.r726PTkY012023@svn.freebsd.org> Date: Fri, 2 Aug 2013 22:46:36 -0700 Content-Transfer-Encoding: 7bit Message-Id: References: <201308020625.r726PTkY012023@svn.freebsd.org> To: Simon J. Gerraty X-Mailer: Apple Mail (2.1508) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 05:46:39 -0000 On 1 Aug 2013, at 23:25, Simon J. Gerraty wrote: > Author: sjg > Date: Fri Aug 2 06:25:28 2013 > New Revision: 253883 > URL: http://svnweb.freebsd.org/changeset/base/253883 > > Log: > Merge bmake-20130730 > Main feature of interest is .MAKE.JOB.PREFIX= > to suppress --- job --- tokens. Cool! Can we set this in /etc/make.conf ? -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 06:31:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 029273D2; Sat, 3 Aug 2013 06:31:30 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84E672982; Sat, 3 Aug 2013 06:31:29 +0000 (UTC) Received: from mail97-am1-R.bigfish.com (10.3.201.226) by AM1EHSOBE012.bigfish.com (10.3.207.134) with Microsoft SMTP Server id 14.1.225.22; Sat, 3 Aug 2013 06:01:11 +0000 Received: from mail97-am1 (localhost [127.0.0.1]) by mail97-am1-R.bigfish.com (Postfix) with ESMTP id 43B9D1800E9; Sat, 3 Aug 2013 06:01:11 +0000 (UTC) X-Forefront-Antispam-Report: CIP:66.129.224.54; KIP:(null); UIP:(null); IPV:NLI; H:P-EMF01-SAC.jnpr.net; RD:none; EFVD:NLI X-SpamScore: 3 X-BigFish: VPS3(zzda00hdc73hzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6h1082kzz1de097hz2fh2a8h668h839hd25hf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h14ddh1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh1b88h1fb3h1d0ch1d2eh1d3fh1de2h1dfeh1dffh1e23h1155h) Received-SPF: pass (mail97-am1: domain of juniper.net designates 66.129.224.54 as permitted sender) client-ip=66.129.224.54; envelope-from=sjg@juniper.net; helo=P-EMF01-SAC.jnpr.net ; SAC.jnpr.net ; Received: from mail97-am1 (localhost.localdomain [127.0.0.1]) by mail97-am1 (MessageSwitch) id 1375509668455049_25366; Sat, 3 Aug 2013 06:01:08 +0000 (UTC) Received: from AM1EHSMHS016.bigfish.com (unknown [10.3.201.239]) by mail97-am1.bigfish.com (Postfix) with ESMTP id 6128160053; Sat, 3 Aug 2013 06:01:08 +0000 (UTC) Received: from P-EMF01-SAC.jnpr.net (66.129.224.54) by AM1EHSMHS016.bigfish.com (10.3.207.154) with Microsoft SMTP Server (TLS) id 14.16.227.3; Sat, 3 Aug 2013 06:01:07 +0000 Received: from magenta.juniper.net (172.17.27.123) by P-EMF01-SAC.jnpr.net (172.24.192.21) with Microsoft SMTP Server (TLS) id 14.3.146.0; Fri, 2 Aug 2013 23:01:04 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id r73614L49040; Fri, 2 Aug 2013 23:01:04 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id 708E258097; Fri, 2 Aug 2013 23:01:04 -0700 (PDT) To: Rui Paulo Subject: Re: svn commit: r253883 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests In-Reply-To: References: <201308020625.r726PTkY012023@svn.freebsd.org> Comments: In-reply-to: Rui Paulo message dated "Fri, 02 Aug 2013 22:46:36 -0700." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Fri, 2 Aug 2013 23:01:04 -0700 Message-ID: <20130803060104.708E258097@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain X-OriginatorOrg: juniper.net X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 06:31:30 -0000 On Fri, 2 Aug 2013 22:46:36 -0700, Rui Paulo writes: >Cool! Can we set this in /etc/make.conf ? I would expect so. From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 08:21:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D2132B73; Sat, 3 Aug 2013 08:21:35 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C04F82B6F; Sat, 3 Aug 2013 08:21:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r738LZZx028043; Sat, 3 Aug 2013 08:21:35 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r738LZOj028042; Sat, 3 Aug 2013 08:21:35 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201308030821.r738LZOj028042@svn.freebsd.org> From: Ulrich Spoerlein Date: Sat, 3 Aug 2013 08:21:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253911 - head/sys/modules/iwn X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 08:21:35 -0000 Author: uqs Date: Sat Aug 3 08:21:35 2013 New Revision: 253911 URL: http://svnweb.freebsd.org/changeset/base/253911 Log: Add missing depend. Modified: head/sys/modules/iwn/Makefile Modified: head/sys/modules/iwn/Makefile ============================================================================== --- head/sys/modules/iwn/Makefile Sat Aug 3 04:25:25 2013 (r253910) +++ head/sys/modules/iwn/Makefile Sat Aug 3 08:21:35 2013 (r253911) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../dev/iwn KMOD = if_iwn -SRCS = if_iwn.c device_if.h bus_if.h pci_if.h opt_wlan.h +SRCS = if_iwn.c device_if.h bus_if.h pci_if.h opt_iwn.h opt_wlan.h .include From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 12:41:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B729B210; Sat, 3 Aug 2013 12:41:22 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3FFA21C3; Sat, 3 Aug 2013 12:41:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73CfMwP016463; Sat, 3 Aug 2013 12:41:22 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73CfMSJ016460; Sat, 3 Aug 2013 12:41:22 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201308031241.r73CfMSJ016460@svn.freebsd.org> From: Glen Barber Date: Sat, 3 Aug 2013 12:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r253912 - in releng/9.2: . release sys/conf sys/sys X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 12:41:22 -0000 Author: gjb Date: Sat Aug 3 12:41:21 2013 New Revision: 253912 URL: http://svnweb.freebsd.org/changeset/base/253912 Log: - Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle. - Update branch name to -RC1. - Bump __FreeBSD_version. Approved by: kib (mentor, implicit) Approved by: re (implicit) Added: releng/9.2/ - copied from r253911, stable/9/ Modified: releng/9.2/release/Makefile.sysinstall releng/9.2/sys/conf/newvers.sh releng/9.2/sys/sys/param.h Modified: releng/9.2/release/Makefile.sysinstall ============================================================================== --- stable/9/release/Makefile.sysinstall Sat Aug 3 08:21:35 2013 (r253911) +++ releng/9.2/release/Makefile.sysinstall Sat Aug 3 12:41:21 2013 (r253912) @@ -24,7 +24,7 @@ # Set these, release builder! # # Fixed version: -#BUILDNAME=9.2-BETA2 +#BUILDNAME=9.2-RC1 # # Automatic SNAP versioning: DATE != date +%Y%m%d Modified: releng/9.2/sys/conf/newvers.sh ============================================================================== --- stable/9/sys/conf/newvers.sh Sat Aug 3 08:21:35 2013 (r253911) +++ releng/9.2/sys/conf/newvers.sh Sat Aug 3 12:41:21 2013 (r253912) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="9.2" -BRANCH="BETA2" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi Modified: releng/9.2/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Sat Aug 3 08:21:35 2013 (r253911) +++ releng/9.2/sys/sys/param.h Sat Aug 3 12:41:21 2013 (r253912) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 901505 /* Master, propagated to newvers */ +#define __FreeBSD_version 902001 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 12:45:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2B69134A; Sat, 3 Aug 2013 12:45:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1871721CF; Sat, 3 Aug 2013 12:45:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73Cj0PR016909; Sat, 3 Aug 2013 12:45:00 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73Cj0gv016908; Sat, 3 Aug 2013 12:45:00 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201308031245.r73Cj0gv016908@svn.freebsd.org> From: Glen Barber Date: Sat, 3 Aug 2013 12:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r253913 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 12:45:01 -0000 Author: gjb Date: Sat Aug 3 12:45:00 2013 New Revision: 253913 URL: http://svnweb.freebsd.org/changeset/base/253913 Log: Bump __FreeBSD_version to a value higher than releng/9.2. Approved by: re (implicit) Approved by: kib (mentor, implicit) Modified: stable/9/sys/sys/param.h Modified: stable/9/sys/sys/param.h ============================================================================== --- stable/9/sys/sys/param.h Sat Aug 3 12:41:21 2013 (r253912) +++ stable/9/sys/sys/param.h Sat Aug 3 12:45:00 2013 (r253913) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 901505 /* Master, propagated to newvers */ +#define __FreeBSD_version 902501 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 13:31:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 91B68934; Sat, 3 Aug 2013 13:31:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB9C22BD; Sat, 3 Aug 2013 13:31:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73DVAdJ031393; Sat, 3 Aug 2013 13:31:10 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73DVAfs031392; Sat, 3 Aug 2013 13:31:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201308031331.r73DVAfs031392@svn.freebsd.org> From: Ian Lepore Date: Sat, 3 Aug 2013 13:31:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253914 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 13:31:10 -0000 Author: ian Date: Sat Aug 3 13:31:10 2013 New Revision: 253914 URL: http://svnweb.freebsd.org/changeset/base/253914 Log: Tweak the imx debug console code so that it works with multiple SoCs. Instead of hard-coding the uart register addresses for the imx51, use a variable that defaults to the imx51 address. When debugging another imx-family SoC, the variable can be set early in initarm() to provide full console/printf support for debugging early boot. Modified: head/sys/arm/freescale/imx/console.c Modified: head/sys/arm/freescale/imx/console.c ============================================================================== --- head/sys/arm/freescale/imx/console.c Sat Aug 3 12:45:00 2013 (r253913) +++ head/sys/arm/freescale/imx/console.c Sat Aug 3 13:31:10 2013 (r253914) @@ -41,46 +41,57 @@ __FBSDID("$FreeBSD$"); /* Allow it to be predefined, to be able to use another UART for console */ #ifndef IMX_UART_BASE -#define IMX_UART_BASE 0xe3fbc000 /* UART1 */ +#define IMX_UART_BASE 0xe3fbc000 /* imx51 UART1 */ #endif -#define IMX_RXD (u_int32_t *)(IMX_UART_BASE + 0x00) -#define IMX_TXD (u_int32_t *)(IMX_UART_BASE + 0x40) +#define IMX_RXD 0x00 +#define IMX_TXD 0x40 -#define IMX_UFCR (u_int32_t *)(IMX_UART_BASE + 0x90) -#define IMX_USR1 (u_int32_t *)(IMX_UART_BASE + 0x94) +#define IMX_UFCR 0x90 +#define IMX_USR1 0x94 #define IMX_USR1_TRDY (1 << 13) -#define IMX_USR2 (u_int32_t *)(IMX_UART_BASE + 0x98) +#define IMX_USR2 0x98 #define IMX_USR2_RDR (1 << 0) #define IMX_USR2_TXFE (1 << 14) #define IMX_USR2_TXDC (1 << 3) -#define IMX_UTS (u_int32_t *)(IMX_UART_BASE + 0xb4) +#define IMX_UTS 0xb4 #define IMX_UTS_TXFULL (1 << 4) /* + * The base address of the uart registers. + * + * This is global so that it can be changed on the fly from the outside. For + * example, set imx_uart_base=physaddr and then call cninit() as the first two + * lines of initarm() and enjoy printf() availability through the tricky bits of + * startup. After initarm() switches from physical to virtual addressing, just + * set imx_uart_base=virtaddr and printf keeps working. + */ +uint32_t imx_uart_base = IMX_UART_BASE; + +/* * uart related funcs */ -static u_int32_t -uart_getreg(u_int32_t *bas) +static uint32_t +ub_getreg(uint32_t off) { - return *((volatile u_int32_t *)(bas)) & 0xff; + return *((volatile uint32_t *)(imx_uart_base + off)); } static void -uart_setreg(u_int32_t *bas, u_int32_t val) +ub_setreg(uint32_t off, uint32_t val) { - *((volatile u_int32_t *)(bas)) = (u_int32_t)val; + *((volatile uint32_t *)(imx_uart_base + off)) = val; } static int ub_tstc(void) { - return ((uart_getreg(IMX_USR2) & IMX_USR2_RDR) ? 1 : 0); + return ((ub_getreg(IMX_USR2) & IMX_USR2_RDR) ? 1 : 0); } static int @@ -90,7 +101,7 @@ ub_getc(void) while (!ub_tstc()); __asm __volatile("nop"); - return (uart_getreg(IMX_RXD) & 0xff); + return (ub_getreg(IMX_RXD) & 0xff); } static void @@ -100,10 +111,10 @@ ub_putc(unsigned char c) if (c == '\n') ub_putc('\r'); - while (uart_getreg(IMX_UTS) & IMX_UTS_TXFULL) + while (ub_getreg(IMX_UTS) & IMX_UTS_TXFULL) __asm __volatile("nop"); - uart_setreg(IMX_TXD, c); + ub_setreg(IMX_TXD, c); } static cn_probe_t uart_cnprobe; @@ -138,17 +149,19 @@ uart_cnprobe(struct consdev *cp) static void uart_cninit(struct consdev *cp) { - uart_setreg(IMX_UFCR, 0x00004210); + + /* Init fifo trigger levels to 32 bytes, refclock div to 2. */ + ub_setreg(IMX_UFCR, 0x00004210); } -void +static void uart_cnputc(struct consdev *cp, int c) { ub_putc(c); } -int +static int uart_cngetc(struct consdev * cp) { From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 13:38:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C8DB9D06; Sat, 3 Aug 2013 13:38:56 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B42A52308; Sat, 3 Aug 2013 13:38:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73DcuvC032279; Sat, 3 Aug 2013 13:38:56 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73DcuWq032278; Sat, 3 Aug 2013 13:38:56 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201308031338.r73DcuWq032278@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 3 Aug 2013 13:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253915 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 13:38:56 -0000 Author: trasz Date: Sat Aug 3 13:38:56 2013 New Revision: 253915 URL: http://svnweb.freebsd.org/changeset/base/253915 Log: Fix typo. Modified: head/sys/sys/priv.h Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Sat Aug 3 13:31:10 2013 (r253914) +++ head/sys/sys/priv.h Sat Aug 3 13:38:56 2013 (r253915) @@ -158,7 +158,8 @@ #define PRIV_PROC_SETRLIMIT 162 /* Can raise resources limits. */ #define PRIV_PROC_SETLOGINCLASS 163 /* Can call setloginclass(2). */ -/* System V IPC privileges. +/* + * System V IPC privileges. */ #define PRIV_IPC_READ 170 /* Can override IPC read perm. */ #define PRIV_IPC_WRITE 171 /* Can override IPC write perm. */ From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 15:59:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AF2EC25A; Sat, 3 Aug 2013 15:59:49 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9CCDC2652; Sat, 3 Aug 2013 15:59:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73Fxntm074769; Sat, 3 Aug 2013 15:59:49 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73FxnQF074768; Sat, 3 Aug 2013 15:59:49 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201308031559.r73FxnQF074768@svn.freebsd.org> From: Glen Barber Date: Sat, 3 Aug 2013 15:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r253916 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 15:59:49 -0000 Author: gjb Date: Sat Aug 3 15:59:48 2013 New Revision: 253916 URL: http://svnweb.freebsd.org/changeset/base/253916 Log: Turn on re@ approval for releng/9.2 Approved by: re (implicit) Approved by: kib (mentor, implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Sat Aug 3 13:38:56 2013 (r253915) +++ svnadmin/conf/approvers Sat Aug 3 15:59:48 2013 (r253916) @@ -20,6 +20,7 @@ ^stable/9/ re #^stable/8/ re #^stable/7/ re +^releng/9.2/ re ^releng/9.[0-1]/ (security-officer|so) ^releng/8.[0-4]/ (security-officer|so) ^releng/7.[0-4]/ (security-officer|so) From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 16:23:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B33E4651; Sat, 3 Aug 2013 16:23:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A08FA26E9; Sat, 3 Aug 2013 16:23:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73GNiGI083602; Sat, 3 Aug 2013 16:23:44 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73GNinZ083598; Sat, 3 Aug 2013 16:23:44 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201308031623.r73GNinZ083598@svn.freebsd.org> From: Dimitry Andric Date: Sat, 3 Aug 2013 16:23:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253917 - head/lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 16:23:44 -0000 Author: dim Date: Sat Aug 3 16:23:43 2013 New Revision: 253917 URL: http://svnweb.freebsd.org/changeset/base/253917 Log: After r253839, which modifies ld's behaviour to not automatically pull in needed libraries, change libc++.so into a linker script, so it can automatically pull in libcxxrt.so. MFC after: 1 week Added: head/lib/libc++/libc++.ldscript (contents, props changed) Modified: head/lib/libc++/Makefile Modified: head/lib/libc++/Makefile ============================================================================== --- head/lib/libc++/Makefile Sat Aug 3 15:59:48 2013 (r253916) +++ head/lib/libc++/Makefile Sat Aug 3 16:23:43 2013 (r253917) @@ -9,6 +9,7 @@ CXXINCLUDEDIR= ${INCLUDEDIR}/c++/v${SHLI LIB= c++ SHLIB_MAJOR= 1 +SHLIB_LDSCRIPT= libc++.ldscript SRCS+= algorithm.cpp\ bind.cpp\ Added: head/lib/libc++/libc++.ldscript ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc++/libc++.ldscript Sat Aug 3 16:23:43 2013 (r253917) @@ -0,0 +1,2 @@ +/* $FreeBSD$ */ +GROUP ( @@SHLIB@@ @@LIBDIR@@/libcxxrt.so ) From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 16:25:22 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2FF797C6; Sat, 3 Aug 2013 16:25:22 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9BD9726F3; Sat, 3 Aug 2013 16:25:21 +0000 (UTC) Received: from alph.d.allbsd.org (p2049-ipbf1102funabasi.chiba.ocn.ne.jp [122.26.101.49]) (authenticated bits=128) by mail.allbsd.org (8.14.5/8.14.5) with ESMTP id r73GP1N5025618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 4 Aug 2013 01:25:11 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.5/8.14.5) with ESMTP id r73GOxfH089347; Sun, 4 Aug 2013 01:25:01 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Sun, 04 Aug 2013 01:24:45 +0900 (JST) Message-Id: <20130804.012445.1330578101731029775.hrs@allbsd.org> To: pjd@FreeBSD.org Subject: Re: svn commit: r252603 - head/usr.sbin/rwhod From: Hiroki Sato In-Reply-To: <201307032104.r63L4KEE015937@svn.freebsd.org> References: <201307032104.r63L4KEE015937@svn.freebsd.org> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart(Sun_Aug__4_01_24_45_2013_098)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.97.4 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (mail.allbsd.org [133.31.130.32]); Sun, 04 Aug 2013 01:25:11 +0900 (JST) X-Spam-Status: No, score=-90.6 required=13.0 tests=CONTENT_TYPE_PRESENT, DIRECTOCNDYN,DYN_PBL,RCVD_IN_PBL,SPF_SOFTFAIL,USER_IN_WHITELIST autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on gatekeeper.allbsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 16:25:22 -0000 ----Security_Multipart(Sun_Aug__4_01_24_45_2013_098)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Pawel Jakub Dawidek wrote in <201307032104.r63L4KEE015937@svn.freebsd.org>: pj> Author: pjd pj> Date: Wed Jul 3 21:04:20 2013 pj> New Revision: 252603 pj> URL: http://svnweb.freebsd.org/changeset/base/252603 pj> pj> Log: pj> The whole sending functionality was implemented within signal handler, pj> which is very bad idea. Split sending and receiving in two processes, pj> which fixes this problem and will help to sandbox rwhod. pj> pj> Submitted by: Mariusz Zaborski pj> Sponsored by: Google Summer of Code 2013 pj> Reviewed by: pjd pj> MFC after: 1 month (snip) pj> if (!quiet_mode) { pj> - signal(SIGALRM, onalrm); pj> - onalrm(0); pj> + pid_child_receiver = pdfork(&fdp, 0); pj> + if (pid_child_receiver == 0) { pj> + receiver_process(); pj> + } else if (pid_child_receiver > 0) { pj> + sender_process(); pj> + } else if (pid_child_receiver == -1) { pj> + syslog(LOG_ERR, "pdfork: %m"); pj> + exit(1); pj> + } pdfork() is available only when options PROCDESC is defined and GENERIC does not have it. -- Hiroki ----Security_Multipart(Sun_Aug__4_01_24_45_2013_098)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iEYEABECAAYFAlH9Ls0ACgkQTyzT2CeTzy3zhQCgyqLDaLEevKuT+U4a7LLsubl1 GXIAn1hB/cOIFW8nx3+dvEKH5Ppj6zc0 =0G45 -----END PGP SIGNATURE----- ----Security_Multipart(Sun_Aug__4_01_24_45_2013_098)---- From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 18:00:43 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C4F402EF; Sat, 3 Aug 2013 18:00:43 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 8858028F4; Sat, 3 Aug 2013 18:00:42 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id 87DAED0D; Sat, 3 Aug 2013 19:55:37 +0200 (CEST) Date: Sat, 3 Aug 2013 20:01:32 +0200 From: Pawel Jakub Dawidek To: Hiroki Sato Subject: Re: svn commit: r252603 - head/usr.sbin/rwhod Message-ID: <20130803180132.GA1403@garage.freebsd.pl> References: <201307032104.r63L4KEE015937@svn.freebsd.org> <20130804.012445.1330578101731029775.hrs@allbsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pWyiEgJYm5f9v55/" Content-Disposition: inline In-Reply-To: <20130804.012445.1330578101731029775.hrs@allbsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, oshogbo@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 18:00:43 -0000 --pWyiEgJYm5f9v55/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 04, 2013 at 01:24:45AM +0900, Hiroki Sato wrote: > Pawel Jakub Dawidek wrote > in <201307032104.r63L4KEE015937@svn.freebsd.org>: >=20 > pj> Author: pjd > pj> Date: Wed Jul 3 21:04:20 2013 > pj> New Revision: 252603 > pj> URL: http://svnweb.freebsd.org/changeset/base/252603 > pj> > pj> Log: > pj> The whole sending functionality was implemented within signal handl= er, > pj> which is very bad idea. Split sending and receiving in two processe= s, > pj> which fixes this problem and will help to sandbox rwhod. > pj> > pj> Submitted by: Mariusz Zaborski > pj> Sponsored by: Google Summer of Code 2013 > pj> Reviewed by: pjd > pj> MFC after: 1 month >=20 > (snip) >=20 > pj> if (!quiet_mode) { > pj> - signal(SIGALRM, onalrm); > pj> - onalrm(0); > pj> + pid_child_receiver =3D pdfork(&fdp, 0); > pj> + if (pid_child_receiver =3D=3D 0) { > pj> + receiver_process(); > pj> + } else if (pid_child_receiver > 0) { > pj> + sender_process(); > pj> + } else if (pid_child_receiver =3D=3D -1) { > pj> + syslog(LOG_ERR, "pdfork: %m"); > pj> + exit(1); > pj> + } >=20 > pdfork() is available only when options PROCDESC is defined and > GENERIC does not have it. Ah, indeed. Thanks for letting me know. I think the proper fix here is to just add PROCDESC to GENERIC as it will be used more and more frequently. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://mobter.com --pWyiEgJYm5f9v55/ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlH9RXwACgkQForvXbEpPzSqBgCgxwozXerPeP7uH6PKpWIs4TVg u5YAoMNVCOQXHv2rup99pLVJjd38iOOe =4wnv -----END PGP SIGNATURE----- --pWyiEgJYm5f9v55/-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 18:05:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 18FB853A; Sat, 3 Aug 2013 18:05:13 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 05DAD2927; Sat, 3 Aug 2013 18:05:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73I5CTl013255; Sat, 3 Aug 2013 18:05:12 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73I5Cq0013254; Sat, 3 Aug 2013 18:05:12 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201308031805.r73I5Cq0013254@svn.freebsd.org> From: Justin Hibbits Date: Sat, 3 Aug 2013 18:05:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253918 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 18:05:13 -0000 Author: jhibbits Date: Sat Aug 3 18:05:12 2013 New Revision: 253918 URL: http://svnweb.freebsd.org/changeset/base/253918 Log: Remove duplicate definition of SPR MMCR0. MFC after: 3 days Modified: head/sys/powerpc/include/spr.h Modified: head/sys/powerpc/include/spr.h ============================================================================== --- head/sys/powerpc/include/spr.h Sat Aug 3 16:23:43 2013 (r253917) +++ head/sys/powerpc/include/spr.h Sat Aug 3 18:05:12 2013 (r253918) @@ -325,7 +325,6 @@ #define SPR_970MMCR0 0x31b /* ... Monitor Mode Control Register 0 (PPC 970) */ #define SPR_970MMCR1 0x31e /* ... Monitor Mode Control Register 1 (PPC 970) */ #define SPR_970MMCRA 0x312 /* ... Monitor Mode Control Register 2 (PPC 970) */ -#define SPR_970MMCR0 0x31b /* ... Monitor Mode Control Register 0 (PPC 970) */ #define SPR_970PMC1 0x313 /* ... PMC 1 */ #define SPR_970PMC2 0x314 /* ... PMC 2 */ #define SPR_970PMC3 0x315 /* ... PMC 3 */ From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 18:23:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D90E092E for ; Sat, 3 Aug 2013 18:23:37 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [IPv6:2607:f8b0:400c:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 940D629D5 for ; Sat, 3 Aug 2013 18:23:37 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id x14so1674972vbb.37 for ; Sat, 03 Aug 2013 11:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FZNR9TOzv359gOFvlBpmSGdlWTpKOHXQyvw4NxlixwY=; b=cvUL0/dkBPmlTJnCtMLuf5i1oOWWXUHnKx2j4YAuLDTjlUeGY/x/ggeqhnvT8O/bAd +Ps/J2/FK+BEaQl5gWpXSrDZmPhvt2u5a4Y8Kt38GSMwnJ0pB+zoMoMFM6tHM6d8voQ+ pCxr81e777yHEIPk+9ZvzP5uM+xpnwGe5Azsc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=FZNR9TOzv359gOFvlBpmSGdlWTpKOHXQyvw4NxlixwY=; b=S22WAKZk3NYajaOoMs0qkisaQpe/D7PcHj78+CcmjX88ytVUaOVOvtYmc0AbrxGTRS BSBUVMCZpEJHf/UHlab3YEC/S6QzxVgmwctZdTERZXuS3Z96sa3DFK/aCbSIZI4ZnAkW VvB5rjrHWqAjfK8vHXXy2viJuDad9FgRuF9AuMRTjqsY7qbDSC3eM43YncmdUEE5M6W3 Jgfl5kgo5zYtSTI+Andd0Z8Bq8wY+BNMLT3luKm6wWpqIvS1P5tNZGC48Ea/Og0Bl9g4 ZgdEsHCtKXQbY2KgRXYpjwZ+US5WGINDcHYkx6OMP/yOPlv1X8H4d8+6ezMtpELJXFYR xZ6A== MIME-Version: 1.0 X-Received: by 10.58.2.137 with SMTP id 9mr3836121veu.50.1375554216620; Sat, 03 Aug 2013 11:23:36 -0700 (PDT) Received: by 10.220.167.74 with HTTP; Sat, 3 Aug 2013 11:23:36 -0700 (PDT) In-Reply-To: <20130803180132.GA1403@garage.freebsd.pl> References: <201307032104.r63L4KEE015937@svn.freebsd.org> <20130804.012445.1330578101731029775.hrs@allbsd.org> <20130803180132.GA1403@garage.freebsd.pl> Date: Sat, 3 Aug 2013 11:23:36 -0700 Message-ID: Subject: Re: svn commit: r252603 - head/usr.sbin/rwhod From: Peter Wemm To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmbYlUrd6I+69jKC962TwLtgpF77yhfgIm+mILnimcjL/enMpJXuzHp96zmDkP8C5j7J1D2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, oshogbo@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 18:23:38 -0000 On Sat, Aug 3, 2013 at 11:01 AM, Pawel Jakub Dawidek wrote: > On Sun, Aug 04, 2013 at 01:24:45AM +0900, Hiroki Sato wrote: >> Pawel Jakub Dawidek wrote >> in <201307032104.r63L4KEE015937@svn.freebsd.org>: >> >> pj> Author: pjd >> pj> Date: Wed Jul 3 21:04:20 2013 >> pj> New Revision: 252603 >> pj> URL: http://svnweb.freebsd.org/changeset/base/252603 >> pj> >> pj> Log: >> pj> The whole sending functionality was implemented within signal handler, >> pj> which is very bad idea. Split sending and receiving in two processes, >> pj> which fixes this problem and will help to sandbox rwhod. >> pj> >> pj> Submitted by: Mariusz Zaborski >> pj> Sponsored by: Google Summer of Code 2013 >> pj> Reviewed by: pjd >> pj> MFC after: 1 month >> >> (snip) >> >> pj> if (!quiet_mode) { >> pj> - signal(SIGALRM, onalrm); >> pj> - onalrm(0); >> pj> + pid_child_receiver = pdfork(&fdp, 0); >> pj> + if (pid_child_receiver == 0) { >> pj> + receiver_process(); >> pj> + } else if (pid_child_receiver > 0) { >> pj> + sender_process(); >> pj> + } else if (pid_child_receiver == -1) { >> pj> + syslog(LOG_ERR, "pdfork: %m"); >> pj> + exit(1); >> pj> + } >> >> pdfork() is available only when options PROCDESC is defined and >> GENERIC does not have it. > > Ah, indeed. Thanks for letting me know. I think the proper fix here is > to just add PROCDESC to GENERIC as it will be used more and more > frequently. When I hit this in the freebsd cluster a few weeks ago, something was very wrong. With a conventional kernel, rwhod wouldn't start up, or hung. When adding PROCDESC things got worse. rwhod would operate, but none of the 9.x machines could see its broadcasts and ruptime reported the 10.x+procdesc+rwhod machines as "down". My vague recollection was that the 10.x+procdesc+rwhod machines could see each other but I am not sure. I was in the process of ripping out rwhod from the freebsd.org cluster by that point. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: So you can \342\200\231 .. for when a ' just won't do ZFS must be the bacon of file systems. "everything's better with ZFS" From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 18:48:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 8F4AFC9D; Sat, 3 Aug 2013 18:48:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A3B0A2A4A; Sat, 3 Aug 2013 18:48:37 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id en1so403312wid.2 for ; Sat, 03 Aug 2013 11:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=r9UMzcLc0OgDlEHw5OmRh/YWAKfCrk5Kn5W5MAafdTo=; b=A0a8GfTo6uy/uy5lhYZnJjfczWImF+EYRuMCA1xlfoe3/pTKeAlsGC/+PTDKrPp0BO trs8PojPl5J2SPSiIZfvcHqy+TXcFD5khnHijxXvYcWH5ZUmr5mv2tW+DLb6pDnuUlfP 3mw/fTZJsDrVnRWohQ6O+/5KX3E0xv0k4yuFDatSyzfP9NLMgBi7gxk1fdTyqP0hmdmz eL32+ZHnXzHOESBzlEmgJhnlbbzaas29aEiHa3GFHxIakMU+QNd8gSTSZixaCbbhoeG+ CtUpWmgnHzukw0PZpzrMRAE64Fk5txTnionicxqFpYNbcNZJRCyBmhdIAh4JaSPcGCi1 7i2g== MIME-Version: 1.0 X-Received: by 10.194.11.67 with SMTP id o3mr8742084wjb.0.1375555715859; Sat, 03 Aug 2013 11:48:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.94.132 with HTTP; Sat, 3 Aug 2013 11:48:35 -0700 (PDT) In-Reply-To: <201308030821.r738LZOj028042@svn.freebsd.org> References: <201308030821.r738LZOj028042@svn.freebsd.org> Date: Sat, 3 Aug 2013 11:48:35 -0700 X-Google-Sender-Auth: q_NJ6tDNzymTEAMqy6bMRHXSN6Q Message-ID: Subject: Re: svn commit: r253911 - head/sys/modules/iwn From: Adrian Chadd To: Ulrich Spoerlein Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 18:48:38 -0000 THanks! -adrian On 3 August 2013 01:21, Ulrich Spoerlein wrote: > Author: uqs > Date: Sat Aug 3 08:21:35 2013 > New Revision: 253911 > URL: http://svnweb.freebsd.org/changeset/base/253911 > > Log: > Add missing depend. > > Modified: > head/sys/modules/iwn/Makefile > > Modified: head/sys/modules/iwn/Makefile > ============================================================================== > --- head/sys/modules/iwn/Makefile Sat Aug 3 04:25:25 2013 (r253910) > +++ head/sys/modules/iwn/Makefile Sat Aug 3 08:21:35 2013 (r253911) > @@ -3,6 +3,6 @@ > .PATH: ${.CURDIR}/../../dev/iwn > > KMOD = if_iwn > -SRCS = if_iwn.c device_if.h bus_if.h pci_if.h opt_wlan.h > +SRCS = if_iwn.c device_if.h bus_if.h pci_if.h opt_iwn.h opt_wlan.h > > .include From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 19:34:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9E726BE4; Sat, 3 Aug 2013 19:34:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from mail0.glenbarber.us (mail0.glenbarber.us [208.86.227.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 581A02BB1; Sat, 3 Aug 2013 19:34:47 +0000 (UTC) Received: from glenbarber.us (70.15.88.86.res-cmts.sewb.ptd.net [70.15.88.86]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: gjb) by mail0.glenbarber.us (Postfix) with ESMTPSA id 103538689; Sat, 3 Aug 2013 19:34:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.8.3 mail0.glenbarber.us 103538689 Authentication-Results: mail0.glenbarber.us; dkim=none reason="no signature"; dkim-adsp=none Date: Sat, 3 Aug 2013 15:34:38 -0400 From: Glen Barber To: Marius Strobl Subject: Re: svn commit: r253899 - head/sys/dev/scc Message-ID: <20130803193438.GH78299@glenbarber.us> References: <201308022328.r72NSoFK044957@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GBDnBH7+ZvLx8QD4" Content-Disposition: inline In-Reply-To: <201308022328.r72NSoFK044957@svn.freebsd.org> X-Operating-System: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 19:34:48 -0000 --GBDnBH7+ZvLx8QD4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 02, 2013 at 11:28:50PM +0000, Marius Strobl wrote: > Author: marius > Date: Fri Aug 2 23:28:49 2013 > New Revision: 253899 > URL: http://svnweb.freebsd.org/changeset/base/253899 > [...] > Modified: > head/sys/dev/scc/scc_dev_quicc.c > head/sys/dev/scc/scc_dev_sab82532.c > head/sys/dev/scc/scc_dev_z8530.c >=20 > Modified: head/sys/dev/scc/scc_dev_quicc.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/dev/scc/scc_dev_quicc.c Fri Aug 2 21:28:36 2013 (r253898) > +++ head/sys/dev/scc/scc_dev_quicc.c Fri Aug 2 23:28:49 2013 (r253899) > @@ -27,13 +27,10 @@ > #include > __FBSDID("$FreeBSD$"); > =20 > -#define __RMAN_RESOURCE_VISIBLE > - > #include > #include > #include > #include > -#include > #include > #include > #include > @@ -63,7 +60,7 @@ static kobj_method_t quicc_methods[] =3D { > KOBJMETHOD(scc_iclear, quicc_bfe_iclear), > KOBJMETHOD(scc_ipend, quicc_bfe_ipend), > KOBJMETHOD(scc_probe, quicc_bfe_probe), > - { 0, 0 } > + KOBJMETHOD_END > }; > =20 > struct scc_class scc_quicc_class =3D { > @@ -77,11 +74,9 @@ struct scc_class scc_quicc_class =3D { > }; > =20 > static int > -quicc_bfe_attach(struct scc_softc *sc, int reset) > +quicc_bfe_attach(struct scc_softc *sc __unused, int reset __unused) > { > - struct scc_bas *bas; > =20 > - bas =3D &sc->sc_bas; > return (0); > } > =20 > @@ -104,7 +99,18 @@ quicc_bfe_enabled(struct scc_softc *sc,=20 > static int > quicc_bfe_iclear(struct scc_softc *sc, struct scc_chan *ch) > { > + struct scc_bas *bas; > + uint16_t rb, st; > =20 > + bas =3D &sc->sc_bas; > + mtx_lock_spin(&sc->sc_hwmtx); > + if (ch->ch_ipend & SER_INT_RXREADY) { > + rb =3D quicc_read2(bas, QUICC_PRAM_SCC_RBASE(ch->ch_nr - 1)); > + st =3D quicc_read2(bas, rb); > + (void)quicc_read4(bas, rb + 4); This seems to break LINT for powerpc and powerpc64. cc1: warnings being treated as errors /src/sys/modules/scc/../../dev/scc/scc_dev_quicc.c: In function 'quicc_bfe_= iclear': /src/sys/modules/scc/../../dev/scc/scc_dev_quicc.c:110: warning: implicit d= eclaration of function 'quicc_read4' /src/sys/modules/scc/../../dev/scc/scc_dev_quicc.c:110: warning: nested ext= ern declaration of 'quicc_read4' [-Wnested-externs] *** Error code 1 Stop. bmake[3]: stopped in /src/sys/modules/scc *** Error code 1 http://tinderbox.freebsd.org/tinderbox-head-build-HEAD-powerpc64-powerpc.fu= ll Glen --GBDnBH7+ZvLx8QD4 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQEcBAEBCAAGBQJR/VtOAAoJEFJPDDeguUaj+SkH/0nV8qjKVmOA1Wj5bW7wp5Ex c1XUfgNC2kPPf8Zke1rD+uHB+oB0T+zlbdvugT6j4p8WLIIRmeZEqqn/9BQXVudj ZaDlVhibSxe3qe/Jy7msO+EvOoxRHtCNFYi9GoivhvTaSV9pQCH9pc91CsVug30f Tkj7ubGsTTnsVchiva40RBcZmZFmkftzS5Iv1f4AhgElJExRmFt8uf1/vUyX7qjm NkHAdpcPxXht/A7BKOheg/9PrmniDfJnKG9Sd4V89Jj5f1LH5C+mvTIpI/yKl7Ul 8QVHmbymdbIaLy94ih8FYocpI9n4/WH9TcJyhlHQKgVcmcz13O6aXpr+EIrT3yo= =F76P -----END PGP SIGNATURE----- --GBDnBH7+ZvLx8QD4-- From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 20:14:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 4617F13D; Sat, 3 Aug 2013 20:14:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 313AF2C92; Sat, 3 Aug 2013 20:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73KETHm051573; Sat, 3 Aug 2013 20:14:29 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73KETlr051572; Sat, 3 Aug 2013 20:14:29 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201308032014.r73KETlr051572@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 3 Aug 2013 20:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253919 - head/release/ia64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 20:14:30 -0000 Author: marcel Date: Sat Aug 3 20:14:29 2013 New Revision: 253919 URL: http://svnweb.freebsd.org/changeset/base/253919 Log: Fix the bootable CD: o We need wait a bit before attempting the root mount. The CD drives on HP machines (typical) go through the management controller so that it can be virtualized. In practice what this means is that it is slow to detect and attach. o Tell the kernel what to use as the root file system. The /etc/fstab trick doesn't work, because we're on the EFI-compatble file system. Modified: head/release/ia64/mkisoimages.sh Modified: head/release/ia64/mkisoimages.sh ============================================================================== --- head/release/ia64/mkisoimages.sh Sat Aug 3 18:05:12 2013 (r253918) +++ head/release/ia64/mkisoimages.sh Sat Aug 3 20:14:29 2013 (r253919) @@ -68,6 +68,8 @@ if [ $bootable = yes ]; then cp $BASE/boot/check-password.4th $MNT/boot cp $BASE/boot/screen.4th $MNT/boot mv $MNT/boot/loader.efi $MNT/efi/boot/bootia64.efi + echo kern.cam.boot_delay=\"3000\" >> $MNT/boot/loader.conf + echo vfs.root.mountfrom=\"cd9660:iso9660/$LABEL\" >> $MNT/boot/loader.conf umount $MNT mdconfig -d -u $md BOOTOPTS="-o bootimage=i386;$EFIPART -o no-emul-boot" From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 21:24:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 2EEAFEB; Sat, 3 Aug 2013 21:24:53 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1C1212E65; Sat, 3 Aug 2013 21:24:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r73LOqLW072269; Sat, 3 Aug 2013 21:24:52 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r73LOqhC072268; Sat, 3 Aug 2013 21:24:52 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201308032124.r73LOqhC072268@svn.freebsd.org> From: Marius Strobl Date: Sat, 3 Aug 2013 21:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253920 - head/sys/dev/scc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 21:24:53 -0000 Author: marius Date: Sat Aug 3 21:24:52 2013 New Revision: 253920 URL: http://svnweb.freebsd.org/changeset/base/253920 Log: Make r253899 compile. Modified: head/sys/dev/scc/scc_dev_quicc.c Modified: head/sys/dev/scc/scc_dev_quicc.c ============================================================================== --- head/sys/dev/scc/scc_dev_quicc.c Sat Aug 3 20:14:29 2013 (r253919) +++ head/sys/dev/scc/scc_dev_quicc.c Sat Aug 3 21:24:52 2013 (r253920) @@ -44,9 +44,13 @@ __FBSDID("$FreeBSD$"); #define quicc_read2(bas, reg) \ bus_space_read_2((bas)->bst, (bas)->bsh, reg) +#define quicc_read4(bas, reg) \ + bus_space_read_4((bas)->bst, (bas)->bsh, reg) #define quicc_write2(bas, reg, val) \ bus_space_write_2((bas)->bst, (bas)->bsh, reg, val) +#define quicc_write4(bas, reg, val) \ + bus_space_write_4((bas)->bst, (bas)->bsh, reg, val) static int quicc_bfe_attach(struct scc_softc *, int); static int quicc_bfe_enabled(struct scc_softc *, struct scc_chan *);