CVS commit: src/crypto/external/bsd/heimdal/dist/lib

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:20:36 UTC 2014

Modified Files:
src/crypto/external/bsd/heimdal/dist/lib/asn1: gen.c
src/crypto/external/bsd/heimdal/dist/lib/com_err: compile_et.c

Log Message:
Use basename(filename) in Generated from %s comments in output files,
to avoid embedding the path to the build tree.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
cvs rdiff -u -r1.1.1.1 -r1.2 \
src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c:1.1.1.1	Wed Apr 13 18:14:40 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/asn1/gen.c	Sat Jan 18 09:20:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: gen.c,v 1.1.1.1 2011/04/13 18:14:40 elric Exp $	*/
+/*	$NetBSD: gen.c,v 1.2 2014/01/18 09:20:36 apb Exp $	*/
 
 /*
  * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
@@ -36,8 +36,9 @@
  */
 
 #include gen_locl.h
+#include libgen.h
 
-__RCSID($NetBSD: gen.c,v 1.1.1.1 2011/04/13 18:14:40 elric Exp $);
+__RCSID($NetBSD: gen.c,v 1.2 2014/01/18 09:20:36 apb Exp $);
 
 FILE *privheaderfile, *headerfile, *codefile, *logfile, *templatefile;
 
@@ -155,7 +156,7 @@ init_generate (const char *filename, con
 fprintf (headerfile,
 	 /* Generated from %s */\n
 	 /* Do not edit */\n\n,
-	 filename);
+	 basename(filename));
 fprintf (headerfile,
 	 #ifndef __%s_h__\n
 	 #define __%s_h__\n\n, headerbase, headerbase);
@@ -268,7 +269,7 @@ init_generate (const char *filename, con
 	 #include errno.h\n
 	 #include limits.h\n
 	 #include krb5/krb5-types.h\n,
-	 filename);
+	 basename(filename));
 
 fprintf (templatefile,
 	 #include %s\n
@@ -366,7 +367,7 @@ generate_header_of_codefile(const char *
 	 #include errno.h\n
 	 #include limits.h\n
 	 #include krb5/krb5-types.h\n,
-	 orig_filename);
+	 basename(orig_filename));
 
 fprintf (codefile,
 	 #include %s\n

Index: src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c
diff -u src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.1.1.1 src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.2
--- src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c:1.1.1.1	Wed Apr 13 18:14:43 2011
+++ src/crypto/external/bsd/heimdal/dist/lib/com_err/compile_et.c	Sat Jan 18 09:20:36 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: compile_et.c,v 1.1.1.1 2011/04/13 18:14:43 elric Exp $	*/
+/*	$NetBSD: compile_et.c,v 1.2 2014/01/18 09:20:36 apb Exp $	*/
 
 /*
  * Copyright (c) 1998-2002 Kungliga Tekniska Högskolan
@@ -39,6 +39,7 @@
 
 #include compile_et.h
 #include getarg.h
+#include libgen.h
 
 #include roken.h
 #include err.h
@@ -77,7 +78,7 @@ generate_c(void)
 if(c_file == NULL)
 	return 1;
 
-fprintf(c_file, /* Generated from %s */\n, filename);
+fprintf(c_file, /* Generated from %s */\n, basename(filename));
 if(id_str)
 	fprintf(c_file, /* %s */\n, id_str);
 fprintf(c_file, \n);
@@ -142,7 +143,7 @@ generate_h(void)
 	if(!isalnum((unsigned char)*p))
 	*p = '_';
 
-fprintf(h_file, /* Generated from %s */\n, filename);
+fprintf(h_file, /* Generated from %s */\n, basename(filename));
 if(id_str)
 	fprintf(h_file, /* %s */\n, id_str);
 fprintf(h_file, \n);



CVS commit: src/sys/external/bsd/acpica/dist/compiler

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:25:24 UTC 2014

Modified Files:
src/sys/external/bsd/acpica/dist/compiler: aslutils.c

Log Message:
Use ACPI_DATE instead of __DATE__ in a version string that
ends up in the iasl executable.  ACPI_DATE is defined in
sys/external/bsd/acpica/dist/include/acapps.h.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/acpica/dist/compiler/aslutils.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/acpica/dist/compiler/aslutils.c
diff -u src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.6 src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.7
--- src/sys/external/bsd/acpica/dist/compiler/aslutils.c:1.6	Fri Dec 27 18:50:56 2013
+++ src/sys/external/bsd/acpica/dist/compiler/aslutils.c	Sat Jan 18 09:25:24 2014
@@ -454,7 +454,7 @@ UtDisplaySummary (
 /* Compiler name and version number */
 
 FlPrintFile (FileId, %s version %X%s [%s]\n\n,
-ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, __DATE__);
+ASL_COMPILER_NAME, (UINT32) ACPI_CA_VERSION, ACPI_WIDTH, ACPI_DATE);
 }
 
 /* Summary of main input and output files */



CVS commit: src/sys/external/bsd/acpica/dist/include

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:48:24 UTC 2014

Modified Files:
src/sys/external/bsd/acpica/dist/include: acapps.h

Log Message:
Update ACPI_DATE to 18 Dec 2013, because acpica version 20131218
was imported on 27 Dec 2013.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/acpica/dist/include/acapps.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/acpica/dist/include/acapps.h
diff -u src/sys/external/bsd/acpica/dist/include/acapps.h:1.4 src/sys/external/bsd/acpica/dist/include/acapps.h:1.5
--- src/sys/external/bsd/acpica/dist/include/acapps.h:1.4	Fri Dec 27 18:50:57 2013
+++ src/sys/external/bsd/acpica/dist/include/acapps.h	Sat Jan 18 09:48:24 2014
@@ -68,7 +68,7 @@
 
 /* Macros for signons and file headers */
 #ifdef ACPI_REPRO
-#define ACPI_DATE 23 Jun 2011
+#define ACPI_DATE 18 Dec 2013
 #else
 #define ACPI_DATE __DATE__
 #endif



CVS commit: src/sys/dev/acpi/acpica

2014-01-18 Thread Alan Barrett
Module Name:src
Committed By:   apb
Date:   Sat Jan 18 09:51:08 UTC 2014

Modified Files:
src/sys/dev/acpi/acpica: README

Log Message:
+ Please also update ACPI_DATE in include/acapps.h.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpica/README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpica/README
diff -u src/sys/dev/acpi/acpica/README:1.5 src/sys/dev/acpi/acpica/README:1.6
--- src/sys/dev/acpi/acpica/README:1.5	Fri Dec 27 18:53:16 2013
+++ src/sys/dev/acpi/acpica/README	Sat Jan 18 09:51:08 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: README,v 1.5 2013/12/27 18:53:16 christos Exp $
+#	$NetBSD: README,v 1.6 2014/01/18 09:51:08 apb Exp $
 
 This is the Intel ACPI Component Architecture, Intel's reference
 implementation of the core operating system ACPI support.  The
