CVS commit: [pgoyette-compat] src/doc

2018-08-25 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat Aug 25 23:12:23 UTC 2018

Modified Files:
src/doc [pgoyette-compat]: COMPAT-branch-notes

Log Message:
Remove duplicate entry for XEN module build infrastructure.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.18 -r1.1.2.19 src/doc/COMPAT-branch-notes

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

Modified files:

Index: src/doc/COMPAT-branch-notes
diff -u src/doc/COMPAT-branch-notes:1.1.2.18 src/doc/COMPAT-branch-notes:1.1.2.19
--- src/doc/COMPAT-branch-notes:1.1.2.18	Sat Aug 25 01:02:48 2018
+++ src/doc/COMPAT-branch-notes	Sat Aug 25 23:12:23 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: COMPAT-branch-notes,v 1.1.2.18 2018/08/25 01:02:48 pgoyette Exp $ */
+/* $NetBSD: COMPAT-branch-notes,v 1.1.2.19 2018/08/25 23:12:23 pgoyette Exp $ */
 
 DONE
 
@@ -54,13 +54,7 @@ TODO - Required for branch merge
 1.  For compat_60, still need to figure out what to do with BSDPTY and
 tty_ptm
 
-2.  Also for compat_60, need to fix the building of XEN (and, for i386,
-XEN-PAE) module variants so that the obj-dir symlinks and the -I
-include order match those present in a kernel build.  See PR/53130
-(Currently, this affects the compat_60 module and its implementation
-of microcode updates for AMD processors - i386 and amd64.)
-
-3.  For compat_50, in addition to rtsock there are some things in dev/vnd,
+2.  For compat_50, in addition to rtsock there are some things in dev/vnd,
 dev/gpio, and dev/wscons/wsmux that I haven't been able to cleanly
 separate.
 
@@ -82,9 +76,7 @@ TODO - Not required for branch merge
 probably need some build infrastructure changes to ensure that
 XEN (and, for i386, XEN-PAE) modules are build with the correct
 macros defined and with -I directories specified in the same order
-as for building kernels.
-
-This currently affects cpu microcode loading for amd64 XEN systems.
+as for building kernels. See PR port-xen/53130.
 
 4.  There seems to be quite a bit of MD compat_xx code, in the various
 sys/arch/ directories.  I haven't yet looked at any of this.  But it



CVS commit: src/doc

2018-08-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 25 21:01:28 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
Add mue(4).


To generate a diff of this commit:
cvs rdiff -u -r1.2432 -r1.2433 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2432 src/doc/CHANGES:1.2433
--- src/doc/CHANGES:1.2432	Sat Aug 25 08:12:28 2018
+++ src/doc/CHANGES	Sat Aug 25 21:01:28 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2432 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2433 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -210,3 +210,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		[maxv 20180820]
 	arm: Add UEFI boot loader for ARM64 platforms. [jmcneill 20180824]
 	kernel: Remove NDIS. [maxv 20180825]
+	mue(4): Add driver for Microchip LAN75xx/LAN78xx (Raspberry Pi 3 B+)
+		from OpenBSD. [rin 20180825]



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

2018-08-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 25 20:55:15 UTC 2018

Modified Files:
src/sys/arch/arm/broadcom: bcm283x_platform.c

Log Message:
Set mac-address property to mue(4).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/broadcom/bcm283x_platform.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/arm/broadcom/bcm283x_platform.c
diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.13 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.14
--- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.13	Tue Aug 21 08:45:17 2018
+++ src/sys/arch/arm/broadcom/bcm283x_platform.c	Sat Aug 25 20:55:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm283x_platform.c,v 1.13 2018/08/21 08:45:17 rin Exp $	*/
+/*	$NetBSD: bcm283x_platform.c,v 1.14 2018/08/25 20:55:15 rin Exp $	*/
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.13 2018/08/21 08:45:17 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.14 2018/08/25 20:55:15 rin Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -1317,7 +1317,7 @@ bcm283x_platform_device_register(device_
 		booted_device = dev;
 	}
 #endif
