CVS commit: [netbsd-6] src/doc

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:25:56 UTC 2017

Modified Files:
src/doc [netbsd-6]: CHANGES-6.2

Log Message:
1441, 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.273 -r1.1.2.274 src/doc/CHANGES-6.2

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

Modified files:

Index: src/doc/CHANGES-6.2
diff -u src/doc/CHANGES-6.2:1.1.2.273 src/doc/CHANGES-6.2:1.1.2.274
--- src/doc/CHANGES-6.2:1.1.2.273	Sun Feb 19 17:43:34 2017
+++ src/doc/CHANGES-6.2	Tue Mar  7 07:25:56 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.2,v 1.1.2.273 2017/02/19 17:43:34 snj Exp $
+# $NetBSD: CHANGES-6.2,v 1.1.2.274 2017/03/07 07:25:56 snj Exp $
 
 A complete list of changes from the 6.1 release until the 6.2 release:
 
@@ -16378,3 +16378,34 @@ external/bsd/tcpdump/tcpdump2netbsd		up 
 	CVE-2017-5484 CVE-2017-5485 CVE-2017-5486
 	[spz, ticket #1436]
 
+sys/arch/x86/include/pmap.h			1.63 via patch
+sys/arch/x86/x86/pmap.c1.241 via patch
+
+	Remove PG_u from the kernel pages on Xen. Otherwise there is
+	no privilege separation between the kernel and userland.
+	[bouyer, ticket #1441]
+
+libexec/httpd/CHANGES   up to 1.25
+libexec/httpd/bozohttpd.8   up to 1.65
+libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.h   up to 1.47
+libexec/httpd/cgi-bozo.cup to 1.37
+libexec/httpd/content-bozo.cup to 1.14
+libexec/httpd/libbozohttpd/libbozohttpd.3   up to 1.4
+libexec/httpd/main.cup to 1.16
+libexec/httpd/small/Makefileup to 1.3
+libexec/httpd/testsuite/Makefileup to 1.7
+libexec/httpd/testsuite/cgi-bin/empty   up to 1.1
+libexec/httpd/testsuite/html_cmpup to 1.5
+libexec/httpd/testsuite/t11.in  up to 1.1
+libexec/httpd/testsuite/t11.out up to 1.1
+libexec/httpd/testsuite/test-bigfileup to 1.4
+libexec/httpd/testsuite/test-simple up to 1.4
+
+	Update bozohttpd to 20170201.  Changes:
+	- fix an infinite loop in cgi processing
+	- fixes and clean up for the testsuite
+	- no longer sends encoding header for compressed formats
+	- add a bozo_get_version() function which returns the version number
+	[mrg, ticket #1437]
+



CVS commit: [netbsd-6] src/libexec/httpd

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:25:19 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6]: CHANGES bozohttpd.8 bozohttpd.c
bozohttpd.h cgi-bozo.c content-bozo.c main.c
src/libexec/httpd/libbozohttpd [netbsd-6]: libbozohttpd.3
src/libexec/httpd/small [netbsd-6]: Makefile
src/libexec/httpd/testsuite [netbsd-6]: Makefile html_cmp test-bigfile
Added Files:
src/libexec/httpd/testsuite [netbsd-6]: t11.in t11.out test-simple
src/libexec/httpd/testsuite/cgi-bin [netbsd-6]: empty

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1437):
libexec/httpd/CHANGES: up to 1.25
libexec/httpd/bozohttpd.8: up to 1.65
libexec/httpd/bozohttpd.c: up to 1.86
libexec/httpd/bozohttpd.h: up to 1.47
libexec/httpd/cgi-bozo.c: up to 1.37
libexec/httpd/content-bozo.c: up to 1.14
libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
libexec/httpd/main.c: up to 1.16
libexec/httpd/small/Makefile: up to 1.3
libexec/httpd/testsuite/Makefile: up to 1.7
libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
libexec/httpd/testsuite/html_cmp: up to 1.5
libexec/httpd/testsuite/t11.in: up to 1.1
libexec/httpd/testsuite/t11.out: up to 1.1
libexec/httpd/testsuite/test-bigfile: up to 1.4
libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number


To generate a diff of this commit:
cvs rdiff -u -r1.11.2.2 -r1.11.2.3 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.32.2.2 -r1.32.2.3 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.30.2.3 -r1.30.2.4 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.20.2.2 -r1.20.2.3 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.20.2.3 -r1.20.2.4 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/libexec/httpd/content-bozo.c
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/libexec/httpd/main.c
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
src/libexec/httpd/libbozohttpd/libbozohttpd.3
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 src/libexec/httpd/small/Makefile
cvs rdiff -u -r1.4.8.1 -r1.4.8.2 src/libexec/httpd/testsuite/Makefile
cvs rdiff -u -r1.4 -r1.4.2.1 src/libexec/httpd/testsuite/html_cmp
cvs rdiff -u -r0 -r1.1.10.2 src/libexec/httpd/testsuite/t11.in \
src/libexec/httpd/testsuite/t11.out
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
src/libexec/httpd/testsuite/test-bigfile
cvs rdiff -u -r0 -r1.4.6.2 src/libexec/httpd/testsuite/test-simple
cvs rdiff -u -r0 -r1.1.10.2 src/libexec/httpd/testsuite/cgi-bin/empty

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

Modified files:

Index: src/libexec/httpd/CHANGES
diff -u src/libexec/httpd/CHANGES:1.11.2.2 src/libexec/httpd/CHANGES:1.11.2.3
--- src/libexec/httpd/CHANGES:1.11.2.2	Fri Apr 15 19:36:08 2016
+++ src/libexec/httpd/CHANGES	Tue Mar  7 07:25:18 2017
@@ -1,4 +1,12 @@
-$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
+$NetBSD: CHANGES,v 1.11.2.3 2017/03/07 07:25:18 snj Exp $
+
+changes in bozohttpd 20170201:
+	o  fix an infinite loop in cgi processing
+	o  fixes and clean up for the testsuite
+	o  no longer sends encoding header for compressed formats
+
+changes in bozohttpd 20160517:
+	o  add a bozo_get_version() function which returns the version number
 
 changes in bozohttpd 20160415:
 	o  add search-word support for CGI

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.32.2.2 src/libexec/httpd/bozohttpd.8:1.32.2.3
--- src/libexec/httpd/bozohttpd.8:1.32.2.2	Fri Apr 15 19:36:08 2016
+++ src/libexec/httpd/bozohttpd.8	Tue Mar  7 07:25:18 2017
@@ -1,8 +1,8 @@
-.\"	$NetBSD: bozohttpd.8,v 1.32.2.2 2016/04/15 19:36:08 snj Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.32.2.3 2017/03/07 07:25:18 snj Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
-.\" Copyright (c) 1997-2015 Matthew R. Green
+.\" Copyright (c) 1997-2017 Matthew R. Green
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 12, 2015
+.Dd February 1, 2017
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -34,7 +34,7 @@
 .Nd hyper text transfer protocol version 1.1 daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl EHVXefhnsu
+.Op Fl EGHVXefhnsu
 .Op Fl C Ar suffix cgihandler
 .Op Fl I Ar port
 .Op Fl L Ar prefix script
@@ -132,6 +132,10 @@ Stops the
 flag from
 .Nm
 detaching from the tty and going into the background.
+.It Fl G
+Get the
+.Nm
+version string, print it on standard output, and exit.
 .It Fl H
 Causes directory index mode to hide files and directories
 that start with 

CVS commit: [netbsd-6-1] src/doc

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:22:48 UTC 2017

Modified Files:
src/doc [netbsd-6-1]: CHANGES-6.1.6

Log Message:
1441, 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-6.1.6

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

Modified files:

Index: src/doc/CHANGES-6.1.6
diff -u src/doc/CHANGES-6.1.6:1.1.2.82 src/doc/CHANGES-6.1.6:1.1.2.83
--- src/doc/CHANGES-6.1.6:1.1.2.82	Sun Feb 19 17:44:11 2017
+++ src/doc/CHANGES-6.1.6	Tue Mar  7 07:22:48 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.1.6,v 1.1.2.82 2017/02/19 17:44:11 snj Exp $
+# $NetBSD: CHANGES-6.1.6,v 1.1.2.83 2017/03/07 07:22:48 snj Exp $
 
 A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6
 release:
@@ -10019,3 +10019,34 @@ external/bsd/tcpdump/tcpdump2netbsd		up 
 	CVE-2017-5484 CVE-2017-5485 CVE-2017-5486
 	[spz, ticket #1436]
 
+sys/arch/x86/include/pmap.h			1.63 via patch
+sys/arch/x86/x86/pmap.c1.241 via patch
+
+	Remove PG_u from the kernel pages on Xen. Otherwise there is
+	no privilege separation between the kernel and userland.
+	[bouyer, ticket #1441]
+
+libexec/httpd/CHANGES   up to 1.25
+libexec/httpd/bozohttpd.8   up to 1.65
+libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.h   up to 1.47
+libexec/httpd/cgi-bozo.cup to 1.37
+libexec/httpd/content-bozo.cup to 1.14
+libexec/httpd/libbozohttpd/libbozohttpd.3   up to 1.4
+libexec/httpd/main.cup to 1.16
+libexec/httpd/small/Makefileup to 1.3
+libexec/httpd/testsuite/Makefileup to 1.7
+libexec/httpd/testsuite/cgi-bin/empty   up to 1.1
+libexec/httpd/testsuite/html_cmpup to 1.5
+libexec/httpd/testsuite/t11.in  up to 1.1
+libexec/httpd/testsuite/t11.out up to 1.1
+libexec/httpd/testsuite/test-bigfileup to 1.4
+libexec/httpd/testsuite/test-simple up to 1.4
+
+	Update bozohttpd to 20170201.  Changes:
+	- fix an infinite loop in cgi processing
+	- fixes and clean up for the testsuite
+	- no longer sends encoding header for compressed formats
+	- add a bozo_get_version() function which returns the version number
+	[mrg, ticket #1437]
+



CVS commit: [netbsd-6-1] src/libexec/httpd

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:21:54 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6-1]: CHANGES bozohttpd.8 bozohttpd.c
bozohttpd.h cgi-bozo.c content-bozo.c main.c
src/libexec/httpd/libbozohttpd [netbsd-6-1]: libbozohttpd.3
src/libexec/httpd/small [netbsd-6-1]: Makefile
src/libexec/httpd/testsuite [netbsd-6-1]: Makefile html_cmp
test-bigfile
Added Files:
src/libexec/httpd/testsuite [netbsd-6-1]: t11.in t11.out test-simple
src/libexec/httpd/testsuite/cgi-bin [netbsd-6-1]: empty

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1437:
libexec/httpd/CHANGES: up to 1.25
libexec/httpd/bozohttpd.8: up to 1.65
libexec/httpd/bozohttpd.c: up to 1.86
libexec/httpd/bozohttpd.h: up to 1.47
libexec/httpd/cgi-bozo.c: up to 1.37
libexec/httpd/content-bozo.c: up to 1.14
libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
libexec/httpd/main.c: up to 1.16
libexec/httpd/small/Makefile: up to 1.3
libexec/httpd/testsuite/Makefile: up to 1.7
libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
libexec/httpd/testsuite/html_cmp: up to 1.5
libexec/httpd/testsuite/t11.in: up to 1.1
libexec/httpd/testsuite/t11.out: up to 1.1
libexec/httpd/testsuite/test-bigfile: up to 1.4
libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number


To generate a diff of this commit:
cvs rdiff -u -r1.11.8.2 -r1.11.8.3 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.32.8.2 -r1.32.8.3 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.30.8.2 -r1.30.8.3 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.20.8.2 -r1.20.8.3 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.20.14.3 -r1.20.14.4 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.7.14.2 -r1.7.14.3 src/libexec/httpd/content-bozo.c
cvs rdiff -u -r1.5.14.2 -r1.5.14.3 src/libexec/httpd/main.c
cvs rdiff -u -r1.1.1.1.20.1 -r1.1.1.1.20.2 \
src/libexec/httpd/libbozohttpd/libbozohttpd.3
cvs rdiff -u -r1.1.1.1.20.1 -r1.1.1.1.20.2 src/libexec/httpd/small/Makefile
cvs rdiff -u -r1.4.20.1 -r1.4.20.2 src/libexec/httpd/testsuite/Makefile
cvs rdiff -u -r1.4 -r1.4.14.1 src/libexec/httpd/testsuite/html_cmp
cvs rdiff -u -r0 -r1.1.8.2 src/libexec/httpd/testsuite/t11.in \
src/libexec/httpd/testsuite/t11.out
cvs rdiff -u -r1.1.1.1.20.1 -r1.1.1.1.20.2 \
src/libexec/httpd/testsuite/test-bigfile
cvs rdiff -u -r0 -r1.4.4.2 src/libexec/httpd/testsuite/test-simple
cvs rdiff -u -r0 -r1.1.8.2 src/libexec/httpd/testsuite/cgi-bin/empty

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

Modified files:

Index: src/libexec/httpd/CHANGES
diff -u src/libexec/httpd/CHANGES:1.11.8.2 src/libexec/httpd/CHANGES:1.11.8.3
--- src/libexec/httpd/CHANGES:1.11.8.2	Fri Apr 15 19:37:27 2016
+++ src/libexec/httpd/CHANGES	Tue Mar  7 07:21:53 2017
@@ -1,4 +1,12 @@
-$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
+$NetBSD: CHANGES,v 1.11.8.3 2017/03/07 07:21:53 snj Exp $
+
+changes in bozohttpd 20170201:
+	o  fix an infinite loop in cgi processing
+	o  fixes and clean up for the testsuite
+	o  no longer sends encoding header for compressed formats
+
+changes in bozohttpd 20160517:
+	o  add a bozo_get_version() function which returns the version number
 
 changes in bozohttpd 20160415:
 	o  add search-word support for CGI

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.32.8.2 src/libexec/httpd/bozohttpd.8:1.32.8.3
--- src/libexec/httpd/bozohttpd.8:1.32.8.2	Fri Apr 15 19:37:27 2016
+++ src/libexec/httpd/bozohttpd.8	Tue Mar  7 07:21:53 2017
@@ -1,8 +1,8 @@
-.\"	$NetBSD: bozohttpd.8,v 1.32.8.2 2016/04/15 19:37:27 snj Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.32.8.3 2017/03/07 07:21:53 snj Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
-.\" Copyright (c) 1997-2015 Matthew R. Green
+.\" Copyright (c) 1997-2017 Matthew R. Green
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 12, 2015
+.Dd February 1, 2017
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -34,7 +34,7 @@
 .Nd hyper text transfer protocol version 1.1 daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl EHVXefhnsu
+.Op Fl EGHVXefhnsu
 .Op Fl C Ar suffix cgihandler
 .Op Fl I Ar port
 .Op Fl L Ar prefix script
@@ -132,6 +132,10 @@ Stops the
 flag from
 .Nm
 detaching from the tty and going into the background.
+.It Fl G
+Get the
+.Nm
+version string, print it on standard output, and exit.
 .It Fl H
 Causes directory index mode to hide 

CVS commit: [netbsd-6-0] src/doc

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:16:38 UTC 2017

Modified Files:
src/doc [netbsd-6-0]: CHANGES-6.0.7

Log Message:
1441, 1437


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-6.0.7

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

Modified files:

Index: src/doc/CHANGES-6.0.7
diff -u src/doc/CHANGES-6.0.7:1.1.2.84 src/doc/CHANGES-6.0.7:1.1.2.85
--- src/doc/CHANGES-6.0.7:1.1.2.84	Sun Feb 19 17:45:16 2017
+++ src/doc/CHANGES-6.0.7	Tue Mar  7 07:16:38 2017
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0.7,v 1.1.2.84 2017/02/19 17:45:16 snj Exp $
+# $NetBSD: CHANGES-6.0.7,v 1.1.2.85 2017/03/07 07:16:38 snj Exp $
 
 A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7
 release:
@@ -10299,3 +10299,34 @@ external/bsd/tcpdump/tcpdump2netbsd		up 
 	CVE-2017-5484 CVE-2017-5485 CVE-2017-5486
 	[spz, ticket #1436]
 
+sys/arch/x86/include/pmap.h			1.63 via patch
+sys/arch/x86/x86/pmap.c1.241 via patch
+
+	Remove PG_u from the kernel pages on Xen. Otherwise there is
+	no privilege separation between the kernel and userland.
+	[bouyer, ticket #1441]
+
+libexec/httpd/CHANGES   up to 1.25
+libexec/httpd/bozohttpd.8   up to 1.65
+libexec/httpd/bozohttpd.c   up to 1.86
+libexec/httpd/bozohttpd.h   up to 1.47
+libexec/httpd/cgi-bozo.cup to 1.37
+libexec/httpd/content-bozo.cup to 1.14
+libexec/httpd/libbozohttpd/libbozohttpd.3   up to 1.4
+libexec/httpd/main.cup to 1.16
+libexec/httpd/small/Makefileup to 1.3
+libexec/httpd/testsuite/Makefileup to 1.7
+libexec/httpd/testsuite/cgi-bin/empty   up to 1.1
+libexec/httpd/testsuite/html_cmpup to 1.5
+libexec/httpd/testsuite/t11.in  up to 1.1
+libexec/httpd/testsuite/t11.out up to 1.1
+libexec/httpd/testsuite/test-bigfileup to 1.4
+libexec/httpd/testsuite/test-simple up to 1.4
+
+	Update bozohttpd to 20170201.  Changes:
+	- fix an infinite loop in cgi processing
+	- fixes and clean up for the testsuite
+	- no longer sends encoding header for compressed formats
+	- add a bozo_get_version() function which returns the version number
+	[mrg, ticket #1437]
+



CVS commit: [netbsd-6-0] src/libexec/httpd

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar  7 07:16:09 UTC 2017

Modified Files:
src/libexec/httpd [netbsd-6-0]: CHANGES bozohttpd.8 bozohttpd.c
bozohttpd.h cgi-bozo.c content-bozo.c main.c
src/libexec/httpd/libbozohttpd [netbsd-6-0]: libbozohttpd.3
src/libexec/httpd/small [netbsd-6-0]: Makefile
src/libexec/httpd/testsuite [netbsd-6-0]: Makefile html_cmp
test-bigfile
Added Files:
src/libexec/httpd/testsuite [netbsd-6-0]: t11.in t11.out test-simple
src/libexec/httpd/testsuite/cgi-bin [netbsd-6-0]: empty

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1437):
libexec/httpd/CHANGES: up to 1.25
libexec/httpd/bozohttpd.8: up to 1.65
libexec/httpd/bozohttpd.c: up to 1.86
libexec/httpd/bozohttpd.h: up to 1.47
libexec/httpd/cgi-bozo.c: up to 1.37
libexec/httpd/content-bozo.c: up to 1.14
libexec/httpd/libbozohttpd/libbozohttpd.3: up to 1.4
libexec/httpd/main.c: up to 1.16
libexec/httpd/small/Makefile: up to 1.3
libexec/httpd/testsuite/Makefile: up to 1.7
libexec/httpd/testsuite/cgi-bin/empty: up to 1.1
libexec/httpd/testsuite/html_cmp: up to 1.5
libexec/httpd/testsuite/t11.in: up to 1.1
libexec/httpd/testsuite/t11.out: up to 1.1
libexec/httpd/testsuite/test-bigfile: up to 1.4
libexec/httpd/testsuite/test-simple: up to 1.4
Update bozohttpd to 20170201.  Changes:
- fix an infinite loop in cgi processing
- fixes and clean up for the testsuite
- no longer sends encoding header for compressed formats
- add a bozo_get_version() function which returns the version number


To generate a diff of this commit:
cvs rdiff -u -r1.11.6.2 -r1.11.6.3 src/libexec/httpd/CHANGES
cvs rdiff -u -r1.32.6.2 -r1.32.6.3 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.30.6.2 -r1.30.6.3 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.20.6.2 -r1.20.6.3 src/libexec/httpd/bozohttpd.h
cvs rdiff -u -r1.20.8.3 -r1.20.8.4 src/libexec/httpd/cgi-bozo.c
cvs rdiff -u -r1.7.8.2 -r1.7.8.3 src/libexec/httpd/content-bozo.c
cvs rdiff -u -r1.5.8.2 -r1.5.8.3 src/libexec/httpd/main.c
cvs rdiff -u -r1.1.1.1.14.1 -r1.1.1.1.14.2 \
src/libexec/httpd/libbozohttpd/libbozohttpd.3
cvs rdiff -u -r1.1.1.1.14.1 -r1.1.1.1.14.2 src/libexec/httpd/small/Makefile
cvs rdiff -u -r1.4.14.1 -r1.4.14.2 src/libexec/httpd/testsuite/Makefile
cvs rdiff -u -r1.4 -r1.4.8.1 src/libexec/httpd/testsuite/html_cmp
cvs rdiff -u -r0 -r1.1.6.2 src/libexec/httpd/testsuite/t11.in \
src/libexec/httpd/testsuite/t11.out
cvs rdiff -u -r1.1.1.1.14.1 -r1.1.1.1.14.2 \
src/libexec/httpd/testsuite/test-bigfile
cvs rdiff -u -r0 -r1.4.2.2 src/libexec/httpd/testsuite/test-simple
cvs rdiff -u -r0 -r1.1.6.2 src/libexec/httpd/testsuite/cgi-bin/empty

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

Modified files:

Index: src/libexec/httpd/CHANGES
diff -u src/libexec/httpd/CHANGES:1.11.6.2 src/libexec/httpd/CHANGES:1.11.6.3
--- src/libexec/httpd/CHANGES:1.11.6.2	Fri Apr 15 19:38:13 2016
+++ src/libexec/httpd/CHANGES	Tue Mar  7 07:16:08 2017
@@ -1,4 +1,12 @@
-$eterna: CHANGES,v 1.78 2011/11/18 01:25:11 mrg Exp $
+$NetBSD: CHANGES,v 1.11.6.3 2017/03/07 07:16:08 snj Exp $
+
+changes in bozohttpd 20170201:
+	o  fix an infinite loop in cgi processing
+	o  fixes and clean up for the testsuite
+	o  no longer sends encoding header for compressed formats
+
+changes in bozohttpd 20160517:
+	o  add a bozo_get_version() function which returns the version number
 
 changes in bozohttpd 20160415:
 	o  add search-word support for CGI

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.32.6.2 src/libexec/httpd/bozohttpd.8:1.32.6.3
--- src/libexec/httpd/bozohttpd.8:1.32.6.2	Fri Apr 15 19:38:13 2016
+++ src/libexec/httpd/bozohttpd.8	Tue Mar  7 07:16:08 2017
@@ -1,8 +1,8 @@
-.\"	$NetBSD: bozohttpd.8,v 1.32.6.2 2016/04/15 19:38:13 snj Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.32.6.3 2017/03/07 07:16:08 snj Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
-.\" Copyright (c) 1997-2015 Matthew R. Green
+.\" Copyright (c) 1997-2017 Matthew R. Green
 .\" All rights reserved.
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 12, 2015
+.Dd February 1, 2017
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -34,7 +34,7 @@
 .Nd hyper text transfer protocol version 1.1 daemon
 .Sh SYNOPSIS
 .Nm
-.Op Fl EHVXefhnsu
+.Op Fl EGHVXefhnsu
 .Op Fl C Ar suffix cgihandler
 .Op Fl I Ar port
 .Op Fl L Ar prefix script
@@ -132,6 +132,10 @@ Stops the
 flag from
 .Nm
 detaching from the tty and going into the background.
+.It Fl G
+Get the
+.Nm
+version string, print it on standard output, and exit.
 .It Fl H
 Causes directory index mode to hide files 

CVS commit: src/sys/net

2017-03-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar  7 01:53:53 UTC 2017

Modified Files:
src/sys/net: if_bridge.c

Log Message:
Remove unnecessary splnet for bridge_enqueue

bridge_enqueue now uses if_transmit_lock that does splnet for device
drivers, so splnet for bridge_enqueue isn't needed anymore.


To generate a diff of this commit:
cvs rdiff -u -r1.133 -r1.134 src/sys/net/if_bridge.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/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.133 src/sys/net/if_bridge.c:1.134
--- src/sys/net/if_bridge.c:1.133	Thu Feb 16 08:12:44 2017
+++ src/sys/net/if_bridge.c	Tue Mar  7 01:53:53 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.133 2017/02/16 08:12:44 knakahara Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.134 2017/03/07 01:53:53 ozaki-r Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.133 2017/02/16 08:12:44 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.134 2017/03/07 01:53:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_bridge_ipf.h"
@@ -1522,13 +1522,7 @@ bridge_output(struct ifnet *ifp, struct 
 }
 			}
 
-#ifndef NET_MPSAFE
-			s = splnet();
-#endif
 			bridge_enqueue(sc, dst_if, mc, 0);
-#ifndef NET_MPSAFE
-			splx(s);
-#endif
 
 			if ((m->m_flags & (M_MCAST | M_BCAST)) != 0 &&
 			dst_if != ifp)
@@ -1585,13 +1579,7 @@ next:
 		return (0);
 	}
 
-#ifndef NET_MPSAFE
-	s = splnet();
-#endif
 	bridge_enqueue(sc, dst_if, m, 0);
-#ifndef NET_MPSAFE
-	splx(s);
-#endif
 
 	return (0);
 }



CVS commit: src/sys/net

2017-03-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar  7 01:32:03 UTC 2017

Modified Files:
src/sys/net: if.c

Log Message:
Add missing splnet to if_deferred_start_common

if_start should run in splnet to avoid running interrupt handlers.


To generate a diff of this commit:
cvs rdiff -u -r1.381 -r1.382 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.381 src/sys/net/if.c:1.382
--- src/sys/net/if.c:1.381	Thu Feb 23 07:57:10 2017
+++ src/sys/net/if.c	Tue Mar  7 01:32:03 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.381 2017/02/23 07:57:10 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.382 2017/03/07 01:32:03 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.381 2017/02/23 07:57:10 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.382 2017/03/07 01:32:03 ozaki-r Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1008,8 +1008,11 @@ if_deferred_start_softint(void *arg)
 static void
 if_deferred_start_common(struct ifnet *ifp)
 {
+	int s;
 
+	s = splnet();
 	if_start_lock(ifp);
+	splx(s);
 }
 
 static inline bool



CVS commit: src/sys/dev/ic

2017-03-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Tue Mar  7 01:28:37 UTC 2017

Modified Files:
src/sys/dev/ic: cs89x0.c

Log Message:
Apply deferred if_start (from maya@)

Fix PR kern/52023


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/ic/cs89x0.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/ic/cs89x0.c
diff -u src/sys/dev/ic/cs89x0.c:1.38 src/sys/dev/ic/cs89x0.c:1.39
--- src/sys/dev/ic/cs89x0.c:1.38	Thu Dec 15 09:28:05 2016
+++ src/sys/dev/ic/cs89x0.c	Tue Mar  7 01:28:37 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $	*/
+/*	$NetBSD: cs89x0.c,v 1.39 2017/03/07 01:28:37 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2004 Christopher Gilbert
@@ -212,7 +212,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.38 2016/12/15 09:28:05 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cs89x0.c,v 1.39 2017/03/07 01:28:37 ozaki-r Exp $");
 
 #include "opt_inet.h"
 
@@ -486,6 +486,7 @@ cs_attach(struct cs_softc *sc, u_int8_t 
 
 	/* Attach the interface. */
 	if_attach(ifp);
+	if_deferred_start_init(ifp, NULL);
 	ether_ifattach(ifp, sc->sc_enaddr);
 
 	rnd_attach_source(>rnd_source, device_xname(sc->sc_dev),
@@ -1583,11 +1584,8 @@ cs_transmit_event(struct cs_softc *sc, u
 	/* Transmission is no longer in progress */
 	sc->sc_txbusy = FALSE;
 
-	/* If there is more to transmit */
-	if (IFQ_IS_EMPTY(>if_snd) == 0) {
-		/* Start the next transmission */
-		cs_start_output(ifp);
-	}
+	/* If there is more to transmit, start the next transmission */
+	if_schedule_deferred_start(ifp);
 }
 
 void



CVS commit: xsrc/external/mit/libdrm/dist/intel

2017-03-06 Thread Christos Zoulas
Module Name:xsrc
Committed By:   christos
Date:   Mon Mar  6 23:11:39 UTC 2017

Modified Files:
xsrc/external/mit/libdrm/dist/intel: uthash.h

Log Message:
add lint to the bogus test for 


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 xsrc/external/mit/libdrm/dist/intel/uthash.h

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

Modified files:

Index: xsrc/external/mit/libdrm/dist/intel/uthash.h
diff -u xsrc/external/mit/libdrm/dist/intel/uthash.h:1.1.1.1 xsrc/external/mit/libdrm/dist/intel/uthash.h:1.2
--- xsrc/external/mit/libdrm/dist/intel/uthash.h:1.1.1.1	Sat Mar  4 18:15:51 2017
+++ xsrc/external/mit/libdrm/dist/intel/uthash.h	Mon Mar  6 18:11:39 2017
@@ -71,7 +71,7 @@ do {
 typedef unsigned int uint32_t;
 typedef unsigned char uint8_t;
 #endif
-#elif defined(__GNUC__) && !defined(__VXWORKS__)
+#elif (defined(__lint__) || defined(__GNUC__)) && !defined(__VXWORKS__)
 #include 
 #else
 typedef unsigned int uint32_t;



CVS commit: src/tests/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 23:07:42 UTC 2017

Added Files:
src/tests/usr.bin/xlint/lint1: d_bltinoffsetof.c

Log Message:
new test


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c

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

Added files:

Index: src/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c:1.1
--- /dev/null	Mon Mar  6 18:07:42 2017
+++ src/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c	Mon Mar  6 18:07:42 2017
@@ -0,0 +1,12 @@
+
+struct foo {
+	int a;
+	char *b;
+};
+
+
+int
+main(void)
+{
+	return __builtin_offsetof(struct foo, b);
+}



CVS commit: src/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 23:04:52 UTC 2017

Modified Files:
src/usr.bin/xlint/lint1: decl.c

Log Message:
Accept PTR for addtype


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/usr.bin/xlint/lint1/decl.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.67 src/usr.bin/xlint/lint1/decl.c:1.68
--- src/usr.bin/xlint/lint1/decl.c:1.67	Tue Dec 27 16:52:35 2016
+++ src/usr.bin/xlint/lint1/decl.c	Mon Mar  6 18:04:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.67 2016/12/27 21:52:35 christos Exp $ */
+/* $NetBSD: decl.c,v 1.68 2017/03/06 23:04:52 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: decl.c,v 1.67 2016/12/27 21:52:35 christos Exp $");
+__RCSID("$NetBSD: decl.c,v 1.68 2017/03/06 23:04:52 christos Exp $");
 #endif
 
 #include 
@@ -256,7 +256,7 @@ addtype(type_t *tp)
 	tspec_t	t;
 #ifdef DEBUG
 	char buf[1024];
-	printf("addtype %s\n", tyname(buf, sizeof(buf), tp));
+	printf("%s: %s\n", __func__, tyname(buf, sizeof(buf), tp));
 #endif
 	if (tp->t_typedef) {
 		if (dcs->d_type != NULL || dcs->d_atyp != NOTSPEC ||
@@ -355,6 +355,8 @@ addtype(type_t *tp)
 dcs->d_terr = 1;
 			dcs->d_atyp = t;
 		}
+	} else if (t == PTR) {
+		dcs->d_type = tp;
 	} else {
 		/*
 		 * remember specifiers "void", "char", "int",
@@ -727,6 +729,10 @@ deftyp(void)
 	tp = dcs->d_type;
 	scl = dcs->d_scl;
 
+#ifdef DEBUG
+	char buf[1024];
+	printf("%s: %s\n", __func__, tyname(buf, sizeof(buf), tp));
+#endif
 	if (t == NOTSPEC && s == NOTSPEC && l == NOTSPEC && c == NOTSPEC &&
 	tp == NULL)
 		dcs->d_notyp = 1;



CVS commit: src/share/man/man4

2017-03-06 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Mon Mar  6 22:29:35 UTC 2017

Modified Files:
src/share/man/man4: pxaip.4

Log Message:
Use more macros.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/pxaip.4

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

Modified files:

Index: src/share/man/man4/pxaip.4
diff -u src/share/man/man4/pxaip.4:1.2 src/share/man/man4/pxaip.4:1.3
--- src/share/man/man4/pxaip.4:1.2	Mon Mar  6 11:34:53 2017
+++ src/share/man/man4/pxaip.4	Mon Mar  6 22:29:35 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pxaip.4,v 1.2 2017/03/06 11:34:53 pgoyette Exp $
+.\"	$NetBSD: pxaip.4,v 1.3 2017/03/06 22:29:35 wiz Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -95,6 +95,6 @@ The
 .Nm
 driver was written by
 .An Steve Woodford
-.Aq s...@netbsd.org .
+.Aq Mt s...@netbsd.org .
 This manual page was contributed by
 .An Stephan Meisinger .



CVS commit: src/distrib/sets/lists/tests

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 21:03:56 UTC 2017

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
more lint tests


To generate a diff of this commit:
cvs rdiff -u -r1.726 -r1.727 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.726 src/distrib/sets/lists/tests/mi:1.727
--- src/distrib/sets/lists/tests/mi:1.726	Mon Mar  6 07:01:47 2017
+++ src/distrib/sets/lists/tests/mi	Mon Mar  6 16:03:56 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.726 2017/03/06 12:01:47 christos Exp $
+# $NetBSD: mi,v 1.727 2017/03/06 21:03:56 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3913,6 +3913,7 @@
 ./usr/tests/usr.bin/xlint/lint1/Atffile		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/Kyuafile	tests-usr.bin-tests	compattestfile,atf,kyua
 ./usr/tests/usr.bin/xlint/lint1/d_alignof.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_bltinoffsetof.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_anon_struct.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_anon_union.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_c99_complex_num.c		tests-usr.bin-tests	compattestfile,atf



CVS commit: src/tests/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 21:02:47 UTC 2017

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile d_cast_typeof.c

Log Message:
add builtin_offsetof


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/xlint/lint1/d_cast_typeof.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/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.14 src/tests/usr.bin/xlint/lint1/Makefile:1.15
--- src/tests/usr.bin/xlint/lint1/Makefile:1.14	Mon Mar  6 07:00:27 2017
+++ src/tests/usr.bin/xlint/lint1/Makefile	Mon Mar  6 16:02:47 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2017/03/06 12:00:27 christos Exp $
+# $NetBSD: Makefile,v 1.15 2017/03/06 21:02:47 christos Exp $
 
 NOMAN=		# defined
 
@@ -10,6 +10,7 @@ TESTS_SH=	t_integration
 
 FILESDIR=	${TESTSDIR}
 FILES+=		d_alignof.c
+FILES+=		d_bltinoffsetof.c
 FILES+=		d_c99_anon_struct.c
 FILES+=		d_c99_anon_union.c
 FILES+=		d_c99_complex_num.c

Index: src/tests/usr.bin/xlint/lint1/d_cast_typeof.c
diff -u src/tests/usr.bin/xlint/lint1/d_cast_typeof.c:1.1 src/tests/usr.bin/xlint/lint1/d_cast_typeof.c:1.2
--- src/tests/usr.bin/xlint/lint1/d_cast_typeof.c:1.1	Mon Mar  6 07:00:27 2017
+++ src/tests/usr.bin/xlint/lint1/d_cast_typeof.c	Mon Mar  6 16:02:47 2017
@@ -7,6 +7,8 @@ struct foo *hole;
 char *
 foo(void)
 {
-	return ((char *)&((typeof(hole))0)->list);
+	return hole ?
+	((char *)&((typeof(hole))0)->list) :
+	((char *)&((typeof(*hole) *)0)->list);
 }
 



CVS commit: src/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 21:01:39 UTC 2017

Modified Files:
src/usr.bin/xlint/lint1: cgram.y externs1.h scan.l tree.c

Log Message:
fix typeof, add __builtin_offsetof


To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/xlint/lint1/cgram.y
cvs rdiff -u -r1.34 -r1.35 src/usr.bin/xlint/lint1/externs1.h
cvs rdiff -u -r1.78 -r1.79 src/usr.bin/xlint/lint1/scan.l
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.93 src/usr.bin/xlint/lint1/cgram.y:1.94
--- src/usr.bin/xlint/lint1/cgram.y:1.93	Mon Mar  6 06:58:31 2017
+++ src/usr.bin/xlint/lint1/cgram.y	Mon Mar  6 16:01:39 2017
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.94 2017/03/06 21:01:39 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.94 2017/03/06 21:01:39 christos Exp $");
 #endif
 
 #include 
@@ -140,6 +140,7 @@ anonymize(sym_t *s)
 %token			T_UNOP
 %token			T_INCDEC
 %token			T_SIZEOF
+%token			T_BUILTIN_OFFSETOF
 %token			T_TYPEOF
 %token			T_EXTENSION
 %token			T_ALIGNOF
@@ -245,7 +246,7 @@ anonymize(sym_t *s)
 %left	T_SHFTOP
 %left	T_ADDOP
 %left	T_MULT T_DIVOP
-%right	T_UNOP T_INCDEC T_SIZEOF T_ALIGNOF T_REAL T_IMAG
+%right	T_UNOP T_INCDEC T_SIZEOF TBUILTIN_SIZEOF T_ALIGNOF T_REAL T_IMAG
 %left	T_LPARN T_LBRACK T_STROP
 
 %token			T_NAME
@@ -1362,10 +1363,7 @@ init_rbrace:
 	;
 
 type_name:
-	  T_TYPEOF term  {
-		$$ = $2->tn_type;
-	  }
-	| {
+  	  {
 		pushdecl(ABSTRACT);
 	  } abstract_declaration {
 		popdecl();
@@ -1398,6 +1396,9 @@ abs_decl:
 	| pointer direct_abs_decl {
 		$$ = addptr($2, $1);
 	  }
+	| T_TYPEOF term {
+		$$ = mktempsym($2->tn_type);
+	  }
 	;
 
 direct_abs_decl:
@@ -1905,6 +1906,11 @@ term:
 	| T_IMAG T_LPARN term T_RPARN {
 		$$ = build(IMAG, $3, NULL);
 	  }
+	| T_BUILTIN_OFFSETOF T_LPARN type_name T_COMMA identifier T_RPARN
+		%prec T_BUILTIN_OFFSETOF {
+		symtyp = FMOS;
+		$$ = bldoffsetof($3, getsym($5));
+	  }
 	| T_SIZEOF term	%prec T_SIZEOF {
 		if (($$ = $2 == NULL ? NULL : bldszof($2->tn_type)) != NULL)
 			chkmisc($2, 0, 0, 0, 0, 0, 1);

Index: src/usr.bin/xlint/lint1/externs1.h
diff -u src/usr.bin/xlint/lint1/externs1.h:1.34 src/usr.bin/xlint/lint1/externs1.h:1.35
--- src/usr.bin/xlint/lint1/externs1.h:1.34	Tue Dec 27 16:52:35 2016
+++ src/usr.bin/xlint/lint1/externs1.h	Mon Mar  6 16:01:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: externs1.h,v 1.34 2016/12/27 21:52:35 christos Exp $	*/
+/*	$NetBSD: externs1.h,v 1.35 2017/03/06 21:01:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -204,6 +204,7 @@ extern	tnode_t	*promote(op_t, int, tnode
 extern	tnode_t	*convert(op_t, int, type_t *, tnode_t *);
 extern	void	cvtcon(op_t, int, type_t *, val_t *, val_t *);
 extern	tnode_t	*bldszof(type_t *);
+extern	tnode_t	*bldoffsetof(type_t *, sym_t *);
 extern	tnode_t	*bldalof(type_t *);
 extern	tnode_t	*cast(tnode_t *, type_t *);
 extern	tnode_t	*funcarg(tnode_t *, tnode_t *);

Index: src/usr.bin/xlint/lint1/scan.l
diff -u src/usr.bin/xlint/lint1/scan.l:1.78 src/usr.bin/xlint/lint1/scan.l:1.79
--- src/usr.bin/xlint/lint1/scan.l:1.78	Sun Jan 15 16:10:24 2017
+++ src/usr.bin/xlint/lint1/scan.l	Mon Mar  6 16:01:39 2017
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 christos Exp $ */
+/* $NetBSD: scan.l,v 1.79 2017/03/06 21:01:39 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: scan.l,v 1.78 2017/01/15 21:10:24 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.79 2017/03/06 21:01:39 christos Exp $");
 #endif
 
 #include 
@@ -218,6 +218,7 @@ static	struct	kwtab {
 	{ "bounded",	T_AT_BOUNDED,	0,	0,	0,	  0,0,1,1,5 },
 	{ "break",	T_BREAK,	0,	0,	0,	  0,0,0,0,1 },
 	{ "buffer",	T_AT_BUFFER,	0,	0,	0,	  0,0,1,1,5 },
+	{ "builtin_offsetof", T_BUILTIN_OFFSETOF, 0, 0, 0,	  0,0,1,0,2 },
 	{ "case",	T_CASE,		0,	0,	0,	  0,0,0,0,1 },
 	{ "char",	T_TYPE,		0,	CHAR,	0,	  0,0,0,0,1 },
 	{ "cold",	T_AT_COLD,	0,	0,	0,	  0,0,1,1,5 },

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.83 src/usr.bin/xlint/lint1/tree.c:1.84
--- src/usr.bin/xlint/lint1/tree.c:1.83	Fri Aug 19 06:19:45 2016
+++ src/usr.bin/xlint/lint1/tree.c	Mon Mar  6 16:01:39 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.83 2016/08/19 10:19:45 christos Exp $	*/
+/*	$NetBSD: tree.c,v 1.84 2017/03/06 21:01:39 christos Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if 

CVS commit: src/share/man/man4

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  6 17:19:21 UTC 2017

Modified Files:
src/share/man/man4: ipsec.4

Log Message:
bump date, improve english


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/share/man/man4/ipsec.4

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

Modified files:

Index: src/share/man/man4/ipsec.4
diff -u src/share/man/man4/ipsec.4:1.39 src/share/man/man4/ipsec.4:1.40
--- src/share/man/man4/ipsec.4:1.39	Mon Mar  6 10:00:14 2017
+++ src/share/man/man4/ipsec.4	Mon Mar  6 17:19:21 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipsec.4,v 1.39 2017/03/06 10:00:14 knakahara Exp $
+.\"	$NetBSD: ipsec.4,v 1.40 2017/03/06 17:19:21 snj Exp $
 .\"	$KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -28,7 +28,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 16, 2012
+.Dd March 6, 2017
 .Dt IPSEC 4
 .Os
 .Sh NAME
@@ -36,7 +36,7 @@
 .Nd IP security protocol
 .Sh DESCRIPTION
 .Nm
-is a security protocol in Internet Protocol (IP) layer.
+is a security protocol in the Internet Protocol (IP) layer.
 .Nm
 is defined for both IPv4 and IPv6
 .Po
@@ -49,12 +49,12 @@ consists of two sub-protocols:
 .Pp
 .Bl -hang
 .It Em Encapsulated Security Payload Pq ESP
-protects IP payload from wire-tapping (interception) by encrypting it with
+protects IP payloads from wire-tapping (interception) by encrypting them with
 secret key cryptography algorithms.
 .It Em Authentication Header Pq AH
-guarantees integrity of IP packet
-and protects it from intermediate alteration or impersonation,
-by attaching cryptographic checksum computed by one-way hash functions.
+guarantees the integrity of IP packets
+and protects them from intermediate alteration or impersonation,
+by attaching cryptographic checksums computed by one-way hash functions.
 .El
 .Pp
 .Nm
@@ -73,50 +73,51 @@ configurations.
 Since version 6,
 .Nx
 uses the IPSEC implementation formerly known as FAST_IPSEC.
-Its specifics and kernel options are describes in the
+Its specifics and kernel options are described in the
 .Xr fast_ipsec 4
 manual page.
 .Ss Kernel interface
 .Nm
-is controlled by key management engine and policy engine,
-in the operating system kernel.
+is controlled by two engines in the kernel: one for key management
+and one for policy.
 .Pp
-Key management engine can be accessed from the userland by using
+The key management engine can be accessed from userland by using
 .Dv PF_KEY
 sockets.
 The
 .Dv PF_KEY
 socket API is defined in RFC2367.
 .Pp
-Policy engine can be controlled by extended part of
+The policy engine can be controlled through the
 .Dv PF_KEY
 API,
 .Xr setsockopt 2
 operations, and
+the
 .Xr sysctl 3
 interface.
-The kernel implements
-extended version of
+The kernel implements an
+extended version of the
 .Dv PF_KEY
-interface, and allows you to define IPsec policy like per-packet filters.
+interface and allows you to define IPsec policy like per-packet filters.
 .Xr setsockopt 2
-interface is used to define per-socket behavior, and
+is used to define per-socket behavior, and
 .Xr sysctl 3
-interface is used to define host-wide default behavior.
+is used to define host-wide default behavior.
 .Pp
-The kernel code does not implement dynamic encryption key exchange protocol
+The kernel does not implement dynamic encryption key exchange protocols
 like IKE
 .Pq Internet Key Exchange .
-That should be implemented as userland programs
-.Pq usually as daemons ,
-by using the above described APIs.
+That should be done in userland
+.Pq usually as a daemon ,
+using the APIs described above.
 .\"
 .Ss Policy management
 The kernel implements experimental policy management code.
 You can manage the IPsec policy in two ways.
 One is to configure per-socket policy using
 .Xr setsockopt 2 .
-The other is to configure kernel packet filter-based policy using
+The other is to configure kernel packet filter-based policy using the
 .Dv PF_KEY
 interface, via
 .Xr setkey 8 .
@@ -125,17 +126,17 @@ In both cases, IPsec policy must be spec
 .Pp
 With
 .Xr setsockopt 2 ,
-you can define IPsec policy in per-socket basis.
-You can enforce particular IPsec policy onto packets that go through
+you can define IPsec policy on a per-socket basis.
+You can enforce particular IPsec policy on packets that go through a
 particular socket.
 .Pp
 With
 .Xr setkey 8
-you can define IPsec policy against packets,
-using sort of packet filtering rule.
-Refer to
+you can define IPsec policy for packets using a form of packet
+filtering rules.
+See
 .Xr setkey 8
-on how to use it.
+for details.
 .Pp
 In the latter case,
 .Dq Li default
@@ -143,9 +144,9 @@ policy is allowed for use with
 .Xr setkey 8 .
 By configuring policy to
 .Li default ,
-you can refer system-wide
+you can refer to system-wide
 .Xr sysctl 8
-variable for 

CVS commit: src/sys/dev/pci

2017-03-06 Thread Michael Lorenz
Module Name:src
Committed By:   macallan
Date:   Mon Mar  6 16:49:26 UTC 2017

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

Log Message:
print out the actual stride value


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/pci/pm3fb.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/pm3fb.c
diff -u src/sys/dev/pci/pm3fb.c:1.3 src/sys/dev/pci/pm3fb.c:1.4
--- src/sys/dev/pci/pm3fb.c:1.3	Wed Dec  7 18:39:04 2016
+++ src/sys/dev/pci/pm3fb.c	Mon Mar  6 16:49:26 2017
@@ -1304,5 +1304,5 @@ pm3fb_set_mode(struct pm3fb_softc *sc, c
 	sc->sc_depth = 8;
 	sc->sc_stride = stride;
 	aprint_normal_dev(sc->sc_dev, "pm3 using %d x %d in 8 bit, stride %d\n",
-	sc->sc_width, sc->sc_height, sc->sc_width);
+	sc->sc_width, sc->sc_height, stride);
 }



CVS commit: src/external/mit/xorg/lib/libdrm

2017-03-06 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar  6 13:50:40 UTC 2017

Modified Files:
src/external/mit/xorg/lib/libdrm: Makefile.defines

Log Message:
We do HAVE_NOUVEAU. so use it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/external/mit/xorg/lib/libdrm/Makefile.defines

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

Modified files:

Index: src/external/mit/xorg/lib/libdrm/Makefile.defines
diff -u src/external/mit/xorg/lib/libdrm/Makefile.defines:1.1 src/external/mit/xorg/lib/libdrm/Makefile.defines:1.2
--- src/external/mit/xorg/lib/libdrm/Makefile.defines:1.1	Mon Mar 17 08:01:18 2014
+++ src/external/mit/xorg/lib/libdrm/Makefile.defines	Mon Mar  6 13:50:40 2017
@@ -1,8 +1,9 @@
-#	$NetBSD: Makefile.defines,v 1.1 2014/03/17 08:01:18 mrg Exp $
+#	$NetBSD: Makefile.defines,v 1.2 2017/03/06 13:50:40 maya Exp $
 
 # common defiles for libdrm components
 
 CPPFLAGS+=	-DHAVE_INTTYPES_H \
+		-DHAVE_NOUVEAU \
 		-DHAVE_RADEON \
 		-DHAVE_SETENV \
 		-DHAVE_STDINT_H \
@@ -12,5 +13,3 @@ CPPFLAGS+=	-DHAVE_INTTYPES_H \
 		-DHAVE_SYS_TYPES_H \
 		-DHAVE_UNISTD_H
 
-#		-DHAVE_NOUVEAU
-



CVS commit: src/distrib/sets/lists/man

2017-03-06 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Mar  6 13:14:25 UTC 2017

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
fix set lists for pxaip(4). it's not a pmax man page.


To generate a diff of this commit:
cvs rdiff -u -r1.1550 -r1.1551 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1550 src/distrib/sets/lists/man/mi:1.1551
--- src/distrib/sets/lists/man/mi:1.1550	Mon Mar  6 09:06:23 2017
+++ src/distrib/sets/lists/man/mi	Mon Mar  6 13:14:25 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1550 2017/03/06 09:06:23 pgoyette Exp $
+# $NetBSD: mi,v 1.1551 2017/03/06 13:14:25 maya Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -7536,7 +7536,6 @@
 ./usr/share/man/man4/pmax/lk201.4		man-obsolete		obsolete
 ./usr/share/man/man4/pmax/pm.4			man-sys-man		.man
 ./usr/share/man/man4/pmax/px.4			man-obsolete		obsolete
-./usr/share/man/man4/pmax/pxaip.4		man-obsolete		obsolete
 ./usr/share/man/man4/pmax/scc.4			man-obsolete		obsolete
 ./usr/share/man/man4/pmax/sii.4			man-sys-man		.man
 ./usr/share/man/man4/pmax/tc.4			man-obsolete		obsolete
@@ -7567,6 +7566,7 @@
 ./usr/share/man/man4/puffs.4			man-sys-man		.man
 ./usr/share/man/man4/pwdog.4			man-sys-man		.man
 ./usr/share/man/man4/px.4			man-sys-man		.man
+./usr/share/man/man4/pxaip.4			man-sys-man		.man
 ./usr/share/man/man4/pxg.4			man-sys-man		.man
 ./usr/share/man/man4/qe.4			man-sys-man		.man
 ./usr/share/man/man4/qec.4			man-sys-man		.man



CVS commit: src/distrib/sets/lists/tests

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 12:01:47 UTC 2017

Modified Files:
src/distrib/sets/lists/tests: mi

Log Message:
add new lint test


To generate a diff of this commit:
cvs rdiff -u -r1.725 -r1.726 src/distrib/sets/lists/tests/mi

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.725 src/distrib/sets/lists/tests/mi:1.726
--- src/distrib/sets/lists/tests/mi:1.725	Mon Feb 27 22:32:11 2017
+++ src/distrib/sets/lists/tests/mi	Mon Mar  6 07:01:47 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.725 2017/02/28 03:32:11 ozaki-r Exp $
+# $NetBSD: mi,v 1.726 2017/03/06 12:01:47 christos Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3938,6 +3938,7 @@
 ./usr/tests/usr.bin/xlint/lint1/d_cast_init.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_cast_init2.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_cast_lhs.c			tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/xlint/lint1/d_cast_typeof.c			tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_compound_literals1.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_compound_literals2.c		tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/xlint/lint1/d_constant_conv1.c		tests-usr.bin-tests	compattestfile,atf



CVS commit: src/tests/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 12:00:27 UTC 2017

Modified Files:
src/tests/usr.bin/xlint/lint1: Makefile
Added Files:
src/tests/usr.bin/xlint/lint1: d_cast_typeof.c

Log Message:
add a test for a typeof cast


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/tests/usr.bin/xlint/lint1/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/d_cast_typeof.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/usr.bin/xlint/lint1/Makefile
diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.13 src/tests/usr.bin/xlint/lint1/Makefile:1.14
--- src/tests/usr.bin/xlint/lint1/Makefile:1.13	Fri Aug 19 06:21:50 2016
+++ src/tests/usr.bin/xlint/lint1/Makefile	Mon Mar  6 07:00:27 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2016/08/19 10:21:50 christos Exp $
+# $NetBSD: Makefile,v 1.14 2017/03/06 12:00:27 christos Exp $
 
 NOMAN=		# defined
 
@@ -35,6 +35,7 @@ FILES+=		d_cast_fun_array_param.c
 FILES+=		d_cast_init.c
 FILES+=		d_cast_init2.c
 FILES+=		d_cast_lhs.c
+FILES+=		d_cast_typeof.c
 FILES+=		d_compound_literals1.c
 FILES+=		d_compound_literals2.c
 FILES+=		d_constant_conv1.c

Added files:

Index: src/tests/usr.bin/xlint/lint1/d_cast_typeof.c
diff -u /dev/null src/tests/usr.bin/xlint/lint1/d_cast_typeof.c:1.1
--- /dev/null	Mon Mar  6 07:00:27 2017
+++ src/tests/usr.bin/xlint/lint1/d_cast_typeof.c	Mon Mar  6 07:00:27 2017
@@ -0,0 +1,12 @@
+
+struct foo {
+	char list;
+};
+struct foo *hole;
+
+char *
+foo(void)
+{
+	return ((char *)&((typeof(hole))0)->list);
+}
+



CVS commit: src/usr.bin/xlint/lint1

2017-03-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar  6 11:58:31 UTC 2017

Modified Files:
src/usr.bin/xlint/lint1: cgram.y

Log Message:
handle typeof in casts


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 src/usr.bin/xlint/lint1/cgram.y

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

Modified files:

Index: src/usr.bin/xlint/lint1/cgram.y
diff -u src/usr.bin/xlint/lint1/cgram.y:1.92 src/usr.bin/xlint/lint1/cgram.y:1.93
--- src/usr.bin/xlint/lint1/cgram.y:1.92	Sat Jan  7 13:28:49 2017
+++ src/usr.bin/xlint/lint1/cgram.y	Mon Mar  6 06:58:31 2017
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.92 2017/01/07 18:28:49 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 christos Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -35,7 +35,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.y,v 1.92 2017/01/07 18:28:49 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.93 2017/03/06 11:58:31 christos Exp $");
 #endif
 
 #include 
@@ -117,7 +117,7 @@ anonymize(sym_t *s)
 }
 %}
 
-%expect 100
+%expect 107
 
 %union {
 	int	y_int;
@@ -1362,7 +1362,10 @@ init_rbrace:
 	;
 
 type_name:
-	  {
+	  T_TYPEOF term  {
+		$$ = $2->tn_type;
+	  }
+	| {
 		pushdecl(ABSTRACT);
 	  } abstract_declaration {
 		popdecl();



CVS commit: src/share/man/man4

2017-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Mar  6 11:34:54 UTC 2017

Modified Files:
src/share/man/man4: pxaip.4

Log Message:
Some minor edits:

s/a on-board/an on-board/
use "serial comma"
s/bus/controller/
add attribution for author of the manual page


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/pxaip.4

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

Modified files:

Index: src/share/man/man4/pxaip.4
diff -u src/share/man/man4/pxaip.4:1.1 src/share/man/man4/pxaip.4:1.2
--- src/share/man/man4/pxaip.4:1.1	Mon Mar  6 09:06:01 2017
+++ src/share/man/man4/pxaip.4	Mon Mar  6 11:34:53 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pxaip.4,v 1.1 2017/03/06 09:06:01 pgoyette Exp $
+.\"	$NetBSD: pxaip.4,v 1.2 2017/03/06 11:34:53 pgoyette Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -32,13 +32,13 @@
 .Os
 .Sh NAME
 .Nm pxaip
-.Nd Intel Xscale PXA250/PXA270 Onboard Peripheral Bus
+.Nd Intel Xscale PXA250/PXA270 Onboard Peripheral Controller
 .Sh SYNOPSIS
 .Cd "pxaip0 at mainbus?"
 .Sh DESCRIPTION
 .Nm
-is a on-board peripheral bus found in XScale PXA250, PXA255, PXA270, PXA271
-and PXA272 processors manufactured by Intel and Marvell Technology.
+is an on-board peripheral controller found in XScale PXA250, PXA255, PXA270,
+PXA271, and PXA272 processors manufactured by Intel and Marvell Technology.
 Drivers are available for the following peripherals:
 .Bl -tag -width -pcdisplay -offset indent
 .It com
@@ -90,8 +90,11 @@ The
 driver first appeared in
 .Nx 2.0 .
 .Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by
 .An Steve Woodford
 .Aq s...@netbsd.org .
+This manual page was contributed by
+.An Stephan Meisinger .



CVS commit: src/sys/arch/arm/include

2017-03-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Mon Mar  6 11:10:23 UTC 2017

Modified Files:
src/sys/arch/arm/include: cpu.h

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/arm/include/cpu.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/arm/include/cpu.h
diff -u src/sys/arch/arm/include/cpu.h:1.90 src/sys/arch/arm/include/cpu.h:1.91
--- src/sys/arch/arm/include/cpu.h:1.90	Wed Apr 15 21:26:47 2015
+++ src/sys/arch/arm/include/cpu.h	Mon Mar  6 11:10:23 2017
@@ -104,7 +104,7 @@ extern int cpu_fpu_present;
 	((curcpu()->ci_intr_depth > 1) ||			\
 	((cf)->cf_tf.tf_spsr & PSR_MODE) == PSR_UND32_MODE)
 #else
-#define CLKF_INTR(cf)	((void)(cf), curcpu()->ci_intr_depth > 1) 
+#define CLKF_INTR(cf)	((void)(cf), curcpu()->ci_intr_depth > 1)
 #endif
 
 /*
@@ -202,7 +202,7 @@ _curlwp_set(struct lwp *l)
 	armreg_tpidrprw_write((uintptr_t)l);
 }
 
-// Also in  but also here if this was included before  
+// Also in  but also here if this was included before 
 static inline struct cpu_info *lwp_getcpu(struct lwp *);
 
 #define	curlwp		_curlwp()
@@ -237,7 +237,7 @@ void cpu_boot_secondary_processors(void)
 #define CPU_IS_PRIMARY(ci)	((ci)->ci_index == 0)
 #define CPU_INFO_FOREACH(cii, ci)			\
 	cii = 0, ci = cpu_info[0]; cii < ncpu && (ci = cpu_info[cii]) != NULL; cii++
-#else 
+#else
 #define cpu_number()0
 
 #define CPU_IS_PRIMARY(ci)	true
@@ -307,7 +307,7 @@ void	cpu_proc_fork(struct proc *, struct
 void	cpu_set_curpri(int);
 
 /*
- * We've already preallocated the stack for the idlelwps for additional CPUs.  
+ * We've already preallocated the stack for the idlelwps for additional CPUs.
  * This hook allows to return them.
  */
 vaddr_t cpu_uarea_alloc_idlelwp(struct cpu_info *);



CVS commit: src/sys/ufs/ffs

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:12:00 UTC 2017

Modified Files:
src/sys/ufs/ffs: ffs_vfsops.c

Log Message:
Adapt the test "enable WAPBL on rw mounts only" to the recent change of
the protocol to update a mounted file.

Should fix PR kern/52031 (FFS mount update doesn't play nice with WAPBL)


To generate a diff of this commit:
cvs rdiff -u -r1.348 -r1.349 src/sys/ufs/ffs/ffs_vfsops.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/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.348 src/sys/ufs/ffs/ffs_vfsops.c:1.349
--- src/sys/ufs/ffs/ffs_vfsops.c:1.348	Wed Mar  1 10:46:43 2017
+++ src/sys/ufs/ffs/ffs_vfsops.c	Mon Mar  6 10:12:00 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.348 2017/03/01 10:46:43 hannken Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.348 2017/03/01 10:46:43 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.349 2017/03/06 10:12:00 hannken Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -518,7 +518,8 @@ ffs_mount(struct mount *mp, const char *
 
 #ifdef WAPBL
 	/* WAPBL can only be enabled on a r/w mount. */
-	if ((mp->mnt_flag & MNT_RDONLY) && !(mp->mnt_iflag & IMNT_WANTRDWR)) {
+	if (((mp->mnt_flag & MNT_RDONLY) && !(mp->mnt_iflag & IMNT_WANTRDWR)) ||
+	(mp->mnt_iflag & IMNT_WANTRDONLY)) {
 		mp->mnt_flag &= ~MNT_LOG;
 	}
 #else /* !WAPBL */



CVS commit: src/sys/kern

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:11:21 UTC 2017

Modified Files:
src/sys/kern: vfs_mount.c vfs_trans.c

Log Message:
Always use the lowest mount for fstrans and suspend.  This way we
enter/leave or suspend/resume the stack of layered file systems as a unit.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/kern/vfs_mount.c
cvs rdiff -u -r1.38 -r1.39 src/sys/kern/vfs_trans.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/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.49 src/sys/kern/vfs_mount.c:1.50
--- src/sys/kern/vfs_mount.c:1.49	Mon Mar  6 10:10:43 2017
+++ src/sys/kern/vfs_mount.c	Mon Mar  6 10:11:21 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.49 2017/03/06 10:10:43 hannken Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.50 2017/03/06 10:11:21 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.49 2017/03/06 10:10:43 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.50 2017/03/06 10:11:21 hannken Exp $");
 
 #include 
 #include 
@@ -711,12 +711,6 @@ mount_domount(struct lwp *l, vnode_t **v
 		return ENOMEM;
 	}
 
-	if ((error = fstrans_mount(mp)) != 0) {
-		vfs_unbusy(mp, false, NULL);
-		vfs_destroy(mp);
-		return error;
-	}
-
 	mp->mnt_stat.f_owner = kauth_cred_geteuid(l->l_cred);
 
 	/*
@@ -734,6 +728,12 @@ mount_domount(struct lwp *l, vnode_t **v
 	if (error != 0)
 		goto err_unmounted;
 
+	if (mp->mnt_lower == NULL) {
+		error = fstrans_mount(mp);
+		if (error)
+			goto err_mounted;
+	}
+
 	/*
 	 * Validate and prepare the mount point.
 	 */

Index: src/sys/kern/vfs_trans.c
diff -u src/sys/kern/vfs_trans.c:1.38 src/sys/kern/vfs_trans.c:1.39
--- src/sys/kern/vfs_trans.c:1.38	Thu Mar  2 10:41:27 2017
+++ src/sys/kern/vfs_trans.c	Mon Mar  6 10:11:21 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_trans.c,v 1.38 2017/03/02 10:41:27 hannken Exp $	*/
+/*	$NetBSD: vfs_trans.c,v 1.39 2017/03/06 10:11:21 hannken Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.38 2017/03/02 10:41:27 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,v 1.39 2017/03/06 10:11:21 hannken Exp $");
 
 /*
  * File system transaction operations.
@@ -123,6 +123,8 @@ static inline struct mount *
 fstrans_normalize_mount(struct mount *mp)
 {
 
+	while (mp && mp->mnt_lower)
+		mp = mp->mnt_lower;
 	if (mp == NULL)
 		return NULL;
 	if ((mp->mnt_iflag & IMNT_HAS_TRANS) == 0)



CVS commit: src/sys/kern

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:10:43 UTC 2017

Modified Files:
src/sys/kern: vfs_mount.c

Log Message:
Deny unmounting file systems below layered file systems.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/kern/vfs_mount.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/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.48 src/sys/kern/vfs_mount.c:1.49
--- src/sys/kern/vfs_mount.c:1.48	Wed Feb 22 09:50:13 2017
+++ src/sys/kern/vfs_mount.c	Mon Mar  6 10:10:43 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.48 2017/02/22 09:50:13 hannken Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.49 2017/03/06 10:10:43 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.48 2017/02/22 09:50:13 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.49 2017/03/06 10:10:43 hannken Exp $");
 
 #include 
 #include 
@@ -817,6 +817,7 @@ err_unmounted:
 int
 dounmount(struct mount *mp, int flags, struct lwp *l)
 {
+	struct mount *cmp;
 	vnode_t *coveredvp;
 	int error, async, used_syncer, used_extattr;
 
@@ -827,6 +828,18 @@ dounmount(struct mount *mp, int flags, s
 #endif /* NVERIEXEC > 0 */
 
 	/*
+	 * No unmount below layered mounts.
+	 */
+	mutex_enter(_lock);
+	TAILQ_FOREACH(cmp, , mnt_list) {
+		if (cmp->mnt_lower == mp) {
+			mutex_exit(_lock);
+			return EBUSY;
+		}
+	}
+	mutex_exit(_lock);
+
+	/*
 	 * XXX Freeze syncer.  Must do this before locking the
 	 * mount point.  See dounmount() for details.
 	 */



CVS commit: src/sys

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:10:07 UTC 2017

Modified Files:
src/sys/fs/union: union_vfsops.c
src/sys/miscfs/nullfs: null_vfsops.c
src/sys/miscfs/overlay: overlay_vfsops.c
src/sys/miscfs/umapfs: umap_vfsops.c
src/sys/sys: mount.h param.h

Log Message:
Add field "mnt_lower" to "struct mount" to track the file system
a layered file system is mounted on.

Welcome to 7.99.65


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/fs/union/union_vfsops.c
cvs rdiff -u -r1.91 -r1.92 src/sys/miscfs/nullfs/null_vfsops.c
cvs rdiff -u -r1.64 -r1.65 src/sys/miscfs/overlay/overlay_vfsops.c
cvs rdiff -u -r1.96 -r1.97 src/sys/miscfs/umapfs/umap_vfsops.c
cvs rdiff -u -r1.220 -r1.221 src/sys/sys/mount.h
cvs rdiff -u -r1.531 -r1.532 src/sys/sys/param.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/fs/union/union_vfsops.c
diff -u src/sys/fs/union/union_vfsops.c:1.76 src/sys/fs/union/union_vfsops.c:1.77
--- src/sys/fs/union/union_vfsops.c:1.76	Fri Feb 17 08:31:25 2017
+++ src/sys/fs/union/union_vfsops.c	Mon Mar  6 10:10:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vfsops.c,v 1.76 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: union_vfsops.c,v 1.77 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1994 The Regents of the University of California.
@@ -77,7 +77,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.76 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.77 2017/03/06 10:10:07 hannken Exp $");
 
 #include 
 #include 
@@ -252,6 +252,8 @@ union_mount(struct mount *mp, const char
 	if (error)
 		goto bad;
 
+	mp->mnt_lower = um->um_uppervp->v_mount;
+
 	switch (um->um_op) {
 	case UNMNT_ABOVE:
 		cp = ":";

Index: src/sys/miscfs/nullfs/null_vfsops.c
diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.91 src/sys/miscfs/nullfs/null_vfsops.c:1.92
--- src/sys/miscfs/nullfs/null_vfsops.c:1.91	Fri Feb 17 08:31:25 2017
+++ src/sys/miscfs/nullfs/null_vfsops.c	Mon Mar  6 10:10:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vfsops.c,v 1.91 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: null_vfsops.c,v 1.92 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.91 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.92 2017/03/06 10:10:07 hannken Exp $");
 
 #include 
 #include 
@@ -170,6 +170,7 @@ nullfs_mount(struct mount *mp, const cha
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->nullm_rootvp = vp;
+	mp->mnt_lower = nmp->nullm_vfs;
 	mp->mnt_iflag |= IMNT_MPSAFE;
 	VOP_UNLOCK(vp);
 

Index: src/sys/miscfs/overlay/overlay_vfsops.c
diff -u src/sys/miscfs/overlay/overlay_vfsops.c:1.64 src/sys/miscfs/overlay/overlay_vfsops.c:1.65
--- src/sys/miscfs/overlay/overlay_vfsops.c:1.64	Fri Feb 17 08:31:25 2017
+++ src/sys/miscfs/overlay/overlay_vfsops.c	Mon Mar  6 10:10:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: overlay_vfsops.c,v 1.64 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: overlay_vfsops.c,v 1.65 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1999, 2000 National Aeronautics & Space Administration
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.64 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.65 2017/03/06 10:10:07 hannken Exp $");
 
 #include 
 #include 
@@ -185,6 +185,7 @@ ov_mount(struct mount *mp, const char *p
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->ovm_rootvp = vp;
+	mp->mnt_lower = nmp->ovm_vfs;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,

Index: src/sys/miscfs/umapfs/umap_vfsops.c
diff -u src/sys/miscfs/umapfs/umap_vfsops.c:1.96 src/sys/miscfs/umapfs/umap_vfsops.c:1.97
--- src/sys/miscfs/umapfs/umap_vfsops.c:1.96	Fri Feb 17 08:31:25 2017
+++ src/sys/miscfs/umapfs/umap_vfsops.c	Mon Mar  6 10:10:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: umap_vfsops.c,v 1.96 2017/02/17 08:31:25 hannken Exp $	*/
+/*	$NetBSD: umap_vfsops.c,v 1.97 2017/03/06 10:10:07 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.96 2017/02/17 08:31:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.97 2017/03/06 10:10:07 hannken Exp $");
 
 #include 
 #include 
@@ -220,6 +220,7 @@ umapfs_mount(struct mount *mp, const cha
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	amp->umapm_rootvp = vp;
+	mp->mnt_lower = amp->umapm_vfs;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->umap_target,

Index: src/sys/sys/mount.h
diff -u src/sys/sys/mount.h:1.220 src/sys/sys/mount.h:1.221
--- src/sys/sys/mount.h:1.220	Wed Jan 11 

CVS commit: src/sys/fs/union

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:08:49 UTC 2017

Modified Files:
src/sys/fs/union: union_vnops.c

Log Message:
Handle v_writecount from union_open(), union_close() and union_revoke()
so lower file system vnodes get marked as open for writing.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/fs/union/union_vnops.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/fs/union/union_vnops.c
diff -u src/sys/fs/union/union_vnops.c:1.63 src/sys/fs/union/union_vnops.c:1.64
--- src/sys/fs/union/union_vnops.c:1.63	Mon Apr 20 23:03:08 2015
+++ src/sys/fs/union/union_vnops.c	Mon Mar  6 10:08:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: union_vnops.c,v 1.63 2015/04/20 23:03:08 riastradh Exp $	*/
+/*	$NetBSD: union_vnops.c,v 1.64 2017/03/06 10:08:49 hannken Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1994, 1995
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.63 2015/04/20 23:03:08 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: union_vnops.c,v 1.64 2017/03/06 10:08:49 hannken Exp $");
 
 #include 
 #include 
@@ -616,6 +616,11 @@ union_open(void *v)
 			error = union_copyup(un, (mode_TRUNC) == 0, cred, l);
 			if (error == 0)
 error = VOP_OPEN(un->un_uppervp, mode, cred);
+			if (error == 0) {
+mutex_enter(un->un_uppervp->v_interlock);
+un->un_uppervp->v_writecount++;
+mutex_exit(un->un_uppervp->v_interlock);
+			}
 			return (error);
 		}
 
@@ -640,6 +645,11 @@ union_open(void *v)
 		return ENXIO;
 
 	error = VOP_OPEN(tvp, mode, cred);
+	if (error == 0 && (ap->a_mode & FWRITE)) {
+		mutex_enter(tvp->v_interlock);
+		tvp->v_writecount++;
+		mutex_exit(tvp->v_interlock);
+	}
 
 	return (error);
 }
@@ -669,6 +679,12 @@ union_close(void *v)
 
 	KASSERT(vp != NULLVP);
 	ap->a_vp = vp;
+	if ((ap->a_fflag & FWRITE)) {
+		KASSERT(vp == un->un_uppervp);
+		mutex_enter(vp->v_interlock);
+		vp->v_writecount--;
+		mutex_exit(vp->v_interlock);
+	}
 	if (do_lock)
 		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	error = VCALL(vp, VOFFSET(vop_close), ap);
@@ -1048,8 +1064,13 @@ union_revoke(void *v)
 	} */ *ap = v;
 	struct vnode *vp = ap->a_vp;
 
-	if (UPPERVP(vp))
+	if (UPPERVP(vp)) {
+		mutex_enter(UPPERVP(vp)->v_interlock);
+		KASSERT(vp->v_interlock == UPPERVP(vp)->v_interlock);
+		UPPERVP(vp)->v_writecount -= vp->v_writecount;
+		mutex_exit(UPPERVP(vp)->v_interlock);
 		VOP_REVOKE(UPPERVP(vp), ap->a_flags);
+	}
 	if (LOWERVP(vp))
 		VOP_REVOKE(LOWERVP(vp), ap->a_flags);
 	vgone(vp);	/* XXXAD?? */



CVS commit: src/sys/kern

2017-03-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Mon Mar  6 10:07:52 UTC 2017

Modified Files:
src/sys/kern: vfs_vnode.c

Log Message:
Change vrecycle() and vgone() to lock with LK_RETRY.  If this node is
a layerfs node the lower node(s) may already be reclaimed.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/kern/vfs_vnode.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/kern/vfs_vnode.c
diff -u src/sys/kern/vfs_vnode.c:1.75 src/sys/kern/vfs_vnode.c:1.76
--- src/sys/kern/vfs_vnode.c:1.75	Fri Feb 17 08:30:00 2017
+++ src/sys/kern/vfs_vnode.c	Mon Mar  6 10:07:52 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_vnode.c,v 1.75 2017/02/17 08:30:00 hannken Exp $	*/
+/*	$NetBSD: vfs_vnode.c,v 1.76 2017/03/06 10:07:52 hannken Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.75 2017/02/17 08:30:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.76 2017/03/06 10:07:52 hannken Exp $");
 
 #include 
 #include 
@@ -919,7 +919,7 @@ vrecycle(vnode_t *vp)
 	 * On layered file systems waiting for the lock would open a can of
 	 * deadlocks as the lower vnodes may have other active references.
 	 */
-	error = vn_lock(vp, LK_EXCLUSIVE | LK_NOWAIT);
+	error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY | LK_NOWAIT);
 
 	mutex_enter(vp->v_interlock);
 	VSTATE_CHANGE(vp, VS_BLOCKED, VS_ACTIVE);
@@ -978,13 +978,12 @@ void
 vgone(vnode_t *vp)
 {
 
-	if (vn_lock(vp, LK_EXCLUSIVE) != 0) {
-		VSTATE_ASSERT(vp, VS_RECLAIMED);
-		vrele(vp);
-	}
-
+	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	mutex_enter(vp->v_interlock);
-	vcache_reclaim(vp);
+	VSTATE_WAIT_STABLE(vp);
+	if (VSTATE_GET(vp) == VS_ACTIVE)
+		vcache_reclaim(vp);
+	VSTATE_ASSERT(vp, VS_RECLAIMED);
 	vrelel(vp, 0);
 }
 



CVS commit: src/share/man/man4

2017-03-06 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Mar  6 10:00:14 UTC 2017

Modified Files:
src/share/man/man4: ipsec.4

Log Message:
add "net.inet.ipsec.crypto_support" man


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/share/man/man4/ipsec.4

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

Modified files:

Index: src/share/man/man4/ipsec.4
diff -u src/share/man/man4/ipsec.4:1.38 src/share/man/man4/ipsec.4:1.39
--- src/share/man/man4/ipsec.4:1.38	Thu Mar 22 20:34:38 2012
+++ src/share/man/man4/ipsec.4	Mon Mar  6 10:00:14 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ipsec.4,v 1.38 2012/03/22 20:34:38 drochner Exp $
+.\"	$NetBSD: ipsec.4,v 1.39 2017/03/06 10:00:14 knakahara Exp $
 .\"	$KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $
 .\"
 .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -192,6 +192,7 @@ for tweaking kernel IPsec behavior:
 .It Sy Name Ta Sy Type Ta Sy Changeable
 .It net.inet.ipsec.ah_cleartos Ta integer Ta yes
 .It net.inet.ipsec.ah_offsetmask Ta integer Ta yes
+.It net.inet.ipsec.crypto_support Ta integer Ta yes
 .It net.inet.ipsec.dfbit Ta integer Ta yes
 .It net.inet.ipsec.ecn Ta integer Ta yes
 .It net.inet.ipsec.debug Ta integer Ta yes
@@ -219,6 +220,11 @@ implement RFC1826 AH.
 It should be set to zero
 .Pq clear the fragment offset field during computation
 for RFC2402 conformance.
+.It Li ipsec.crypto_support
+The variable configures the kernel behavior to select encryption drivers.
+If set to > 0, the kernel select first hardware encryption driver.
+If set to < 0, the kernel select first software encryption driver.
+If set to 0, the kernel select first either hardware or software driver.
 .It Li ipsec.dfbit
 The variable configures the kernel behavior on IPv4 IPsec tunnel encapsulation.
 If set to 0, DF bit on the outer IPv4 header will be cleared.



CVS commit: src/sys

2017-03-06 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Mon Mar  6 09:59:05 UTC 2017

Modified Files:
src/sys/netipsec: ipsec_netbsd.c
src/sys/opencrypto: cryptodev.h

Log Message:
add sysctl to select software/hardware encryption driver. can enable 
CRYPTO_DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/netipsec/ipsec_netbsd.c
cvs rdiff -u -r1.28 -r1.29 src/sys/opencrypto/cryptodev.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/netipsec/ipsec_netbsd.c
diff -u src/sys/netipsec/ipsec_netbsd.c:1.38 src/sys/netipsec/ipsec_netbsd.c:1.39
--- src/sys/netipsec/ipsec_netbsd.c:1.38	Thu Jul  7 06:55:43 2016
+++ src/sys/netipsec/ipsec_netbsd.c	Mon Mar  6 09:59:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ipsec_netbsd.c,v 1.38 2016/07/07 06:55:43 msaitoh Exp $	*/
+/*	$NetBSD: ipsec_netbsd.c,v 1.39 2017/03/06 09:59:05 knakahara Exp $	*/
 /*	$KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $	*/
 /*	$KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.38 2016/07/07 06:55:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.39 2017/03/06 09:59:05 knakahara Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -702,6 +702,12 @@ SYSCTL_SETUP(sysctl_net_inet_ipsec_setup
 		   NULL, 0, _used, 0,
 		   CTL_NET, PF_INET, ipproto_ipsec,
 		   CTL_CREATE, CTL_EOL);
+	sysctl_createv(clog, 0, NULL, NULL,
+		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+		   CTLTYPE_INT, "crypto_support", NULL,
+		   NULL, 0, _support, 0,
+		   CTL_NET, PF_INET, ipproto_ipsec,
+		   CTL_CREATE, CTL_EOL);
 #ifdef IPSEC_DEBUG
 	sysctl_createv(clog, 0, NULL, NULL,
 		   CTLFLAG_PERMANENT|CTLFLAG_READWRITE,

Index: src/sys/opencrypto/cryptodev.h
diff -u src/sys/opencrypto/cryptodev.h:1.28 src/sys/opencrypto/cryptodev.h:1.29
--- src/sys/opencrypto/cryptodev.h:1.28	Thu Jul  7 06:55:43 2016
+++ src/sys/opencrypto/cryptodev.h	Mon Mar  6 09:59:05 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: cryptodev.h,v 1.28 2016/07/07 06:55:43 msaitoh Exp $ */
+/*	$NetBSD: cryptodev.h,v 1.29 2017/03/06 09:59:05 knakahara Exp $ */
 /*	$FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $	*/
 /*	$OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $	*/
 
@@ -89,6 +89,10 @@
 #include 
 #include 
 
+#if defined(_KERNEL_OPT)
+#include "opt_ocf.h"
+#endif
+
 /* Some initial values */
 #define CRYPTO_DRIVERS_INITIAL	4
 #define CRYPTO_SW_SESSIONS	32
@@ -641,18 +645,12 @@ extern int	cuio_getptr(struct uio *, int
 
 #ifdef CRYPTO_DEBUG	/* yuck, netipsec defines these differently */
 #ifndef DPRINTF
-#define DPRINTF(a) uprintf a
-#endif
-#ifndef DCPRINTF
-#define DCPRINTF(a) printf a
+#define DPRINTF(a) printf a
 #endif
 #else
 #ifndef DPRINTF
 #define DPRINTF(a)
 #endif
-#ifndef DCPRINTF
-#define DCPRINTF(a)
-#endif
 #endif
 
 #endif /* _KERNEL */



CVS commit: src/lib/libc/gen

2017-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Mar  6 09:24:09 UTC 2017

Modified Files:
src/lib/libc/gen: realpath.3

Log Message:
Improve grammar.  Pointed out by Timo Buhrmester on netbsd-docs list.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/gen/realpath.3

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/gen/realpath.3
diff -u src/lib/libc/gen/realpath.3:1.18 src/lib/libc/gen/realpath.3:1.19
--- src/lib/libc/gen/realpath.3:1.18	Fri May 24 09:35:11 2013
+++ src/lib/libc/gen/realpath.3	Mon Mar  6 09:24:09 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: realpath.3,v 1.18 2013/05/24 09:35:11 wiz Exp $
+.\"	$NetBSD: realpath.3,v 1.19 2017/03/06 09:24:09 pgoyette Exp $
 .\"
 .\" Copyright (c) 1994
 .\"	The Regents of the University of California.  All rights reserved.
@@ -89,7 +89,7 @@ If an error occurs,
 .Fn realpath
 returns
 .Dv NULL ,
-and
+and if
 .Fa resolvedname
 was not allocated by
 .Fn realpath ,



CVS commit: src/distrib/sets/lists/man

2017-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Mar  6 09:06:23 UTC 2017

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
Add pxaip(4) man page to the sets list.


To generate a diff of this commit:
cvs rdiff -u -r1.1549 -r1.1550 src/distrib/sets/lists/man/mi

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

Modified files:

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1549 src/distrib/sets/lists/man/mi:1.1550
--- src/distrib/sets/lists/man/mi:1.1549	Thu Feb 16 08:32:21 2017
+++ src/distrib/sets/lists/man/mi	Mon Mar  6 09:06:23 2017
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1549 2017/02/16 08:32:21 knakahara Exp $
+# $NetBSD: mi,v 1.1550 2017/03/06 09:06:23 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1576,6 +1576,7 @@
 ./usr/share/man/cat4/puffs.0			man-puffs-catman	.cat
 ./usr/share/man/cat4/pwdog.0			man-sys-catman		.cat
 ./usr/share/man/cat4/px.0			man-sys-catman		.cat
+./usr/share/man/cat4/pxaip.0			man-sys-catman		.cat
 ./usr/share/man/cat4/pxg.0			man-sys-catman		.cat
 ./usr/share/man/cat4/qe.0			man-sys-catman		.cat
 ./usr/share/man/cat4/qec.0			man-sys-catman		.cat
@@ -4619,6 +4620,7 @@
 ./usr/share/man/html4/puffs.html		man-sys-htmlman		html
 ./usr/share/man/html4/pwdog.html		man-sys-htmlman		html
 ./usr/share/man/html4/px.html			man-sys-htmlman		html
+./usr/share/man/html4/pxaip.html		man-sys-htmlman		html
 ./usr/share/man/html4/pxg.html			man-sys-htmlman		html
 ./usr/share/man/html4/qe.html			man-sys-htmlman		html
 ./usr/share/man/html4/qec.html			man-sys-htmlman		html
@@ -7534,6 +7536,7 @@
 ./usr/share/man/man4/pmax/lk201.4		man-obsolete		obsolete
 ./usr/share/man/man4/pmax/pm.4			man-sys-man		.man
 ./usr/share/man/man4/pmax/px.4			man-obsolete		obsolete
+./usr/share/man/man4/pmax/pxaip.4		man-obsolete		obsolete
 ./usr/share/man/man4/pmax/scc.4			man-obsolete		obsolete
 ./usr/share/man/man4/pmax/sii.4			man-sys-man		.man
 ./usr/share/man/man4/pmax/tc.4			man-obsolete		obsolete



CVS commit: src/share/man/man4

2017-03-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Mar  6 09:06:02 UTC 2017

Modified Files:
src/share/man/man4: Makefile com.4 ohci.4
Added Files:
src/share/man/man4: pxaip.4

Log Message:
Add pxaip(4) man page from Stephan Meisinger in PR misc/52033


To generate a diff of this commit:
cvs rdiff -u -r1.633 -r1.634 src/share/man/man4/Makefile
cvs rdiff -u -r1.21 -r1.22 src/share/man/man4/com.4
cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/ohci.4
cvs rdiff -u -r0 -r1.1 src/share/man/man4/pxaip.4

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

Modified files:

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.633 src/share/man/man4/Makefile:1.634
--- src/share/man/man4/Makefile:1.633	Thu Feb 16 08:32:21 2017
+++ src/share/man/man4/Makefile	Mon Mar  6 09:06:01 2017
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.633 2017/02/16 08:32:21 knakahara Exp $
+#	$NetBSD: Makefile,v 1.634 2017/03/06 09:06:01 pgoyette Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -50,8 +50,8 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	pad.4 pas.4 pcdisplay.4 pcf8563rtc.4 pciide.4 pckbc.4 pckbd.4 pcn.4 \
 	pcppi.4 pcscp.4 pcweasel.4 pdcide.4 pdcsata.4 piixide.4 piixpcib.4 \
 	piixpm.4 pim.4 plip.4 pm3fb.4 pms.4 pmu.4 pnaphy.4 ppbus.4 ppp.4 pppoe.4 \
-	pseye.4 ptcd.4 ptm.4 pty.4 puc.4 pud.4 puffs.4 pwdog.4 px.4 pxg.4 \
-	qe.4 qec.4 qsphy.4 \
+	pseye.4 ptcd.4 ptm.4 pty.4 puc.4 pud.4 puffs.4 pwdog.4 px.4 pxaip.4 \
+	pxg.4 qe.4 qec.4 qsphy.4 \
 	raid.4 ral.4 ray.4 rcons.4 rdcphy.4 re.4 rgephy.4 rlphy.4 \
 	rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rtwn.4 rum.4 run.4 \
 	s390rtc.4 satalink.4 sbus.4 scc.4 schide.4 \

Index: src/share/man/man4/com.4
diff -u src/share/man/man4/com.4:1.21 src/share/man/man4/com.4:1.22
--- src/share/man/man4/com.4:1.21	Sun Apr 29 07:27:19 2012
+++ src/share/man/man4/com.4	Mon Mar  6 09:06:01 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: com.4,v 1.21 2012/04/29 07:27:19 tsutsui Exp $
+.\"	$NetBSD: com.4,v 1.22 2017/03/06 09:06:01 pgoyette Exp $
 .\"
 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
 .\" All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" from: @(#)dca.4	5.2 (Berkeley) 3/27/91
 .\"
-.Dd April 29, 2012
+.Dd March 4, 2017
 .Dt COM 4
 .Os
 .Sh NAME
@@ -62,6 +62,7 @@
 .Ss Arm32
 .Cd "com0 at mainbus? base 0x00210fe0"
 .Cd "com1 at mainbus? base 0x00210be0"
+.Cd "com0 at pxaip?"
 .Ss HP 9000/300 and 400 Series
 .Cd "com* at dio? scode ?"
 .Cd "com* at frodo? offset ?"
@@ -171,6 +172,7 @@ with the code listed.
 .Xr pcmcom 4 ,
 .Xr pnpbios 4 ,
 .Xr puc 4 ,
+.Xr pxaip 4 ,
 .Xr rtfps 4 ,
 .Xr tty 4 ,
 .Xr xirc 4 ,

Index: src/share/man/man4/ohci.4
diff -u src/share/man/man4/ohci.4:1.8 src/share/man/man4/ohci.4:1.9
--- src/share/man/man4/ohci.4:1.8	Wed Apr 30 13:10:54 2008
+++ src/share/man/man4/ohci.4	Mon Mar  6 09:06:01 2017
@@ -1,4 +1,4 @@
-.\" $NetBSD: ohci.4,v 1.8 2008/04/30 13:10:54 martin Exp $
+.\" $NetBSD: ohci.4,v 1.9 2017/03/06 09:06:01 pgoyette Exp $
 .\"
 .\" Copyright (c) 1999 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 25, 1998
+.Dd March 4, 2017
 .Dt OHCI 4
 .Os
 .Sh NAME
@@ -37,6 +37,8 @@
 .Cd "ohci*at cardbus? function ?"
 .Cd "ohci*at pci? dev ? function ?"
 .Cd "usb* at ohci?"
+.Ss Arm32
+.Cd "ohci0at pxaip?"
 .Sh DESCRIPTION
 The
 .Nm

Added files:

Index: src/share/man/man4/pxaip.4
diff -u /dev/null src/share/man/man4/pxaip.4:1.1
--- /dev/null	Mon Mar  6 09:06:02 2017
+++ src/share/man/man4/pxaip.4	Mon Mar  6 09:06:01 2017
@@ -0,0 +1,97 @@
+.\"	$NetBSD: pxaip.4,v 1.1 2017/03/06 09:06:01 pgoyette Exp $
+.\"
+.\" Copyright (c) 2017 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Steve Woodford.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES 

CVS commit: src/sys/net80211

2017-03-06 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Mon Mar  6 08:36:20 UTC 2017

Modified Files:
src/sys/net80211: ieee80211_input.c

Log Message:
Fix incrementing wrong counter


To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 src/sys/net80211/ieee80211_input.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/net80211/ieee80211_input.c
diff -u src/sys/net80211/ieee80211_input.c:1.87 src/sys/net80211/ieee80211_input.c:1.88
--- src/sys/net80211/ieee80211_input.c:1.87	Thu Feb  2 10:05:35 2017
+++ src/sys/net80211/ieee80211_input.c	Mon Mar  6 08:36:20 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee80211_input.c,v 1.87 2017/02/02 10:05:35 nonaka Exp $	*/
+/*	$NetBSD: ieee80211_input.c,v 1.88 2017/03/06 08:36:20 ozaki-r Exp $	*/
 /*-
  * Copyright (c) 2001 Atsushi Onoe
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -36,7 +36,7 @@
 __FBSDID("$FreeBSD: src/sys/net80211/ieee80211_input.c,v 1.81 2005/08/10 16:22:29 sam Exp $");
 #endif
 #ifdef __NetBSD__
-__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.87 2017/02/02 10:05:35 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ieee80211_input.c,v 1.88 2017/03/06 08:36:20 ozaki-r Exp $");
 #endif
 
 #ifdef _KERNEL_OPT
@@ -780,7 +780,7 @@ ieee80211_deliver_data(struct ieee80211c
 			len = m1->m_pkthdr.len;
 			IFQ_ENQUEUE(>if_snd, m1, error);
 			if (error) {
-ifp->if_omcasts++;
+ifp->if_oerrors++;
 m = NULL;
 			}
 			ifp->if_obytes += len;



CVS commit: [netbsd-6] src/sys/arch/x86

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  6 08:18:44 UTC 2017

Modified Files:
src/sys/arch/x86/include [netbsd-6]: pmap.h
src/sys/arch/x86/x86 [netbsd-6]: pmap.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1441):
sys/arch/x86/x86/pmap.c: revision 1.241 via patch
sys/arch/x86/include/pmap.h: revision 1.63 via patch
Should be PG_k, doesn't change anything.
--
Remove PG_u from the kernel pages on Xen. Otherwise there is no privilege
separation between the kernel and userland.
On Xen-amd64, the kernel runs in ring3 just like userland, and the
separation is guaranteed by the hypervisor - each syscall/trap is
intercepted by Xen and sent manually to the kernel. Before that, the
hypervisor modifies the page tables so that the kernel becomes accessible.
Later, when returning to userland, the hypervisor removes the kernel pages
and flushes the TLB.
However, TLB flushes are costly, and in order to reduce the number of pages
flushed Xen marks the userland pages as global, while keeping the kernel
ones as local. This way, when returning to userland, only the kernel pages
get flushed - which makes sense since they are the only ones that got
removed from the mapping.
Xen differentiates the userland pages by looking at their PG_u bit in the
PTE; if a page has this bit then Xen tags it as global, otherwise Xen
manually adds the bit but keeps the page as local. The thing is, since we
set PG_u in the kernel pages, Xen believes our kernel pages are in fact
userland pages, so it marks them as global. Therefore, when returning to
userland, the kernel pages indeed get removed from the page tree, but are
not flushed from the TLB. Which means that they are still accessible.
With this - and depending on the DTLB size - userland has a small window
where it can read/write to the last kernel pages accessed, which is enough
to completely escalate privileges: the sysent structure systematically gets
read when performing a syscall, and chances are that it will still be
cached in the TLB. Userland can then use this to patch a chosen syscall,
make it point to a userland function, retrieve %gs and compute the address
of its credentials, and finally grant itself root privileges.


To generate a diff of this commit:
cvs rdiff -u -r1.49.2.2 -r1.49.2.3 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.164.2.5 -r1.164.2.6 src/sys/arch/x86/x86/pmap.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/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.49.2.2 src/sys/arch/x86/include/pmap.h:1.49.2.3
--- src/sys/arch/x86/include/pmap.h:1.49.2.2	Wed May  9 03:22:52 2012
+++ src/sys/arch/x86/include/pmap.h	Mon Mar  6 08:18:44 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.49.2.2 2012/05/09 03:22:52 riz Exp $	*/
+/*	$NetBSD: pmap.h,v 1.49.2.3 2017/03/06 08:18:44 snj Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -182,15 +182,7 @@ struct pmap {
 	((pmap)->pm_pdirpa[0] + (index) * sizeof(pd_entry_t))
 #endif
 
-/* 
- * flag to be used for kernel mappings: PG_u on Xen/amd64, 
- * 0 otherwise.
- */
-#if defined(XEN) && defined(__x86_64__)
-#define PG_k PG_u
-#else
 #define PG_k 0
-#endif
 
 /*
  * MD flags that we use for pmap_enter and pmap_kenter_pa:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.164.2.5 src/sys/arch/x86/x86/pmap.c:1.164.2.6
--- src/sys/arch/x86/x86/pmap.c:1.164.2.5	Thu Jul 14 07:05:34 2016
+++ src/sys/arch/x86/x86/pmap.c	Mon Mar  6 08:18:44 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.164.2.5 2016/07/14 07:05:34 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.164.2.6 2017/03/06 08:18:44 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.5 2016/07/14 07:05:34 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.6 2017/03/06 08:18:44 snj Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1467,7 +1467,7 @@ pmap_bootstrap(vaddr_t kva_start)
 	memset((void *) (xen_dummy_user_pgd + KERNBASE), 0, PAGE_SIZE);
 	/* Mark read-only */
 	HYPERVISOR_update_va_mapping(xen_dummy_user_pgd + KERNBASE,
-	pmap_pa2pte(xen_dummy_user_pgd) | PG_u | PG_V, UVMF_INVLPG);
+	pmap_pa2pte(xen_dummy_user_pgd) | PG_k | PG_V, UVMF_INVLPG);
 	/* Pin as L4 */
 	xpq_queue_pin_l4_table(xpmap_ptom_masked(xen_dummy_user_pgd));
 #endif /* __x86_64__ */
@@ -2064,7 +2064,7 @@ pmap_pdp_ctor(void *arg, void *v, int fl
 	 * this pdir will NEVER be active in kernel mode
 	 * so mark recursive entry invalid
 	 */
-	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_u;
+	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_k;
 	/*
 	 * PDP constructed this way won't be for kernel,
 	 * hence we don't put kernel mappings on Xen.



CVS commit: [netbsd-6-1] src/sys/arch/x86

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  6 08:18:14 UTC 2017

Modified Files:
src/sys/arch/x86/include [netbsd-6-1]: pmap.h
src/sys/arch/x86/x86 [netbsd-6-1]: pmap.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1441):
sys/arch/x86/x86/pmap.c: revision 1.241 via patch
sys/arch/x86/include/pmap.h: revision 1.63 via patch
Should be PG_k, doesn't change anything.
--
Remove PG_u from the kernel pages on Xen. Otherwise there is no privilege
separation between the kernel and userland.
On Xen-amd64, the kernel runs in ring3 just like userland, and the
separation is guaranteed by the hypervisor - each syscall/trap is
intercepted by Xen and sent manually to the kernel. Before that, the
hypervisor modifies the page tables so that the kernel becomes accessible.
Later, when returning to userland, the hypervisor removes the kernel pages
and flushes the TLB.
However, TLB flushes are costly, and in order to reduce the number of pages
flushed Xen marks the userland pages as global, while keeping the kernel
ones as local. This way, when returning to userland, only the kernel pages
get flushed - which makes sense since they are the only ones that got
removed from the mapping.
Xen differentiates the userland pages by looking at their PG_u bit in the
PTE; if a page has this bit then Xen tags it as global, otherwise Xen
manually adds the bit but keeps the page as local. The thing is, since we
set PG_u in the kernel pages, Xen believes our kernel pages are in fact
userland pages, so it marks them as global. Therefore, when returning to
userland, the kernel pages indeed get removed from the page tree, but are
not flushed from the TLB. Which means that they are still accessible.
With this - and depending on the DTLB size - userland has a small window
where it can read/write to the last kernel pages accessed, which is enough
to completely escalate privileges: the sysent structure systematically gets
read when performing a syscall, and chances are that it will still be
cached in the TLB. Userland can then use this to patch a chosen syscall,
make it point to a userland function, retrieve %gs and compute the address
of its credentials, and finally grant itself root privileges.


To generate a diff of this commit:
cvs rdiff -u -r1.49.2.2 -r1.49.2.2.6.1 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.164.2.4.6.1 -r1.164.2.4.6.2 src/sys/arch/x86/x86/pmap.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/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.49.2.2 src/sys/arch/x86/include/pmap.h:1.49.2.2.6.1
--- src/sys/arch/x86/include/pmap.h:1.49.2.2	Wed May  9 03:22:52 2012
+++ src/sys/arch/x86/include/pmap.h	Mon Mar  6 08:18:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.49.2.2 2012/05/09 03:22:52 riz Exp $	*/
+/*	$NetBSD: pmap.h,v 1.49.2.2.6.1 2017/03/06 08:18:14 snj Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -182,15 +182,7 @@ struct pmap {
 	((pmap)->pm_pdirpa[0] + (index) * sizeof(pd_entry_t))
 #endif
 
-/* 
- * flag to be used for kernel mappings: PG_u on Xen/amd64, 
- * 0 otherwise.
- */
-#if defined(XEN) && defined(__x86_64__)
-#define PG_k PG_u
-#else
 #define PG_k 0
-#endif
 
 /*
  * MD flags that we use for pmap_enter and pmap_kenter_pa:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.164.2.4.6.1 src/sys/arch/x86/x86/pmap.c:1.164.2.4.6.2
--- src/sys/arch/x86/x86/pmap.c:1.164.2.4.6.1	Thu Jul 14 07:10:22 2016
+++ src/sys/arch/x86/x86/pmap.c	Mon Mar  6 08:18:14 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.164.2.4.6.1 2016/07/14 07:10:22 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.164.2.4.6.2 2017/03/06 08:18:14 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.4.6.1 2016/07/14 07:10:22 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.4.6.2 2017/03/06 08:18:14 snj Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1467,7 +1467,7 @@ pmap_bootstrap(vaddr_t kva_start)
 	memset((void *) (xen_dummy_user_pgd + KERNBASE), 0, PAGE_SIZE);
 	/* Mark read-only */
 	HYPERVISOR_update_va_mapping(xen_dummy_user_pgd + KERNBASE,
-	pmap_pa2pte(xen_dummy_user_pgd) | PG_u | PG_V, UVMF_INVLPG);
+	pmap_pa2pte(xen_dummy_user_pgd) | PG_k | PG_V, UVMF_INVLPG);
 	/* Pin as L4 */
 	xpq_queue_pin_l4_table(xpmap_ptom_masked(xen_dummy_user_pgd));
 #endif /* __x86_64__ */
@@ -2064,7 +2064,7 @@ pmap_pdp_ctor(void *arg, void *v, int fl
 	 * this pdir will NEVER be active in kernel mode
 	 * so mark recursive entry invalid
 	 */
-	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_u;
+	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_k;
 	/*
 	 * PDP constructed this way won't be for kernel,
 	 * hence we don't put kernel mappings on Xen.



CVS commit: [netbsd-6-0] src/sys/arch/x86

2017-03-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Mar  6 08:17:49 UTC 2017

Modified Files:
src/sys/arch/x86/include [netbsd-6-0]: pmap.h
src/sys/arch/x86/x86 [netbsd-6-0]: pmap.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1441):
sys/arch/x86/x86/pmap.c: revision 1.241 via patch
sys/arch/x86/include/pmap.h: revision 1.63 via patch
Should be PG_k, doesn't change anything.
--
Remove PG_u from the kernel pages on Xen. Otherwise there is no privilege
separation between the kernel and userland.
On Xen-amd64, the kernel runs in ring3 just like userland, and the
separation is guaranteed by the hypervisor - each syscall/trap is
intercepted by Xen and sent manually to the kernel. Before that, the
hypervisor modifies the page tables so that the kernel becomes accessible.
Later, when returning to userland, the hypervisor removes the kernel pages
and flushes the TLB.
However, TLB flushes are costly, and in order to reduce the number of pages
flushed Xen marks the userland pages as global, while keeping the kernel
ones as local. This way, when returning to userland, only the kernel pages
get flushed - which makes sense since they are the only ones that got
removed from the mapping.
Xen differentiates the userland pages by looking at their PG_u bit in the
PTE; if a page has this bit then Xen tags it as global, otherwise Xen
manually adds the bit but keeps the page as local. The thing is, since we
set PG_u in the kernel pages, Xen believes our kernel pages are in fact
userland pages, so it marks them as global. Therefore, when returning to
userland, the kernel pages indeed get removed from the page tree, but are
not flushed from the TLB. Which means that they are still accessible.
With this - and depending on the DTLB size - userland has a small window
where it can read/write to the last kernel pages accessed, which is enough
to completely escalate privileges: the sysent structure systematically gets
read when performing a syscall, and chances are that it will still be
cached in the TLB. Userland can then use this to patch a chosen syscall,
make it point to a userland function, retrieve %gs and compute the address
of its credentials, and finally grant itself root privileges.


To generate a diff of this commit:
cvs rdiff -u -r1.49.2.2 -r1.49.2.2.4.1 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.164.2.4.4.1 -r1.164.2.4.4.2 src/sys/arch/x86/x86/pmap.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/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.49.2.2 src/sys/arch/x86/include/pmap.h:1.49.2.2.4.1
--- src/sys/arch/x86/include/pmap.h:1.49.2.2	Wed May  9 03:22:52 2012
+++ src/sys/arch/x86/include/pmap.h	Mon Mar  6 08:17:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.49.2.2 2012/05/09 03:22:52 riz Exp $	*/
+/*	$NetBSD: pmap.h,v 1.49.2.2.4.1 2017/03/06 08:17:49 snj Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -182,15 +182,7 @@ struct pmap {
 	((pmap)->pm_pdirpa[0] + (index) * sizeof(pd_entry_t))
 #endif
 
-/* 
- * flag to be used for kernel mappings: PG_u on Xen/amd64, 
- * 0 otherwise.
- */
-#if defined(XEN) && defined(__x86_64__)
-#define PG_k PG_u
-#else
 #define PG_k 0
-#endif
 
 /*
  * MD flags that we use for pmap_enter and pmap_kenter_pa:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.164.2.4.4.1 src/sys/arch/x86/x86/pmap.c:1.164.2.4.4.2
--- src/sys/arch/x86/x86/pmap.c:1.164.2.4.4.1	Thu Jul 14 07:09:39 2016
+++ src/sys/arch/x86/x86/pmap.c	Mon Mar  6 08:17:49 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.164.2.4.4.1 2016/07/14 07:09:39 snj Exp $	*/
+/*	$NetBSD: pmap.c,v 1.164.2.4.4.2 2017/03/06 08:17:49 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.4.4.1 2016/07/14 07:09:39 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.164.2.4.4.2 2017/03/06 08:17:49 snj Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -1467,7 +1467,7 @@ pmap_bootstrap(vaddr_t kva_start)
 	memset((void *) (xen_dummy_user_pgd + KERNBASE), 0, PAGE_SIZE);
 	/* Mark read-only */
 	HYPERVISOR_update_va_mapping(xen_dummy_user_pgd + KERNBASE,
-	pmap_pa2pte(xen_dummy_user_pgd) | PG_u | PG_V, UVMF_INVLPG);
+	pmap_pa2pte(xen_dummy_user_pgd) | PG_k | PG_V, UVMF_INVLPG);
 	/* Pin as L4 */
 	xpq_queue_pin_l4_table(xpmap_ptom_masked(xen_dummy_user_pgd));
 #endif /* __x86_64__ */
@@ -2064,7 +2064,7 @@ pmap_pdp_ctor(void *arg, void *v, int fl
 	 * this pdir will NEVER be active in kernel mode
 	 * so mark recursive entry invalid
 	 */
-	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_u;
+	pdir[PDIR_SLOT_PTE] = pmap_pa2pte(pdirpa) | PG_k;
 	/*
 	 * PDP constructed this way won't be for kernel,
 	 * hence we don't put kernel mappings on Xen.