@@ -15,6 +15,8 @@ something sane that we can use. The curr
 	mv components/* .
 	rmdir components
 
+Please also update ACPI_DATE in include/acapps.h.
+
 The routines that the operating system must provide are documented
 in the following document:
 



CVS commit: [netbsd-5-2] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:15:59 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-2]: main

Log Message:
Also note CVE-2014-0591.


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.16.2.3 -r1.425.2.16.2.4 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.16.2.3 src/distrib/notes/common/main:1.425.2.16.2.4
--- src/distrib/notes/common/main:1.425.2.16.2.3	Fri Jan 17 17:00:03 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:15:59 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.16.2.3 2014/01/17 17:00:03 bouyer Exp $
+.\	$NetBSD: main,v 1.425.2.16.2.4 2014/01/18 11:15:59 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -484,6 +484,11 @@ ntpd used as DDoS amplifier
 Advisories prior to NetBSD-SA2013-010 do not affect
 NetBSD 5.2.2:
 .Lk http://www.NetBSD.org/support/security/patches-5.2.2.html .
+.Ss2 Other Security Fixes
+.(bullet
+bind: Fix CVE-2014-0591. 
+.bullet)
+.
 .Ss2 Kernel
 .(bullet
 Xen: remove a bogus diagostic message spamming the console.  (PR#46313):



CVS commit: [netbsd-5-1] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:15:56 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-1]: main

Log Message:
Also note CVE-2014-0591.


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.14.2.5 -r1.425.2.14.2.6 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.14.2.5 src/distrib/notes/common/main:1.425.2.14.2.6
--- src/distrib/notes/common/main:1.425.2.14.2.5	Fri Jan 17 16:44:06 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:15:56 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.14.2.5 2014/01/17 16:44:06 bouyer Exp $
+.\	$NetBSD: main,v 1.425.2.14.2.6 2014/01/18 11:15:56 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -484,6 +484,10 @@ ntpd used as DDoS amplifier
 Advisories prior to NetBSD-SA2013-010 do not affect
 NetBSD 5.1.4:
 .Lk http://www.NetBSD.org/support/security/patches-5.1.4.html .
+.Ss2 Other Security Fixes
+.(bullet
+bind: Fix CVE-2014-0591.
+.bullet)
 .
 .Ss2 Kernel
 .(bullet



CVS commit: [netbsd-6-0] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:16:02 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-0]: main

Log Message:
Also note CVE-2014-0591.


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.4.2.6 -r1.484.2.4.2.7 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.4.2.6 src/distrib/notes/common/main:1.484.2.4.2.7
--- src/distrib/notes/common/main:1.484.2.4.2.6	Fri Jan 17 18:02:51 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:16:02 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.4.2.6 2014/01/17 18:02:51 bouyer Exp $
+.\	$NetBSD: main,v 1.484.2.4.2.7 2014/01/18 11:16:02 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -495,6 +495,11 @@ ntpd used as DDoS amplifier
 Advisories prior to NetBSD-SA2013-009 do not affect
 NetBSD 6.0.4:
 .Lk http://www.NetBSD.org/support/security/patches-6.0.4.html .
+.Ss2 Other Security Fixes
+.(bullet
+bind: Fix CVE-2014-0591.
+.bullet)
+.
 .Ss2 Kernel
 .(bullet
 .Xr pci 4 :



CVS commit: [netbsd-6-1] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:16:01 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-1]: main

Log Message:
Also note CVE-2014-0591.


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.6.2.5 -r1.484.2.6.2.6 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.6.2.5 src/distrib/notes/common/main:1.484.2.6.2.6
--- src/distrib/notes/common/main:1.484.2.6.2.5	Fri Jan 17 18:11:37 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:16:01 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.6.2.5 2014/01/17 18:11:37 bouyer Exp $
+.\	$NetBSD: main,v 1.484.2.6.2.6 2014/01/18 11:16:01 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -501,6 +501,11 @@ ntpd used as DDoS amplifier
 Advisories prior to NetBSD-SA2013-009 do not affect
 NetBSD 6.1.3:
 .Lk http://www.NetBSD.org/support/security/patches-6.1.3.html .
+.Ss2 Other Security Fixes
+.(bullet
+bind: Fix CVE-2014-0591.
+.bullet)
+.
 .Ss2 Kernel
 .(bullet
 .Xr pci 4 :



CVS commit: [netbsd-6-0] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:23:51 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-0]: main

Log Message:
Update Date


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.4.2.7 -r1.484.2.4.2.8 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.4.2.7 src/distrib/notes/common/main:1.484.2.4.2.8
--- src/distrib/notes/common/main:1.484.2.4.2.7	Sat Jan 18 11:16:02 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:23:50 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.4.2.7 2014/01/18 11:16:02 bouyer Exp $
+.\	$NetBSD: main,v 1.484.2.4.2.8 2014/01/18 11:23:50 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd August 17, 2012
+.Dd January 18, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME



CVS commit: [netbsd-5-2] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:23:44 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-2]: main

Log Message:
Update Date


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.16.2.4 -r1.425.2.16.2.5 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.16.2.4 src/distrib/notes/common/main:1.425.2.16.2.5
--- src/distrib/notes/common/main:1.425.2.16.2.4	Sat Jan 18 11:15:59 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:23:44 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.16.2.4 2014/01/18 11:15:59 bouyer Exp $
+.\	$NetBSD: main,v 1.425.2.16.2.5 2014/01/18 11:23:44 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd November 27, 2012
+.Dd January 18, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME



CVS commit: [netbsd-6-1] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:23:52 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-6-1]: main

Log Message:
Update Date


To generate a diff of this commit:
cvs rdiff -u -r1.484.2.6.2.6 -r1.484.2.6.2.7 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.484.2.6.2.6 src/distrib/notes/common/main:1.484.2.6.2.7
--- src/distrib/notes/common/main:1.484.2.6.2.6	Sat Jan 18 11:16:01 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:23:52 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.484.2.6.2.6 2014/01/18 11:16:01 bouyer Exp $
+.\	$NetBSD: main,v 1.484.2.6.2.7 2014/01/18 11:23:52 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd August 15, 2013
+.Dd January 18, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME



CVS commit: [netbsd-5-1] src/distrib/notes/common

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 11:23:49 UTC 2014

Modified Files:
src/distrib/notes/common [netbsd-5-1]: main

Log Message:
Update Date


To generate a diff of this commit:
cvs rdiff -u -r1.425.2.14.2.6 -r1.425.2.14.2.7 src/distrib/notes/common/main

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/common/main
diff -u src/distrib/notes/common/main:1.425.2.14.2.6 src/distrib/notes/common/main:1.425.2.14.2.7
--- src/distrib/notes/common/main:1.425.2.14.2.6	Sat Jan 18 11:15:56 2014
+++ src/distrib/notes/common/main	Sat Jan 18 11:23:49 2014
@@ -1,4 +1,4 @@
-.\	$NetBSD: main,v 1.425.2.14.2.6 2014/01/18 11:15:56 bouyer Exp $
+.\	$NetBSD: main,v 1.425.2.14.2.7 2014/01/18 11:23:49 bouyer Exp $
 .\
 .\ Copyright (c) 1999-2008 The NetBSD Foundation, Inc.
 .\ All rights reserved.
@@ -50,7 +50,7 @@
 .as MACHINE_LIST  sgimips shark sparc sparc64 sun2 sun3 vax x68k xen zaurus .
 .so \*[.CURDIR]/../common/macros
 .
-.Dd February 2, 2012
+.Dd January 18, 2014
 .Dt INSTALL 8
 .Os NetBSD
 .Sh NAME



CVS commit: src/tests/crypto/opencrypto

2014-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 15:15:16 UTC 2014

Modified Files:
src/tests/crypto/opencrypto: t_opencrypto.sh

Log Message:
Add the test cases for sha1_hmac


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/crypto/opencrypto/t_opencrypto.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/crypto/opencrypto/t_opencrypto.sh
diff -u src/tests/crypto/opencrypto/t_opencrypto.sh:1.3 src/tests/crypto/opencrypto/t_opencrypto.sh:1.4
--- src/tests/crypto/opencrypto/t_opencrypto.sh:1.3	Fri Jan 17 19:35:33 2014
+++ src/tests/crypto/opencrypto/t_opencrypto.sh	Sat Jan 18 15:15:16 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: t_opencrypto.sh,v 1.3 2014/01/17 19:35:33 pgoyette Exp $
+#	$NetBSD: t_opencrypto.sh,v 1.4 2014/01/18 15:15:16 pgoyette Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -226,6 +226,19 @@ null_cleanup() {
 	common_cleanup
 }
 
+atf_test_case sha1_hmac cleanup
+sha1_hmac_head() {
+	common_head Test SHA1_HMAC crypto
+}
+
+sha1_hmac_body() {
+	common_body h_sha1hmac
+}
+
+sha1_hmac_cleanup() {
+	common_cleanup
+}
+
 atf_test_case xcbcmac cleanup
 xcbcmac_head() {
 	common_head Test XCBC_MAC_96 crypto
@@ -254,5 +267,6 @@ atf_init_test_cases() {
 	atf_add_test_case md5
 	atf_add_test_case md5_hmac
 	atf_add_test_case null
+	atf_add_test_case sha1_hmac
 	atf_add_test_case xcbcmac
 }



CVS commit: src/lib/libc/citrus/modules

2014-01-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jan 18 15:21:41 UTC 2014

Modified Files:
src/lib/libc/citrus/modules: citrus_euc.c

Log Message:
revert previous, it causes other problem and I cannot easily debug it.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/lib/libc/citrus/modules/citrus_euc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/citrus/modules/citrus_euc.c
diff -u src/lib/libc/citrus/modules/citrus_euc.c:1.16 src/lib/libc/citrus/modules/citrus_euc.c:1.17
--- src/lib/libc/citrus/modules/citrus_euc.c:1.16	Thu Jan 16 15:28:51 2014
+++ src/lib/libc/citrus/modules/citrus_euc.c	Sat Jan 18 10:21:41 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: citrus_euc.c,v 1.16 2014/01/16 20:28:51 christos Exp $	*/
+/*	$NetBSD: citrus_euc.c,v 1.17 2014/01/18 15:21:41 christos Exp $	*/
 
 /*-
  * Copyright (c)2002 Citrus Project,
@@ -60,7 +60,7 @@
 
 #include sys/cdefs.h
 #if defined(LIBC_SCCS)  !defined(lint)
-__RCSID($NetBSD: citrus_euc.c,v 1.16 2014/01/16 20:28:51 christos Exp $);
+__RCSID($NetBSD: citrus_euc.c,v 1.17 2014/01/18 15:21:41 christos Exp $);
 #endif /* LIBC_SCCS and not lint */
 
 #include assert.h