-	if (device_is_a(dev, "usmsc") &&
+	if ((device_is_a(dev, "usmsc") || device_is_a(dev, "mue")) &&
 	vcprop_tag_success_p(_macaddr.tag)) {
 		const uint8_t enaddr[ETHER_ADDR_LEN] = {
 		 (vb.vbt_macaddr.addr >> 0) & 0xff,



CVS commit: src/sys/arch

2018-08-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 25 20:52:42 UTC 2018

Modified Files:
src/sys/arch/algor/conf: P4032 P5064 P6032
src/sys/arch/alpha/conf: GENERIC
src/sys/arch/amd64/conf: ALL XEN3_DOM0
src/sys/arch/cats/conf: GENERIC INSTALL
src/sys/arch/evbarm/conf: HDL_G HPT5325 MINI2440 MMNET_GENERIC
MPCSA_GENERIC NSLU2 OPENBLOCKS_A6 SHEEVAPLUG SMDK2410 TS7200
src/sys/arch/evbppc/conf: OPENBLOCKS266_OPT PMPPC
src/sys/arch/hpcarm/conf: WZERO3
src/sys/arch/hpcmips/conf: GENERIC TX3922 VR41XX
src/sys/arch/hppa/conf: GENERIC
src/sys/arch/i386/conf: ALL GENERIC_TINY INSTALL_FLOPPY XEN3PAE_DOM0
src/sys/arch/iyonix/conf: GENERIC
src/sys/arch/landisk/conf: GENERIC
src/sys/arch/macppc/conf: GENERIC
src/sys/arch/ofppc/conf: GENERIC
src/sys/arch/playstation2/conf: DEBUG
src/sys/arch/prep/conf: GENERIC
src/sys/arch/sgimips/conf: GENERIC32_IP3x
src/sys/arch/sparc64/conf: GENERIC
src/sys/arch/x68k/conf: GENERIC
src/sys/arch/zaurus/conf: GENERIC

Log Message:
Add (commented out) mue(4) to where appropriate.
Also add MII/PHY drivers for USB NICs if missing.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/algor/conf/P4032
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/algor/conf/P5064
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/algor/conf/P6032
cvs rdiff -u -r1.384 -r1.385 src/sys/arch/alpha/conf/GENERIC
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.155 -r1.156 src/sys/arch/amd64/conf/XEN3_DOM0
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/cats/conf/GENERIC
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/cats/conf/INSTALL
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/evbarm/conf/HDL_G
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/evbarm/conf/HPT5325
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/conf/MINI2440
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbarm/conf/NSLU2
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/evbarm/conf/OPENBLOCKS_A6
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/evbarm/conf/SHEEVAPLUG
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/evbarm/conf/SMDK2410
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/evbarm/conf/TS7200
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbppc/conf/OPENBLOCKS266_OPT
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/evbppc/conf/PMPPC
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/hpcarm/conf/WZERO3
cvs rdiff -u -r1.236 -r1.237 src/sys/arch/hpcmips/conf/GENERIC
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/hpcmips/conf/TX3922
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/hpcmips/conf/VR41XX
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/hppa/conf/GENERIC
cvs rdiff -u -r1.448 -r1.449 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.158 -r1.159 src/sys/arch/i386/conf/GENERIC_TINY
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/i386/conf/INSTALL_FLOPPY
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/i386/conf/XEN3PAE_DOM0
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/landisk/conf/GENERIC
cvs rdiff -u -r1.348 -r1.349 src/sys/arch/macppc/conf/GENERIC
cvs rdiff -u -r1.166 -r1.167 src/sys/arch/ofppc/conf/GENERIC
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/playstation2/conf/DEBUG
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/prep/conf/GENERIC
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/sgimips/conf/GENERIC32_IP3x
cvs rdiff -u -r1.205 -r1.206 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.189 -r1.190 src/sys/arch/x68k/conf/GENERIC
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/zaurus/conf/GENERIC

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/algor/conf/P4032
diff -u src/sys/arch/algor/conf/P4032:1.75 src/sys/arch/algor/conf/P4032:1.76
--- src/sys/arch/algor/conf/P4032:1.75	Wed Aug  1 20:04:09 2018
+++ src/sys/arch/algor/conf/P4032	Sat Aug 25 20:52:40 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: P4032,v 1.75 2018/08/01 20:04:09 maxv Exp $
+#	$NetBSD: P4032,v 1.76 2018/08/25 20:52:40 rin Exp $
 #
 # Algorithmics P-4032 kernel.
 #
@@ -7,7 +7,7 @@ include	"arch/algor/conf/std.algor"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"P4032-$Revision: 1.75 $"
+#ident 		"P4032-$Revision: 1.76 $"
 
 maxusers 32
 
@@ -276,6 +276,7 @@ ukphy*	at mii? phy ?			# generic unknown
 #axe*	at uhub? port ?		# ASIX AX88172 based adapters
 #cue*	at uhub? port ?		# CATC USB-EL1201A based adapters
 #kue*	at uhub? port ?		# Kawasaki LSI KL5KUSB101B based adapters
+#mue*	at uhub? port ?		# Microchip LAN75xx/LAN78xx based adapters
 #url*	at uhub? port ?		# Realtek RTL8150L based adapters
 
 # Serial adapters

Index: src/sys/arch/algor/conf/P5064
diff -u src/sys/arch/algor/conf/P5064:1.86 src/sys/arch/algor/conf/P5064:1.87
--- src/sys/arch/algor/conf/P5064:1.86	Wed Aug  1 20:04:09 2018
+++ 

CVS commit: src

2018-08-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sat Aug 25 20:12:22 UTC 2018

Modified Files:
src/distrib/sets/lists/man: mi
src/distrib/sets/lists/modules: mi
src/share/man/man4: Makefile
src/sys/dev/usb: files.usb usbdevices.config
src/sys/modules: Makefile
Added Files:
src/share/man/man4: mue.4
src/sys/dev/usb: if_mue.c if_muereg.h if_muevar.h
src/sys/modules/if_mue: Makefile if_mue.ioconf

Log Message:
Add mue(4), driver for Microchip LAN75xx/LAN78xx known as internal NIC of
Raspberry Pi 3 B+, from OpenBSD.

Tested on Raspberry Pi 3 B+ (LAN7800) and Z-TEK ZE582 (LAN7500).

* BUGS/TODO

- If the media type is set to something other than 1000baseT-FDX, data
  transmission becomes quite unstable. Also, ukphy(4) recognize 1000baseT as
  a supported media type, but it is not in fact.

- Catch up with changes made to usmsc(4) in nick-nhusb branch, i.e.,
  make the driver MP-safe.

- Support RX/VLAN/TX chekcsum offloading.


To generate a diff of this commit:
cvs rdiff -u -r1.1611 -r1.1612 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.116 -r1.117 src/distrib/sets/lists/modules/mi
cvs rdiff -u -r1.664 -r1.665 src/share/man/man4/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/mue.4
cvs rdiff -u -r1.151 -r1.152 src/sys/dev/usb/files.usb
cvs rdiff -u -r0 -r1.1 src/sys/dev/usb/if_mue.c src/sys/dev/usb/if_muereg.h \
src/sys/dev/usb/if_muevar.h
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/usb/usbdevices.config
cvs rdiff -u -r1.207 -r1.208 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/if_mue/Makefile \
src/sys/modules/if_mue/if_mue.ioconf

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.1611 src/distrib/sets/lists/man/mi:1.1612
--- src/distrib/sets/lists/man/mi:1.1611	Sat Aug 25 11:10:52 2018
+++ src/distrib/sets/lists/man/mi	Sat Aug 25 20:12:21 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1611 2018/08/25 11:10:52 martin Exp $
+# $NetBSD: mi,v 1.1612 2018/08/25 20:12:21 rin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1455,6 +1455,7 @@
 ./usr/share/man/cat4/mt2131.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mtd.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mtio.0			man-sys-catman		.cat
+./usr/share/man/cat4/mue.0			man-sys-catman		.cat
 ./usr/share/man/cat4/multicast.0		man-sys-catman		.cat
 ./usr/share/man/cat4/music.0			man-sys-catman		.cat
 ./usr/share/man/cat4/mvme68k/autoconf.0		man-sys-catman		.cat
@@ -4566,6 +4567,7 @@
 ./usr/share/man/html4/mt2131.html		man-sys-htmlman		html
 ./usr/share/man/html4/mtd.html			man-sys-htmlman		html
 ./usr/share/man/html4/mtio.html			man-sys-htmlman		html
+./usr/share/man/html4/mue.html			man-sys-htmlman		html
 ./usr/share/man/html4/multicast.html		man-sys-htmlman		html
 ./usr/share/man/html4/music.html		man-sys-htmlman		html
 ./usr/share/man/html4/mvme68k/autoconf.html	man-sys-htmlman		html
@@ -7527,6 +7529,7 @@
 ./usr/share/man/man4/mt2131.4			man-sys-man		.man
 ./usr/share/man/man4/mtd.4			man-sys-man		.man
 ./usr/share/man/man4/mtio.4			man-sys-man		.man
+./usr/share/man/man4/mue.4			man-sys-man		.man
 ./usr/share/man/man4/multicast.4		man-sys-man		.man
 ./usr/share/man/man4/music.4			man-sys-man		.man
 ./usr/share/man/man4/mvme68k/autoconf.4		man-sys-man		.man

Index: src/distrib/sets/lists/modules/mi
diff -u src/distrib/sets/lists/modules/mi:1.116 src/distrib/sets/lists/modules/mi:1.117
--- src/distrib/sets/lists/modules/mi:1.116	Sun May 20 14:08:33 2018
+++ src/distrib/sets/lists/modules/mi	Sat Aug 25 20:12:21 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.116 2018/05/20 14:08:33 thorpej Exp $
+# $NetBSD: mi,v 1.117 2018/08/25 20:12:21 rin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -166,6 +166,8 @@
 ./@MODULEDIR@/if_loop/if_loop.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/if_mplsbase-kernel-modules	kmod
 ./@MODULEDIR@/if_mpls/if_mpls.kmod		base-kernel-modules	kmod
+./@MODULEDIR@/if_muebase-kernel-modules	kmod
+./@MODULEDIR@/if_mue/if_mue.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/if_npflogbase-kernel-modules	kmod
 ./@MODULEDIR@/if_npflog/if_npflog.kmod		base-kernel-modules	kmod
 ./@MODULEDIR@/if_pppbase-kernel-modules	kmod

Index: src/share/man/man4/Makefile
diff -u src/share/man/man4/Makefile:1.664 src/share/man/man4/Makefile:1.665
--- src/share/man/man4/Makefile:1.664	Tue Aug 14 14:49:13 2018
+++ src/share/man/man4/Makefile	Sat Aug 25 20:12:21 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.664 2018/08/14 14:49:13 maxv Exp $
+#	$NetBSD: Makefile,v 1.665 2018/08/25 20:12:21 rin Exp $
 #	@(#)Makefile	8.1 (Berkeley) 6/18/93
 
 MAN=	aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -75,7 +75,8 @@ MAN=	aac.4 ac97.4 acardide.4 aceride.4 a
 	zero.4 zstty.4 zyd.4
 
 # USB devices
-MAN+=	atu.4 aubtfwl.4 aue.4 axe.4 axen.4 cdce.4 

CVS commit: src/games/fortune/datfiles

2018-08-25 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sat Aug 25 19:38:37 UTC 2018

Modified Files:
src/games/fortune/datfiles: fortunes2

Log Message:
typo


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/games/fortune/datfiles/fortunes2

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

Modified files:

Index: src/games/fortune/datfiles/fortunes2
diff -u src/games/fortune/datfiles/fortunes2:1.62 src/games/fortune/datfiles/fortunes2:1.63
--- src/games/fortune/datfiles/fortunes2:1.62	Wed Dec 13 21:11:27 2017
+++ src/games/fortune/datfiles/fortunes2	Sat Aug 25 19:38:37 2018
@@ -46642,7 +46642,7 @@ Whose limericks stopped at line two.
 
 There was a young man from Verdunne.
 
-	[Actually, there are three limericks in this series, the third one
+	[Actually, there are three limericks in this series; the third one
 	 is about some guy named Nero.  If anyone has a copy of it, please
 	 mail it to "fortune".  Ed.]
 %



CVS commit: src/bin/sh

2018-08-25 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Aug 25 17:35:31 UTC 2018

Modified Files:
src/bin/sh: sh.1

Log Message:
PR bin/48875

Add a paragraph (briefer than previously posted to mailing lists)
to explain that there is no guarantee that the results of a command
substitution will be available before all commands started by the
cmdsub have completed.

Include the original proposed text (much longer) as *roff comments, so
it will at least be available to those who browse the man page sources.

While here, clean up the existing text about command substitutions to
make it a little more accurate (and to advise against using the `` form).


To generate a diff of this commit:
cvs rdiff -u -r1.206 -r1.207 src/bin/sh/sh.1

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

Modified files:

Index: src/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.206 src/bin/sh/sh.1:1.207
--- src/bin/sh/sh.1:1.206	Thu May  3 05:11:43 2018
+++ src/bin/sh/sh.1	Sat Aug 25 17:35:31 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sh.1,v 1.206 2018/05/03 05:11:43 wiz Exp $
+.\"	$NetBSD: sh.1,v 1.207 2018/08/25 17:35:31 kre Exp $
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -1903,32 +1903,124 @@ has with
 .\"
 Command substitution allows the output of a command to be substituted in
 place of the command (and surrounding syntax).
-Command substitution occurs when the command is enclosed as follows:
+Command substitution occurs when a word contains
+a command list enclosed as follows:
 .Pp
-.Dl Ic $( Ns Ar command Ns Ic \&)
+.Dl Ic $( Ns Ar list Ns Ic \&)
 .Pp
-or
-.Po
-.Dq backquoted
-version
-.Pc :
-.Pp
-.Dl Ic \&` Ns Ar command Ns Ic \&`
-.Pp
-The shell expands the command substitution by executing command in a
-sub-shell environment and replacing the command substitution with the
-standard output of the command, removing sequences of one or more
+or the older
+.Pq Dq backquoted
+version, which is best avoided:
+.Pp
+.Dl Ic \&` Ns Ar list Ns Ns Ic \&`
+.Pp
+See the section
+.Sx Complex Commands
+above for the definition of
+.Ic list .
+.Pp
+The shell expands the command substitution by executing the
+.Ar list
+in a sub-shell environment and replacing the command substitution with the
+standard output of the
+.Ar list
+after removing any sequence of one or more
 .Ao newline Ac Ns s
-at the end of the substitution.
+from the end of the substitution.
 (Embedded
 .Ao newline Ac Ns s
 before
 the end of the output are not removed; however, during field splitting,
-they may be translated into
-.Ao space Ac Ns s ,
+they may be used to separate fields
+.Pq "as spaces usually are"
 depending on the value of
 .Ev IFS
 and any quoting that is in effect.)
+.Pp
+Note that if a command substitution includes commands
+to be run in the background,
+the sub-shell running those commands
+will only wait for them to complete if an appropriate
+.Ic wait
+command is included in the command list.
+However, the shell in which the result of the command substitution
+will be used will wait for both the sub-shell to exit and for the
+file descriptor that was initially standard output for the command
+substitution sub-shell to be closed.
+In some circumstances this might not happen until all processes
+started by the command substitution have finished.
+.\" While the exit of the sub-shell closes its standard output,
+.\" any background process left running may still
+.\" have that file descriptor open.
+.\" This includes yet another sub-shell which might have been
+.\" (almost invisibly) created to wait for some other command to complete,
+.\" and even where the background command has had its
+.\" standard output redirected or closed,
+.\" the waiting sub-shell may still have it open.
+.\" Thus there is no guarantee that the result of a command substitution
+.\" will be available in the shell which is to use it before all of
+.\" the commands started by the command substitution have completed,
+.\" though careful coding can often avoid delays beyond the termination
+.\" of the command substitution sub-shell.
+.\" .Pp
+.\" For example, assuming a script were to contain the following
+.\" code (which could be done better other ways, attempting
+.\" this kind of trickery is not recommended):
+.\" .Bd -literal -offset indent
+.\" if [ "$( printf "Ready? " >&2; read ans; printf "${ans}";
+.\"{ sleep 120 >/dev/null && kill $$ >/dev/null 2>&1; }& )" = go ]
+.\" then
+.\" 	printf Working...
+.\" 	# more code
+.\" fi
+.\" .Ed
+.\" .Pp
+.\" the
+.\" .Dq Working...
+.\" output will not be printed, and code that follows will never be executed.
+.\" Nor will anything later in the script
+.\" .Po
+.\" unless
+.\" .Dv SIGTERM
+.\" is trapped or ignored
+.\" .Pc .
+.\" .Pp
+.\" The intent is to prompt the user, wait for the user to
+.\" answer, then if the answer was
+.\" .Dq go
+.\" do the appropriate work, but set a 2 minute time limit
+.\" on 

CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 17:14:39 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: eval.c

Log Message:
Fix merge mishap due to #983 / #989 pullup order.


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.6 -r1.140.2.7 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.140.2.6 src/bin/sh/eval.c:1.140.2.7
--- src/bin/sh/eval.c:1.140.2.6	Sat Aug 25 14:48:22 2018
+++ src/bin/sh/eval.c	Sat Aug 25 17:14:38 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.140.2.6 2018/08/25 14:48:22 martin Exp $	*/
+/*	$NetBSD: eval.c,v 1.140.2.7 2018/08/25 17:14:38 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.140.2.6 2018/08/25 14:48:22 martin Exp $");
+__RCSID("$NetBSD: eval.c,v 1.140.2.7 2018/08/25 17:14:38 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1058,7 +1058,6 @@ evalcommand(union node *cmd, int flgs, s
 	switch (cmdentry.cmdtype) {
 	case CMDFUNCTION:
 		VXTRACE(DBG_EVAL, ("Shell function:  "), trargs(argv));
-		redirect(cmd->ncmd.redirect, flags & EV_MORE ? REDIR_PUSH : 0);
 		redirect(cmd->ncmd.redirect, REDIR_PUSH);
 		saveparam = shellparam;
 		shellparam.malloc = 0;



CVS commit: [netbsd-7] src/doc

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 17:07:03 UTC 2018

Modified Files:
src/doc [netbsd-7]: CHANGES-7.2

Log Message:
Ammend ticket #1632


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.106 -r1.1.2.107 src/doc/CHANGES-7.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-7.2
diff -u src/doc/CHANGES-7.2:1.1.2.106 src/doc/CHANGES-7.2:1.1.2.107
--- src/doc/CHANGES-7.2:1.1.2.106	Sat Aug 25 15:14:23 2018
+++ src/doc/CHANGES-7.2	Sat Aug 25 17:07:03 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.2,v 1.1.2.106 2018/08/25 15:14:23 martin Exp $
+# $NetBSD: CHANGES-7.2,v 1.1.2.107 2018/08/25 17:07:03 martin Exp $
 
 A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2
 release:
@@ -6013,6 +6013,7 @@ sys/dev/usb/ehcivar.h1.45 (patch)
 sys/dev/usb/motg.c1.22 (patch)
 sys/dev/usb/ohci.c1.282,1.283 (patch)
 sys/dev/usb/ohcivar.h1.60 (patch)
+sys/dev/usb/ugen.c(patch)
 sys/dev/usb/uhci.c1.281,1.282 (patch)
 sys/dev/usb/uhcivar.h1.55 (patch)
 sys/dev/usb/usbdi.c1.177 (patch)



CVS commit: [netbsd-7] src/sys/dev/usb

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 17:00:14 UTC 2018

Modified Files:
src/sys/dev/usb [netbsd-7]: ugen.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1632):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: 
file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.124.2.4 -r1.124.2.5 src/sys/dev/usb/ugen.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/usb/ugen.c
diff -u src/sys/dev/usb/ugen.c:1.124.2.4 src/sys/dev/usb/ugen.c:1.124.2.5
--- src/sys/dev/usb/ugen.c:1.124.2.4	Mon Feb 19 19:33:06 2018
+++ src/sys/dev/usb/ugen.c	Sat Aug 25 17:00:14 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ugen.c,v 1.124.2.4 2018/02/19 19:33:06 snj Exp $	*/
+/*	$NetBSD: ugen.c,v 1.124.2.5 2018/08/25 17:00:14 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.124.2.4 2018/02/19 19:33:06 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.124.2.5 

CVS commit: [netbsd-7] src/doc

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 15:14:23 UTC 2018

Modified Files:
src/doc [netbsd-7]: CHANGES-7.2

Log Message:
Tickets #1631 - #1634


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-7.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-7.2
diff -u src/doc/CHANGES-7.2:1.1.2.105 src/doc/CHANGES-7.2:1.1.2.106
--- src/doc/CHANGES-7.2:1.1.2.105	Tue Aug 14 14:35:23 2018
+++ src/doc/CHANGES-7.2	Sat Aug 25 15:14:23 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.2,v 1.1.2.105 2018/08/14 14:35:23 martin Exp $
+# $NetBSD: CHANGES-7.2,v 1.1.2.106 2018/08/25 15:14:23 martin Exp $
 
 A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2
 release:
@@ -6002,3 +6002,55 @@ sys/netinet6/frag6.c1.64
 	Ignore zero-sized fragments.
 	[maxv, ticket #1630]
 
+etc/powerd/scripts/sleep_button			1.11
+
+	Remove the stopping and starting of various network scripts on
+	sleep / resume.
+	[roy, ticket #1631]
+
+sys/dev/usb/ehci.c1.260,1.261 (patch)
+sys/dev/usb/ehcivar.h1.45 (patch)
+sys/dev/usb/motg.c1.22 (patch)
+sys/dev/usb/ohci.c1.282,1.283 (patch)
+sys/dev/usb/ohcivar.h1.60 (patch)
+sys/dev/usb/uhci.c1.281,1.282 (patch)
+sys/dev/usb/uhcivar.h1.55 (patch)
+sys/dev/usb/usbdi.c1.177 (patch)
+sys/dev/usb/usbdivar.h1.117 (patch)
+sys/dev/usb/xhci.c1.96 (patch)
+sys/dev/usb/xhcivar.h1.10 (patch)
+sys/external/bsd/dwc2/dwc2.c			1.52 (patch)
+
+	Move the struct usb_task to struct usbd_xfer for everyone to use
+	and various transfer/abort handling fixes.
+	Initialise the usb abort task in the HCI allocx routine, so that it
+	can be safely usb_rem_task()'d.
+	Rework the handling of softintr vs cancellation vs timeout abort.
+	[mrg, ticket #1632]
+
+external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.16
+external/bsd/dhcpcd/dist/src/dhcp.c up to 1.13
+external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.1.1.13
+external/bsd/dhcpcd/dist/src/if-bsd.c   up to 1.1.1.9
+external/bsd/dhcpcd/dist/src/if.c   up to 1.1.1.9
+external/bsd/dhcpcd/dist/src/ipv4.c up to 1.1.1.10
+external/bsd/dhcpcd/dist/src/ipv6.c up to 1.1.1.12
+doc/3RDPARTY	(manually edited)
+
+	Import dhcpcd-7.0.8.
+	[roy, ticket #1633]
+
+external/public-domain/tz/dist/Makefile up to 1.1.1.21
+external/public-domain/tz/dist/NEWS up to 1.1.1.22
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.12
+external/public-domain/tz/dist/africa   up to 1.1.1.15
+external/public-domain/tz/dist/asia up to 1.1.1.20
+external/public-domain/tz/dist/australasia  up to 1.1.1.15
+external/public-domain/tz/dist/europe   up to 1.1.1.21
+external/public-domain/tz/dist/theory.html  up to 1.1.1.4
+external/public-domain/tz/dist/version  up to 1.1.1.9
+external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.2
+doc/3RDPARTY	1.1520 (patch)
+
+	Import tzdata2018e
+	[kre, ticket #1634]



CVS commit: [netbsd-7] src

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 15:11:43 UTC 2018

Modified Files:
src/doc [netbsd-7]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-7]: Makefile NEWS
TZDATA_VERSION africa asia australasia europe theory.html version
ziguard.awk

Log Message:
Catch up to current for the following, requested by kre in ticket #1634:

external/public-domain/tz/dist/Makefile up to 1.1.1.21
external/public-domain/tz/dist/NEWS up to 1.1.1.22
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.12
external/public-domain/tz/dist/africa   up to 1.1.1.15
external/public-domain/tz/dist/asia up to 1.1.1.20
external/public-domain/tz/dist/australasia  up to 1.1.1.15
external/public-domain/tz/dist/europe   up to 1.1.1.21
external/public-domain/tz/dist/theory.html  up to 1.1.1.4
external/public-domain/tz/dist/version  up to 1.1.1.9
external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.2
doc/3RDPARTY1.1520 (patch)

Import tzdata2018e from ftp://ftp.iana.org/tz/releases/tzdata2018e.tar.gz

Summary of changes in tzdata2018e (2018-05-01 23:42:51 -0700):

News for the tz database

Release 2018e - 2018-05-01 23:42:51 -0700

North Korea switches back to +09 on 2018-05-05 (tomorrow!)


To generate a diff of this commit:
cvs rdiff -u -r1.1145.2.50 -r1.1145.2.51 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.1.4.9 -r1.1.1.1.4.10 \
src/external/public-domain/tz/dist/Makefile \
src/external/public-domain/tz/dist/asia \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.1.4.10 -r1.1.1.1.4.11 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.6.4.6 -r1.6.4.7 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.1.4.8 -r1.1.1.1.4.9 \
src/external/public-domain/tz/dist/africa \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.1.4.3 -r1.1.1.1.4.4 \
src/external/public-domain/tz/dist/theory.html
cvs rdiff -u -r1.1.1.3.4.6 -r1.1.1.3.4.7 \
src/external/public-domain/tz/dist/version
cvs rdiff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3 \
src/external/public-domain/tz/dist/ziguard.awk

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1145.2.50 src/doc/3RDPARTY:1.1145.2.51
--- src/doc/3RDPARTY:1.1145.2.50	Sat Aug 25 15:02:59 2018
+++ src/doc/3RDPARTY	Sat Aug 25 15:11:43 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1145.2.50 2018/08/25 15:02:59 martin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1145.2.51 2018/08/25 15:11:43 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1300,8 +1300,8 @@ Notes:
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2014j (+ upgraded zic) / tzdata2017d
-Current Vers:	tzcode2017d / tzdata2017d
+Version:	tzcode2014j (+ upgraded zic) / tzdata2018e
+Current Vers:	tzcode2018e / tzdata2018e
 Maintainer:	Paul Eggert 
 Archive Site:	ftp://ftp.iana.org/tz/releases/
 Archive Site:	ftp://munnari.oz.au/pub/oldtz/

Index: src/external/public-domain/tz/dist/Makefile
diff -u src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.9 src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.10
--- src/external/public-domain/tz/dist/Makefile:1.1.1.1.4.9	Sun Mar 25 14:06:32 2018
+++ src/external/public-domain/tz/dist/Makefile	Sat Aug 25 15:11:43 2018
@@ -21,7 +21,7 @@ DATAFORM=		main
 
 # Change the line below for your time zone (after finding the zone you want in
 # the time zone files, or adding it to a time zone file).
-# Alternately, if you discover you've got the wrong time zone, you can just
+# Alternatively, if you discover you've got the wrong time zone, you can just
 #	zic -l rightzone
 # to correct things.
 # Use the command
@@ -38,7 +38,7 @@ LOCALTIME=	GMT
 # template file are used to determine "spring forward" and "fall back" days and
 # times; the environment variable itself specifies UT offsets of standard and
 # daylight saving time.
-# Alternately, if you discover you've got the wrong time zone, you can just
+# Alternatively, if you discover you've got the wrong time zone, you can just
 #	zic -p rightzone
 # to correct things.
 # Use the command
@@ -236,14 +236,16 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fn
   $(GCC_INSTRUMENT) \
   -Wall -Wextra \
   -Walloc-size-larger-than=10 -Warray-bounds=2 \
-  -Wbad-function-cast -Wcast-align -Wdate-time \
+  -Wbad-function-cast -Wcast-align=strict -Wdate-time \
   -Wdeclaration-after-statement -Wdouble-promotion \
   -Wformat=2 -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation \
   -Winit-self -Wjump-misses-init -Wlogical-op \
   -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
   

CVS commit: [netbsd-7] src

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 15:03:00 UTC 2018

Modified Files:
src/doc [netbsd-7]: 3RDPARTY
src/external/bsd/dhcpcd/dist/src [netbsd-7]: defs.h dhcp.c dhcp6.c
if-bsd.c if.c ipv4.c ipv6.c

Log Message:
Sync to head the following, requested by roy in ticket #1633:

external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.16
external/bsd/dhcpcd/dist/src/dhcp.c up to 1.13
external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.1.1.13
external/bsd/dhcpcd/dist/src/if-bsd.c   up to 1.1.1.9
external/bsd/dhcpcd/dist/src/if.c   up to 1.1.1.9
external/bsd/dhcpcd/dist/src/ipv4.c up to 1.1.1.10
external/bsd/dhcpcd/dist/src/ipv6.c up to 1.1.1.12
doc/3RDPARTY(manually edited)

Import dhcpcd-7.0.8 with the following changes:
  *  Don't use IP_PKTINFO on NetBSD-7 as it's incomplete.
  *  Workaround RTM_NEWADDR sending the wrong broadcast address
 on NetBSD-7.
  *  Silence diagnostics if an address vanishes when reading
 it's flags on all BSD's.
  *  Misc compiler warnings fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.1145.2.49 -r1.1145.2.50 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.15.2.2 -r1.1.1.15.2.3 \
src/external/bsd/dhcpcd/dist/src/defs.h
cvs rdiff -u -r1.11.4.2 -r1.11.4.3 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.1.1.12.4.2 -r1.1.1.12.4.3 \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.1.1.8.4.2 -r1.1.1.8.4.3 \
src/external/bsd/dhcpcd/dist/src/if-bsd.c \
src/external/bsd/dhcpcd/dist/src/if.c
cvs rdiff -u -r1.1.1.9.4.2 -r1.1.1.9.4.3 \
src/external/bsd/dhcpcd/dist/src/ipv4.c
cvs rdiff -u -r1.1.1.11.2.2 -r1.1.1.11.2.3 \
src/external/bsd/dhcpcd/dist/src/ipv6.c

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1145.2.49 src/doc/3RDPARTY:1.1145.2.50
--- src/doc/3RDPARTY:1.1145.2.49	Fri Jul 27 10:43:18 2018
+++ src/doc/3RDPARTY	Sat Aug 25 15:02:59 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1145.2.49 2018/07/27 10:43:18 martin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1145.2.50 2018/08/25 15:02:59 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -305,8 +305,8 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	7.0.7
-Current Vers:	7.0.7
+Version:	7.0.8
+Current Vers:	7.0.8
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/external/bsd/dhcpcd/dist/src/defs.h
diff -u src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.15.2.2 src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.15.2.3
--- src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.15.2.2	Fri Jul 27 10:43:20 2018
+++ src/external/bsd/dhcpcd/dist/src/defs.h	Sat Aug 25 15:03:00 2018
@@ -28,7 +28,7 @@
 #define CONFIG_H
 
 #define PACKAGE			"dhcpcd"
-#define VERSION			"7.0.7"
+#define VERSION			"7.0.8"
 
 #ifndef CONFIG
 # define CONFIG			SYSCONFDIR "/" PACKAGE ".conf"

Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.2 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.3
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.11.4.2	Fri Jul 27 10:43:20 2018
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Sat Aug 25 15:03:00 2018
@@ -86,6 +86,11 @@
 #define IPDEFTTL 64 /* RFC1340 */
 #endif
 
+/* NetBSD-7 has an incomplete IP_PKTINFO implementation. */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 8
+#undef IP_PKTINFO
+#endif
+
 /* Assert the correct structure size for on wire */
 __CTASSERT(sizeof(struct ip)		== 20);
 __CTASSERT(sizeof(struct udphdr)	== 8);
@@ -3267,7 +3272,7 @@ get_udp_data(void *udp, size_t *len)
 	struct bootp_pkt *p;
 
 	p = (struct bootp_pkt *)udp;
-	*len = ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp);
+	*len = (size_t)ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp);
 	return (char *)udp + offsetof(struct bootp_pkt, bootp);
 }
 

Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.2 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.3
--- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.12.4.2	Fri Jul 27 10:43:20 2018
+++ src/external/bsd/dhcpcd/dist/src/dhcp6.c	Sat Aug 25 15:03:00 2018
@@ -777,7 +777,6 @@ dhcp6_makemessage(struct interface *ifp)
 		/* FALLTHROUGH */
 	case DH6S_INIT:
 		for (l = 0; l < ifo->ia_len; l++) {
-			ifia = >ia[l];
 			len += sizeof(o) + sizeof(uint32_t); /* IAID */
 			/* IA_TA does not have T1 or T2 timers */
 			if (ifo->ia[l].ia_type != D6_OPTION_IA_TA)

Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c
diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.1.1.8.4.2 

CVS commit: [netbsd-7] src/sys

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:57:35 UTC 2018

Modified Files:
src/sys/dev/usb [netbsd-7]: ehci.c ehcivar.h motg.c ohci.c ohcivar.h
uhci.c uhcivar.h usbdi.c usbdivar.h xhci.c xhcivar.h
src/sys/external/bsd/dwc2 [netbsd-7]: dwc2.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1632):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.

among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: 
file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.228.2.2 -r1.228.2.3 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.42.12.1 -r1.42.12.2 src/sys/dev/usb/ehcivar.h
cvs rdiff -u -r1.6.4.4 -r1.6.4.5 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.253.2.4 -r1.253.2.5 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/dev/usb/ohcivar.h
cvs rdiff -u -r1.264.2.3 -r1.264.2.4 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.52.12.1 -r1.52.12.2 src/sys/dev/usb/uhcivar.h
cvs rdiff -u -r1.161.2.2 -r1.161.2.3 src/sys/dev/usb/usbdi.c
cvs rdiff -u -r1.107.4.2 -r1.107.4.3 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.23.2.7 -r1.23.2.8 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.4.8.1 

CVS commit: [netbsd-7] src/etc/powerd/scripts

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:54:18 UTC 2018

Modified Files:
src/etc/powerd/scripts [netbsd-7]: sleep_button

Log Message:
Pull up following revision(s) (requested by roy in ticket #1631):

etc/powerd/scripts/sleep_button: revision 1.11

Remove the stopping and starting of various network scripts on
sleep / resume.

This should no longer be needed now the various applications
(dhcpcd, ntpd, wpa_supplicant et all) are more aware to the network state
as all interface carriers should be brought down and up again.

Fixes PR misc/52397.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.22.1 src/etc/powerd/scripts/sleep_button

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

Modified files:

Index: src/etc/powerd/scripts/sleep_button
diff -u src/etc/powerd/scripts/sleep_button:1.10 src/etc/powerd/scripts/sleep_button:1.10.22.1
--- src/etc/powerd/scripts/sleep_button:1.10	Mon Oct 17 23:27:41 2011
+++ src/etc/powerd/scripts/sleep_button	Sat Aug 25 14:54:18 2018
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-#	$NetBSD: sleep_button,v 1.10 2011/10/17 23:27:41 jmcneill Exp $
+#	$NetBSD: sleep_button,v 1.10.22.1 2018/08/25 14:54:18 martin Exp $
 #
 # Generic script for sleep button events.
 #
@@ -10,13 +10,6 @@
 
 case "${2}" in
 pressed)
-
-	/etc/rc.d/bluetooth stop
-	/etc/rc.d/ntpd stop
-	/etc/rc.d/dhclient stop
-	/etc/rc.d/network stop
-	/etc/rc.d/wpa_supplicant stop
-
 	if /sbin/sysctl -q hw.acpi.sleep.state; then
 		/sbin/sysctl -w hw.acpi.sleep.state=3
 	elif /sbin/sysctl -q machdep.xen.suspend; then
@@ -31,13 +24,6 @@ pressed)
 		# ... waking up
 		sleep 1
 	fi