@@ -273,8 +273,7 @@ _citrus_EUC_mbrtowc_priv(_EUCEncodingInf
 	wchar = 0;
 	while (len--  0)
 		wchar = (wchar  8) | (*s1++  0xff);
-	if (wchar != (wchar  ~ei-mask) | ei-bits[cs])
-		goto encoding_error;
+	wchar = (wchar  ~ei-mask) | ei-bits[cs];
 
 	psenc-chlen = 0;
 	if (pwc)



CVS commit: src/tests/crypto/opencrypto

2014-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 15:55:32 UTC 2014

Modified Files:
src/tests/crypto/opencrypto: h_md5.c

Log Message:
Fix verification to use correct buffer.

Use test cases defined in RFC 1321


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/crypto/opencrypto/h_md5.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/crypto/opencrypto/h_md5.c
diff -u src/tests/crypto/opencrypto/h_md5.c:1.2 src/tests/crypto/opencrypto/h_md5.c:1.3
--- src/tests/crypto/opencrypto/h_md5.c:1.2	Fri Jan 17 14:16:08 2014
+++ src/tests/crypto/opencrypto/h_md5.c	Sat Jan 18 15:55:32 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: h_md5.c,v 1.2 2014/01/17 14:16:08 pgoyette Exp $ */
+/* $NetBSD: h_md5.c,v 1.3 2014/01/18 15:55:32 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -36,18 +36,42 @@
 
 #include crypto/cryptodev.h
 
-unsigned char key[] = abcdefgh;
-unsigned char iv[8] = {0};
-char plaintx[16] = 1234567890123456;
-const unsigned char ciphertx[16] = {
-	0x21, 0xc6, 0x0d, 0xa5, 0x34, 0x24, 0x8b, 0xce,
-	0x95, 0x86, 0x64, 0xb3, 0x66, 0x77, 0x9b, 0x4c
+/* Test vectors from RFC1321 */
+
+const struct {
+	size_t len;
+	unsigned char plaintx[80];
+	unsigned char digest[16];
+} tests[] = {
+	{ 0, ,
+	  { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
+	0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
+	{ 1, a,
+	  { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8,
+	0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
+	{ 3, abc,
+	  { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
+	0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } },
+	{ 14, message digest,
+	  { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d,
+	0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
+	{ 26, abcdefghijklmnopqrstuvwxyz,
+	  { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00,
+	0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } },
+	{ 62, ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789,
+	  { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5,
+	0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } },
+	{ 80, 123456789012345678901234567890123456789012345678901234567890
+		12345678901234567890,
+	  { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55,
+	0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } },
 };
 
 int
 main(void)
 {
 	int fd, res;
+	size_t i;
 	struct session_op cs;
 	struct crypt_op co;
 	unsigned char buf[16];
@@ -57,26 +81,33 @@ main(void)
 		err(1, open);
 	memset(cs, 0, sizeof(cs));
 	cs.mac = CRYPTO_MD5;
-#if 0
-	cs.mackeylen = 8;
-	cs.mackey = key;
-#endif
-	res = ioctl(fd, CIOCGSESSION, cs);
-	if (res  0)
-		err(1, CIOCGSESSION);
-
-	memset(co, 0, sizeof(co));
-	co.ses = cs.ses;
-	co.op = COP_ENCRYPT;
-	co.len = sizeof(plaintx);
-	co.src = plaintx;
-	co.mac = buf;
-	res = ioctl(fd, CIOCCRYPT, co);
-	if (res  0)
-		err(1, CIOCCRYPT);
-
-	if (memcmp(co.dst, ciphertx, sizeof(ciphertx)))
-		errx(1, verification failed);
 
+	for (i = 0; i  __arraycount(tests); i++) {
+		res = ioctl(fd, CIOCGSESSION, cs);
+		if (res  0)
+			err(1, CIOCGSESSION test %zu, i);
+
+		memset(co, 0, sizeof(co));
+		memset(buf, 0, sizeof(buf));
+		co.ses = cs.ses;
+		co.op = COP_ENCRYPT;
+		co.len = tests[i].len;
+		co.src = __UNCONST(tests[i].plaintx);
+		co.mac = buf;
+		res = ioctl(fd, CIOCCRYPT, co);
+		if (res  0)
+			err(1, CIOCCRYPT test %zu, i);
+
+		if (memcmp(co.mac, tests[i].digest,
+			   sizeof(tests[i].digest))) {
+			size_t j;
+
+			printf( Idx  Actual  Golden\n);
+			for (j=0; j  sizeof(tests[i].digest); j++)
+printf(0x%02zx:  0x%02x   0x%02x\n,
+j, buf[j], tests[i].digest[j]);
+			errx(1, verification failed test %zu, i);
+		}
+	}
 	return 0;
 }



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSPosix

2014-01-18 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sat Jan 18 16:51:44 UTC 2014

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSUNP.c

Log Message:
Don't try and use an address we can't use.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.2 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.3
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c:1.2	Tue Sep 29 23:56:28 2009
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSUNP.c	Sat Jan 18 16:51:44 2014
@@ -411,6 +411,24 @@ struct ifi_info *get_ifi_info(int family
 if ((flags  IFF_UP) == 0)
 continue;   /* ignore if interface not up */
 
+	/* Skip addresses we can't use */
+#ifdef SIOCGIFAFLAG_IN6
+if (ifr-ifr_addr.sa_family == AF_INET6) {
+		struct in6_ifreq ifr6;
+
+		if (sockf6 == -1)
+			sockf6 = socket(AF_INET6, SOCK_DGRAM, 0);
+		memset(ifr6, 0, sizeof(ifr6));
+		memcpy(ifr6.ifr_name, ifr-ifr_name, sizeof(ifr6.ifr_name));
+		memcpy(ifr6.ifr_addr, ifr-ifr_addr, sizeof(ifr6.ifr_addr));
+		if (ioctl(sockf6, SIOCGIFAFLAG_IN6, ifr6)  0)
+			goto gotError;
+		if (ifr6.ifr_ifru.ifru_flags6 
+		(IN6_IFF_NOTREADY | IN6_IFF_DETACHED))
+			continue;
+	}
+#endif
+
 ifi = (struct ifi_info*)calloc(1, sizeof(struct ifi_info));
 if (ifi == NULL) {
 goto gotError;



CVS commit: src/doc

2014-01-18 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Jan 18 17:09:04 UTC 2014

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
Postfix was updated to version 2.10.3.


To generate a diff of this commit:
cvs rdiff -u -r1.1087 -r1.1088 src/doc/3RDPARTY
cvs rdiff -u -r1.1881 -r1.1882 src/doc/CHANGES

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1087 src/doc/3RDPARTY:1.1088
--- src/doc/3RDPARTY:1.1087	Sat Jan 11 18:35:48 2014
+++ src/doc/3RDPARTY	Sat Jan 18 17:09:04 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1087 2014/01/11 18:35:48 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1088 2014/01/18 17:09:04 tron Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1058,8 +1058,8 @@ and more. Vern's ping is gone. We are to
 now to do a new import.
 
 Package:	Postfix
-Version:	2.10.2
-Current Vers:	2.10.2
+Version:	2.10.3
+Current Vers:	2.11.0/2.10.3
 Maintainer:	Wietse Venema wie...@porcupine.org
 Archive Site:	ftp://postfix.cloud9.net/official/
 Home Page:	http://www.postfix.org/

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.1881 src/doc/CHANGES:1.1882
--- src/doc/CHANGES:1.1881	Sat Jan 11 18:35:48 2014
+++ src/doc/CHANGES	Sat Jan 18 17:09:04 2014
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1881 $
+# LIST OF CHANGES FROM LAST RELEASE:			$Revision: 1.1882 $
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -340,3 +340,4 @@ Changes from NetBSD 6.0 to NetBSD 7.0:
 	luna68k: Add support to pass boothowto and boot device info from
 		 bootloader to kernel. [tsutsui 20140111]
 	OpenSSL: Imported 1.0.1f [christos 20130111]
+	postfix(1): Import version 2.10.3 [tron 20140118]



CVS commit: src/lib/libm

2014-01-18 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jan 18 17:20:36 UTC 2014

Modified Files:
src/lib/libm: Makefile

Log Message:
Add various functions which need fenv support to arm.


To generate a diff of this commit:
cvs rdiff -u -r1.152 -r1.153 src/lib/libm/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.152 src/lib/libm/Makefile:1.153
--- src/lib/libm/Makefile:1.152	Fri Nov 22 13:37:24 2013
+++ src/lib/libm/Makefile	Sat Jan 18 17:20:36 2014
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.152 2013/11/22 13:37:24 martin Exp $
+#  $NetBSD: Makefile,v 1.153 2014/01/18 17:20:36 skrll Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -52,7 +52,8 @@ USE_SHLIBDIR=	yes
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
 .elif (${MACHINE_CPU} == arm)
 .PATH: ${.CURDIR}/arch/arm
-COMMON_SRCS+= fenv.c
+COMMON_SRCS+= fenv.c s_nexttowardf.c \
+	s_nearbyint.c s_rintl.c
 COPTS.e_sqrtl.c += -DHAVE_FENV_H
 .if (${MKSOFTFLOAT} == no)
 ARCH_SRCS = e_sqrt.S e_sqrtf.S lrint.S lrintf.S s_fabsf.S s_fma.S s_fmaf.S



CVS commit: src/lib/librumphijack

2014-01-18 Thread Matthias Scheler
Module Name:src
Committed By:   tron
Date:   Sat Jan 18 18:37:30 UTC 2014

Modified Files:
src/lib/librumphijack: Makefile

Log Message:
Make sure that _FORTIFY_SOURCE really gets undefined even if USE_SSP
is set to yes to fix build problems caused by the recent change to
this makefile.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/lib/librumphijack/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/librumphijack/Makefile
diff -u src/lib/librumphijack/Makefile:1.15 src/lib/librumphijack/Makefile:1.16
--- src/lib/librumphijack/Makefile:1.15	Fri Jan 10 15:54:29 2014
+++ src/lib/librumphijack/Makefile	Sat Jan 18 18:37:30 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.15 2014/01/10 15:54:29 christos Exp $
+#	$NetBSD: Makefile,v 1.16 2014/01/18 18:37:30 tron Exp $
 #
 
 LIB=		rumphijack
@@ -18,6 +18,6 @@ WARNS?=		5
 # a stack frame
 COPTS.hijackdlsym.c+=	-O0
 
-CPPFLAGS+=	-U_FORTIFY_SOURCE
-
 .include bsd.lib.mk
+
+CPPFLAGS+=	-U_FORTIFY_SOURCE



CVS commit: src/sys/dev/pci

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 19:24:46 UTC 2014

Modified Files:
src/sys/dev/pci: sisfb.c

Log Message:
Request a 80x25 tty emulation, which is more likely to work than 80x30
on a 640x400 VGA.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/sisfb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/sisfb.c
diff -u src/sys/dev/pci/sisfb.c:1.2 src/sys/dev/pci/sisfb.c:1.3
--- src/sys/dev/pci/sisfb.c:1.2	Mon Jan 30 19:41:23 2012
+++ src/sys/dev/pci/sisfb.c	Sat Jan 18 19:24:46 2014
@@ -24,7 +24,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sisfb.c,v 1.2 2012/01/30 19:41:23 drochner Exp $);
+__KERNEL_RCSID(0, $NetBSD: sisfb.c,v 1.3 2014/01/18 19:24:46 bouyer Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -571,7 +571,7 @@ sisfb_setup(struct sisfb *fb)
 		sisfb_loadcmap(fb, 0, 256);
 	}
 
-	rasops_init(ri, 30, 80);
+	rasops_init(ri, 25, 80);
 	rasops_reconfig(ri, ri-ri_height / ri-ri_font-fontheight,
 	ri-ri_width / ri-ri_font-fontwidth);
 



CVS commit: src/sys/arch/evbmips/conf

2014-01-18 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sat Jan 18 19:26:41 UTC 2014

Modified Files:
src/sys/arch/evbmips/conf: LOONGSON

Log Message:
Add FONT_BOLD8x16, which will help to have a 80x25 tty on sisfb
(which is limited to 640x400 pixels at this time).


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbmips/conf/LOONGSON

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbmips/conf/LOONGSON
diff -u src/sys/arch/evbmips/conf/LOONGSON:1.21 src/sys/arch/evbmips/conf/LOONGSON:1.22
--- src/sys/arch/evbmips/conf/LOONGSON:1.21	Sun Jun 30 21:38:56 2013
+++ src/sys/arch/evbmips/conf/LOONGSON	Sat Jan 18 19:26:41 2014
@@ -1,4 +1,4 @@
-# $NetBSD: LOONGSON,v 1.21 2013/06/30 21:38:56 rmind Exp $
+# $NetBSD: LOONGSON,v 1.22 2014/01/18 19:26:41 bouyer Exp $
 #
 # LOONGSON machine description file
 # 
@@ -22,7 +22,7 @@ include		arch/evbmips/conf/std.loongson
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		LOONGSON-$Revision: 1.21 $
+#ident 		LOONGSON-$Revision: 1.22 $
 
 maxusers	16
 
@@ -152,6 +152,7 @@ options		WSDISPLAY_SCROLLSUPPORT
 options		WS_KERNEL_FG=WSCOL_GREEN
 #options 	WSDISPLAY_DEFAULTSCREENS=4
 options 	FONT_GALLANT12x22
+options 	FONT_BOLD8x16
 # compatibility to other console drivers
 options 	WSDISPLAY_COMPAT_RAWKBD		# can get raw scancodes
 #



CVS commit: src/tests/crypto/opencrypto

2014-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 19:44:41 UTC 2014

Modified Files:
src/tests/crypto/opencrypto: h_md5.c

Log Message:
Free each crypto(4) session when we're done with it.  (A new session
is created for each test case.)


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/crypto/opencrypto/h_md5.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/crypto/opencrypto/h_md5.c
diff -u src/tests/crypto/opencrypto/h_md5.c:1.3 src/tests/crypto/opencrypto/h_md5.c:1.4
--- src/tests/crypto/opencrypto/h_md5.c:1.3	Sat Jan 18 15:55:32 2014
+++ src/tests/crypto/opencrypto/h_md5.c	Sat Jan 18 19:44:41 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: h_md5.c,v 1.3 2014/01/18 15:55:32 pgoyette Exp $ */
+/* $NetBSD: h_md5.c,v 1.4 2014/01/18 19:44:41 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -108,6 +108,9 @@ main(void)
 j, buf[j], tests[i].digest[j]);
 			errx(1, verification failed test %zu, i);
 		}
+		res = ioctl(fd, CIOCFSESSION, cs.ses);
+		if (res  0)
+			err(1, CIOCFSESSION test %zu, i);
 	}
 	return 0;
 }



CVS commit: src/tests/crypto/opencrypto

2014-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 20:10:34 UTC 2014

Modified Files:
src/tests/crypto/opencrypto: h_md5.c

Log Message:
Remove some debugging code.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/crypto/opencrypto/h_md5.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/crypto/opencrypto/h_md5.c
diff -u src/tests/crypto/opencrypto/h_md5.c:1.4 src/tests/crypto/opencrypto/h_md5.c:1.5
--- src/tests/crypto/opencrypto/h_md5.c:1.4	Sat Jan 18 19:44:41 2014
+++ src/tests/crypto/opencrypto/h_md5.c	Sat Jan 18 20:10:34 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: h_md5.c,v 1.4 2014/01/18 19:44:41 pgoyette Exp $ */
+/* $NetBSD: h_md5.c,v 1.5 2014/01/18 20:10:34 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -98,16 +98,9 @@ main(void)
 		if (res  0)
 			err(1, CIOCCRYPT test %zu, i);
 
-		if (memcmp(co.mac, tests[i].digest,
-			   sizeof(tests[i].digest))) {
-			size_t j;
-
-			printf( Idx  Actual  Golden\n);
-			for (j=0; j  sizeof(tests[i].digest); j++)
-printf(0x%02zx:  0x%02x   0x%02x\n,
-j, buf[j], tests[i].digest[j]);
+		if (memcmp(co.mac, tests[i].digest, sizeof(tests[i].digest)))
 			errx(1, verification failed test %zu, i);
-		}
+
 		res = ioctl(fd, CIOCFSESSION, cs.ses);
 		if (res  0)
 			err(1, CIOCFSESSION test %zu, i);



CVS commit: src/tests/crypto/opencrypto

2014-01-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Jan 18 20:40:27 UTC 2014

Modified Files:
src/tests/crypto/opencrypto: h_aesctr1.c

Log Message:
Include more of the test cases from RFC 1321.

XXX cases 3, 6, and 9 are currently disabled because we don't seem
to handle plain-text in other than 8-byte chunks.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/crypto/opencrypto/h_aesctr1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/crypto/opencrypto/h_aesctr1.c
diff -u src/tests/crypto/opencrypto/h_aesctr1.c:1.2 src/tests/crypto/opencrypto/h_aesctr1.c:1.3
--- src/tests/crypto/opencrypto/h_aesctr1.c:1.2	Fri Jan 17 14:16:08 2014
+++ src/tests/crypto/opencrypto/h_aesctr1.c	Sat Jan 18 20:40:27 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: h_aesctr1.c,v 1.2 2014/01/17 14:16:08 pgoyette Exp $ */
+/* $NetBSD: h_aesctr1.c,v 1.3 2014/01/18 20:40:27 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,55 +30,221 @@
 #include fcntl.h
 #include stdio.h
 #include string.h
+#include unistd.h
 
 #include sys/ioctl.h
 #include sys/time.h
 
 #include crypto/cryptodev.h
 
-unsigned char key[20] = {0xae, 0x68, 0x52, 0xf8, 0x12, 0x10, 0x67, 0xcc,
-			 0x4b, 0xf7, 0xa5, 0x76, 0x55, 0x77, 0xf3, 0x9e,
-	0x00, 0x00, 0x00, 0x30};
-unsigned char iv[8] = {0};
-char plaintx[16] = Single block msg;
-const unsigned char ciphertx[16] = {
-	0xe4, 0x09, 0x5d, 0x4f, 0xb7, 0xa7, 0xb3, 0x79,
-	0x2d, 0x61, 0x75, 0xa3, 0x26, 0x13, 0x11, 0xb8
+/*
+ * Test vectors from RFC 3686
+ *
+ * Test vectors 3, 6, and 9 are disabled because we don't support
+ * 36-byte (ie, unpadded) operations.
+ */
+
+const struct {
+	size_t len;
+	size_t key_len;
+	unsigned char key[36];		/* Includes 32-bit nonce */
+	unsigned char iv[8];
+	unsigned char plaintx[36];
+	unsigned char ciphertx[36];
+} tests[] = {
+	/* Test Vector #1: Encrypting 16 octets using AES-CTR w/ 128-bit key*/
+	{ 16, 20, 
+	  { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC,
+	0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E,
+	0x00, 0x00, 0x00, 0x30 },
+	  { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+	  { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62,
+	0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 },
+	  { 0xE4, 0x09, 0x5D, 0x4F, 0xB7, 0xA7, 0xB3, 0x79,
+	0x2D, 0x61, 0x75, 0xA3, 0x26, 0x13, 0x11, 0xB8 }
+	},
+
+	/* Test Vector #2: Encrypting 32 octets using AES-CTR w/ 128-bit key */
+	{ 32, 20, 
+	  { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7,
+	0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63,
+	0x00, 0x6C, 0xB6, 0xDB },
+	  { 0xC0, 0x54, 0x3B, 0x59, 0xDA, 0x48, 0xD9, 0x0B },
+	  { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+	0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+	0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F },
+	  { 0x51, 0x04, 0xA1, 0x06, 0x16, 0x8A, 0x72, 0xD9,
+	0x79, 0x0D, 0x41, 0xEE, 0x8E, 0xDA, 0xD3, 0x88,
+	0xEB, 0x2E, 0x1E, 0xFC, 0x46, 0xDA, 0x57, 0xC8,
+	0xFC, 0xE6, 0x30, 0xDF, 0x91, 0x41, 0xBE, 0x28 }
+	},
+
+	/* Test Vector #3: Encrypting 36 octets using AES-CTR w/ 128-bit key */
+/*	{ 36, 20,
+	  { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8,
+	0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC,
+	0x00, 0xE0, 0x01, 0x7B },
+	  { 0x27, 0x77, 0x7F, 0x3F, 0x4A, 0x17, 0x86, 0xF0 },
+	  { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+	0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+	0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+	0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
+	0x20, 0x21, 0x22, 0x23 },
+	  { 0xC1, 0xCF, 0x48, 0xA8, 0x9F, 0x2F, 0xFD, 0xD9,
+	0xCF, 0x46, 0x52, 0xE9, 0xEF, 0xDB, 0x72, 0xD7,
+	0x45, 0x40, 0xA4, 0x2B, 0xDE, 0x6D, 0x78, 0x36,
+	0xD5, 0x9A, 0x5C, 0xEA, 0xAE, 0xF3, 0x10, 0x53,
+	0x25, 0xB2, 0x07, 0x2F }
+	},
+*/
+	/* Test Vector #4: Encrypting 16 octets using AES-CTR w/ 192-bit key */
+	{ 16, 28,
+	  { 0x16, 0xAF, 0x5B, 0x14, 0x5F, 0xC9, 0xF5, 0x79,
+	0xC1, 0x75, 0xF9, 0x3E, 0x3B, 0xFB, 0x0E, 0xED,
+	0x86, 0x3D, 0x06, 0xCC, 0xFD, 0xB7, 0x85, 0x15,
+	0x00, 0x00, 0x00, 0x48 },
+	  { 0x36, 0x73, 0x3C, 0x14, 0x7D, 0x6D, 0x93, 0xCB },
+	  { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62,
+	0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 },
+	  { 0x4B, 0x55, 0x38, 0x4F, 0xE2, 0x59, 0xC9, 0xC8,
+	0x4E, 0x79, 0x35, 0xA0, 0x03, 0xCB, 0xE9, 0x28 }
+	},
+
+	/* Test Vector #5: Encrypting 32 octets using AES-CTR w/ 192-bit key */
+	{ 32, 28,
+	  { 0x7C, 0x5C, 0xB2, 0x40, 0x1B, 0x3D, 0xC3, 0x3C,
+	0x19, 0xE7, 0x34, 0x08, 0x19, 0xE0, 0xF6, 0x9C,
+	0x67, 0x8C, 0x3D, 0xB8, 0xE6, 0xF6, 0xA9, 0x1A,
+	0x00, 0x96, 0xB0, 0x3B },
+	  { 0x02, 0x0C, 0x6E, 0xAD, 0xC2, 0xCB, 0x50, 0x0D },
+	  { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+	0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
+	0x10, 0x11, 0x12, 

CVS commit: src/lib/libc/compiler_rt

2014-01-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan 18 21:26:46 UTC 2014

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
Must use LIBC_MACHINE_ARCH for deciding whether 64bit support code is
neded. Otherwise e.g. i386 compat libs are broken.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.11 src/lib/libc/compiler_rt/Makefile.inc:1.12
--- src/lib/libc/compiler_rt/Makefile.inc:1.11	Sat Jan 18 03:28:28 2014
+++ src/lib/libc/compiler_rt/Makefile.inc	Sat Jan 18 21:26:46 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.11 2014/01/18 03:28:28 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.12 2014/01/18 21:26:46 joerg Exp $
 
 COMPILER_RT_SRCDIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
 
@@ -145,7 +145,7 @@ GENERIC_SRCS+= \
 	popcountdi2.c \
 	subvdi3.c
 
-.if empty(MACHINE_ARCH:M*64*)  ${MACHINE_ARCH} != alpha
+.if empty(LIBC_MACHINE_ARCH:M*64*)  ${LIBC_MACHINE_ARCH} != alpha
 GENERIC_SRCS+= \
 	cmpdi2.c \
 	ashldi3.c \



CVS commit: src/lib/libc/compiler_rt

2014-01-18 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Jan 18 21:27:11 UTC 2014

Modified Files:
src/lib/libc/compiler_rt: Makefile.inc

Log Message:
ARM needs __clear_cache.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/lib/libc/compiler_rt/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/compiler_rt/Makefile.inc
diff -u src/lib/libc/compiler_rt/Makefile.inc:1.12 src/lib/libc/compiler_rt/Makefile.inc:1.13
--- src/lib/libc/compiler_rt/Makefile.inc:1.12	Sat Jan 18 21:26:46 2014
+++ src/lib/libc/compiler_rt/Makefile.inc	Sat Jan 18 21:27:11 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.12 2014/01/18 21:26:46 joerg Exp $
+# $NetBSD: Makefile.inc,v 1.13 2014/01/18 21:27:11 joerg Exp $
 
 COMPILER_RT_SRCDIR=	${NETBSDSRCDIR}/sys/external/bsd/compiler_rt/dist
 
@@ -188,6 +188,8 @@ GENERIC_SRCS+= \
 	aeabi_uidivmod.S \
 	aeabi_uldivmod.S
 .endif
+GENERIC_SRCS+= \
+	clear_cache.c
 # Not yet, overlaps with softfloat
 #	aeabi_dcmp.S \
 #	aeabi_fcmp.S



CVS commit: src/sys/arch/sparc/sparc

2014-01-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan 19 00:22:33 UTC 2014

Modified Files:
src/sys/arch/sparc/sparc: timer.c timer_sun4m.c timervar.h

Log Message:
remove schedintr_4m(), and go back to only having the level 14
timer call statclock/schedclock.  the randomness for this clock
makes the hardclock() call very jittery.

instead of this, trigger a softintr IPI at level 10 on non-primary
CPUs from the primary CPU's clock interrupt (at level 10.)  this
cleans up the generic sparc timer code a little as well.

this makes the time goes backwards problem *much* less frequent,
but i still see it sometimes.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sparc/sparc/timer.c
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/sparc/timer_sun4m.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc/sparc/timervar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc/sparc/timer.c
diff -u src/sys/arch/sparc/sparc/timer.c:1.31 src/sys/arch/sparc/sparc/timer.c:1.32
--- src/sys/arch/sparc/sparc/timer.c:1.31	Sat Oct 19 19:40:23 2013
+++ src/sys/arch/sparc/sparc/timer.c	Sun Jan 19 00:22:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer.c,v 1.31 2013/10/19 19:40:23 mrg Exp $ */
+/*	$NetBSD: timer.c,v 1.32 2014/01/19 00:22:33 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -60,7 +60,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: timer.c,v 1.31 2013/10/19 19:40:23 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: timer.c,v 1.32 2014/01/19 00:22:33 mrg Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -87,7 +87,7 @@ void *sched_cookie;
 static struct counter {
 	volatile u_int *cntreg;	/* counter register */
 	u_int limit;		/* limit we count up to */
-	u_int offset;		/* accumulated offet due to wraps */
+	u_int offset;		/* accumulated offset due to wraps */
 	u_int shift;		/* scaling for valid bits */
 	u_int mask;		/* valid bit mask */
 } cntr;
@@ -117,12 +117,11 @@ timer_get_timecount(struct timecounter *
 	u_int c, res, r;
 	int s;
 
-
 	s = splhigh();
 
 	res = c = *ctr-cntreg;
 
-	res  = ~TMR_LIMIT;
+	res = ~TMR_LIMIT;
 
 	if (c != res) {
 		r = ctr-limit;
@@ -155,7 +154,6 @@ void
 timerattach(volatile int *cntreg, volatile int *limreg)
 {
 	u_int prec = 0, t0;
-	void(*sched_intr_fn)(void *);
 
 	/*
 	 * Calibrate delay() by tweaking the magic constant
@@ -198,11 +196,11 @@ timerattach(volatile int *cntreg, volati
 	
 	printf(: delay constant %d, frequency = % PRIu64  Hz\n,
 	   timerblurb, counter_timecounter.tc_frequency);
+printf(timer: limit %u shift %u mask %x\n, cntr.limit, cntr.shift, cntr.mask);
 
 #if defined(SUN4) || defined(SUN4C)
 	if (CPU_ISSUN4 || CPU_ISSUN4C) {
 		timer_init = timer_init_4;
-		sched_intr_fn = schedintr;
 		level10.ih_fun = clockintr_4;
 		level14.ih_fun = statintr_4;
 		cntr.limit = tmr_ustolim(tick);
@@ -211,12 +209,6 @@ timerattach(volatile int *cntreg, volati
 #if defined(SUN4M)
 	if (CPU_ISSUN4M) {
 		timer_init = timer_init_4m;
-#if defined(MULTIPROCESSOR)
-		if (sparc_ncpus  1)
-			sched_intr_fn = schedintr_4m;
-		else
-#endif
-			sched_intr_fn = schedintr;
 		level10.ih_fun = clockintr_4m;
 		level14.ih_fun = statintr_4m;
 		cntr.limit = tmr_ustolim4m(tick);
@@ -227,7 +219,7 @@ timerattach(volatile int *cntreg, volati
 	intr_establish(14, 0, level14, NULL, true);
 
 	/* Establish a soft interrupt at a lower level for schedclock */
-	sched_cookie = sparc_softintr_establish(IPL_SCHED, sched_intr_fn, NULL);
+	sched_cookie = sparc_softintr_establish(IPL_SCHED, schedintr, NULL);
 	if (sched_cookie == NULL)
 		panic(timerattach: cannot establish schedintr);
 

Index: src/sys/arch/sparc/sparc/timer_sun4m.c
diff -u src/sys/arch/sparc/sparc/timer_sun4m.c:1.29 src/sys/arch/sparc/sparc/timer_sun4m.c:1.30
--- src/sys/arch/sparc/sparc/timer_sun4m.c:1.29	Sat Nov 16 23:54:01 2013
+++ src/sys/arch/sparc/sparc/timer_sun4m.c	Sun Jan 19 00:22:33 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_sun4m.c,v 1.29 2013/11/16 23:54:01 mrg Exp $	*/
+/*	$NetBSD: timer_sun4m.c,v 1.30 2014/01/19 00:22:33 mrg Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -58,7 +58,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: timer_sun4m.c,v 1.29 2013/11/16 23:54:01 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: timer_sun4m.c,v 1.30 2014/01/19 00:22:33 mrg Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -78,6 +78,11 @@ struct timer_4m		*timerreg4m;
 #define	counterreg4m	cpuinfo.counterreg_4m
 
 /*
+ * SMP hardclock handler.
+ */
+#define IPL_HARDCLOCK	10
+
+/*
  * Set up the real-time and statistics clocks.
  * Leave stathz 0 only if no alternative timer is available.
  *
@@ -96,31 +101,45 @@ timer_init_4m(void)
 	icr_si_bic(SINTR_T);
 }
 
-void
-schedintr_4m(void *v)
+#ifdef MULTIPROCESSOR
+/*
+ * Handle SMP hardclock() calling for this CPU.
+ */
+static void
+hardclock_ipi(void *cap)
 {
+	int s = splsched();
 
-	kpreempt_disable();
+	hardclock((struct 

CVS commit: src/external/gpl3/gcc

2014-01-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan 19 00:37:30 UTC 2014

Modified Files:
src/external/gpl3/gcc: gcc2netbsd

Log Message:
delete .svn subdirs as part of the pre-import.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/gcc2netbsd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/gcc2netbsd
diff -u src/external/gpl3/gcc/gcc2netbsd:1.3 src/external/gpl3/gcc/gcc2netbsd:1.4
--- src/external/gpl3/gcc/gcc2netbsd:1.3	Fri Dec 13 10:01:49 2013
+++ src/external/gpl3/gcc/gcc2netbsd	Sun Jan 19 00:37:30 2014
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-#	$NetBSD: gcc2netbsd,v 1.3 2013/12/13 10:01:49 mrg Exp $
+#	$NetBSD: gcc2netbsd,v 1.4 2014/01/19 00:37:30 mrg Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,10 +39,10 @@ then
 	echo Usage: $PROG directory 12
 	exit 1
 fi
-FILE=$1
+DIR=$1
 
 ### Remove the $'s around RCS tags
-cleantags $FILE
+cleantags $DIR
 
 RM=
 boehm-gc
@@ -65,10 +65,11 @@ libstdc++-v3/testsuite
 zlib
 
 
-find $FILE -name .cvsignore -exec rm -f {} +
-find $FILE -name .gitignore -exec rm -f {} +
+find $DIR -name .cvsignore -exec rm -f {} +
+find $DIR -name .gitignore -exec rm -f {} +
+find $DIR -name .svn -type d -exec rm -fr {} +
 for i in $RM; do
-	rm -fr $FILE/$i
+	rm -fr $DIR/$i
 done
 
 echo You can import now.  Use the following command:



CVS commit: src/sys/arch/powerpc/conf

2014-01-18 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jan 19 02:32:21 UTC 2014

Modified Files:
src/sys/arch/powerpc/conf: kern.ldscript

Log Message:
make this look more like the latest elf32ppc.x.  tested on pegasosII.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/conf/kern.ldscript

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/conf/kern.ldscript
diff -u src/sys/arch/powerpc/conf/kern.ldscript:1.5 src/sys/arch/powerpc/conf/kern.ldscript:1.6
--- src/sys/arch/powerpc/conf/kern.ldscript:1.5	Sat Nov 16 12:00:21 2013
+++ src/sys/arch/powerpc/conf/kern.ldscript	Sun Jan 19 02:32:21 2014
@@ -1,7 +1,9 @@
-/* $NetBSD: kern.ldscript,v 1.5 2013/11/16 12:00:21 mrg Exp $ */
+/* $NetBSD: kern.ldscript,v 1.6 2014/01/19 02:32:21 mrg Exp $ */
 
-/*  ldscript for NetBSD/powerpc kernels and LKMs */
-OUTPUT_ARCH(powerpc)
+/*  ldscript for NetBSD/powerpc kernels and LKMs, based on elf32ppc.x */
+OUTPUT_FORMAT(elf32-powerpc, elf32-powerpc,
+	  elf32-powerpc)
+OUTPUT_ARCH(powerpc:common)
 ENTRY(_start)
 SEARCH_DIR(/lib);
 /* Do we need any of these?
@@ -14,29 +16,45 @@ SECTIONS
   .text  :
   {
 _ftext = . ;
+PROVIDE_HIDDEN (__eprol = .);
 *(.text)
-*(.text.startup)
-*(.text.unlikely)
+*(.text.unlikely .text.*_unlikely)
+*(.text.exit .text.exit.*)
+*(.text.startup .text.startup.*)
+*(.text.hot .text.hot.*)
+*(.text.* .gnu.linkonce.t.*)
 __stub_start = .;
 *(.stub)
 __stub_end = .;
 __stub_pmap_start = .;
 *(.stub.pmap)
 __stub_pmap_end = .;
+/* .gnu.warning sections are handled specially by elf32.em.  */
 *(.gnu.warning)
+*(.glink)
   } =0
   _etext = .;
+  PROVIDE (__etext = .);
+  PROVIDE (_etext = .);
   PROVIDE (etext = .);
-  .rodata: { *(.rodata) *(.rodata.*) }
+  .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
+  .rodata1: { *(.rodata1) }
+  .sdata2 :
+  {
+PROVIDE (_SDA2_BASE_ = 32768);
+*(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
+  }
+  .sbss2  : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
+  /*.jcr: { KEEP (*(.jcr)) } */ /* XXX??? */
   .reginfo : { *(.reginfo) }
 /*  . = . + 0x1000; */
-  .data:
+  .data   :
   {
 _fdata = . ;
-*(.data)
-CONSTRUCTORS
+*(.data .data.* .gnu.linkonce.d.*)
+SORT(CONSTRUCTORS)
   }
-  .data1			: { *(.data1) }
+  .data1  : { *(.data1) }
   . = ALIGN(32);	/* COHERENCY UNIT */
   .data.cacheline_aligned	: { *(.data.cacheline_aligned) }
   . = ALIGN(32);	/* COHERENCY UNIT */
@@ -45,32 +63,79 @@ SECTIONS
   _gp = ALIGN(16) + 0x7ff0;
   .lit8 : { *(.lit8) }
   .lit4 : { *(.lit4) }
-  .sdata : { *(.sdata) }
-  _edata  =  .;
-  PROVIDE (edata = .);
+  .sdata  :
+  {
+PROVIDE (_SDA_BASE_ = 32768);
+*(.sdata .sdata.* .gnu.linkonce.s.*)
+  }
+  _edata = .; PROVIDE (edata = .);
+  . = .;
   __bss_start = .;
   _fbss = .;
-  .sbss  : { *(.sbss) *(.scommon) }
-  .bss   :
+  .sbss   :
   {
-   *(.bss)
+PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
+*(.dynsbss)
+*(.sbss .sbss.* .gnu.linkonce.sb.*)
+*(.scommon)
+PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
+  }
+  .bss:
+  {
+   *(.dynbss)
+   *(.bss .bss.* .gnu.linkonce.b.*)
*(COMMON)
+   /* Align here to ensure that the .bss section occupies space up to
+  _end.  Align after .bss to ensure correct alignment even if the
+  .bss section disappears because there are no input sections.
+  FIXME: Why do we need it? When there is no .bss section, we don't
+  pad the .data section.  */
+   . = ALIGN(. != 0 ? 32 / 8 : 1);
   }
-  _end = . ;
-  PROVIDE (end = .);
-  /* These are needed for ELF backends which have not yet been
- converted to the new style linker.  */
-  .stab 0 : { *(.stab) }
-  .stabstr 0 : { *(.stabstr) }
+  . = ALIGN(32 / 8);
+  . = ALIGN(32 / 8);
+  __end = .;
+  _end = .; PROVIDE (end = .);
+  /* . = DATA_SEGMENT_END (.); */
+  /* Stabs debugging sections.  */
+  .stab  0 : { *(.stab) }
+  .stabstr   0 : { *(.stabstr) }
+  .stab.excl 0 : { *(.stab.excl) }
+  .stab.exclstr  0 : { *(.stab.exclstr) }
+  .stab.index0 : { *(.stab.index) }
+  .stab.indexstr 0 : { *(.stab.indexstr) }
+  .comment   0 : { *(.comment) }
   /* DWARF debug sections.
- Symbols in the .debug DWARF section are relative to the beginning of the
- section so we begin .debug at 0.  It's not clear yet what needs to happen
- for the others.   */
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0.  */
+  /* DWARF 1 */
   .debug  0 : { *(.debug) }
+  .line   0 : { *(.line) }
+  /* GNU DWARF 1 extensions */
   .debug_srcinfo  0 : { *(.debug_srcinfo) }
+  .debug_sfnames  0 : { *(.debug_sfnames) }
+  /* DWARF 1.1 and 

CVS commit: src/sys/arch/alpha/pci

2014-01-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 19 03:44:13 UTC 2014

Modified Files:
src/sys/arch/alpha/pci: tsp_bus_mem.c

Log Message:
Set a proper address for PCI memspace to make bus_space_mmap(9) work correctly.

Reported and confirmed with radeonfb(4) by Naruaki Etomi in PR port-48431.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/alpha/pci/tsp_bus_mem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/alpha/pci/tsp_bus_mem.c
diff -u src/sys/arch/alpha/pci/tsp_bus_mem.c:1.12 src/sys/arch/alpha/pci/tsp_bus_mem.c:1.13
--- src/sys/arch/alpha/pci/tsp_bus_mem.c:1.12	Mon Feb  6 02:14:15 2012
+++ src/sys/arch/alpha/pci/tsp_bus_mem.c	Sun Jan 19 03:44:13 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: tsp_bus_mem.c,v 1.12 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: tsp_bus_mem.c,v 1.13 2014/01/19 03:44:13 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tsp_bus_mem.c,v 1.12 2012/02/06 02:14:15 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: tsp_bus_mem.c,v 1.13 2014/01/19 03:44:13 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -57,7 +57,8 @@ __KERNEL_RCSID(0, $NetBSD: tsp_bus_mem.
 #define	CHIP_MEM_EX_STORE_SIZE(v)	\
 	(sizeof (((struct tsp_config *)(v))-pc_mem_exstorage))
 
-#define CHIP_MEM_SYS_START(v)(((struct tsp_config *)(v))-pc_iobase)
+#define CHIP_MEM_SYS_START(v)		\
+	(((struct tsp_config *)(v))-pc_iobase | P_PCI_MEM)
 
 /*
  * Tsunami core logic appears on EV6.  We require at least EV56



CVS commit: src/sys/rump/include/machine

2014-01-18 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jan 19 07:01:55 UTC 2014

Modified Files:
src/sys/rump/include/machine: intr.h

Log Message:
Make IPL_ values different.
This makes ni real difference for rump, but avoods
KASSERTs in common code when we try to assert
ipl not higher as
Suggested by riastradh, OK: pooka.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/rump/include/machine/intr.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/include/machine/intr.h
diff -u src/sys/rump/include/machine/intr.h:1.19 src/sys/rump/include/machine/intr.h:1.20
--- src/sys/rump/include/machine/intr.h:1.19	Tue Jan  8 08:55:28 2013
+++ src/sys/rump/include/machine/intr.h	Sun Jan 19 07:01:55 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.19 2013/01/08 08:55:28 skrll Exp $	*/
+/*	$NetBSD: intr.h,v 1.20 2014/01/19 07:01:55 martin Exp $	*/
 
 /*
  * Copyright (c) 2009, 2010 Antti Kantee.  All Rights Reserved.
@@ -56,13 +56,18 @@ makeiplcookie(ipl_t ipl)
 #define splx(x) ((void)x)
 #define spl0() ((void)0)
 
+/*
+ * IPL_* does not mean anything to a run-to-completition rump kernel,
+ * but we sometimes assert a not higher than condition, so we assign
+ * different values (following spl(9)).
+ */
 #define IPL_NONE 0
-#define	IPL_SOFTBIO 1
 #define	IPL_SOFTCLOCK 1
-#define IPL_SOFTSERIAL 1
-#define	IPL_SOFTNET 1
-#define IPL_SCHED 2
-#define IPL_VM 2
-#define IPL_HIGH 2
+#define	IPL_SOFTBIO 2
+#define	IPL_SOFTNET 3
+#define IPL_SOFTSERIAL 4
+#define IPL_VM 5
+#define IPL_SCHED 6
+#define IPL_HIGH 7
 
 #endif /* _SYS_RUMP_INTR_H_ */