-
-	/etc/rc.d/wpa_supplicant start
-	/etc/rc.d/network start
-	/etc/rc.d/dhclient start
-	/etc/rc.d/ntpdate start
-	/etc/rc.d/ntpd start
-	/etc/rc.d/bluetooth start
 	;;
 
 released)



CVS commit: [netbsd-8] src/doc

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:50:21 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Tickets #977, #978, #981 - #989


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/doc/CHANGES-8.1

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-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.12 src/doc/CHANGES-8.1:1.1.2.13
--- src/doc/CHANGES-8.1:1.1.2.12	Wed Aug 15 12:16:31 2018
+++ src/doc/CHANGES-8.1	Sat Aug 25 14:50:21 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.12 2018/08/15 12:16:31 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.13 2018/08/25 14:50:21 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -509,3 +509,105 @@ sbin/route/route.c1.160
 	about it other than the type and length.
 	[roy, ticket #976]
 
+sys/compat/netbsd32/netbsd32.h			1.119
+sys/compat/netbsd32/netbsd32_fs.c		1.81
+
+	Support nullfs in netbsd32.
+	[mrg, ticket #977]
+
+dist/pf/share/man/man4/pf.4			1.13
+dist/pf/share/man/man4/pflog.4			1.7
+dist/pf/share/man/man4/pfsync.4			1.7
+dist/pf/share/man/man5/pf.conf.5		1.17
+dist/pf/share/man/man5/pf.os.5			1.7
+
+	Add a deprecation note in each of the PF man pages,
+	and note it is obsolete.
+	[maxv, ticket #978]
+
+sys/dev/usb/ehci.c1.260,1.261 (patch)
+sys/dev/usb/ehcivar.h1.45 (patch)
+sys/dev/usb/motg.c1.22 (patch)
+sys/dev/usb/ohci.c1.282,1.283 (patch)
+sys/dev/usb/ohcivar.h1.60 (patch)
+sys/dev/usb/uhci.c1.281,1.282 (patch)
+sys/dev/usb/uhcivar.h1.55 (patch)
+sys/dev/usb/usbdi.c1.177 (patch)
+sys/dev/usb/usbdivar.h1.117 (patch)
+sys/dev/usb/xhci.c1.96 (patch)
+sys/dev/usb/xhcivar.h1.10 (patch)
+sys/external/bsd/dwc2/dwc2.c			1.52 (patch)
+
+	Move the struct usb_task to struct usbd_xfer for everyone to use
+	and various transfer/abort handling fixes.
+	Initialise the usb abort task in the HCI allocx routine, so that it
+	can be safely usb_rem_task()'d.
+	Rework the handling of softintr vs cancellation vs timeout abort.
+	[mrg, ticket #980]
+
+external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.16
+external/bsd/dhcpcd/dist/src/dhcp.c up to 1.13
+external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.1.1.13
+external/bsd/dhcpcd/dist/src/if-bsd.c   up to 1.1.1.9
+external/bsd/dhcpcd/dist/src/if.c   up to 1.1.1.9
+external/bsd/dhcpcd/dist/src/ipv4.c up to 1.1.1.10
+external/bsd/dhcpcd/dist/src/ipv6.c up to 1.1.1.12
+doc/3RDPARTY	(manually edited)
+
+	Import dhcpcd-7.0.8.
+	[roy, ticket #981]
+
+bin/sh/eval.c	1.157
+
+	Fix "command not found" handling so that the error message
+	goes to stderr (after any redirections are applied).
+	[kre, ticket #982]
+
+bin/sh/eval.c	1.158
+bin/sh/eval.h	1.21
+bin/sh/main.c	1.74
+
+	Back out eval.c rev 1.125 which tried to fix a redirection
+	bug but was incorrect and caused other fallout.
+	[kre, ticket #983]
+
+sys/arch/xen/xen/xbd_xenbus.c			1.83
+
+	Avoid a race condition between I/O submission in xbd_diskstart() and
+	interrupt handling in xbd_handler().
+	[jdolecek, ticket #984]
+
+crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc 1.2,1.3
+
+	Sync compiler flags between genereation of ghash-x86.S and
+	compilation of gcm128.c.
+	[manu, ticket #985]
+
+sys/netipsec/key.c1.257
+
+	Don't call key_ismyaddr, which may sleep, in a pserialize read
+	section.
+	[ozaki-r, ticket #986]
+
+bin/sh/trap.c	1.44
+
+	Fix a potential race in handling of the trap[] strings.
+	[kre, ticket #987]
+
+bin/sh/histedit.c1.53
+bin/sh/mystring.c1.18
+bin/sh/options.c1.53
+bin/sh/parser.c	1.147
+bin/sh/var.c	1.70
+
+	Remove atoi().
+	Always init OPTIND to 1 when sh starts.
+	[kre, ticket #988]
+
+bin/sh/eval.c	1.156
+bin/sh/eval.h	1.20
+bin/sh/exec.c	1.53
+
+	Fix several bugs in the command / type builtin.
+	[kre, ticket #989]
+



CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:48:22 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: eval.c eval.h exec.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #989):

bin/sh/eval.c: revision 1.156
bin/sh/eval.h: revision 1.20
bin/sh/exec.c: revision 1.53

Fix several bugs in the command / type builtin ( including PR bin/48499 )

1. Make command -pv (and -pV) work (which is not as easy as the PR
   suggests it might be (the "check and cause error" was there because
   it did not work, not in order to prevent it from working).

2. Stop -v and -V being both used (that makes no sense).

3. Stop the "type" builtin inheriting the args (-pvV) that "command" has
   (which it did, as when -v -or -V is used with command, it and type are
implemented using the same code).

4. make "command -v word" DTRT for sh keywords (was treating them as an error).

5. Require at least one arg for "command -[vV]" or "type" else usage & error.
   Strictly this should also apply to "command" and "command -p" (no -v)
   but that's handled elsewhere, so perhaps some other time.   Perhaps
   "command -v" (and -V) should be limited to 1 command name (where "type"
   can have many) as in the POSIX definitions, but I don't think that matters.

6. With "command -V alias", (or "type alias" which is the same thing),
   (but not "command -v alias") alter the output format, so we get
ll is an alias for: ls -al
   instead of the old
ll is an alias for
ls -al
   (and note there was a space, for some reason, after "for")
   That is, unless the alias value contains any \n characters, in which
   case (something approximating) the old multi-line format is retained.
   Also note: that if code wants to parse/use the value of an alias, it
   should be using the output of "alias name", not command or type.

Note that none of the above affects "command [-p] cmd" (no -v or -V options)
only "command -[vV]" and "type".

Note also that the changes to eval.[ch] are merely to make syspath()
visible in exec.c rather than static in eval.c


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.5 -r1.140.2.6 src/bin/sh/eval.c
cvs rdiff -u -r1.19.8.1 -r1.19.8.2 src/bin/sh/eval.h
cvs rdiff -u -r1.47.2.3 -r1.47.2.4 src/bin/sh/exec.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.140.2.5 src/bin/sh/eval.c:1.140.2.6
--- src/bin/sh/eval.c:1.140.2.5	Sat Aug 25 14:22:49 2018
+++ src/bin/sh/eval.c	Sat Aug 25 14:48:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.140.2.5 2018/08/25 14:22:49 martin Exp $	*/
+/*	$NetBSD: eval.c,v 1.140.2.6 2018/08/25 14:48:22 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.140.2.5 2018/08/25 14:22:49 martin Exp $");
+__RCSID("$NetBSD: eval.c,v 1.140.2.6 2018/08/25 14:48:22 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -696,7 +696,7 @@ evalbackcmd(union node *n, struct backcm
 		result->fd, result->buf, result->nleft, result->jp));
 }
 
-static const char *
+const char *
 syspath(void)
 {
 	static char *sys_path = NULL;

Index: src/bin/sh/eval.h
diff -u src/bin/sh/eval.h:1.19.8.1 src/bin/sh/eval.h:1.19.8.2
--- src/bin/sh/eval.h:1.19.8.1	Sat Aug 25 14:22:49 2018
+++ src/bin/sh/eval.h	Sat Aug 25 14:48:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.h,v 1.19.8.1 2018/08/25 14:22:49 martin Exp $	*/
+/*	$NetBSD: eval.h,v 1.19.8.2 2018/08/25 14:48:22 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -52,6 +52,8 @@ union node;	/* BLETCH for ansi C */
 void evaltree(union node *, int);
 void evalbackcmd(union node *, struct backcmd *);
 
+const char *syspath(void);
+
 /* in_function returns nonzero if we are currently evaluating a function */
 int in_function(void);		/* return non-zero, if evaluating a function */
 

Index: src/bin/sh/exec.c
diff -u src/bin/sh/exec.c:1.47.2.3 src/bin/sh/exec.c:1.47.2.4
--- src/bin/sh/exec.c:1.47.2.3	Fri Jul 13 14:29:15 2018
+++ src/bin/sh/exec.c	Sat Aug 25 14:48:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.c,v 1.47.2.3 2018/07/13 14:29:15 martin Exp $	*/
+/*	$NetBSD: exec.c,v 1.47.2.4 2018/08/25 14:48:22 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)exec.c	8.4 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: exec.c,v 1.47.2.3 2018/07/13 14:29:15 martin Exp $");
+__RCSID("$NetBSD: exec.c,v 1.47.2.4 2018/08/25 14:48:22 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1064,8 +1064,15 @@ typecmd(int argc, char **argv)
 		}
 	}
 
-	if (p_flag && (v_flag || V_flag))
-		error("cannot specify -p with -v or -V");
+	if (argv[0][0] != 'c' && v_flag | V_flag | p_flag)
+		error("usage: %s name...", argv[0]);
+
+	if (v_flag && V_flag)
+		error("-v and -V cannot both be specified");
+
+	if 

CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:45:37 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: histedit.c mystring.c options.c parser.c var.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #988):

bin/sh/parser.c: revision 1.147
bin/sh/var.c: revision 1.70
bin/sh/mystring.c: revision 1.18
bin/sh/options.c: revision 1.53
bin/sh/histedit.c: revision 1.53

Remove atoi()

Mostly use number() (no longer implemented using atoi()) when an
unsigned integer is required, but use strtoXXX() when a conversion
is wanted, without the possibility or error (like setting OPTIND
and RANDOM).   Always init OPTIND to 1 when sh starts (overriding
anything in environ.)


To generate a diff of this commit:
cvs rdiff -u -r1.48.8.1 -r1.48.8.2 src/bin/sh/histedit.c
cvs rdiff -u -r1.17 -r1.17.22.1 src/bin/sh/mystring.c
cvs rdiff -u -r1.49 -r1.49.2.1 src/bin/sh/options.c
cvs rdiff -u -r1.132.2.4 -r1.132.2.5 src/bin/sh/parser.c
cvs rdiff -u -r1.55.2.2 -r1.55.2.3 src/bin/sh/var.c

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

Modified files:

Index: src/bin/sh/histedit.c
diff -u src/bin/sh/histedit.c:1.48.8.1 src/bin/sh/histedit.c:1.48.8.2
--- src/bin/sh/histedit.c:1.48.8.1	Sun Jul 23 14:58:14 2017
+++ src/bin/sh/histedit.c	Sat Aug 25 14:45:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: histedit.c,v 1.48.8.1 2017/07/23 14:58:14 snj Exp $	*/
+/*	$NetBSD: histedit.c,v 1.48.8.2 2018/08/25 14:45:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)histedit.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: histedit.c,v 1.48.8.1 2017/07/23 14:58:14 snj Exp $");
+__RCSID("$NetBSD: histedit.c,v 1.48.8.2 2018/08/25 14:45:37 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -210,8 +210,8 @@ sethistsize(const char *hs)
 	HistEvent he;
 
 	if (hist != NULL) {
-		if (hs == NULL || *hs == '\0' ||
-		   (histsize = atoi(hs)) < 0)
+		if (hs == NULL || *hs == '\0' || *hs == '-' ||
+		   (histsize = number(hs)) < 0)
 			histsize = 100;
 		history(hist, , H_SETSIZE, histsize);
 		history(hist, , H_SETUNIQUE, 1);
@@ -529,7 +529,7 @@ str_to_event(const char *str, int last)
 		s++;
 	}
 	if (is_number(s)) {
-		i = atoi(s);
+		i = number(s);
 		if (relative) {
 			while (retval != -1 && i--) {
 retval = history(hist, , H_NEXT);

Index: src/bin/sh/mystring.c
diff -u src/bin/sh/mystring.c:1.17 src/bin/sh/mystring.c:1.17.22.1
--- src/bin/sh/mystring.c:1.17	Sun Apr 28 17:01:28 2013
+++ src/bin/sh/mystring.c	Sat Aug 25 14:45:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: mystring.c,v 1.17 2013/04/28 17:01:28 dholland Exp $	*/
+/*	$NetBSD: mystring.c,v 1.17.22.1 2018/08/25 14:45:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)mystring.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: mystring.c,v 1.17 2013/04/28 17:01:28 dholland Exp $");
+__RCSID("$NetBSD: mystring.c,v 1.17.22.1 2018/08/25 14:45:37 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -51,6 +51,8 @@ __RCSID("$NetBSD: mystring.c,v 1.17 2013
  *	is_number(s)		Return true if s is a string of digits.
  */
 
+#include 
+#include 
 #include 
 #include "shell.h"
 #include "syntax.h"
@@ -110,10 +112,15 @@ prefix(const char *pfx, const char *stri
 int
 number(const char *s)
 {
+	char *ep = NULL;
+	intmax_t n;
 
-	if (! is_number(s))
-		error("Illegal number: %s", s);
-	return atoi(s);
+	if (!is_digit(*s) || ((n = strtoimax(s, , 10)), 
+	(ep == NULL || ep == s || *ep != '\0')))
+		error("Illegal number: '%s'", s);
+	if (n < INT_MIN || n > INT_MAX)
+		error("Number out of range: %s", s);
+	return (int)n;
 }
 
 

Index: src/bin/sh/options.c
diff -u src/bin/sh/options.c:1.49 src/bin/sh/options.c:1.49.2.1
--- src/bin/sh/options.c:1.49	Mon May 29 14:03:23 2017
+++ src/bin/sh/options.c	Sat Aug 25 14:45:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.49 2017/05/29 14:03:23 kre Exp $	*/
+/*	$NetBSD: options.c,v 1.49.2.1 2018/08/25 14:45:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c	8.2 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: options.c,v 1.49 2017/05/29 14:03:23 kre Exp $");
+__RCSID("$NetBSD: options.c,v 1.49.2.1 2018/08/25 14:45:37 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -60,6 +60,7 @@ __RCSID("$NetBSD: options.c,v 1.49 2017/
 #include "memalloc.h"
 #include "error.h"
 #include "mystring.h"
+#include "syntax.h"
 #ifndef SMALL
 #include "myhistedit.h"
 #endif
@@ -444,7 +445,12 @@ setcmd(int argc, char **argv)
 void
 getoptsreset(const char *value)
 {
-	if (number(value) == 1) {
+	/*
+	 * This is just to detect the case where OPTIND=1
+	 * is executed.   Any other string assigned to OPTIND
+	 * is OK, but is not a reset.   No errors, so cannot use number()
+	 */
+	if (is_digit(*value) && strtol(value, NULL, 10) == 1) {
 		shellparam.optnext = NULL;
 		

CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:41:22 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: trap.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #987):

bin/sh/trap.c: revision 1.44

PR bin/36532 (perhaps)

This is more or less the same patch as provided in the PR
(just 11 years later, so changed a bit) by woods@...

Since there is no known way to actually cause the reported crash,
we may never know if this change actually fixes anything.   But
even if it doesn't it certainly cannot hurt.

There is a potential race which could possibly explain the issue
(see commentary in the PR) which is not easy to avoid - if that is
the actual cause, this should provide a defence, if not really a fix.


To generate a diff of this commit:
cvs rdiff -u -r1.40.2.1 -r1.40.2.2 src/bin/sh/trap.c

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

Modified files:

Index: src/bin/sh/trap.c
diff -u src/bin/sh/trap.c:1.40.2.1 src/bin/sh/trap.c:1.40.2.2
--- src/bin/sh/trap.c:1.40.2.1	Sun Jul 23 14:58:14 2017
+++ src/bin/sh/trap.c	Sat Aug 25 14:41:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.40.2.1 2017/07/23 14:58:14 snj Exp $	*/
+/*	$NetBSD: trap.c,v 1.40.2.2 2018/08/25 14:41:21 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)trap.c	8.5 (Berkeley) 6/5/95";
 #else
-__RCSID("$NetBSD: trap.c,v 1.40.2.1 2017/07/23 14:58:14 snj Exp $");
+__RCSID("$NetBSD: trap.c,v 1.40.2.2 2018/08/25 14:41:21 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -523,9 +523,11 @@ dotrap(void)
 		savestatus=exitstatus;
 		CTRACE(DBG_TRAP|DBG_SIG, ("dotrap %d: \"%s\"\n", i,
 		trap[i] ? trap[i] : "-NULL-"));
-		tr = savestr(trap[i]);		/* trap code may free trap[i] */
-		evalstring(tr, 0);
-		ckfree(tr);
+		if ((tr = trap[i]) != NULL) {
+			tr = savestr(tr);	/* trap code may free trap[i] */
+			evalstring(tr, 0);
+			ckfree(tr);
+		}
 		exitstatus=savestatus;
 	}
 }



CVS commit: [netbsd-8] src/sys/netipsec

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:35:22 UTC 2018

Modified Files:
src/sys/netipsec [netbsd-8]: key.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #986):

sys/netipsec/key.c: revision 1.257

Don't call key_ismyaddr, which may sleep, in a pserialize read section

Use mutex here instead of pserialize because using mutex is simpler than
using psz+ref, which is another solution, and key_checkspidup isn't called in
any performance-sensitive paths.


To generate a diff of this commit:
cvs rdiff -u -r1.163.2.9 -r1.163.2.10 src/sys/netipsec/key.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/netipsec/key.c
diff -u src/sys/netipsec/key.c:1.163.2.9 src/sys/netipsec/key.c:1.163.2.10
--- src/sys/netipsec/key.c:1.163.2.9	Wed Apr 18 14:06:24 2018
+++ src/sys/netipsec/key.c	Sat Aug 25 14:35:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.163.2.9 2018/04/18 14:06:24 martin Exp $	*/
+/*	$NetBSD: key.c,v 1.163.2.10 2018/08/25 14:35:21 martin Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.163.2.9 2018/04/18 14:06:24 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.163.2.10 2018/08/25 14:35:21 martin Exp $");
 
 /*
  * This code is referred to RFC 2367
@@ -3458,7 +3458,6 @@ key_checkspidup(const struct secasindex 
 {
 	struct secashead *sah;
 	struct secasvar *sav;
-	int s;
 
 	/* check address family */
 	if (saidx->src.sa.sa_family != saidx->dst.sa.sa_family) {
@@ -3467,18 +3466,19 @@ key_checkspidup(const struct secasindex 
 	}
 
 	/* check all SAD */
-	s = pserialize_read_enter();
-	SAHLIST_READER_FOREACH(sah) {
+	/* key_ismyaddr may sleep, so use mutex, not pserialize, here. */
+	mutex_enter(_sad.lock);
+	SAHLIST_WRITER_FOREACH(sah) {
 		if (!key_ismyaddr((struct sockaddr *)>saidx.dst))
 			continue;
 		sav = key_getsavbyspi(sah, spi);
 		if (sav != NULL) {
-			pserialize_read_exit(s);
 			KEY_SA_UNREF();
+			mutex_exit(_sad.lock);
 			return true;
 		}
 	}
-	pserialize_read_exit(s);
+	mutex_exit(_sad.lock);
 
 	return false;
 }



CVS commit: [netbsd-8] src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:33:04 UTC 2018

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386 [netbsd-8]:
modes.inc

Log Message:
Pull up following revision(s) (requested by manu in ticket #985):

crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc: revision 
1.2
crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc: revision 
1.3

Add missing defines:
https://github.com/openssl/openssl/pull/6828

When ghash-x86.S is generated with -DOPENSSL_IA32_SSE2 we need to
compile
gcm128.c with the same flags.

Reported by manu@

remove -DGHASH_ASM_X86; it is already defined.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.8.1 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc:1.1.8.1
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc:1.1	Sat May 16 17:32:54 2015
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/i386/modes.inc	Sat Aug 25 14:33:04 2018
@@ -1,4 +1,5 @@
 .PATH.S: ${.PARSEDIR}
 MODES_SRCS += ghash-x86.o
-MODESCPPFLAGS = -DGHASH_ASM
+MODESCPPFLAGS = -DGHASH_ASM -DOPENSSL_IA32_SSE2
+
 .include "../../modes.inc"



CVS commit: [netbsd-8] src/sys/arch/xen/xen

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:28:00 UTC 2018

Modified Files:
src/sys/arch/xen/xen [netbsd-8]: xbd_xenbus.c

Log Message:
Pull up following revision(s) (requested by jdolecek in ticket #984):

sys/arch/xen/xen/xbd_xenbus.c: revision 1.83

avoid race condition between I/O submission in xbd_diskstart() and
interrupt handling in xbd_handler() - need to protect it with splbio()

fixes PR port-xen/53506 by Emmanuel Dreyfus, and likely also port-xen/53074
by Brad Spencer


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.76.6.1 src/sys/arch/xen/xen/xbd_xenbus.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/xen/xen/xbd_xenbus.c
diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.76 src/sys/arch/xen/xen/xbd_xenbus.c:1.76.6.1
--- src/sys/arch/xen/xen/xbd_xenbus.c:1.76	Sun Mar  5 23:07:12 2017
+++ src/sys/arch/xen/xen/xbd_xenbus.c	Sat Aug 25 14:28:00 2018
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbd_xenbus.c,v 1.76 2017/03/05 23:07:12 mlelstv Exp $  */
+/*  $NetBSD: xbd_xenbus.c,v 1.76.6.1 2018/08/25 14:28:00 martin Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -50,7 +50,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.76 2017/03/05 23:07:12 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.76.6.1 2018/08/25 14:28:00 martin Exp $");
 
 #include "opt_xen.h"
 
@@ -916,6 +916,7 @@ xbd_diskstart(device_t self, struct buf 
 	vaddr_t va;
 	int nsects, nbytes, seg;
 	int notify, error = 0;
+	int s;
 
 	DPRINTF(("xbd_diskstart(%p): b_bcount = %ld\n",
 	bp, (long)bp->b_bcount));
@@ -931,6 +932,8 @@ xbd_diskstart(device_t self, struct buf 
 		goto err;
 	}
 
+	s = splbio();	/* XXX SMP */
+
 	if (__predict_false(
 	sc->sc_backend_status == BLKIF_STATE_SUSPENDED)) {
 		/* device is suspended, do not consume buffer */
@@ -1008,6 +1011,7 @@ out:
 	RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(>sc_ring, notify);
 	if (notify)
 		hypervisor_notify_via_evtchn(sc->sc_evtchn);
+	splx(s);	/* XXXSMP */
 err:
 	return error;
 }



CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 14:22:50 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: eval.c eval.h main.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #983):

bin/sh/eval.c: revision 1.158
bin/sh/eval.h: revision 1.21
bin/sh/main.c: revision 1.74

PR bin/48875

Revert the changes that were made 19 May 2016 (principally eval.c 1.125)
and the bug fixes in subsequent days (eval.c 1.126 and 1.127) and also
update some newer code that was added more recently which acted in
accordance with those changes (make that code be as it would have been
if the changes now being reverted had never been made).

While the changes made did solve the problem, in a sense, they were
never correct (see the PR for some discussion) and it had always been
intended that they be reverted.   However, in practical sh code, no
issues were reported - until just recently - so nothing was done,
until now...

After this commit, the validate_fn_redirects test case of the sh ATF
test t_redir will fail.   In particular, the subtest of that test
case which is described in the source (of the test) as:

This one is the real test for PR bin/48875

will fail.

Alternative changes, not to "fix" the problem in the PR, but to
often avoid it will be coming very soon - after which that ATF
test will succeed again.

XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.4 -r1.140.2.5 src/bin/sh/eval.c
cvs rdiff -u -r1.19 -r1.19.8.1 src/bin/sh/eval.h
cvs rdiff -u -r1.70.2.1 -r1.70.2.2 src/bin/sh/main.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.140.2.4 src/bin/sh/eval.c:1.140.2.5
--- src/bin/sh/eval.c:1.140.2.4	Sat Aug 25 11:45:40 2018
+++ src/bin/sh/eval.c	Sat Aug 25 14:22:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.140.2.4 2018/08/25 11:45:40 martin Exp $	*/
+/*	$NetBSD: eval.c,v 1.140.2.5 2018/08/25 14:22:49 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.140.2.4 2018/08/25 11:45:40 martin Exp $");
+__RCSID("$NetBSD: eval.c,v 1.140.2.5 2018/08/25 14:22:49 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -221,7 +221,7 @@ evalstring(char *s, int flag)
 	while ((n = parsecmd(0)) != NEOF) {
 		XTRACE(DBG_EVAL, ("evalstring: "), showtree(n));
 		if (n && nflag == 0)
-			evaltree(n, flag | EV_MORE);
+			evaltree(n, flag);
 		popstackmark();
 	}
 	popfile();
@@ -256,20 +256,19 @@ evaltree(union node *n, int flags)
 	getpid(), n, NODETYPENAME(n->type), n->type, flags));
 	switch (n->type) {
 	case NSEMI:
-		evaltree(n->nbinary.ch1, (sflags & EV_TESTED) |
-		(n->nbinary.ch2 ? EV_MORE : 0));
+		evaltree(n->nbinary.ch1, flags & EV_TESTED);
 		if (nflag || evalskip)
 			goto out;
 		evaltree(n->nbinary.ch2, flags);
 		break;
 	case NAND:
-		evaltree(n->nbinary.ch1, EV_TESTED | EV_MORE);
+		evaltree(n->nbinary.ch1, EV_TESTED);
 		if (nflag || evalskip || exitstatus != 0)
 			goto out;
 		evaltree(n->nbinary.ch2, flags);
 		break;
 	case NOR:
-		evaltree(n->nbinary.ch1, EV_TESTED | EV_MORE);
+		evaltree(n->nbinary.ch1, EV_TESTED);
 		if (nflag || evalskip || exitstatus == 0)
 			goto out;
 		evaltree(n->nbinary.ch2, flags);
@@ -296,14 +295,14 @@ evaltree(union node *n, int flags)
 		}
 		break;
 	case NSUBSHELL:
-		evalsubshell(n, flags & ~EV_MORE);
+		evalsubshell(n, flags);
 		do_etest = !(flags & EV_TESTED);
 		break;
 	case NBACKGND:
-		evalsubshell(n, flags & ~EV_MORE);
+		evalsubshell(n, flags);
 		break;
 	case NIF: {
-		evaltree(n->nif.test, EV_TESTED | EV_MORE);
+		evaltree(n->nif.test, EV_TESTED);
 		if (nflag || evalskip)
 			goto out;
 		if (exitstatus == 0)
@@ -331,11 +330,11 @@ evaltree(union node *n, int flags)
 		exitstatus = 0;
 		break;
 	case NNOT:
-		evaltree(n->nnot.com, (sflags & EV_MORE) | EV_TESTED);
+		evaltree(n->nnot.com, EV_TESTED);
 		exitstatus = !exitstatus;
 		break;
 	case NDNOT:
-		evaltree(n->nnot.com, (sflags & EV_MORE) | EV_TESTED);
+		evaltree(n->nnot.com, EV_TESTED);
 		if (exitstatus != 0)
 			exitstatus = 1;
 		break;
@@ -379,7 +378,7 @@ evalloop(union node *n, int flags)
 	CTRACE(DBG_EVAL,  ("\n"));
 
 	for (;;) {
-		evaltree(n->nbinary.ch1, EV_TESTED | EV_MORE);
+		evaltree(n->nbinary.ch1, EV_TESTED);
 		if (nflag)
 			break;
 		if (evalskip) {
@@ -398,7 +397,7 @@ evalloop(union node *n, int flags)
 			if (exitstatus == 0)
 break;
 		}
-		evaltree(n->nbinary.ch2, (flags & EV_TESTED) | EV_MORE);
+		evaltree(n->nbinary.ch2, flags & EV_TESTED);
 		status = exitstatus;
 		if (evalskip)
 			goto skipping;
@@ -431,11 +430,6 @@ evalfor(union node *n, int flags)
 
 	loopnest++;
 	for (sp = arglist.list ; sp ; sp = sp->next) {
-		int f = flags & (EV_TESTED | EV_MORE);
-
-		if (sp->next)
-			f |= EV_MORE;
-
 		if (xflag) {
 			

CVS commit: [netbsd-8] src/bin/sh

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:45:40 UTC 2018

Modified Files:
src/bin/sh [netbsd-8]: eval.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #982):

bin/sh/eval.c: revision 1.157

PR bin/42184 PR bin/52687  (detailing the same bug).

Fix "command not found" handling so that the error message
goes to stderr (after any redirections are applied).

More importantly, in

foo > /tmp/junk

/tmp/junk should be created, before any attempt is made
to execute (the assumed non-existing) "foo".

All this was always true for any command (not found command)
containing a / in its name

foo/bar >/tmp/junk  2>>/tmp/errs

would have created /tmp/junk, then complained (in /tmp/errs)
about foo/bar not being found.   Now that happens for ordinary
commands as well.

The fix (which I found when I saw differences between our
code and FreeBSD's, where, for the benefit of PR 42184,
this has been fixed, sometime in the past 9 years) is
frighteningly simple.   Simply do not short circuit execution
(or print any error) when the initial lookup fails to
find the command - it will fail anyway when we actually
try running it.   The cost is a (seemingly unnecessary,
except that it really is) fork in this case.

This is what I had been planning, but I expected it would
be much more difficult than it turned out

XXX pullup-8


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.3 -r1.140.2.4 src/bin/sh/eval.c

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

Modified files:

Index: src/bin/sh/eval.c
diff -u src/bin/sh/eval.c:1.140.2.3 src/bin/sh/eval.c:1.140.2.4
--- src/bin/sh/eval.c:1.140.2.3	Fri Jul 13 14:29:15 2018
+++ src/bin/sh/eval.c	Sat Aug 25 11:45:40 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: eval.c,v 1.140.2.3 2018/07/13 14:29:15 martin Exp $	*/
+/*	$NetBSD: eval.c,v 1.140.2.4 2018/08/25 11:45:40 martin Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c	8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.140.2.3 2018/07/13 14:29:15 martin Exp $");
+__RCSID("$NetBSD: eval.c,v 1.140.2.4 2018/08/25 11:45:40 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -903,7 +903,7 @@ evalcommand(union node *cmd, int flgs, s
 		cmdentry.u.bltin = bltincmd;
 	} else {
 		static const char PATH[] = "PATH=";
-		int cmd_flags = DO_ERR;
+		int cmd_flags = 0;
 
 		/*
 		 * Modify the command lookup path, if a PATH= assignment
@@ -917,11 +917,20 @@ evalcommand(union node *cmd, int flgs, s
 			int argsused, use_syspath;
 
 			find_command(argv[0], , cmd_flags, path);
+#if 0
+			/*
+			 * This short circuits all of the processing that
+			 * should be done (including processing the
+			 * redirects), so just don't ...
+			 *
+			 * (eventually this whole #if'd block will vanish)
+			 */
 			if (cmdentry.cmdtype == CMDUNKNOWN) {
 exitstatus = 127;
 flushout();
 goto out;
 			}
+#endif
 
 			/* implement the 'command' builtin here */
 			if (cmdentry.cmdtype != CMDBUILTIN ||
@@ -947,9 +956,10 @@ evalcommand(union node *cmd, int flgs, s
 
 	/* Fork off a child process if necessary. */
 	if (cmd->ncmd.backgnd || (trap[0] && (flags & EV_EXIT) != 0)
-	 || (cmdentry.cmdtype == CMDNORMAL && (flags & EV_EXIT) == 0)
-	 || ((flags & EV_BACKCMD) != 0
-	&& ((cmdentry.cmdtype != CMDBUILTIN && cmdentry.cmdtype != CMDSPLBLTIN)
+	 || ((cmdentry.cmdtype == CMDNORMAL || cmdentry.cmdtype == CMDUNKNOWN)
+	 && (flags & EV_EXIT) == 0)
+	 || ((flags & EV_BACKCMD) != 0 &&
+	((cmdentry.cmdtype != CMDBUILTIN && cmdentry.cmdtype != CMDSPLBLTIN)
 		 || cmdentry.u.bltin == dotcmd
 		 || cmdentry.u.bltin == evalcmd))) {
 		INTOFF;



CVS commit: [netbsd-8] src

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:38:19 UTC 2018

Modified Files:
src/doc [netbsd-8]: 3RDPARTY
src/external/bsd/dhcpcd/dist/src [netbsd-8]: defs.h dhcp.c dhcp6.c
if-bsd.c if.c ipv4.c ipv6.c

Log Message:
Sync to head the following, requested by roy in ticket #981:

external/bsd/dhcpcd/dist/src/defs.h up to 1.1.1.16
external/bsd/dhcpcd/dist/src/dhcp.c up to 1.13
external/bsd/dhcpcd/dist/src/dhcp6.cup to 1.1.1.13
external/bsd/dhcpcd/dist/src/if-bsd.c   up to 1.1.1.9
external/bsd/dhcpcd/dist/src/if.c   up to 1.1.1.9
external/bsd/dhcpcd/dist/src/ipv4.c up to 1.1.1.10
external/bsd/dhcpcd/dist/src/ipv6.c up to 1.1.1.12
doc/3RDPARTY(manually edited)

Import dhcpcd-7.0.8 with the following changes:
  *  Don't use IP_PKTINFO on NetBSD-7 as it's incomplete.
  *  Workaround RTM_NEWADDR sending the wrong broadcast address
 on NetBSD-7.
  *  Silence diagnostics if an address vanishes when reading
 it's flags on all BSD's.
  *  Misc compiler warnings fixed.


To generate a diff of this commit:
cvs rdiff -u -r1.1444.2.16 -r1.1444.2.17 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.4.2.5 -r1.1.1.4.2.6 \
src/external/bsd/dhcpcd/dist/src/defs.h
cvs rdiff -u -r1.1.1.3.8.4 -r1.1.1.3.8.5 \
src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.1.1.4.2.3 -r1.1.1.4.2.4 \
src/external/bsd/dhcpcd/dist/src/dhcp6.c
cvs rdiff -u -r1.1.1.3.2.3 -r1.1.1.3.2.4 \
src/external/bsd/dhcpcd/dist/src/if-bsd.c
cvs rdiff -u -r1.1.1.3.2.2 -r1.1.1.3.2.3 \
src/external/bsd/dhcpcd/dist/src/if.c \
src/external/bsd/dhcpcd/dist/src/ipv4.c
cvs rdiff -u -r1.1.1.3.2.4 -r1.1.1.3.2.5 \
src/external/bsd/dhcpcd/dist/src/ipv6.c

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1444.2.16 src/doc/3RDPARTY:1.1444.2.17
--- src/doc/3RDPARTY:1.1444.2.16	Sat Aug 11 14:54:49 2018
+++ src/doc/3RDPARTY	Sat Aug 25 11:38:19 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1444.2.16 2018/08/11 14:54:49 martin Exp $
+#	$NetBSD: 3RDPARTY,v 1.1444.2.17 2018/08/25 11:38:19 martin Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -334,8 +334,8 @@ Notes:
 Use the dhcp2netbsd script.
 
 Package:	dhcpcd
-Version:	7.0.7
-Current Vers:	7.0.7
+Version:	7.0.8
+Current Vers:	7.0.8
 Maintainer:	roy
 Archive Site:	ftp://roy.marples.name/pub/dhcpcd/
 Home Page:	http://roy.marples.name/projects/dhcpcd/

Index: src/external/bsd/dhcpcd/dist/src/defs.h
diff -u src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.4.2.5 src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.4.2.6
--- src/external/bsd/dhcpcd/dist/src/defs.h:1.1.1.4.2.5	Fri Jul 27 10:22:52 2018
+++ src/external/bsd/dhcpcd/dist/src/defs.h	Sat Aug 25 11:38:19 2018
@@ -28,7 +28,7 @@
 #define CONFIG_H
 
 #define PACKAGE			"dhcpcd"
-#define VERSION			"7.0.7"
+#define VERSION			"7.0.8"
 
 #ifndef CONFIG
 # define CONFIG			SYSCONFDIR "/" PACKAGE ".conf"

Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.1.1.3.8.4 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.1.1.3.8.5
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.1.1.3.8.4	Thu Jun  7 18:34:03 2018
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c	Sat Aug 25 11:38:19 2018
@@ -86,6 +86,11 @@
 #define IPDEFTTL 64 /* RFC1340 */
 #endif
 
+/* NetBSD-7 has an incomplete IP_PKTINFO implementation. */
+#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 8
+#undef IP_PKTINFO
+#endif
+
 /* Assert the correct structure size for on wire */
 __CTASSERT(sizeof(struct ip)		== 20);
 __CTASSERT(sizeof(struct udphdr)	== 8);
@@ -3267,7 +3272,7 @@ get_udp_data(void *udp, size_t *len)
 	struct bootp_pkt *p;
 
 	p = (struct bootp_pkt *)udp;
-	*len = ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp);
+	*len = (size_t)ntohs(p->ip.ip_len) - sizeof(p->ip) - sizeof(p->udp);
 	return (char *)udp + offsetof(struct bootp_pkt, bootp);
 }
 

Index: src/external/bsd/dhcpcd/dist/src/dhcp6.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.4.2.3 src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.4.2.4
--- src/external/bsd/dhcpcd/dist/src/dhcp6.c:1.1.1.4.2.3	Thu Jun  7 18:34:03 2018
+++ src/external/bsd/dhcpcd/dist/src/dhcp6.c	Sat Aug 25 11:38:19 2018
@@ -777,7 +777,6 @@ dhcp6_makemessage(struct interface *ifp)
 		/* FALLTHROUGH */
 	case DH6S_INIT:
 		for (l = 0; l < ifo->ia_len; l++) {
-			ifia = >ia[l];
 			len += sizeof(o) + sizeof(uint32_t); /* IAID */
 			/* IA_TA does not have T1 or T2 timers */
 			if (ifo->ia[l].ia_type != D6_OPTION_IA_TA)

Index: src/external/bsd/dhcpcd/dist/src/if-bsd.c
diff -u src/external/bsd/dhcpcd/dist/src/if-bsd.c:1.1.1.3.2.3 

CVS commit: [netbsd-8] src/sys

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:29:52 UTC 2018

Modified Files:
src/sys/dev/usb [netbsd-8]: ehci.c ehcivar.h motg.c ohci.c ohcivar.h
uhci.c uhcivar.h usbdi.c usbdivar.h xhci.c xhcivar.h
src/sys/external/bsd/dwc2 [netbsd-8]: dwc2.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #980):

sys/dev/usb/usbdivar.h: revision 1.117
sys/external/bsd/dwc2/dwc2.c: revision 1.52
sys/dev/usb/xhcivar.h: revision 1.10
sys/dev/usb/motg.c: revision 1.22
sys/dev/usb/ehci.c: revision 1.260
sys/dev/usb/ehci.c: revision 1.261
sys/dev/usb/xhci.c: revision 1.96
sys/dev/usb/ohci.c: revision 1.282
sys/dev/usb/ohci.c: revision 1.283
sys/dev/usb/ehcivar.h: revision 1.45
sys/dev/usb/uhci.c: revision 1.281
sys/dev/usb/uhci.c: revision 1.282
sys/dev/usb/usbdi.c: revision 1.177
sys/dev/usb/ohcivar.h: revision 1.60
sys/dev/usb/uhcivar.h: revision 1.55
(all via patch)

pull across abort fixes from nick-nhusb.  add more abort fixes, using
ideas from Taylor and Nick, and myself.  special thanks to both who
inspired much of the code here, if not wrote it directly.
among other problems, this assert should no longer trigger:

   panic: kernel diagnostic assertion "xfer->ux_state == XFER_ONQU" failed: 
file "/current/src/sys/dev/usb/usbdi.c", line 914

using usbhist i was able to track down my instance of it being related
to userland close() beginning, dropping the sc_lock, and then the usb
softintr completes the transfer normally, and when it is done, the
abort path attempts to re-complete the transfer, and the above assert
is tripped.

changes from nhusb were commited with these logs:
--
Move the struct usb_task to struct usbd_xfer for everyone to use.
--
Set device transfer status to USBD_IN_PROGRESS if start methods succeeds
--
Actually set the transfer status on transfers in ohci_abort_xfer and
the controller is dying
--
Don't supply the lock to callout_halt when polling as it won't be held
--
Improve transfer abort
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--
--
Mark device transfers as USBD_IN_PROGRESS appropriately and improve
abort handling
--

additional changes include:
- initialise the usb abort task in the HCI allocx routine, so that it
  can be safely usb_rem_task()'d.
- rework the handling of softintr vs cancellation vs timeout abort based
  upon a scheme from Taylor:
  when completing a transfer normally:
  - if the status is not in progress, it must be cancelled or timed out,
and we should not process this xfer.
  - set the status as normal.
  - unconditionallly callout_stop() and usb_rem_task().  they're safe and
either aren't running, or will run and do nothing.
  - finally call usb_transfer_complete().
  when aborting a transfer:
  - status should be cancelled or timed out.
  - if cancelling, callout_halt and usb_rem_task_wait() to make sure the
timer is either done or cancelled.
  - at this point, the ux_status must not be cancelled or timed out, and
if it is not in progress we're done.
  - set the status.
  - if the controller is dying, just return.
  - perform HCI-specific tasks to abort this xfer.
  - finally call usb_transfer_complete().
  for the timeout and timeout task:
  - if the HCI is not dying, and the ux_status is in progress, then
trigger the usb abort task.
- remove UXFER_ABORTWAIT and UXFER_ABORTING.

tested on:
- multiple PC systems with several types of devices: ugen/UPS, ucom,
  umass with disk, ssd and cdrom backends, kbd, ms, using uhci, ehci
  and xhci.
- erlite3: sd@umass on dwc2.
- sunblade2000: kbd/ms and umass disk on ohci.

untested:
- motg, slhci and ahci.  motg has some portion of the new scheme
  applied, but slhci and ahci require more study.

future work includes pushing a lot of the common abort handling into
usbdi.c and leaving upm_abort() for HC specific tasks, but this change
is pullup-able to netbsd-7 and netbsd-8 as it does not change any
external API, as well as removing over 100 lines of code while adding
over 30 new asserts.

XXX: pullup-7, pullup-8.

fix DIAGNOSTIC build by not copying ub_usepolling to stack before use

Sprinkle __diagused


To generate a diff of this commit:
cvs rdiff -u -r1.254.8.3 -r1.254.8.4 src/sys/dev/usb/ehci.c
cvs rdiff -u -r1.43 -r1.43.10.1 src/sys/dev/usb/ehcivar.h
cvs rdiff -u -r1.17.10.2 -r1.17.10.3 src/sys/dev/usb/motg.c
cvs rdiff -u -r1.273.6.2 -r1.273.6.3 src/sys/dev/usb/ohci.c
cvs rdiff -u -r1.58 -r1.58.10.1 src/sys/dev/usb/ohcivar.h
cvs rdiff -u -r1.275.2.3 -r1.275.2.4 src/sys/dev/usb/uhci.c
cvs rdiff -u -r1.53 -r1.53.10.1 src/sys/dev/usb/uhcivar.h
cvs rdiff -u -r1.173.2.1 -r1.173.2.2 src/sys/dev/usb/usbdi.c
cvs rdiff -u -r1.114 -r1.114.6.1 src/sys/dev/usb/usbdivar.h
cvs rdiff -u -r1.72.2.6 -r1.72.2.7 src/sys/dev/usb/xhci.c
cvs rdiff -u -r1.7 -r1.7.6.1 

CVS commit: [netbsd-8] src/dist/pf/share/man

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:21:54 UTC 2018

Modified Files:
src/dist/pf/share/man/man4 [netbsd-8]: pf.4 pflog.4 pfsync.4
src/dist/pf/share/man/man5 [netbsd-8]: pf.conf.5 pf.os.5

Log Message:
Pull up following revision(s) (requested by maxv in ticket #978):

dist/pf/share/man/man4/pfsync.4: revision 1.7
dist/pf/share/man/man4/pf.4: revision 1.13
dist/pf/share/man/man5/pf.os.5: revision 1.7
dist/pf/share/man/man4/pflog.4: revision 1.7
dist/pf/share/man/man5/pf.conf.5: revision 1.17

Add a bold note to say our PF is obsolete.

Add a deprecation note in each of the PF man pages (instead of just pf.4),
so that it's really clear.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.12.40.1 src/dist/pf/share/man/man4/pf.4
cvs rdiff -u -r1.6 -r1.6.40.1 src/dist/pf/share/man/man4/pflog.4 \
src/dist/pf/share/man/man4/pfsync.4
cvs rdiff -u -r1.16 -r1.16.40.1 src/dist/pf/share/man/man5/pf.conf.5
cvs rdiff -u -r1.6 -r1.6.40.1 src/dist/pf/share/man/man5/pf.os.5

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

Modified files:

Index: src/dist/pf/share/man/man4/pf.4
diff -u src/dist/pf/share/man/man4/pf.4:1.12 src/dist/pf/share/man/man4/pf.4:1.12.40.1
--- src/dist/pf/share/man/man4/pf.4:1.12	Sat Dec 19 14:05:53 2009
+++ src/dist/pf/share/man/man4/pf.4	Sat Aug 25 11:21:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pf.4,v 1.12 2009/12/19 14:05:53 ahoka Exp $
+.\"	$NetBSD: pf.4,v 1.12.40.1 2018/08/25 11:21:53 martin Exp $
 .\"	$OpenBSD: pf.4,v 1.59 2007/05/31 19:19:51 jmc Exp $
 .\"
 .\" Copyright (C) 2001, Kjell Wooding.  All rights reserved.
@@ -27,7 +27,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 19, 2009
+.Dd August 25, 2018
 .Dt PF 4
 .Os
 .Sh NAME
@@ -36,6 +36,13 @@
 .Sh SYNOPSIS
 .Cd "pseudo-device pf"
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 Packet filtering takes place in the kernel.
 A pseudo-device,
 .Pa /dev/pf ,

Index: src/dist/pf/share/man/man4/pflog.4
diff -u src/dist/pf/share/man/man4/pflog.4:1.6 src/dist/pf/share/man/man4/pflog.4:1.6.40.1
--- src/dist/pf/share/man/man4/pflog.4:1.6	Sun Mar 22 14:29:34 2009
+++ src/dist/pf/share/man/man4/pflog.4	Sat Aug 25 11:21:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pflog.4,v 1.6 2009/03/22 14:29:34 perry Exp $
+.\"	$NetBSD: pflog.4,v 1.6.40.1 2018/08/25 11:21:53 martin Exp $
 .\"	$OpenBSD: pflog.4,v 1.10 2007/05/31 19:19:51 jmc Exp $
 .\"
 .\" Copyright (c) 2001 Tobias Weingartner
@@ -24,7 +24,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 31, 2007
+.Dd August 25, 2018
 .Dt PFLOG 4
 .Os
 .Sh NAME
@@ -33,6 +33,13 @@
 .Sh SYNOPSIS
 .Cd "pseudo-device pflog"
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Nm pflog
 interface is a pseudo-device which makes visible all packets logged by
Index: src/dist/pf/share/man/man4/pfsync.4
diff -u src/dist/pf/share/man/man4/pfsync.4:1.6 src/dist/pf/share/man/man4/pfsync.4:1.6.40.1
--- src/dist/pf/share/man/man4/pfsync.4:1.6	Mon Apr 12 21:28:23 2010
+++ src/dist/pf/share/man/man4/pfsync.4	Sat Aug 25 11:21:53 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pfsync.4,v 1.6 2010/04/12 21:28:23 wiz Exp $
+.\"	$NetBSD: pfsync.4,v 1.6.40.1 2018/08/25 11:21:53 martin Exp $
 .\"	$OpenBSD: pfsync.4,v 1.25 2007/05/31 19:19:51 jmc Exp $
 .\"
 .\" Copyright (c) 2002 Michael Shalayeff
@@ -25,7 +25,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd April 12, 2010
+.Dd August 25, 2018
 .Dt PFSYNC 4
 .Os
 .Sh NAME
@@ -34,6 +34,13 @@
 .Sh SYNOPSIS
 .Cd "pseudo-device pfsync"
 .Sh DESCRIPTION
+.Bf -symbolic
+The NetBSD version of PF is obsolete, and its use is strongly discouraged.
+Use
+.Xr npf 7
+instead.
+.Pp
+.Ef
 The
 .Nm
 interface is a pseudo-device which exposes certain changes to the state

Index: src/dist/pf/share/man/man5/pf.conf.5
diff -u src/dist/pf/share/man/man5/pf.conf.5:1.16 src/dist/pf/share/man/man5/pf.conf.5:1.16.40.1
--- src/dist/pf/share/man/man5/pf.conf.5:1.16	Wed Oct 14 17:44:25 2009
+++ src/dist/pf/share/man/man5/pf.conf.5	Sat Aug 25 11:21:54 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pf.conf.5,v 1.16 2009/10/14 17:44:25 joerg Exp $
+.\"	$NetBSD: pf.conf.5,v 1.16.40.1 2018/08/25 11:21:54 martin Exp $
 .\"	$OpenBSD: pf.conf.5,v 1.383 2007/07/17 16:27:38 jmc Exp $
 .\"
 .\" Copyright (c) 2002, Daniel Hartmeier
@@ -28,13 +28,20 @@
 .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 26, 2007
+.Dd August 25, 2018
 .Dt 

CVS commit: [netbsd-8] src/sys/compat/netbsd32

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:13:06 UTC 2018

Modified Files:
src/sys/compat/netbsd32 [netbsd-8]: netbsd32.h netbsd32_fs.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #977):

sys/compat/netbsd32/netbsd32_fs.c: revision 1.81
sys/compat/netbsd32/netbsd32.h: revision 1.119

support nullfs in netbsd32.


To generate a diff of this commit:
cvs rdiff -u -r1.114.8.2 -r1.114.8.3 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/compat/netbsd32/netbsd32_fs.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.114.8.2 src/sys/compat/netbsd32/netbsd32.h:1.114.8.3
--- src/sys/compat/netbsd32/netbsd32.h:1.114.8.2	Sat Apr 14 03:04:06 2018
+++ src/sys/compat/netbsd32/netbsd32.h	Sat Aug 25 11:13:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.114.8.2 2018/04/14 03:04:06 snj Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.114.8.3 2018/08/25 11:13:05 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -958,7 +958,7 @@ struct netbsd32_tmpfs_args {
 /* from  */
 struct netbsd32_iso_args {
 	netbsd32_charp fspec;
-	struct export_args30 _pad1;
+	struct netbsd32_export_args30 _pad1;
 	int	flags;
 };
 
@@ -1014,8 +1014,6 @@ struct netbsd32_mountd_exports_list {
 	netbsd32_export_argsp	mel_exports;
 };
 
-/* no struct export_args30 yet */
-
 /* from  */
 struct netbsd32_nfs_args {
 	int32_t		version;	/* args structure version number */
@@ -1053,6 +1051,17 @@ struct netbsd32_msdosfs_args {
 	int	gmtoff;		/* v3: offset from UTC in seconds */
 };
 
+/* from  */
+struct netbsd32_layer_args {
+	netbsd32_charp target;		/* Target of loopback  */
+	struct netbsd32_export_args30 _pad1; /* compat with old userland tools */
+};
+
+/* from  */
+struct netbsd32_null_args {
+	struct	netbsd32_layer_args	la;	/* generic layerfs args */
+};
+
 struct netbsd32_posix_spawn_file_actions_entry {
 	enum { FAE32_OPEN, FAE32_DUP2, FAE32_CLOSE } fae_action;
 

Index: src/sys/compat/netbsd32/netbsd32_fs.c
diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.80 src/sys/compat/netbsd32/netbsd32_fs.c:1.80.2.1
--- src/sys/compat/netbsd32/netbsd32_fs.c:1.80	Thu Jun  1 02:45:08 2017
+++ src/sys/compat/netbsd32/netbsd32_fs.c	Sat Aug 25 11:13:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $	*/
+/*	$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $");
 
 #include 
 #include 
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.
 #include 
 #include 
 #include 
+#include 
 
 #define NFS_ARGS_ONLY
 #include 
@@ -799,6 +800,7 @@ netbsd32___mount50(struct lwp *l, const 
 		struct netbsd32_nfs_args nfs_args;
 		struct netbsd32_msdosfs_args msdosfs_args;
 		struct netbsd32_tmpfs_args tmpfs_args;
+		struct netbsd32_null_args null_args;
 	} fs_args32;
 	union {
 		struct ufs_args ufs_args;
@@ -807,6 +809,7 @@ netbsd32___mount50(struct lwp *l, const 
 		struct nfs_args nfs_args;
 		struct msdosfs_args msdosfs_args;
 		struct tmpfs_args tmpfs_args;
+		struct null_args null_args;
 	} fs_args;
 	const char *type = SCARG_P32(uap, type);
 	const char *path = SCARG_P32(uap, path);
@@ -953,6 +956,20 @@ netbsd32___mount50(struct lwp *l, const 
 		data_seg = UIO_SYSSPACE;
 		data = _args.nfs_args;
 		data_len = sizeof(fs_args.nfs_args);
+	} else if (strcmp(mtype, MOUNT_NULL) == 0) {
+		if (data_len > sizeof(fs_args32.null_args))
+			return EINVAL;
+		if ((flags & MNT_GETARGS) == 0) {
+			error = copyin(data, _args32.null_args, 
+			sizeof(fs_args32.null_args));
+			if (error)
+return error;
+			fs_args.null_args.la.target =
+			NETBSD32PTR64(fs_args32.null_args.la.target);
+		}
+		data_seg = UIO_SYSSPACE;
+		data = _args.null_args;
+		data_len = sizeof(fs_args.null_args);
 	} else {
 		data_seg = UIO_USERSPACE;
 	}
@@ -1032,6 +1049,13 @@ netbsd32___mount50(struct lwp *l, const 
 			fs_args.nfs_args.hostname);
 			error = copyout(_args32.nfs_args, data,
 			sizeof(fs_args32.nfs_args));
+		} else if (strcmp(mtype, MOUNT_NULL) == 0) {
+			if (data_len != sizeof(fs_args.null_args))
+return EINVAL;
+			NETBSD32PTR32(fs_args32.null_args.la.target,
+			fs_args.null_args.la.target);
+			error = copyout(_args32.null_args, data, 
+			sizeof(fs_args32.null_args));
 		}
 	}
 	return error;



CVS commit: src/distrib/sets/lists

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:10:52 UTC 2018

Modified Files:
src/distrib/sets/lists/base: md.i386
src/distrib/sets/lists/debug: md.i386
src/distrib/sets/lists/man: mi

Log Message:
obsolete ndiscvt


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/distrib/sets/lists/base/md.i386
cvs rdiff -u -r1.16 -r1.17 src/distrib/sets/lists/debug/md.i386
cvs rdiff -u -r1.1610 -r1.1611 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/base/md.i386
diff -u src/distrib/sets/lists/base/md.i386:1.150 src/distrib/sets/lists/base/md.i386:1.151
--- src/distrib/sets/lists/base/md.i386:1.150	Fri Jul 13 09:15:55 2018
+++ src/distrib/sets/lists/base/md.i386	Sat Aug 25 11:10:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.150 2018/07/13 09:15:55 maxv Exp $
+# $NetBSD: md.i386,v 1.151 2018/08/25 11:10:52 martin Exp $
 ./dev/lms0	base-obsolete		obsolete
 ./dev/mms0	base-obsolete		obsolete
 ./dev/pms0	base-obsolete		obsolete
@@ -103,7 +103,7 @@
 ./usr/sbin/apmd	base-sysutil-bin
 ./usr/sbin/bad144base-sysutil-bin
 ./usr/sbin/ipwctlbase-sysutil-bin
-./usr/sbin/ndiscvtbase-sysutil-bin
+./usr/sbin/ndiscvtbase-sysutil-bin	obsolete
 ./usr/sbin/zzz	base-sysutil-bin
 ./usr/share/man/cat8/mount_qemufwcfg.0		man-sysutil-catman	.cat
 ./usr/share/man/html8/mount_qemufwcfg.html	man-sysutil-htmlman	html

Index: src/distrib/sets/lists/debug/md.i386
diff -u src/distrib/sets/lists/debug/md.i386:1.16 src/distrib/sets/lists/debug/md.i386:1.17
--- src/distrib/sets/lists/debug/md.i386:1.16	Fri Jul 13 09:15:55 2018
+++ src/distrib/sets/lists/debug/md.i386	Sat Aug 25 11:10:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.16 2018/07/13 09:15:55 maxv Exp $
+# $NetBSD: md.i386,v 1.17 2018/08/25 11:10:52 martin Exp $
 ./usr/lib/libi386_g.acomp-c-debuglib		debuglib
 ./usr/lib/libm387_g.acomp-c-debuglib		debuglib
 ./usr/lib/libpmc_g.acomp-obsolete		obsolete
@@ -17,7 +17,7 @@
 ./usr/libdata/debug/usr/sbin/apmd.debug		comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/bad144.debug	comp-sysutil-debug	debug
 ./usr/libdata/debug/usr/sbin/ipwctl.debug	comp-sysutil-debug	debug
-./usr/libdata/debug/usr/sbin/ndiscvt.debug	comp-sysutil-debug	debug
+./usr/libdata/debug/usr/sbin/ndiscvt.debug	comp-sysutil-debug	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait3.debug	tests-obsolete	obsolete
 ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait4.debug	tests-obsolete	obsolete

Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1610 src/distrib/sets/lists/man/mi:1.1611
--- src/distrib/sets/lists/man/mi:1.1610	Sat Aug 25 07:48:56 2018
+++ src/distrib/sets/lists/man/mi	Sat Aug 25 11:10:52 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1610 2018/08/25 07:48:56 maxv Exp $
+# $NetBSD: mi,v 1.1611 2018/08/25 11:10:52 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2602,7 +2602,7 @@
 ./usr/share/man/cat8/i386/makedev.0		man-obsolete		obsolete
 ./usr/share/man/cat8/i386/mbr.0			man-obsolete		obsolete
 ./usr/share/man/cat8/i386/multiboot.0		man-obsolete		obsolete
-./usr/share/man/cat8/i386/ndiscvt.0		man-netutil-catman	.cat
+./usr/share/man/cat8/i386/ndiscvt.0		man-obsolete		obsolete
 ./usr/share/man/cat8/i386/pxeboot.0		man-obsolete		obsolete
 ./usr/share/man/cat8/i386/reboot.0		man-obsolete		obsolete
 ./usr/share/man/cat8/i386/reboot_i386.0		man-obsolete		obsolete
@@ -5570,7 +5570,7 @@
 ./usr/share/man/html8/i386/dosboot.html		man-obsolete		obsolete
 ./usr/share/man/html8/i386/mbr.html		man-obsolete		obsolete
 ./usr/share/man/html8/i386/multiboot.html	man-obsolete		obsolete
-./usr/share/man/html8/i386/ndiscvt.html		man-netutil-htmlman	html
+./usr/share/man/html8/i386/ndiscvt.html		man-obsolete		obsolete
 ./usr/share/man/html8/i386/pxeboot.html		man-obsolete		obsolete
 ./usr/share/man/html8/i386/w95boot.html		man-obsolete		obsolete
 ./usr/share/man/html8/iasl.html			man-sysutil-htmlman	html
@@ -8673,7 +8673,7 @@
 ./usr/share/man/man8/i386/makedev.8		man-obsolete		obsolete
 ./usr/share/man/man8/i386/mbr.8			man-obsolete		obsolete
 ./usr/share/man/man8/i386/multiboot.8		man-obsolete		obsolete
-./usr/share/man/man8/i386/ndiscvt.8		man-netutil-man		.man
+./usr/share/man/man8/i386/ndiscvt.8		man-obsolete		obsolete
 ./usr/share/man/man8/i386/pxeboot.8		man-obsolete		obsolete
 ./usr/share/man/man8/i386/reboot.8		man-obsolete		obsolete
 ./usr/share/man/man8/i386/reboot_i386.8		man-obsolete		obsolete



CVS commit: src/usr.sbin

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 11:06:00 UTC 2018

Modified Files:
src/usr.sbin: Makefile
Removed Files:
src/usr.sbin/ndiscvt: Makefile inf-parse.y inf-token.l inf.c inf.h
ndiscvt.8 ndiscvt.c

Log Message:
Remove userland part of ndis


To generate a diff of this commit:
cvs rdiff -u -r1.276 -r1.277 src/usr.sbin/Makefile
cvs rdiff -u -r1.11 -r0 src/usr.sbin/ndiscvt/Makefile
cvs rdiff -u -r1.6 -r0 src/usr.sbin/ndiscvt/inf-parse.y
cvs rdiff -u -r1.10 -r0 src/usr.sbin/ndiscvt/inf-token.l
cvs rdiff -u -r1.4 -r0 src/usr.sbin/ndiscvt/inf.c
cvs rdiff -u -r1.3 -r0 src/usr.sbin/ndiscvt/inf.h
cvs rdiff -u -r1.9 -r0 src/usr.sbin/ndiscvt/ndiscvt.8
cvs rdiff -u -r1.12 -r0 src/usr.sbin/ndiscvt/ndiscvt.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.sbin/Makefile
diff -u src/usr.sbin/Makefile:1.276 src/usr.sbin/Makefile:1.277
--- src/usr.sbin/Makefile:1.276	Tue Jan  9 03:31:13 2018
+++ src/usr.sbin/Makefile	Sat Aug 25 11:06:00 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.276 2018/01/09 03:31:13 christos Exp $
+#	$NetBSD: Makefile,v 1.277 2018/08/25 11:06:00 martin Exp $
 #	from: @(#)Makefile	5.20 (Berkeley) 6/12/93
 
 .include 
@@ -17,7 +17,7 @@ SUBDIR=	ac accton acpitools altq apm apm
 	lastlogin ldpd link lmcconfig lockstat lpr \
 	mailwrapper makefs map-mbone mdconfig memswitch mlxctl mmcformat \
 	mopd mountd moused mrinfo mrouted mscdlabel mtrace mtree \
-	ndbootd ndiscvt netgroup_mkdb nfsd \
+	ndbootd netgroup_mkdb nfsd \
 	ofctl \
 	paxctl pcictl perfused psrset pstat pwd_mkdb postinstall \
 	powerd puffs \



CVS commit: src

2018-08-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 25 09:54:37 UTC 2018

Modified Files:
src/share/examples/secmodel: secmodel_example.c
src/sys/kern: kern_proc.c
src/sys/secmodel/extensions: secmodel_extensions.c
src/sys/secmodel/suser: secmodel_suser.c
src/sys/sys: kauth.h

Log Message:
Add KAUTH_REQ_PROCESS_CANSEE_EPROC, and use it for the kern.proc node.
Same permission as before, so no functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/share/examples/secmodel/secmodel_example.c
cvs rdiff -u -r1.212 -r1.213 src/sys/kern/kern_proc.c
cvs rdiff -u -r1.8 -r1.9 src/sys/secmodel/extensions/secmodel_extensions.c
cvs rdiff -u -r1.46 -r1.47 src/sys/secmodel/suser/secmodel_suser.c
cvs rdiff -u -r1.78 -r1.79 src/sys/sys/kauth.h

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

Modified files:

Index: src/share/examples/secmodel/secmodel_example.c
diff -u src/share/examples/secmodel/secmodel_example.c:1.27 src/share/examples/secmodel/secmodel_example.c:1.28
--- src/share/examples/secmodel/secmodel_example.c:1.27	Sun Jul 15 05:16:40 2018
+++ src/share/examples/secmodel/secmodel_example.c	Sat Aug 25 09:54:37 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_example.c,v 1.27 2018/07/15 05:16:40 maxv Exp $ */
+/* $NetBSD: secmodel_example.c,v 1.28 2018/08/25 09:54:37 maxv Exp $ */
 
 /*
  * This file is placed in the public domain.
@@ -13,7 +13,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.27 2018/07/15 05:16:40 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_example.c,v 1.28 2018/08/25 09:54:37 maxv Exp $");
 
 #include 
 #include 
@@ -370,6 +370,7 @@ secmodel_example_process_cb(kauth_cred_t
 		case KAUTH_REQ_PROCESS_CANSEE_ENTRY:
 		case KAUTH_REQ_PROCESS_CANSEE_ENV:
 		case KAUTH_REQ_PROCESS_CANSEE_OPENFILES:
+		case KAUTH_REQ_PROCESS_CANSEE_EPROC:
 		default:
 			result = KAUTH_RESULT_DEFER;
 			break;

Index: src/sys/kern/kern_proc.c
diff -u src/sys/kern/kern_proc.c:1.212 src/sys/kern/kern_proc.c:1.213
--- src/sys/kern/kern_proc.c:1.212	Sat Apr 14 14:26:20 2018
+++ src/sys/kern/kern_proc.c	Sat Aug 25 09:54:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_proc.c,v 1.212 2018/04/14 14:26:20 kamil Exp $	*/
+/*	$NetBSD: kern_proc.c,v 1.213 2018/08/25 09:54:37 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.212 2018/04/14 14:26:20 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_proc.c,v 1.213 2018/08/25 09:54:37 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_kstack.h"
@@ -263,8 +263,8 @@ proc_listener_cb(kauth_cred_t cred, kaut
 		case KAUTH_REQ_PROCESS_CANSEE_ARGS:
 		case KAUTH_REQ_PROCESS_CANSEE_ENTRY:
 		case KAUTH_REQ_PROCESS_CANSEE_OPENFILES:
+		case KAUTH_REQ_PROCESS_CANSEE_EPROC:
 			result = KAUTH_RESULT_ALLOW;
-
 			break;
 
 		case KAUTH_REQ_PROCESS_CANSEE_ENV:
@@ -1701,7 +1701,7 @@ sysctl_doeproc(SYSCTLFN_ARGS)
 		mutex_enter(p->p_lock);
 		error = kauth_authorize_process(l->l_cred,
 		KAUTH_PROCESS_CANSEE, p,
-		KAUTH_ARG(KAUTH_REQ_PROCESS_CANSEE_ENTRY), NULL, NULL);
+		KAUTH_ARG(KAUTH_REQ_PROCESS_CANSEE_EPROC), NULL, NULL);
 		if (error != 0) {
 			mutex_exit(p->p_lock);
 			continue;

Index: src/sys/secmodel/extensions/secmodel_extensions.c
diff -u src/sys/secmodel/extensions/secmodel_extensions.c:1.8 src/sys/secmodel/extensions/secmodel_extensions.c:1.9
--- src/sys/secmodel/extensions/secmodel_extensions.c:1.8	Sun Apr  8 14:46:32 2018
+++ src/sys/secmodel/extensions/secmodel_extensions.c	Sat Aug 25 09:54:37 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_extensions.c,v 1.8 2018/04/08 14:46:32 kamil Exp $ */
+/* $NetBSD: secmodel_extensions.c,v 1.9 2018/08/25 09:54:37 maxv Exp $ */
 /*-
  * Copyright (c) 2011 Elad Efrat 
  * All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: secmodel_extensions.c,v 1.8 2018/04/08 14:46:32 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: secmodel_extensions.c,v 1.9 2018/08/25 09:54:37 maxv Exp $");
 
 #include 
 #include 
@@ -428,6 +428,7 @@ secmodel_extensions_process_cb(kauth_cre
 		case KAUTH_REQ_PROCESS_CANSEE_ARGS:
 		case KAUTH_REQ_PROCESS_CANSEE_ENTRY:
 		case KAUTH_REQ_PROCESS_CANSEE_OPENFILES:
+		case KAUTH_REQ_PROCESS_CANSEE_EPROC:
 			if (curtain != 0) {
 struct proc *p = arg0;
 

Index: src/sys/secmodel/suser/secmodel_suser.c
diff -u src/sys/secmodel/suser/secmodel_suser.c:1.46 src/sys/secmodel/suser/secmodel_suser.c:1.47
--- src/sys/secmodel/suser/secmodel_suser.c:1.46	Sun Jul 15 05:16:45 2018
+++ src/sys/secmodel/suser/secmodel_suser.c	Sat Aug 25 09:54:37 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: secmodel_suser.c,v 1.46 2018/07/15 05:16:45 maxv Exp $ */
+/* $NetBSD: secmodel_suser.c,v 1.47 2018/08/25 09:54:37 maxv Exp $ */
 /*-
  * Copyright (c) 2006 Elad Efrat 
  * All rights reserved.
@@ -38,7 +38,7 @@
  */
 
 #include 

CVS commit: src/doc

2018-08-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 25 08:12:28 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
Belatedly note the removal of vm86 (me, one year ago), and n8 (maya, two
weeks ago).


To generate a diff of this commit:
cvs rdiff -u -r1.2431 -r1.2432 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2431 src/doc/CHANGES:1.2432
--- src/doc/CHANGES:1.2431	Sat Aug 25 08:08:26 2018
+++ src/doc/CHANGES	Sat Aug 25 08:12:28 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2431 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2432 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -47,6 +47,7 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	lm(4): Add support for NCT5174D, NCT6775F, NCT6779D and NCT679[1235]D.
 		[msaitoh 20170711]
 	arm: Add support for NVIDIA Tegra X1 SoC. [jmcneill 20170720]
+	i386: Remove vm86. [maxv 20170812]
 	itesio(4): Add support IT8628E. [hauke 20170814]
 	ichsmb(4): Add support for Intel C3000. [msaitoh 20170817]
 	ismt(4): Add support for Intel C3000. [msaitoh 20170817]
@@ -194,6 +195,7 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		[kamil 20180803]
 	lua: Import version 5.3.5. [alnsn 20180804]
 	arm: Add driver for ARM GICv3 interrupt controllers. [jmcneill 20180808]
+	kernel: Remove the n8 driver. [maya 20180808]
  	bind: Import version 9.12.2-P1. [christos 20180812]
 	arm: Add support for Rockchip RK3399 SoC. [jmcneill 20180812]
 	amd64: Randomize by default all the randomizable VM areas in the kernel.



CVS commit: src/doc

2018-08-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 25 08:08:26 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
Note removal of NDIS.


To generate a diff of this commit:
cvs rdiff -u -r1.2430 -r1.2431 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2430 src/doc/CHANGES:1.2431
--- src/doc/CHANGES:1.2430	Sat Aug 25 00:09:12 2018
+++ src/doc/CHANGES	Sat Aug 25 08:08:26 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2430 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2431 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -207,3 +207,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	amd64: Add support for kASan - Kernel Address Sanitizer.
 		[maxv 20180820]
 	arm: Add UEFI boot loader for ARM64 platforms. [jmcneill 20180824]
+	kernel: Remove NDIS. [maxv 20180825]



CVS commit: src

2018-08-25 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Aug 25 07:48:57 UTC 2018

Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man4/man4.i386: Makefile
src/sys/arch/amd64/conf: ALL
src/sys/arch/evbarm/conf: ARMADILLO-IOT-G3 CUBOX CUBOX-I MMNET_GENERIC
MPCSA_GENERIC NITROGEN6X
src/sys/arch/i386/conf: ALL GENERIC files.i386
src/sys/arch/iyonix/conf: GENERIC
src/sys/dev/pci: files.pci
Removed Files:
src/share/man/man4/man4.i386: ndis.4
src/sys/compat/ndis: cfg_var.h files.ndis hal_var.h kern_ndis.c
kern_windrv.c nbcompat.c nbcompat.h ndis_var.h ntoskrnl_var.h
pe_var.h resource_var.h subr_hal.c subr_ndis.c subr_ntoskrnl.c
subr_pe.c subr_usbd.c usbd_var.h winx64_wrap.S
src/sys/dev/if_ndis: if_ndis.c if_ndis_pccard.c if_ndis_pci.c
if_ndisvar.h
src/sys/modules/ndis: Makefile

Log Message:
Retire NDIS. It appears that it has never worked, after 13 years it was
still marked as "experimental", and nowadays it may be one more obstacle
to MPification of the network stack.

Discussed on tech-net@.


To generate a diff of this commit:
cvs rdiff -u -r1.1609 -r1.1610 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.77 -r1.78 src/share/man/man4/man4.i386/Makefile
cvs rdiff -u -r1.6 -r0 src/share/man/man4/man4.i386/ndis.4
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbarm/conf/ARMADILLO-IOT-G3
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbarm/conf/CUBOX
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbarm/conf/CUBOX-I
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/evbarm/conf/MMNET_GENERIC
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/evbarm/conf/MPCSA_GENERIC
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/evbarm/conf/NITROGEN6X
cvs rdiff -u -r1.447 -r1.448 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1190 -r1.1191 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.395 -r1.396 src/sys/arch/i386/conf/files.i386
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/iyonix/conf/GENERIC
cvs rdiff -u -r1.2 -r0 src/sys/compat/ndis/cfg_var.h \
src/sys/compat/ndis/files.ndis src/sys/compat/ndis/resource_var.h
cvs rdiff -u -r1.1 -r0 src/sys/compat/ndis/hal_var.h \
src/sys/compat/ndis/usbd_var.h src/sys/compat/ndis/winx64_wrap.S
cvs rdiff -u -r1.26 -r0 src/sys/compat/ndis/kern_ndis.c \
src/sys/compat/ndis/subr_ntoskrnl.c
cvs rdiff -u -r1.8 -r0 src/sys/compat/ndis/kern_windrv.c \
src/sys/compat/ndis/ntoskrnl_var.h src/sys/compat/ndis/subr_hal.c
cvs rdiff -u -r1.12 -r0 src/sys/compat/ndis/nbcompat.c
cvs rdiff -u -r1.15 -r0 src/sys/compat/ndis/nbcompat.h
cvs rdiff -u -r1.6 -r0 src/sys/compat/ndis/ndis_var.h \
src/sys/compat/ndis/subr_usbd.c
cvs rdiff -u -r1.5 -r0 src/sys/compat/ndis/pe_var.h
cvs rdiff -u -r1.29 -r0 src/sys/compat/ndis/subr_ndis.c
cvs rdiff -u -r1.7 -r0 src/sys/compat/ndis/subr_pe.c
cvs rdiff -u -r1.40 -r0 src/sys/dev/if_ndis/if_ndis.c
cvs rdiff -u -r1.5 -r0 src/sys/dev/if_ndis/if_ndis_pccard.c
cvs rdiff -u -r1.22 -r0 src/sys/dev/if_ndis/if_ndis_pci.c
cvs rdiff -u -r1.9 -r0 src/sys/dev/if_ndis/if_ndisvar.h
cvs rdiff -u -r1.399 -r1.400 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.1 -r0 src/sys/modules/ndis/Makefile

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.1609 src/distrib/sets/lists/man/mi:1.1610
--- src/distrib/sets/lists/man/mi:1.1609	Tue Aug 14 14:49:13 2018
+++ src/distrib/sets/lists/man/mi	Sat Aug 25 07:48:56 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1609 2018/08/14 14:49:13 maxv Exp $
+# $NetBSD: mi,v 1.1610 2018/08/25 07:48:56 maxv Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1261,7 +1261,7 @@
 ./usr/share/man/cat4/i386/lpt.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i386/mem.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i386/mms.0			man-sys-catman		.cat
-./usr/share/man/cat4/i386/ndis.0		man-sys-catman		.cat
+./usr/share/man/cat4/i386/ndis.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i386/npx.0			man-obsolete		obsolete
 ./usr/share/man/cat4/i386/olms.0		man-obsolete		obsolete
 ./usr/share/man/cat4/i386/omms.0		man-obsolete		obsolete
@@ -4396,7 +4396,7 @@
 ./usr/share/man/html4/i386/lpt.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/mem.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/mms.html		man-sys-htmlman		html
-./usr/share/man/html4/i386/ndis.html		man-sys-htmlman		html
+./usr/share/man/html4/i386/ndis.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/npx.html		man-obsolete		obsolete
 ./usr/share/man/html4/i386/pcibios.html		man-sys-htmlman		html
 ./usr/share/man/html4/i386/pnpbios.html		man-sys-htmlman		html
@@ -7333,7 +7333,7 @@
 ./usr/share/man/man4/i386/lpt.4			man-obsolete		obsolete
 ./usr/share/man/man4/i386/mem.4			man-obsolete		obsolete
 ./usr/share/man/man4/i386/mms.4			

CVS commit: [netbsd-8] src/sbin/route

2018-08-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Aug 25 07:06:48 UTC 2018

Modified Files:
src/sbin/route [netbsd-8]: route.c

Log Message:
Pull up following revision(s) (requested by roy in ticket #976):

sbin/route/route.c: revision 1.160

Resolve every route(4) message type before printing anything more about it
other than the type and length.

This solves the issue where RTM_ONEWADDR is received and it tries to
parse route information from it.


To generate a diff of this commit:
cvs rdiff -u -r1.155.4.3 -r1.155.4.4 src/sbin/route/route.c

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

Modified files:

Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.155.4.3 src/sbin/route/route.c:1.155.4.4
--- src/sbin/route/route.c:1.155.4.3	Mon Apr  9 13:34:11 2018
+++ src/sbin/route/route.c	Sat Aug 25 07:06:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.155.4.3 2018/04/09 13:34:11 bouyer Exp $	*/
+/*	$NetBSD: route.c,v 1.155.4.4 2018/08/25 07:06:48 martin Exp $	*/
 
 /*
  * Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "@(#)route.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: route.c,v 1.155.4.3 2018/04/09 13:34:11 bouyer Exp $");
+__RCSID("$NetBSD: route.c,v 1.155.4.4 2018/08/25 07:06:48 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -1462,11 +1462,14 @@ print_rtmsg(struct rt_msghdr *rtm, int m
 		}
 		printf("\n");
 		break;
-	default:
+	case RTM_ADD:
+	case RTM_DELETE:
+	case RTM_GET:
 		(void)printf("pid %d, seq %d, errno %d, flags: ",
 			rtm->rtm_pid, rtm->rtm_seq, rtm->rtm_errno);
 		bprintf(stdout, rtm->rtm_flags, routeflags);
 		pmsg_common(rtm);
+		break;
 	}
 }