CVS commit: src/lib/libpthread

2018-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  9 23:45:56 UTC 2018

Modified Files:
src/lib/libpthread: Makefile

Log Message:
But set NOSANITIZER


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/lib/libpthread/Makefile

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

Modified files:

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.89 src/lib/libpthread/Makefile:1.90
--- src/lib/libpthread/Makefile:1.89	Sat Jun  9 18:41:55 2018
+++ src/lib/libpthread/Makefile	Sat Jun  9 19:45:56 2018
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.89 2018/06/09 22:41:55 christos Exp $
+#	$NetBSD: Makefile,v 1.90 2018/06/09 23:45:56 christos Exp $
 #
 
-#NOSANITIZER=	# defined
+NOSANITIZER=	# defined
 WARNS?=	5
 LIB=	pthread
 



CVS commit: src

2018-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  9 22:41:55 UTC 2018

Modified Files:
src/lib/libc: Makefile.inc
src/lib/libpthread: Makefile
src/libexec/ld.elf_so: Makefile

Log Message:
We can't build those three with MKSANITIZER, they are used too early.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/Makefile.inc
cvs rdiff -u -r1.88 -r1.89 src/lib/libpthread/Makefile
cvs rdiff -u -r1.137 -r1.138 src/libexec/ld.elf_so/Makefile

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

Modified files:

Index: src/lib/libc/Makefile.inc
diff -u src/lib/libc/Makefile.inc:1.18 src/lib/libc/Makefile.inc:1.19
--- src/lib/libc/Makefile.inc:1.18	Fri Aug 28 07:45:02 2015
+++ src/lib/libc/Makefile.inc	Sat Jun  9 18:41:55 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.18 2015/08/28 11:45:02 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.19 2018/06/09 22:41:55 christos Exp $
 #	@(#)Makefile	8.2 (Berkeley) 2/3/94
 #
 # All library objects contain sccsid strings by default; they may be
@@ -17,6 +17,7 @@
 # The Hesiod functions are always in libc. To choose that getpwent() and friends
 # actually call the Hesiod functions, put -DHESIOD on the CPPFLAGS line below.
 
+NOSANITIZER=	# defined
 USE_FORT?=	yes
 
 USE_SHLIBDIR=	yes

Index: src/lib/libpthread/Makefile
diff -u src/lib/libpthread/Makefile:1.88 src/lib/libpthread/Makefile:1.89
--- src/lib/libpthread/Makefile:1.88	Sun Feb 25 13:51:18 2018
+++ src/lib/libpthread/Makefile	Sat Jun  9 18:41:55 2018
@@ -1,6 +1,7 @@
-#	$NetBSD: Makefile,v 1.88 2018/02/25 18:51:18 chs Exp $
+#	$NetBSD: Makefile,v 1.89 2018/06/09 22:41:55 christos Exp $
 #
 
+#NOSANITIZER=	# defined
 WARNS?=	5
 LIB=	pthread
 

Index: src/libexec/ld.elf_so/Makefile
diff -u src/libexec/ld.elf_so/Makefile:1.137 src/libexec/ld.elf_so/Makefile:1.138
--- src/libexec/ld.elf_so/Makefile:1.137	Mon Jun 19 07:57:01 2017
+++ src/libexec/ld.elf_so/Makefile	Sat Jun  9 18:41:55 2018
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.137 2017/06/19 11:57:01 joerg Exp $
+#	$NetBSD: Makefile,v 1.138 2018/06/09 22:41:55 christos Exp $
 #
 # NOTE: when changing ld.so, ensure that ldd still compiles.
 #
-
+NOSANITIZER=	# defined
 WARNS?=4
 
 LDELFSO_MACHINE_ARCH?= ${MACHINE_ARCH}



CVS commit: src/external/gpl3/gcc/lib

2018-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  9 22:40:00 UTC 2018

Modified Files:
src/external/gpl3/gcc/lib: Makefile.sanitizer

Log Message:
don't depend on libstdc++


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/lib/Makefile.sanitizer

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

Modified files:

Index: src/external/gpl3/gcc/lib/Makefile.sanitizer
diff -u src/external/gpl3/gcc/lib/Makefile.sanitizer:1.4 src/external/gpl3/gcc/lib/Makefile.sanitizer:1.5
--- src/external/gpl3/gcc/lib/Makefile.sanitizer:1.4	Tue Feb 13 21:12:07 2018
+++ src/external/gpl3/gcc/lib/Makefile.sanitizer	Sat Jun  9 18:40:00 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sanitizer,v 1.4 2018/02/14 02:12:07 christos Exp $
+#	$NetBSD: Makefile.sanitizer,v 1.5 2018/06/09 22:40:00 christos Exp $
 
 SANITIZER=${GCCDIST}/libsanitizer
 .PATH: ${SANITIZER}/interception ${SANITIZER}/sanitizer_common
@@ -70,7 +70,6 @@ CPPFLAGS+=-D__STDC_LIMIT_MACROS -DSANITI
 CPPFLAGS+=-DSANITIZER_NEEDS_SEGV=1
 #CPPFLAGS+=-DCAN_SANITIZE_UB=0
 
-LIBDPLIBS+=stdc++ ${.CURDIR}/../libstdc++-v3
 LIBDPLIBS+=pthread ${.CURDIR}/../../../../../lib/libpthread
 COPTS+=-std=gnu++11 -fsized-deallocation -fvisibility=hidden
 COPTS+=-fno-builtin -fno-exceptions -fno-rtti -funwind-tables



CVS commit: src/external/gpl3/gcc/lib/libasan

2018-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  9 22:39:29 UTC 2018

Modified Files:
src/external/gpl3/gcc/lib/libasan: Makefile

Log Message:
consistency, define to empty.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/external/gpl3/gcc/lib/libasan/Makefile

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

Modified files:

Index: src/external/gpl3/gcc/lib/libasan/Makefile
diff -u src/external/gpl3/gcc/lib/libasan/Makefile:1.23 src/external/gpl3/gcc/lib/libasan/Makefile:1.24
--- src/external/gpl3/gcc/lib/libasan/Makefile:1.23	Fri Jun  1 21:38:41 2018
+++ src/external/gpl3/gcc/lib/libasan/Makefile	Sat Jun  9 18:39:29 2018
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.23 2018/06/02 01:38:41 christos Exp $
+# $NetBSD: Makefile,v 1.24 2018/06/09 22:39:29 christos Exp $
 
 UNSUPPORTED_COMPILER.clang=	# defined
-NOSANITIZER=yes
+NOSANITIZER=	# defined
 
 .include 
 



CVS commit: src/sys/dev/raidframe

2018-06-09 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Sat Jun  9 21:18:41 UTC 2018

Modified Files:
src/sys/dev/raidframe: rf_layout.h

Log Message:
Fix two mis-spellings in comments.  No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/raidframe/rf_layout.h

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

Modified files:

Index: src/sys/dev/raidframe/rf_layout.h
diff -u src/sys/dev/raidframe/rf_layout.h:1.17 src/sys/dev/raidframe/rf_layout.h:1.18
--- src/sys/dev/raidframe/rf_layout.h:1.17	Sun Mar  4 06:02:38 2007
+++ src/sys/dev/raidframe/rf_layout.h	Sat Jun  9 21:18:41 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_layout.h,v 1.17 2007/03/04 06:02:38 christos Exp $	*/
+/*	$NetBSD: rf_layout.h,v 1.18 2018/06/09 21:18:41 oster Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -88,7 +88,7 @@ struct RF_RaidLayout_s {
  * The mapping code returns a pointer to a list of AccessStripeMap structures, which
  * describes all the mapping information about an access.  The list contains one
  * AccessStripeMap structure per stripe touched by the access.  Each element in the list
- * contains a stripe identifier and a pointer to a list of PhysDiskAddr structuress.  Each
+ * contains a stripe identifier and a pointer to a list of PhysDiskAddr structures.  Each
  * element in this latter list describes the physical location of a stripe unit accessed
  * within the corresponding stripe.
  *
@@ -192,7 +192,7 @@ typedef struct RF_FailedStripe_s RF_Fail
 struct RF_FailedStripe_s {
 	RF_VoidFunctionPointerListElem_t *vfple;   /* linked list of pointers to DAG creation
 		  functions for stripes */
-	RF_VoidFunctionPointerListElem_t *bvfple;  /* linked list of poitners to DAG creation
+	RF_VoidFunctionPointerListElem_t *bvfple;  /* linked list of pointers to DAG creation
 		  functions for blocks */
 	RF_ASMHeaderListElem_t *asmh_u;/* Access Stripe Map Headers for regular
 		  stripes */



CVS commit: src/sys/dev/pci

2018-06-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  9 18:53:16 UTC 2018

Modified Files:
src/sys/dev/pci: if_msk.c if_skreg.h

Log Message:
port basic match support for several more Yukon variants from OpenBSD, together
with some basic conditionals I've found in that driver; only compile-tested, so
very likely needs further work to actually work

adresses also PR kern/43507


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/if_msk.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/if_skreg.h

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

Modified files:

Index: src/sys/dev/pci/if_msk.c
diff -u src/sys/dev/pci/if_msk.c:1.55 src/sys/dev/pci/if_msk.c:1.56
--- src/sys/dev/pci/if_msk.c:1.55	Fri Oct 20 12:01:43 2017
+++ src/sys/dev/pci/if_msk.c	Sat Jun  9 18:53:16 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_msk.c,v 1.55 2017/10/20 12:01:43 christos Exp $ */
+/* $NetBSD: if_msk.c,v 1.56 2018/06/09 18:53:16 jdolecek Exp $ */
 /*	$OpenBSD: if_msk.c,v 1.42 2007/01/17 02:43:02 krw Exp $	*/
 
 /*
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.55 2017/10/20 12:01:43 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_msk.c,v 1.56 2018/06/09 18:53:16 jdolecek Exp $");
 
 #include 
 #include 
@@ -154,31 +154,39 @@ static const struct msk_product {
 	{ PCI_VENDOR_DLINK,		PCI_PRODUCT_DLINK_DGE550SX },
 	{ PCI_VENDOR_DLINK,		PCI_PRODUCT_DLINK_DGE560SX },
 	{ PCI_VENDOR_DLINK,		PCI_PRODUCT_DLINK_DGE560T },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_1 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C032 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C033 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C034 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C036 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C042 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021CU },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021X },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8022CU },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8022X },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8035 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8036 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8038 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8039 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8040 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8048 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8050 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8052 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8053 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8055 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8055_2 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8056 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8057 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8058 },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021CU },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8021X },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8022CU },
-	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8022X },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8059 },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8061CU },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8061X },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8062CU },
 	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKONII_8062X },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8070 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8071 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8072 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8075 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_8079 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C032 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C033 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C034 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C036 },
+	{ PCI_VENDOR_MARVELL,		PCI_PRODUCT_MARVELL_YUKON_C042 },
 	{ PCI_VENDOR_SCHNEIDERKOCH,	PCI_PRODUCT_SCHNEIDERKOCH_SK_9SXX },
 	{ PCI_VENDOR_SCHNEIDERKOCH,	PCI_PRODUCT_SCHNEIDERKOCH_SK_9E21 }
 };
@@ -754,6 +762,12 @@ msk_update_int_mod(struct sk_softc *sc, 
 	switch (sc->sk_type) {
 	case SK_YUKON_EC:
 	case SK_YUKON_EC_U:
+	case SK_YUKON_EX:
+	case SK_YUKON_SUPR:
+	case SK_YUKON_ULTRA2:
+	case SK_YUKON_OPTIMA:
+	case SK_YUKON_PRM:
+	case SK_YUKON_OPTIMA2:
 		imtimer_ticks = SK_IMTIMER_TICKS_YUKON_EC;
 		break;
 	case SK_YUKON_FE:
@@ -825,7 +839,8 @@ void msk_reset(struct sk_softc *sc)
 	else
 		reg1 &= ~(SK_Y2_REG1_PHY1_COMA | SK_Y2_REG1_PHY2_COMA);
 
-	if (sc->sk_type == SK_YUKON_EC_U) {
+	if (sc->sk_type == SK_YUKON_EC_U || sc->sk_type == SK_YUKON_EX ||
+	sc->sk_type >= SK_YUKON_FE_P) {
 		uint32_t our;
 
 		CSR_WRITE_2(sc, SK_CSR, SK_CSR_WOL_ON);
@@ -862,6 +877,11 @@ void msk_reset(struct sk_softc *sc)
 	

CVS commit: src/sys/ufs/lfs

2018-06-09 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Sat Jun  9 18:48:31 UTC 2018

Modified Files:
src/sys/ufs/lfs: lfs_bio.c lfs_segment.c

Log Message:
Add missing b_cflags and b_oflags.
Ok dholland@
Addresses PR kern/42342 by Yoshihiro Nakajima


To generate a diff of this commit:
cvs rdiff -u -r1.141 -r1.142 src/sys/ufs/lfs/lfs_bio.c
cvs rdiff -u -r1.276 -r1.277 src/sys/ufs/lfs/lfs_segment.c

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

Modified files:

Index: src/sys/ufs/lfs/lfs_bio.c
diff -u src/sys/ufs/lfs/lfs_bio.c:1.141 src/sys/ufs/lfs/lfs_bio.c:1.142
--- src/sys/ufs/lfs/lfs_bio.c:1.141	Sat Jun 10 05:29:36 2017
+++ src/sys/ufs/lfs/lfs_bio.c	Sat Jun  9 18:48:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_bio.c,v 1.141 2017/06/10 05:29:36 maya Exp $	*/
+/*	$NetBSD: lfs_bio.c,v 1.142 2018/06/09 18:48:31 zafer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003, 2008 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.141 2017/06/10 05:29:36 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.142 2018/06/09 18:48:31 zafer Exp $");
 
 #include 
 #include 
@@ -420,8 +420,7 @@ lfs_bwrite_ext(struct buf *bp, int flags
 	ASSERT_MAYBE_SEGLOCK(fs);
 	KASSERT(bp->b_cflags & BC_BUSY);
 	KASSERT(flags & BW_CLEAN || !LFS_IS_MALLOC_BUF(bp));
-	KASSERT(((bp->b_oflags | bp->b_flags) & (BO_DELWRI|B_LOCKED))
-	!= BO_DELWRI);
+	KASSERT((bp->b_flags & B_LOCKED) || !(bp->b_oflags & BO_DELWRI));
 
 	/*
 	 * Don't write *any* blocks if we're mounted read-only, or

Index: src/sys/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.276 src/sys/ufs/lfs/lfs_segment.c:1.277
--- src/sys/ufs/lfs/lfs_segment.c:1.276	Wed Jun  6 01:49:09 2018
+++ src/sys/ufs/lfs/lfs_segment.c	Sat Jun  9 18:48:31 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.276 2018/06/06 01:49:09 maya Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.277 2018/06/09 18:48:31 zafer Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.276 2018/06/06 01:49:09 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.277 2018/06/09 18:48:31 zafer Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1408,13 +1408,13 @@ loop:
 			continue;
 		}
 #ifdef DIAGNOSTIC
-# ifdef LFS_USE_B_INVAL
-		if ((bp->b_flags & BC_INVAL) != 0 && bp->b_iodone == NULL) {
+# ifdef LFS_USE_BC_INVAL
+		if ((bp->b_cflags & BC_INVAL) != 0 && bp->b_iodone == NULL) {
 			DLOG((DLOG_SEG, "lfs_gather: lbn %" PRId64
 			  " is BC_INVAL\n", bp->b_lblkno));
 			VOP_PRINT(bp->b_vp);
 		}
-# endif /* LFS_USE_B_INVAL */
+# endif /* LFS_USE_BC_INVAL */
 		if (!(bp->b_oflags & BO_DELWRI))
 			panic("lfs_gather: bp not BO_DELWRI");
 		if (!(bp->b_flags & B_LOCKED)) {
@@ -2106,7 +2106,7 @@ lfs_writeseg(struct lfs *fs, struct segm
 	LFS_WRITESEGENTRY(sup, fs, sp->seg_number, bp); /* Ifile */
 
 	/*
-	 * Mark blocks B_BUSY, to prevent then from being changed between
+	 * Mark blocks BC_BUSY, to prevent then from being changed between
 	 * the checksum computation and the actual write.
 	 *
 	 * If we are cleaning, check indirect blocks for UNWRITTEN, and if
@@ -2217,7 +2217,7 @@ lfs_writeseg(struct lfs *fs, struct segm
 		/* Loop through gop_write cluster blocks */
 		for (byteoffset = 0; byteoffset < (*bpp)->b_bcount;
 		 byteoffset += lfs_sb_getbsize(fs)) {
-#ifdef LFS_USE_B_INVAL
+#ifdef LFS_USE_BC_INVAL
 			if (((*bpp)->b_cflags & BC_INVAL) != 0 &&
 			(*bpp)->b_iodone != NULL) {
 if (copyin((void *)(*bpp)->b_saveaddr +
@@ -2228,7 +2228,7 @@ lfs_writeseg(struct lfs *fs, struct segm
 		(*bpp)->b_lblkno);
 }
 			} else
-#endif /* LFS_USE_B_INVAL */
+#endif /* LFS_USE_BC_INVAL */
 			{
 sum = lfs_cksum_part((char *)
 (*bpp)->b_data + byteoffset, el_size, sum);
@@ -2320,9 +2320,9 @@ lfs_writeseg(struct lfs *fs, struct segm
 			bp->b_bcount, bp->b_blkno,
 			sp->seg_number);
 
-#ifdef LFS_USE_B_INVAL
+#ifdef LFS_USE_BC_INVAL
 			/*
-			 * Fake buffers from the cleaner are marked as B_INVAL.
+			 * Fake buffers from the cleaner are marked as BC_INVAL.
 			 * We need to copy the data from user space rather than
 			 * from the buffer indicated.
 			 * XXX == what do I do on an error?
@@ -2333,7 +2333,7 @@ lfs_writeseg(struct lfs *fs, struct segm
 	panic("lfs_writeseg: "
 	"copyin failed [2]");
 			} else
-#endif /* LFS_USE_B_INVAL */
+#endif /* LFS_USE_BC_INVAL */
 			if (cl->flags & LFS_CL_MALLOC) {
 /* copy data into our cluster. */
 memcpy(p, bp->b_data, bp->b_bcount);
@@ -2590,8 +2590,7 @@ lfs_cluster_aiodone(struct buf *bp)
 			tbp->b_flags |= B_ASYNC; /* for biodone */
 		}
 
-		if (((tbp->b_flags | tbp->b_oflags) &
-		(B_LOCKED | BO_DELWRI)) == B_LOCKED)
+		if ((tbp->b_flags & B_LOCKED) && !(tbp->b_oflags & BO_DELWRI))
 			LFS_UNLOCK_BUF(tbp);
 
 		if 

CVS commit: src/sys/dev/pci

2018-06-09 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Sat Jun  9 18:39:33 UTC 2018

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
small sync of Marvell Yukon PCI product ids with OpenBSD - add 8048 variant, 
rename
YUKON_1 to YUKON_8070

also adjust description for YUKON_8055_2 to have "88E8055-2" just so that it 
shows
up differently


To generate a diff of this commit:
cvs rdiff -u -r1.1339 -r1.1340 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1339 src/sys/dev/pci/pcidevs:1.1340
--- src/sys/dev/pci/pcidevs:1.1339	Thu May 31 09:11:47 2018
+++ src/sys/dev/pci/pcidevs	Sat Jun  9 18:39:32 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1339 2018/05/31 09:11:47 mrg Exp $
+$NetBSD: pcidevs,v 1.1340 2018/06/09 18:39:32 jdolecek Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -2501,13 +2501,14 @@ product MARVELL YUKON_8038	0x4352	Yukon 
 product MARVELL YUKON_8039	0x4353	Yukon 88E8039
 product MARVELL YUKON_8040	0x4354	Yukon 88E8040
 product MARVELL YUKON_8040T	0x4355	Yukon 88E8040T
+product MARVELL YUKON_8048	0x435a	Yukon 88E8048
 product MARVELL YUKON_C033	0x4356	Yukon 88EC033
 product MARVELL YUKON_8052	0x4360	Yukon 88E8052
 product MARVELL YUKON_8050	0x4361	Yukon 88E8050
 product MARVELL YUKON_8053	0x4362	Yukon 88E8053
 product MARVELL YUKON_8055	0x4363	Yukon 88E8055
 product MARVELL YUKON_8056	0x4364	Yukon 88E8056
-product MARVELL YUKON_1		0x4365	Yukon
+product MARVELL YUKON_8070	0x4365	Yukon 88E8056
 product MARVELL YUKON_C036	0x4366	Yukon 88EC036
 product MARVELL YUKON_C032	0x4367	Yukon 88EC032
 product MARVELL YUKON_C034	0x4368	Yukon 88EC034
@@ -2515,7 +2516,7 @@ product MARVELL YUKON_C042	0x4369	Yukon 
 product MARVELL YUKON_8058	0x436a	Yukon 88E8058
 product MARVELL YUKON_8071	0x436b	Yukon 88E8071
 product MARVELL YUKON_8072	0x436c	Yukon 88E8072
-product MARVELL YUKON_8055_2	0x436d	Yukon 88E8055
+product MARVELL YUKON_8055_2	0x436d	Yukon 88E8055-2
 product MARVELL YUKON_8075	0x4370	Yukon 88E8075
 product MARVELL YUKON_8057	0x4380	Yukon 88E8057
 product MARVELL YUKON_8059	0x4381	Yukon 88E8059



CVS commit: [netbsd-8] src/doc

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 18:01:25 UTC 2018

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

Log Message:
Ammend ticket #780


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.206 -r1.1.2.207 src/doc/CHANGES-8.0

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.0
diff -u src/doc/CHANGES-8.0:1.1.2.206 src/doc/CHANGES-8.0:1.1.2.207
--- src/doc/CHANGES-8.0:1.1.2.206	Sat Jun  9 15:46:27 2018
+++ src/doc/CHANGES-8.0	Sat Jun  9 18:01:24 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.206 2018/06/09 15:46:27 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.207 2018/06/09 18:01:24 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -13849,6 +13849,7 @@ usr.bin/make/unit-tests/Makefile		1.53
 usr.bin/make/unit-tests/varquote.exp		upto 1.2
 usr.bin/make/unit-tests/varquote.mk		upto 1.2
 usr.bin/make/var.c1.220
+distrib/sets/lists/tests/mi			1.784
 
 	- Introduce :q modifier for make variables and make it double escape
 	   $'s so that passing variables to recursive makes with :q works as



CVS commit: [netbsd-8] src/distrib/sets/lists/tests

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 17:59:43 UTC 2018

Modified Files:
src/distrib/sets/lists/tests [netbsd-8]: mi

Log Message:
Also pull up r1.784 for ticket #870:

add new tests


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

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

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.752.2.9 src/distrib/sets/lists/tests/mi:1.752.2.10
--- src/distrib/sets/lists/tests/mi:1.752.2.9	Sun Feb 11 21:17:34 2018
+++ src/distrib/sets/lists/tests/mi	Sat Jun  9 17:59:43 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.752.2.9 2018/02/11 21:17:34 snj Exp $
+# $NetBSD: mi,v 1.752.2.10 2018/06/09 17:59:43 martin Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -3857,6 +3857,8 @@
 ./usr/tests/usr.bin/make/unit-tests/varcmd.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmisc.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varmisc.mk	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varquote.exp	tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/varquote.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varshell.exp	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/varshell.mk	tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/mixerctl			tests-usr.bin-tests	compattestfile,atf



CVS commit: src/lib/libedit

2018-06-09 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Jun  9 17:41:55 UTC 2018

Modified Files:
src/lib/libedit: readline.c
src/lib/libedit/readline: readline.h

Log Message:
Provide more compatibility with readline headers; now python-3.6.5 works
when changing 'readline' -> 'edit' in setup.py.
Revert previous conditional setting of unbuffered.


To generate a diff of this commit:
cvs rdiff -u -r1.146 -r1.147 src/lib/libedit/readline.c
cvs rdiff -u -r1.42 -r1.43 src/lib/libedit/readline/readline.h

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

Modified files:

Index: src/lib/libedit/readline.c
diff -u src/lib/libedit/readline.c:1.146 src/lib/libedit/readline.c:1.147
--- src/lib/libedit/readline.c:1.146	Mon Jan  1 17:32:46 2018
+++ src/lib/libedit/readline.c	Sat Jun  9 13:41:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.c,v 1.146 2018/01/01 22:32:46 christos Exp $	*/
+/*	$NetBSD: readline.c,v 1.147 2018/06/09 17:41:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: readline.c,v 1.146 2018/01/01 22:32:46 christos Exp $");
+__RCSID("$NetBSD: readline.c,v 1.147 2018/06/09 17:41:55 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include 
@@ -80,7 +80,7 @@ int rl_end = 0;
 char *rl_line_buffer = NULL;
 rl_vcpfunc_t *rl_linefunc = NULL;
 int rl_done = 0;
-VFunction *rl_event_hook = NULL;
+rl_hook_func_t *rl_event_hook = NULL;
 KEYMAP_ENTRY_ARRAY emacs_standard_keymap,
 emacs_meta_keymap,
 emacs_ctlx_keymap;
@@ -429,7 +429,7 @@ readline(const char *p)
 	if (rl_pre_input_hook)
 		(*rl_pre_input_hook)(NULL, 0);
 
-	if (rl_event_hook && !(e->el_flags_TTY)) {
+	if (rl_event_hook && !(e->el_flags & NO_TTY)) {
 		el_set(e, EL_GETCFN, _rl_event_read_char);
 		used_event_hook = 1;
 	}
@@ -2074,15 +2074,12 @@ rl_callback_read_char(void)
 	if (done && rl_linefunc != NULL) {
 		el_set(e, EL_UNBUFFERED, 0);
 		if (done == 2) {
-		if ((wbuf = strdup(buf)) != NULL)
-			wbuf[count] = '\0';
+			if ((wbuf = strdup(buf)) != NULL)
+wbuf[count] = '\0';
 		} else
 			wbuf = NULL;
 		(*(void (*)(const char *))rl_linefunc)(wbuf);
-		if (!rl_already_prompted) {
-		el_set(e, EL_UNBUFFERED, 1);
-		rl_already_prompted = 1;
-		}
+		el_set(e, EL_UNBUFFERED, 1);
 	}
 }
 

Index: src/lib/libedit/readline/readline.h
diff -u src/lib/libedit/readline/readline.h:1.42 src/lib/libedit/readline/readline.h:1.43
--- src/lib/libedit/readline/readline.h:1.42	Fri Sep  1 06:19:10 2017
+++ src/lib/libedit/readline/readline.h	Sat Jun  9 13:41:55 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: readline.h,v 1.42 2017/09/01 10:19:10 christos Exp $	*/
+/*	$NetBSD: readline.h,v 1.43 2018/06/09 17:41:55 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -38,11 +38,13 @@
 
 /* typedefs */
 typedef int	  Function(const char *, int);
+typedef char *CPFunction(const char *, int);
 typedef void	  VFunction(void);
 typedef void	  rl_vcpfunc_t(char *);
 typedef char	**rl_completion_func_t(const char *, int, int);
 typedef char *rl_compentry_func_t(const char *, int);
 typedef int	  rl_command_func_t(int, int);
+typedef int	  rl_hook_func_t(void);
 
 /* only supports length */
 typedef struct {
@@ -137,6 +139,7 @@ extern VFunction	*rl_redisplay_function;
 extern VFunction	*rl_completion_display_matches_hook;
 extern VFunction	*rl_prep_term_function;
 extern VFunction	*rl_deprep_term_function;
+extern rl_hook_func_t	*rl_event_hook;
 extern int		readline_echoing_p;
 extern int		_rl_print_completions_horizontally;
 
@@ -177,7 +180,7 @@ char		*filename_completion_function(cons
 char		*username_completion_function(const char *, int);
 int		 rl_complete(int, int);
 int		 rl_read_key(void);
-char	   **completion_matches(const char *, rl_compentry_func_t *);
+char	   **completion_matches(/* const */ char *, rl_compentry_func_t *);
 void		 rl_display_match_list(char **, int, int);
 
 int		 rl_insert(int, int);



CVS commit: [netbsd-8] src/doc

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:46:27 UTC 2018

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

Log Message:
Tickets #850 - #852, #854 - #858, #861 - #865, #867 - #874


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.205 -r1.1.2.206 src/doc/CHANGES-8.0

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.0
diff -u src/doc/CHANGES-8.0:1.1.2.205 src/doc/CHANGES-8.0:1.1.2.206
--- src/doc/CHANGES-8.0:1.1.2.205	Thu Jun  7 18:37:04 2018
+++ src/doc/CHANGES-8.0	Sat Jun  9 15:46:27 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.205 2018/06/07 18:37:04 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.206 2018/06/09 15:46:27 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -13677,3 +13677,202 @@ doc/3RDPARTY	(manually modified)
 
 	Import dhcpcd 7.0.5b.
 	[roy, ticket #849]
+
+usr.bin/tr/str.c1.30
+
+	Do not accept invalid octal character values.
+	[leot, ticket #850]
+
+sys/external/bsd/drm2/nouveau/nouveau_pci.c	1.9-1.11
+
+	Disable drm2 on modern nouveau cards (Pascal-based)
+	and second generation of Maxwell, they are not supported
+	by this version of the drm code.
+	[mrg, ticket #851]
+
+sys/net/route.c	1.210
+sys/netinet/ip_icmp.c1.171
+sys/netinet6/icmp6.c1.238
+
+	Fix _rt_free via rtrequest(RTM_DELETE) hangs in rt_timer handlers.
+	[ozaki-r, ticket #852]
+
+external/mpl/dhcp/dist/common/bpf.c		1.3
+(as external/bsd/dhcp/dist/common/bpf.c)
+
+	Handle carp interfaces.
+	[maya, ticket #854]
+
+sbin/fsck_lfs/bufcache.c			1.20
+sbin/fsck_lfs/bufcache.h			1.14
+
+	Fix incore(), use a 64bit logical block number.
+	[maya, ticket #855]
+
+sys/nfs/nfs.h	1.76
+sys/nfs/nfs_clntsocket.c			1.6
+sys/nfs/nfs_socket.c1.199
+sys/nfs/nfs_subs.c1.230
+
+	Protect the nfs request queue with its own mutex.
+	Make the nfs_receive queue check for signals so that intr mounts
+	can be interrupted.
+	[maya, ticket #856]
+
+sys/dev/pci/mpii.c1.9
+
+	Fix malloc flags to avoid a sleep in interrupt context.
+	[maya, ticket #857]
+
+usr.sbin/makefs/ffs.c1.70
+
+	Fix makefs UFS2 lazy inode initialization.
+	[maya, ticket #858]
+
+sys/compat/common/rtsock_50.c			1.7
+
+	Added missing ifi_link_state at compat_50_rt_oifmsg() and
+	compat_50_iflist().
+	[nonaka, ticket #861]
+
+
+sys/net/if_llatbl.c1.27
+
+	It is necessary to use wall time instead of monotonic time
+	for rmx_expire.
+	[nonaka, ticket #862]
+
+sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x 1.6,1.7 (patch)
+
+	Work around a binutils problem by adding a .pad section.
+	[uwe, ticket #863]
+
+sys/dev/pci/ixgbe/ix_txrx.c			1.40-1.47 (patch)
+sys/dev/pci/ixgbe/ixgbe.c			1.148,1.149,1.151,1.152,1.154
+		1.155,1.157-1.160 (patch)
+sys/dev/pci/ixgbe/ixgbe.h			1.43,1.44,1.46,1.49 (patch)
+sys/dev/pci/ixgbe/ixgbe_netbsd.c		1.7 (patch)
+sys/dev/pci/ixgbe/ixgbe_netbsd.h		1.8 (patch)
+sys/dev/pci/ixgbe/ixgbe_osdep.h			1.22 (patch)
+sys/dev/pci/ixgbe/ixv.c1.100-1.104 (patch)
+sys/dev/pci/ixgbe/ixv.c1.94,1.95,1.99 (patch)
+
+	- Use ixgbe_eitr_write() when writing the EITR for the link interrupt
+	  like queue's EITR to write the register safely.
+	- Don't free and reallocate bus_dmamem when it's not required.
+	- QPRDC register is only for 82599 and newer.
+	- Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT].
+	- The TQSMR register is not for receiving but for transmitting, so
+	  move the initialization from ixgbe_initialize_receive_units()
+	  to ixgbe_initialize_transmit_units().
+	- Add rxd_nxck (Receive Descriptor next to check) read only sysctl.
+	-  Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving
+	  a descriptor with DD bit is worse than just processing the entry.
+	  And it's also racy to check IFF_RUNNING in rxeof().
+	- Add "bool txr_no_space" for TX descriptor shortage. Use it like
+	  IFF_OACTIVE.
+	- Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without
+	  this, interrupt mask state and EIMS may mismatch and if_init
+	  doesn't recover from TX/RX stall problem.
+	- Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some
+	  registers to console.
+	- Constify several variables in ixgbe/ so that they land in
+	  .rodata (1038 bytes).
+	- Don't call ixgbe_rearm_queues() in ixgbe_local_timer1() to avoid
+	  disabling TX/RX interrupt forever (PR#53294).
+	- Remove unused structure entries and macros.
+	- Whitespace fix.
+	[msaitoh, ticket #864]
+
+sys/arch/amd64/amd64/machdep.c		1.303 (patch)
+sys/arch/amd64/conf/GENERIC		1.492 (patch)
+sys/arch/amd64/conf/files.amd64		1.103 (patch)
+sys/arch/i386/i386/machdep.c		1.806 (patch)
+sys/arch/i386/conf/GENERIC		1.1179 (patch)
+sys/arch/i386/conf/files.i386		1.393 (patch)
+sys/arch/x86/include/cpu.h		1.91 (patch)
+sys/arch/x86/include/specialreg.h	upto 1.126 (patch)
+sys/arch/x86/x86/x86_machdep.c		upto 1.115 (patch, 

CVS commit: [netbsd-8] src/share/i18n/esdb/ISO-8859

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:43:34 UTC 2018

Modified Files:
src/share/i18n/esdb/ISO-8859 [netbsd-8]: ISO-8859.alias

Log Message:
Pull up following revision(s) (requested by maya in ticket #874):

share/i18n/esdb/ISO-8859/ISO-8859.alias: revision 1.4

Add more aliases for Hebrew and Arabic ISO-8859-... encodings.

ISO-8859-8 is supposed to be visual order (i.e. legible if displayed ltr)
ISO-8859-8-i is supposed to be implicit logic order
ISO-8859-8-e is supposed to be explicit about order

In practice, ISO-8859-8 implying visual order is rare, and logic
order is used. ISO-8859-8-e is rarely used.

Same for Arabic, which uses ISO-8859-6-...

Mentioned in RFC 1555, RFC 1556.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.68.1 src/share/i18n/esdb/ISO-8859/ISO-8859.alias

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

Modified files:

Index: src/share/i18n/esdb/ISO-8859/ISO-8859.alias
diff -u src/share/i18n/esdb/ISO-8859/ISO-8859.alias:1.3 src/share/i18n/esdb/ISO-8859/ISO-8859.alias:1.3.68.1
--- src/share/i18n/esdb/ISO-8859/ISO-8859.alias:1.3	Wed Dec 13 15:46:34 2006
+++ src/share/i18n/esdb/ISO-8859/ISO-8859.alias	Sat Jun  9 15:43:34 2018
@@ -1,13 +1,13 @@
-# $NetBSD: ISO-8859.alias,v 1.3 2006/12/13 15:46:34 tnozaki Exp $
+# $NetBSD: ISO-8859.alias,v 1.3.68.1 2018/06/09 15:43:34 martin Exp $
 
 1	iso-8859-1 iso8859-1 iso_8859-1:1987 iso-ir-100 iso_8859-1 latin1 l1 ibm819 cp819
 2	iso-8859-2 iso8859-2 iso_8859-2:1987 iso-ir-101 iso_8859-2 latin2 l2 ibm912 cp912
 3	iso-8859-3 iso8859-3 iso_8859-3:1988 iso-ir-109 iso_8859-3 latin3 l3 ibm913 cp913
 4	iso-8859-4 iso8859-4 iso_8859-4:1988 iso-ir-110 iso_8859-4 latin4 l4 ibm914 cp914
 5	iso-8859-5 iso8859-5 iso_8859-5:1988 iso-ir-144 iso_8859-5 cyrillic ibm915 cp915
-6	iso-8859-6 iso8859-6 iso_8859-6:1987 iso-ir-127 iso_8859-6 ecma-114 asmo-708 arabic ibm1089 cp1089
+6	iso-8859-6 iso-8859-6-i iso-8859-6-e iso8859-6 iso_8859-6:1987 iso-ir-127 iso_8859-6 ecma-114 asmo-708 arabic ibm1089 cp1089
 7	iso-8859-7 iso8859-7 iso_8859-7:1987 iso-ir-126 iso_8859-7 elot_928 ecma-118 greek greek8 ibm813 cp813
-8	iso-8859-8 iso8859-8 iso_8859-8:1988 iso-ir-138 iso_8859-8 hebrew ibm916 cp916
+8	iso-8859-8 iso-8859-8-i iso-8859-8-e iso8859-8 iso_8859-8:1988 iso-ir-138 iso_8859-8 hebrew ibm916 cp916
 9	iso-8859-9 iso8859-9 iso_8859-9:1989 iso-ir-148 iso_8859-9 latin5 l5 ibm920 cp920
 10	iso-8859-10 iso8859-10 iso_8859-10:1992 iso-ir-157 iso_8859-10 latin6 l6
 11	iso-8859-11 iso8859-11 iso_8859-11 iso-ir-166 tis620 tis620-0



CVS commit: [netbsd-8] src/usr.bin/fstat

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:41:38 UTC 2018

Modified Files:
src/usr.bin/fstat [netbsd-8]: misc.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #873):
usr.bin/fstat/misc.c: revision 1.18
Update fstat for audio(4) and pad(4) devices.
XXX - pullup 8.
Ok christos@.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.6.1 src/usr.bin/fstat/misc.c

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

Modified files:

Index: src/usr.bin/fstat/misc.c
diff -u src/usr.bin/fstat/misc.c:1.17 src/usr.bin/fstat/misc.c:1.17.6.1
--- src/usr.bin/fstat/misc.c:1.17	Fri Dec 30 21:08:23 2016
+++ src/usr.bin/fstat/misc.c	Sat Jun  9 15:41:37 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: misc.c,v 1.17 2016/12/30 21:08:23 christos Exp $	*/
+/*	$NetBSD: misc.c,v 1.17.6.1 2018/06/09 15:41:37 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: misc.c,v 1.17 2016/12/30 21:08:23 christos Exp $");
+__RCSID("$NetBSD: misc.c,v 1.17.6.1 2018/06/09 15:41:37 martin Exp $");
 
 #include 
 #include 
@@ -102,7 +102,11 @@ static struct nlist nl[] = {
 { .n_name = "vnops" },
 #define NL_XENEVT	17
 { .n_name = "xenevt_fileops" },
-#define NL_MAX		18
+#define NL_AUDIO	18
+{ .n_name = "audio_fileops" },
+#define NL_PAD		19
+{ .n_name = "pad_fileops" },
+#define NL_MAX		20
 { .n_name = NULL }
 };
 
@@ -277,6 +281,12 @@ pmisc(struct file *f, const char *name)
 	case NL_CRYPTO:
 		printf("* crypto %p\n", f->f_data);
 		return 0;
+	case NL_AUDIO:
+		printf("* audio %p\n", f->f_data);
+		return 0;
+	case NL_PAD:
+		printf("* pad %p\n", f->f_data);
+		return 0;
 	case NL_MAX:
 		printf("* %s ops=%p %p\n", name, f->f_ops, f->f_data);
 		return 0;



CVS commit: [netbsd-8] src/external/bsd/top/dist/machine

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:40:05 UTC 2018

Modified Files:
src/external/bsd/top/dist/machine [netbsd-8]: m_netbsd.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #872):

external/bsd/top/dist/machine/m_netbsd.c: revision 1.20

Fix read of unitialized array elements in top(1)

The cp_old array is allocated with malloc(3) and its pointer is passed to=
percentages64().

In this function there happens a calculation of total_change, which value=
depends on the value inside the unitialized cp_old[] array.

WARNING: MemorySanitizer: use-of-uninitialized-value
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:478:65
SUMMARY: MemorySanitizer: use-of-uninitialized-value
/usr/src/external/bsd/top/bin/../dist/machine/m_netbsd.c:1341:6 in percentages64
Exiting

Fix this issue by changling malloc(3) with calloc(3).

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by 


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.19.6.1 src/external/bsd/top/dist/machine/m_netbsd.c

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

Modified files:

Index: src/external/bsd/top/dist/machine/m_netbsd.c
diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.19 src/external/bsd/top/dist/machine/m_netbsd.c:1.19.6.1
--- src/external/bsd/top/dist/machine/m_netbsd.c:1.19	Mon Dec 26 12:46:31 2016
+++ src/external/bsd/top/dist/machine/m_netbsd.c	Sat Jun  9 15:40:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $	*/
+/*	$NetBSD: m_netbsd.c,v 1.19.6.1 2018/06/09 15:40:05 martin Exp $	*/
 
 /*
  * top - a top users display for Unix
@@ -37,12 +37,12 @@
  *		Andrew Doran 
  *
  *
- * $Id: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $
+ * $Id: m_netbsd.c,v 1.19.6.1 2018/06/09 15:40:05 martin Exp $
  */
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: m_netbsd.c,v 1.19 2016/12/26 12:46:31 leot Exp $");
+__RCSID("$NetBSD: m_netbsd.c,v 1.19.6.1 2018/06/09 15:40:05 martin Exp $");
 #endif
 
 #include 
@@ -335,7 +335,7 @@ machine_init(statics)
 		ncpu = 1;
 
 	cpu_states = malloc(sizeof(cpu_states[0]) * CPUSTATES * ncpu);
-	cp_old = malloc(sizeof(cp_old[0]) * CPUSTATES * ncpu);
+	cp_old = calloc(CPUSTATES * ncpu, sizeof(cp_old[0]));
 	cp_diff = malloc(sizeof(cp_diff[0]) * CPUSTATES * ncpu);
 	if (cpu_states == NULL || cp_time == NULL || cp_old == NULL ||
 	cp_diff == NULL) {



CVS commit: [netbsd-8] src/external/bsd/top/dist

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:37:57 UTC 2018

Modified Files:
src/external/bsd/top/dist [netbsd-8]: top.c

Log Message:
Pull up following revision(s) (requested by kamil in ticket #871):

external/bsd/top/dist/top.c: revision 1.10

Fix unitialized signal mask passed to sigaction(2) in top(1)

Detected with Memory Sanitizer during the integration of sanitizers with
the NetBSD basesystem.

Reported by 


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.9.24.1 src/external/bsd/top/dist/top.c

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

Modified files:

Index: src/external/bsd/top/dist/top.c
diff -u src/external/bsd/top/dist/top.c:1.9 src/external/bsd/top/dist/top.c:1.9.24.1
--- src/external/bsd/top/dist/top.c:1.9	Fri Mar 23 14:46:05 2012
+++ src/external/bsd/top/dist/top.c	Sat Jun  9 15:37:57 2018
@@ -135,6 +135,7 @@ set_signal(int sig, RETSIGTYPE (*handler
 #ifdef HAVE_SIGACTION
 struct sigaction action;
 
+sigemptyset(_mask);
 action.sa_handler = handler;
 action.sa_flags = 0;
 (void) sigaction(sig, , NULL);



CVS commit: [netbsd-8] src

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:35:38 UTC 2018

Modified Files:
src/external/mit/xorg [netbsd-8]: xorg-pkg-ver.mk
src/sys/arch/acorn32/stand/lib [netbsd-8]: Makefile.inc
src/sys/arch/hppa/spmath [netbsd-8]: Makefile.inc
src/sys/arch/i386/stand/lib [netbsd-8]: Makefile.inc
src/sys/arch/ia64/stand/efi/libefi [netbsd-8]: Makefile.inc
src/sys/arch/m68k/fpsp [netbsd-8]: Makefile.inc
src/sys/compat/common [netbsd-8]: Makefile.inc
src/sys/lib/libgnuefi [netbsd-8]: Makefile.inc
src/sys/lib/libkern [netbsd-8]: Makefile.inc
src/sys/lib/libsa [netbsd-8]: Makefile.inc
src/sys/lib/libz [netbsd-8]: Makefile.inc
src/usr.bin/make [netbsd-8]: make.1 var.c
src/usr.bin/make/unit-tests [netbsd-8]: Makefile
Added Files:
src/usr.bin/make/unit-tests [netbsd-8]: varquote.exp varquote.mk

Log Message:
Pull up following revision(s) (requested by christos in ticket #870):

sys/lib/libgnuefi/Makefile.inc: revision 1.5
external/mit/xorg/xorg-pkg-ver.mk: revision 1.9
sys/arch/i386/stand/lib/Makefile.inc: revision 1.17
sys/compat/common/Makefile.inc: revision 1.25
usr.bin/make/unit-tests/varquote.exp: revision 1.1, 1.2
sys/lib/libsa/Makefile.inc: revision 1.24
usr.bin/make/var.c: revision 1.220
sys/arch/ia64/stand/efi/libefi/Makefile.inc: revision 1.5
sys/arch/hppa/spmath/Makefile.inc: revision 1.10
usr.bin/make/unit-tests/varquote.mk: revision 1.1, 1.2
usr.bin/make/unit-tests/Makefile: revision 1.53
sys/lib/libkern/Makefile.inc: revision 1.45
sys/arch/acorn32/stand/lib/Makefile.inc: revision 1.4
sys/arch/m68k/fpsp/Makefile.inc: revision 1.21
usr.bin/make/make.1: revision 1.273
sys/lib/libz/Makefile.inc: revision 1.17

- Introduce :q modifier for make variables and make it double escape $'s so
  that passing variables to recursive makes with :q works as expected.
- Adjust makefiles that use recursive make to use :q

Discussed on tech-toolchain@

XXX: pullup 8


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.8.1 src/external/mit/xorg/xorg-pkg-ver.mk
cvs rdiff -u -r1.3 -r1.3.10.1 src/sys/arch/acorn32/stand/lib/Makefile.inc
cvs rdiff -u -r1.9 -r1.9.10.1 src/sys/arch/hppa/spmath/Makefile.inc
cvs rdiff -u -r1.16 -r1.16.10.1 src/sys/arch/i386/stand/lib/Makefile.inc
cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/arch/ia64/stand/efi/libefi/Makefile.inc
cvs rdiff -u -r1.20 -r1.20.10.1 src/sys/arch/m68k/fpsp/Makefile.inc
cvs rdiff -u -r1.22 -r1.22.10.1 src/sys/compat/common/Makefile.inc
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/lib/libgnuefi/Makefile.inc
cvs rdiff -u -r1.44 -r1.44.10.1 src/sys/lib/libkern/Makefile.inc
cvs rdiff -u -r1.23 -r1.23.10.1 src/sys/lib/libsa/Makefile.inc
cvs rdiff -u -r1.16 -r1.16.10.1 src/sys/lib/libz/Makefile.inc
cvs rdiff -u -r1.266.4.1 -r1.266.4.2 src/usr.bin/make/make.1
cvs rdiff -u -r1.215.4.1 -r1.215.4.2 src/usr.bin/make/var.c
cvs rdiff -u -r1.52 -r1.52.8.1 src/usr.bin/make/unit-tests/Makefile
cvs rdiff -u -r0 -r1.2.2.2 src/usr.bin/make/unit-tests/varquote.exp \
src/usr.bin/make/unit-tests/varquote.mk

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

Modified files:

Index: src/external/mit/xorg/xorg-pkg-ver.mk
diff -u src/external/mit/xorg/xorg-pkg-ver.mk:1.8 src/external/mit/xorg/xorg-pkg-ver.mk:1.8.8.1
--- src/external/mit/xorg/xorg-pkg-ver.mk:1.8	Sun Aug  9 10:09:07 2015
+++ src/external/mit/xorg/xorg-pkg-ver.mk	Sat Jun  9 15:35:37 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: xorg-pkg-ver.mk,v 1.8 2015/08/09 10:09:07 aymeric Exp $
+#	$NetBSD: xorg-pkg-ver.mk,v 1.8.8.1 2018/06/09 15:35:37 martin Exp $
 
 # when including this make sure PROG is set so that $X11SRCDIR.$PROG
 # is a valid setting.  set XORG_PKG_VER_PROG if PROG is wrong.
@@ -19,7 +19,7 @@ XORG_PKG_PACKAGE_VERSION!= \
 	}' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
 .if !empty(XORG_PKG_PACKAGE_VERSION)
 CPPFLAGS+=	-DPACKAGE_VERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
-CPPFLAGS+=	-DVERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
+CPPFLAGS+=	-DVERSION=\"${XORG_PKG_PACKAGE_VERSION:q}\"
 .endif
 
 XORG_PKG_PACKAGE_STRING!= \

Index: src/sys/arch/acorn32/stand/lib/Makefile.inc
diff -u src/sys/arch/acorn32/stand/lib/Makefile.inc:1.3 src/sys/arch/acorn32/stand/lib/Makefile.inc:1.3.10.1
--- src/sys/arch/acorn32/stand/lib/Makefile.inc:1.3	Tue Mar 22 08:25:22 2016
+++ src/sys/arch/acorn32/stand/lib/Makefile.inc	Sat Jun  9 15:35:38 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.3 2016/03/22 08:25:22 mrg Exp $
+#	$NetBSD: Makefile.inc,v 1.3.10.1 2018/06/09 15:35:38 martin Exp $
 #
 #	Configuration variables (default values are below):
 #
@@ -22,12 +22,12 @@ RISCOSLIB=		${RISCOSDST}/libriscos.a
 RISCOSMAKE= \
 	cd ${RISCOSDIR} && MAKEOBJDIRPREFIX= && unset MAKEOBJDIRPREFIX && \
 	  MAKEOBJDIR=${RISCOSDST} ${MAKE} \
-	CC=${CC:Q} 

CVS commit: [netbsd-8] src/usr.sbin/sysinst

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:19:28 UTC 2018

Modified Files:
src/usr.sbin/sysinst [netbsd-8]: bsddisklabel.c defs.h menus.mi net.c
partman.c util.c
src/usr.sbin/sysinst/arch/alpha [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/emips [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/hp300 [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/hppa [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/i386 [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/landisk [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/mipsco [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/mvme68k [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/pmax [netbsd-8]: md.c
src/usr.sbin/sysinst/arch/x68k [netbsd-8]: md.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #869):

usr.sbin/sysinst/arch/mvme68k/md.c: revision 1.5
usr.sbin/sysinst/net.c: revision 1.24
usr.sbin/sysinst/partman.c: revision 1.22
usr.sbin/sysinst/menus.mi: revision 1.12
usr.sbin/sysinst/arch/i386/md.c: revision 1.8
usr.sbin/sysinst/arch/alpha/md.c: revision 1.3
usr.sbin/sysinst/bsddisklabel.c: revision 1.3
usr.sbin/sysinst/arch/x68k/md.c: revision 1.5
usr.sbin/sysinst/arch/hp300/md.c: revision 1.5
usr.sbin/sysinst/arch/emips/md.c: revision 1.4
usr.sbin/sysinst/arch/pmax/md.c: revision 1.3
usr.sbin/sysinst/arch/mipsco/md.c: revision 1.3
usr.sbin/sysinst/arch/hppa/md.c: revision 1.3
usr.sbin/sysinst/util.c: revision 1.8
usr.sbin/sysinst/defs.h: revision 1.10
usr.sbin/sysinst/arch/landisk/md.c: revision 1.4

deconst -> __UNCONST, the former involves UB with NULL arithmetic.


To generate a diff of this commit:
cvs rdiff -u -r1.2.20.1 -r1.2.20.2 src/usr.sbin/sysinst/bsddisklabel.c
cvs rdiff -u -r1.9.8.1 -r1.9.8.2 src/usr.sbin/sysinst/defs.h
cvs rdiff -u -r1.11.6.1 -r1.11.6.2 src/usr.sbin/sysinst/menus.mi
cvs rdiff -u -r1.23 -r1.23.6.1 src/usr.sbin/sysinst/net.c
cvs rdiff -u -r1.15.6.3 -r1.15.6.4 src/usr.sbin/sysinst/partman.c
cvs rdiff -u -r1.7 -r1.7.8.1 src/usr.sbin/sysinst/util.c
cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/sysinst/arch/alpha/md.c
cvs rdiff -u -r1.3 -r1.3.8.1 src/usr.sbin/sysinst/arch/emips/md.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/sysinst/arch/hppa/md.c
cvs rdiff -u -r1.6.8.2 -r1.6.8.3 src/usr.sbin/sysinst/arch/i386/md.c
cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/sysinst/arch/landisk/md.c
cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/sysinst/arch/mipsco/md.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.2 -r1.2.20.1 src/usr.sbin/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.4 -r1.4.8.1 src/usr.sbin/sysinst/arch/x68k/md.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/sysinst/bsddisklabel.c
diff -u src/usr.sbin/sysinst/bsddisklabel.c:1.2.20.1 src/usr.sbin/sysinst/bsddisklabel.c:1.2.20.2
--- src/usr.sbin/sysinst/bsddisklabel.c:1.2.20.1	Tue Jun  5 08:12:54 2018
+++ src/usr.sbin/sysinst/bsddisklabel.c	Sat Jun  9 15:19:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: bsddisklabel.c,v 1.2.20.1 2018/06/05 08:12:54 bouyer Exp $	*/
+/*	$NetBSD: bsddisklabel.c,v 1.2.20.2 2018/06/09 15:19:27 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -803,7 +803,7 @@ check_partitions(void)
 	} else
 		rv = -1;
 	if (rv != 0) {
-		process_menu(MENU_ok, deconst(MSG_No_Bootcode));
+		process_menu(MENU_ok, __UNCONST(MSG_No_Bootcode));
 		return 0;
 	}
 #endif
@@ -811,7 +811,7 @@ check_partitions(void)
 	fstype = pm->bsdlabel[pm->rootpart].pi_fstype;
 	if (fstype == FS_BSDFFS &&
 	(pm->bsdlabel[pm->rootpart].pi_flags & PIF_FFSv2) != 0) {
-		process_menu(MENU_ok, deconst(MSG_cannot_ufs2_root));
+		process_menu(MENU_ok, __UNCONST(MSG_cannot_ufs2_root));
 		return 0;
 	}
 #endif

Index: src/usr.sbin/sysinst/defs.h
diff -u src/usr.sbin/sysinst/defs.h:1.9.8.1 src/usr.sbin/sysinst/defs.h:1.9.8.2
--- src/usr.sbin/sysinst/defs.h:1.9.8.1	Tue Jun  5 08:12:54 2018
+++ src/usr.sbin/sysinst/defs.h	Sat Jun  9 15:19:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: defs.h,v 1.9.8.1 2018/06/05 08:12:54 bouyer Exp $	*/
+/*	$NetBSD: defs.h,v 1.9.8.2 2018/06/09 15:19:27 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -45,12 +45,6 @@
 
 const char *getfslabelname(uint8_t);
 
-static inline void *
-deconst(const void *p)
-{
-	return (char *)0 + ((const char *)p - (const char *)0);
-}
-
 #include "msg_defs.h"
 #include "menu_defs.h"
 

Index: src/usr.sbin/sysinst/menus.mi
diff -u src/usr.sbin/sysinst/menus.mi:1.11.6.1 src/usr.sbin/sysinst/menus.mi:1.11.6.2
--- src/usr.sbin/sysinst/menus.mi:1.11.6.1	Tue Jun  5 08:12:54 2018
+++ src/usr.sbin/sysinst/menus.mi	Sat Jun  9 15:19:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: menus.mi,v 

CVS commit: [netbsd-8] src/sys

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:16:30 UTC 2018

Modified Files:
src/sys/kern [netbsd-8]: uipc_socket.c uipc_socket2.c
src/sys/sys [netbsd-8]: socketvar.h

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

sys/sys/socketvar.h: revision 1.156
sys/kern/uipc_socket2.c: revision 1.130
sys/kern/uipc_socket.c: revision 1.264

Separate receive socket errors from general socket errors.


To generate a diff of this commit:
cvs rdiff -u -r1.255.2.2 -r1.255.2.3 src/sys/kern/uipc_socket.c
cvs rdiff -u -r1.124.8.1 -r1.124.8.2 src/sys/kern/uipc_socket2.c
cvs rdiff -u -r1.144.6.2 -r1.144.6.3 src/sys/sys/socketvar.h

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

Modified files:

Index: src/sys/kern/uipc_socket.c
diff -u src/sys/kern/uipc_socket.c:1.255.2.2 src/sys/kern/uipc_socket.c:1.255.2.3
--- src/sys/kern/uipc_socket.c:1.255.2.2	Mon Apr  9 13:34:10 2018
+++ src/sys/kern/uipc_socket.c	Sat Jun  9 15:16:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket.c,v 1.255.2.2 2018/04/09 13:34:10 bouyer Exp $	*/
+/*	$NetBSD: uipc_socket.c,v 1.255.2.3 2018/06/09 15:16:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.255.2.2 2018/04/09 13:34:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.255.2.3 2018/06/09 15:16:30 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1240,11 +1240,16 @@ soreceive(struct socket *so, struct mbuf
 		if (m == NULL && so->so_rcv.sb_cc)
 			panic("receive 1");
 #endif
-		if (so->so_error) {
+		if (so->so_error || so->so_rerror) {
 			if (m != NULL)
 goto dontblock;
-			error = so->so_error;
-			so->so_error = 0;
+			if (so->so_error) {
+error = so->so_error;
+so->so_error = 0;
+			} else {
+error = so->so_rerror;
+so->so_rerror = 0;
+			}
 			goto release;
 		}
 		if (so->so_state & SS_CANTRCVMORE) {
@@ -1564,7 +1569,8 @@ soreceive(struct socket *so, struct mbuf
 		 */
 		while (flags & MSG_WAITALL && m == NULL && uio->uio_resid > 0 &&
 		!sosendallatonce(so) && !nextrecord) {
-			if (so->so_error || so->so_state & SS_CANTRCVMORE)
+			if (so->so_error || so->so_rerror ||
+			so->so_state & SS_CANTRCVMORE)
 break;
 			/*
 			 * If we are peeking and the socket receive buffer is
@@ -2250,7 +2256,7 @@ filt_soread(struct knote *kn, long hint)
 		kn->kn_flags |= EV_EOF;
 		kn->kn_fflags = so->so_error;
 		rv = 1;
-	} else if (so->so_error)
+	} else if (so->so_error || so->so_rerror)
 		rv = 1;
 	else if (kn->kn_sfflags & NOTE_LOWAT)
 		rv = (kn->kn_data >= kn->kn_sdata);

Index: src/sys/kern/uipc_socket2.c
diff -u src/sys/kern/uipc_socket2.c:1.124.8.1 src/sys/kern/uipc_socket2.c:1.124.8.2
--- src/sys/kern/uipc_socket2.c:1.124.8.1	Mon Apr  9 13:34:10 2018
+++ src/sys/kern/uipc_socket2.c	Sat Jun  9 15:16:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_socket2.c,v 1.124.8.1 2018/04/09 13:34:10 bouyer Exp $	*/
+/*	$NetBSD: uipc_socket2.c,v 1.124.8.2 2018/06/09 15:16:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.124.8.1 2018/04/09 13:34:10 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.124.8.2 2018/06/09 15:16:30 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mbuftrace.h"
@@ -504,7 +504,7 @@ soroverflow(struct socket *so)
 	KASSERT(solocked(so));
 
 	so->so_rcv.sb_overflowed++;
-	so->so_error = ENOBUFS;
+	so->so_rerror = ENOBUFS;
 	sorwakeup(so);
 }
 

Index: src/sys/sys/socketvar.h
diff -u src/sys/sys/socketvar.h:1.144.6.2 src/sys/sys/socketvar.h:1.144.6.3
--- src/sys/sys/socketvar.h:1.144.6.2	Mon Apr  9 13:34:10 2018
+++ src/sys/sys/socketvar.h	Sat Jun  9 15:16:30 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: socketvar.h,v 1.144.6.2 2018/04/09 13:34:10 bouyer Exp $	*/
+/*	$NetBSD: socketvar.h,v 1.144.6.3 2018/06/09 15:16:30 martin Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -160,6 +160,7 @@ struct socket {
 	short		so_qlimit;	/* max number queued connections */
 	short		so_timeo;	/* connection timeout */
 	u_short		so_error;	/* error affecting connection */
+	u_short		so_rerror;	/* error affecting receiving */
 	u_short		so_aborting;	/* references from soabort() */
 	pid_t		so_pgid;	/* pgid for signals */
 	u_long		so_oobmark;	/* chars to oob mark */



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

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:14:49 UTC 2018

Modified Files:
src/sys/arch/x86/x86 [netbsd-8]: procfs_machdep.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #867):

sys/arch/x86/x86/procfs_machdep.c: revision 1.23

Add SSBD bit for Intel.


To generate a diff of this commit:
cvs rdiff -u -r1.15.2.4 -r1.15.2.5 src/sys/arch/x86/x86/procfs_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.4 src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.5
--- src/sys/arch/x86/x86/procfs_machdep.c:1.15.2.4	Fri Mar 16 13:08:14 2018
+++ src/sys/arch/x86/x86/procfs_machdep.c	Sat Jun  9 15:14:49 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.15.2.5 2018/06/09 15:14:49 martin Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.4 2018/03/16 13:08:14 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.15.2.5 2018/06/09 15:14:49 martin Exp $");
 
 #include 
 #include 
@@ -190,7 +190,7 @@ static const char * const x86_features[]
 	NULL, NULL, "avx512_4vnniw", "avx512_4fmaps", NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL, NULL, "arch_capabilities", NULL, NULL},
+	NULL, NULL, NULL, NULL, NULL, "arch_capabilities", NULL, "ssbd"},
 };
 
 static int	procfs_getonecpu(int, struct cpu_info *, char *, size_t *);



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

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 15:12:21 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-8]: machdep.c
src/sys/arch/amd64/conf [netbsd-8]: GENERIC files.amd64
src/sys/arch/i386/conf [netbsd-8]: GENERIC files.i386
src/sys/arch/i386/i386 [netbsd-8]: machdep.c
src/sys/arch/x86/include [netbsd-8]: cpu.h specialreg.h
src/sys/arch/x86/x86 [netbsd-8]: x86_machdep.c
Added Files:
src/sys/arch/x86/x86 [netbsd-8]: spectre.c

Log Message:
Pullup the following revisions, requested by maxv in ticket #865:

sys/arch/amd64/amd64/machdep.c  1.303 (patch)
sys/arch/amd64/conf/GENERIC 1.492 (patch)
sys/arch/amd64/conf/files.amd64 1.103 (patch)
sys/arch/i386/i386/machdep.c1.806 (patch)
sys/arch/i386/conf/GENERIC  1.1179 (patch)
sys/arch/i386/conf/files.i386   1.393 (patch)
sys/arch/x86/include/cpu.h  1.91 (patch)
sys/arch/x86/include/specialreg.h   upto 1.126 (patch)
sys/arch/x86/x86/x86_machdep.c  upto 1.115 (patch, adapted)
sys/arch/x86/x86/spectre.c  upto 1.19 (patch, adapted,
no IBRS,
SpectreV2 mitigations not
enabled by default)

Backport the hardware SpectreV2 and SpectreV4 mitigations.


To generate a diff of this commit:
cvs rdiff -u -r1.255.6.6 -r1.255.6.7 src/sys/arch/amd64/amd64/machdep.c
cvs rdiff -u -r1.459.2.9 -r1.459.2.10 src/sys/arch/amd64/conf/GENERIC
cvs rdiff -u -r1.88.8.3 -r1.88.8.4 src/sys/arch/amd64/conf/files.amd64
cvs rdiff -u -r1.1156.2.9 -r1.1156.2.10 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.378.6.2 -r1.378.6.3 src/sys/arch/i386/conf/files.i386
cvs rdiff -u -r1.782.6.5 -r1.782.6.6 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.71.2.5 -r1.71.2.6 src/sys/arch/x86/include/cpu.h
cvs rdiff -u -r1.98.2.4 -r1.98.2.5 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r0 -r1.19.2.2 src/sys/arch/x86/x86/spectre.c
cvs rdiff -u -r1.91.4.2 -r1.91.4.3 src/sys/arch/x86/x86/x86_machdep.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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.255.6.6 src/sys/arch/amd64/amd64/machdep.c:1.255.6.7
--- src/sys/arch/amd64/amd64/machdep.c:1.255.6.6	Thu Mar 22 16:59:03 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Sat Jun  9 15:12:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.255.6.6 2018/03/22 16:59:03 martin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.255.6.7 2018/06/09 15:12:21 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255.6.6 2018/03/22 16:59:03 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.255.6.7 2018/06/09 15:12:21 martin Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1549,6 +1549,9 @@ init_x86_64(paddr_t first_avail)
 	svs_init();
 #endif
 	cpu_init_msrs(_info_primary, true);
+#ifndef XEN
+	cpu_speculation_init(_info_primary);
+#endif
 
 	use_pae = 1; /* PAE always enabled in long mode */
 

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.459.2.9 src/sys/arch/amd64/conf/GENERIC:1.459.2.10
--- src/sys/arch/amd64/conf/GENERIC:1.459.2.9	Wed Apr 18 14:45:08 2018
+++ src/sys/arch/amd64/conf/GENERIC	Sat Jun  9 15:12:21 2018
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.459.2.9 2018/04/18 14:45:08 martin Exp $
+# $NetBSD: GENERIC,v 1.459.2.10 2018/06/09 15:12:21 martin Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.459.2.9 $"
+#ident		"GENERIC-$Revision: 1.459.2.10 $"
 
 maxusers	64		# estimated number of users
 
@@ -77,6 +77,7 @@ options 	SYSCTL_INCLUDE_DESCR	# Include 
 options 	SVS		# Separate Virtual Space
 makeoptions	SPECTRE_V2_GCC_MITIGATION=1	# GCC Spectre variant 2
 		# migitation
+options 	SPECTRE_V2_GCC_MITIGATION
 
 # CPU features
 acpicpu*	at cpu?		# ACPI CPU (including frequency scaling)

Index: src/sys/arch/amd64/conf/files.amd64
diff -u src/sys/arch/amd64/conf/files.amd64:1.88.8.3 src/sys/arch/amd64/conf/files.amd64:1.88.8.4
--- src/sys/arch/amd64/conf/files.amd64:1.88.8.3	Wed Apr 11 14:23:30 2018
+++ src/sys/arch/amd64/conf/files.amd64	Sat Jun  9 15:12:21 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: files.amd64,v 1.88.8.3 2018/04/11 14:23:30 martin Exp $
+#	$NetBSD: files.amd64,v 1.88.8.4 2018/06/09 15:12:21 martin Exp $
 #
 # new style config file for amd64 architecture
 #
@@ -54,6 +54,7 @@ file	arch/amd64/amd64/machdep.c		machdep
 file	arch/amd64/amd64/process_machdep.c	machdep
 file	arch/amd64/amd64/trap.c			

CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:59:43 UTC 2018

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h
ixgbe_netbsd.c ixgbe_netbsd.h ixgbe_osdep.h ixv.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #864):

sys/dev/pci/ixgbe/ix_txrx.c 1.40-1.47 (patch)
sys/dev/pci/ixgbe/ixgbe.c   1.148,1.149,1.151,
1.152,1.154,
1.155,1.157-1.160 
(patch)
sys/dev/pci/ixgbe/ixgbe.h   1.43,1.44,1.46,1.49 
(patch)
sys/dev/pci/ixgbe/ixgbe_netbsd.c1.7 (patch)
sys/dev/pci/ixgbe/ixgbe_netbsd.h1.8 (patch)
sys/dev/pci/ixgbe/ixgbe_osdep.h 1.22 (patch)
sys/dev/pci/ixgbe/ixv.c 1.100-1.104 (patch)
sys/dev/pci/ixgbe/ixv.c 1.94,1.95,1.99 (patch)

 Remove unused structure entries. No functional change.
 -
 Remove unused IXGBE_FC_HI and IXGBE_FC_LO. The watermark of the flow control
is automatically calculated from the size of the packet buffer.
 -
 Use ixgbe_eitr_write() when writing the EITR for the link interrupt like
queue's EITR to write the register safely. This change is not relatively
so important than queue's EITR because link's EITR is written in if_init().
 -
 Don't free and reallocate bus_dmamem when it's not required. Currently,
the watchdog timer is completely broken and never fire (it's from FreeBSD
(pre iflib)). If the problem is fixed and watchdog fired, ixgbe_init() always
calls ixgbe_jcl_reinit() and it causes panic. The reason is that
ixgbe_local_timer1(it includes watchdog function) is softint and
xgbe_jcl_reinit() calls bus_dmamem*() functions. bus_dmamem*() can't be called
from interrupt context.

 One of the way to prevent panic is use worqueue for the timer, but it's
not a small change. (I'll do it in future).

 Another way is not reallocate dmamem if it's not required. If both the MTU
(rx_mbuf_sz in reality) and the number of RX descriptors are not changed, it's
not required to call bus_dmamem_{unmap,free}(). Even if we use workque, this
change save time of ixgbe_init().

 I have a code to fix broken watchdog timer but it sometime causes watchdog
timeout, so I don't commit it yet.
 -
Count some register correctly:
- QPRDC register is only for 82599 and newer.
- Count IXGBE_QPRDC, PX{ON,OFF}{T,R}XC[NT].
 The TQSMR register is not for receiving but for transmitting, so move the
initialization from ixgbe_initialize_receive_units() to
ixgbe_initialize_transmit_units(). No functional change.
 -
 Whitespace fix. No functional change.
 -
 Add rxd_nxck (Receive Descriptor next to check) read only sysctl.
 Don't check IFF_RUNNING in ixgbe_rxeof(). Doing break and leaving a deacriptor
with DD bit is worse than just processing the entry. And it's also racy to
check IFF_RUNNING in rxeof(). If you'd like to strictly obey IFF_RUNNING,
it would be better to do it in the upper layer.
 Same as DragonFly (a part of 79251f5ebe4cf9dd2f3e6aed590e09d756d39922).
 Add "bool txr_no_space" for TX descriptor shortage. Use it like IFF_OACTIVE.
 Clear que->disabled_count in {ixgbe,ixv}_init_locked(). Without this,
interrupt mask state and EIMS may mismatch and if_init doesn't recover
from TX/RX stall problem.
 This change itself doesn't fix PR#53294.
 -
 Add hw.ixgN.debug sysctl. "sysctl -w hw.ixgN.debug=1" dumps some registers
to console.
 -
Constify several variables in ixgbe/ so that they land in .rodata (1038
bytes).
 -
 Don't call ixgbe_rearm_queues() in ixgbe_local_timer1().
   ixgbe_enable_queue() and ixgbe_disable_queue() try to enable/disable queue
  interrupt safely. It has the internal counter. When a queue's MSI-X is
  received, ixgbe_msix_que() is called (IPL_NET). This function disable the
  queue's interrupt by ixgbe_disable_queue() and issues an softint.
  ixgbe_handle() queue is called by the softint (IPL_SOFTNET), process TX, RX
  and call ixgbe_enable_queue() at the end.

   ixgbe_local_timer1() is a callout and run always on CPU 0 (IPL_SOFTCLOCK).
  When ixgbe_rearm_queues() called, an MSI-X interrupt is issued for a specific
  queue. It may not CPU 0. If this interrupt's ixgbe_msix_que() is called and
  sofint_schedule() is called before the last sofint's softint_execute() is not
  called, the softint_schedule() fails because of SOFTINT_PENDING. It result
  in breaking ixgbe_{enable,disable}_queue()'s internal counter.
   ixgbe_local_timer1() is written not to call ixgbe_rearm_queues() if
  the interrupt is disabled, but it's called because of unknown bug or a race.

  One solution to avoid this problem is to not to use the internal counter,
  but it's little difficult. Another solution is stop using
  ixgbe_rearm_queues() at all. Essentially, ixgbe_rearm_queues() is not
  required (it 

CVS commit: [netbsd-8] src/sys/arch/macppc/stand/fixcoff

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:47:37 UTC 2018

Modified Files:
src/sys/arch/macppc/stand/fixcoff [netbsd-8]: elf32_powerpc_merge.x

Log Message:
Pull up following revision(s) (requested by uwe in ticket #863):

sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x: revision 1.6,1.7 
(patch)

PR port-macppc/52564

  . = (. + 0x0FFF) & 0xF000;

now seems to cause binutils to pad the preceding section, and when
that happens to be .text the powermac ofw is unhappy for whatever
reason.

For now provide .pad section that absorbs the padding as a workaround.
The binutils problem still needs to be looked into.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.4.1 \
src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x

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/macppc/stand/fixcoff/elf32_powerpc_merge.x
diff -u src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.4 src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.4.4.1
--- src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x:1.4	Thu Apr 20 18:53:12 2017
+++ src/sys/arch/macppc/stand/fixcoff/elf32_powerpc_merge.x	Sat Jun  9 14:47:37 2018
@@ -1,3 +1,4 @@
+/*	$NetBSD: elf32_powerpc_merge.x,v 1.4.4.1 2018/06/09 14:47:37 martin Exp $ */
 OUTPUT_ARCH(powerpc)
 SECTIONS
 {
@@ -40,6 +41,7 @@ SECTIONS
   .dtors : { *(.dtors)   }
   _etext = .;
   PROVIDE (etext = .);
+  .pad   : { LONG(0) }
   /* Read-write section, merged into data segment: */
   . = (. + 0x0FFF) & 0xF000;
   .data:



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

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:44:33 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_llatbl.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #862):

sys/net/if_llatbl.c: revision 1.27

It is necessary to set wall time instead of monotonic time to rmx_expire.


To generate a diff of this commit:
cvs rdiff -u -r1.18.6.3 -r1.18.6.4 src/sys/net/if_llatbl.c

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

Modified files:

Index: src/sys/net/if_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.18.6.3 src/sys/net/if_llatbl.c:1.18.6.4
--- src/sys/net/if_llatbl.c:1.18.6.3	Tue Mar 13 13:27:10 2018
+++ src/sys/net/if_llatbl.c	Sat Jun  9 14:44:33 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.18.6.3 2018/03/13 13:27:10 martin Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.18.6.4 2018/06/09 14:44:33 martin Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -112,8 +112,8 @@ lltable_dump_entry(struct lltable *llt, 
 		/* Need to copy by myself */
 		rtm->rtm_index = ifp->if_index;
 		rtm->rtm_rmx.rmx_mtu = 0;
-		rtm->rtm_rmx.rmx_expire =
-		(lle->la_flags & LLE_STATIC) ? 0 : lle->la_expire;
+		rtm->rtm_rmx.rmx_expire = (lle->la_flags & LLE_STATIC) ? 0 :
+		time_mono_to_wall(lle->la_expire);
 		rtm->rtm_flags = RTF_UP;
 		rtm->rtm_flags |= RTF_HOST; /* For ndp */
 		/* For backward compatibility */



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

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:38:18 UTC 2018

Modified Files:
src/sys/compat/common [netbsd-8]: rtsock_50.c

Log Message:
Pull up following revision(s) (requested by nonaka in ticket #861):

sys/compat/common/rtsock_50.c: revision 1.7

Added missing ifi_link_state at compat_50_rt_oifmsg() and compat_50_iflist().


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.10.1 src/sys/compat/common/rtsock_50.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/common/rtsock_50.c
diff -u src/sys/compat/common/rtsock_50.c:1.4 src/sys/compat/common/rtsock_50.c:1.4.10.1
--- src/sys/compat/common/rtsock_50.c:1.4	Mon Aug 24 22:50:33 2015
+++ src/sys/compat/common/rtsock_50.c	Sat Jun  9 14:38:18 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtsock_50.c,v 1.4 2015/08/24 22:50:33 pooka Exp $	*/
+/*	$NetBSD: rtsock_50.c,v 1.4.10.1 2018/06/09 14:38:18 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.4 2015/08/24 22:50:33 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_50.c,v 1.4.10.1 2018/06/09 14:38:18 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -92,6 +92,7 @@ compat_50_rt_oifmsg(struct ifnet *ifp)
 	oifm.ifm_data.ifi_type = ifp->if_data.ifi_type;
 	oifm.ifm_data.ifi_addrlen = ifp->if_data.ifi_addrlen;
 	oifm.ifm_data.ifi_hdrlen = ifp->if_data.ifi_hdrlen;
+	oifm.ifm_data.ifi_link_state = ifp->if_data.ifi_link_state;
 	oifm.ifm_data.ifi_mtu = ifp->if_data.ifi_mtu;
 	oifm.ifm_data.ifi_metric = ifp->if_data.ifi_metric;
 	oifm.ifm_data.ifi_baudrate = ifp->if_data.ifi_baudrate;
@@ -128,6 +129,7 @@ compat_50_iflist(struct ifnet *ifp, stru
 	ifm->ifm_data.ifi_type = ifp->if_data.ifi_type;
 	ifm->ifm_data.ifi_addrlen = ifp->if_data.ifi_addrlen;
 	ifm->ifm_data.ifi_hdrlen = ifp->if_data.ifi_hdrlen;
+	ifm->ifm_data.ifi_link_state = ifp->if_data.ifi_link_state;
 	ifm->ifm_data.ifi_mtu = ifp->if_data.ifi_mtu;
 	ifm->ifm_data.ifi_metric = ifp->if_data.ifi_metric;
 	ifm->ifm_data.ifi_baudrate = ifp->if_data.ifi_baudrate;



CVS commit: [netbsd-8] src/usr.sbin/makefs

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:35:21 UTC 2018

Modified Files:
src/usr.sbin/makefs [netbsd-8]: ffs.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #858):

usr.sbin/makefs/ffs.c: revision 1.70

PR/52828: Mark Johnston: makefs UFS2 lazy inode initialization is buggy
makefs(8) emulates UFS2 in performing lazy initialization of inode
blocks when allocating and writing inodes. However, it only ever
initializes one inode block at a time, which may be insufficient.

If so, a later initialization may clobber an inode, resulting in
an inconsistent filesystem.

I committed a minimal fix for the problem to FreeBSD:
https://svnweb.freebsd.org/changeset/base/326912


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.69.4.1 src/usr.sbin/makefs/ffs.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/makefs/ffs.c
diff -u src/usr.sbin/makefs/ffs.c:1.69 src/usr.sbin/makefs/ffs.c:1.69.4.1
--- src/usr.sbin/makefs/ffs.c:1.69	Wed Feb  8 21:27:26 2017
+++ src/usr.sbin/makefs/ffs.c	Sat Jun  9 14:35:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $	*/
+/*	$NetBSD: ffs.c,v 1.69.4.1 2018/06/09 14:35:21 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -71,7 +71,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: ffs.c,v 1.69 2017/02/08 21:27:26 christos Exp $");
+__RCSID("$NetBSD: ffs.c,v 1.69.4.1 2018/06/09 14:35:21 martin Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -1115,7 +1115,7 @@ ffs_write_inode(union dinode *dp, uint32
 	 * Initialize inode blocks on the fly for UFS2.
 	 */
 	initediblk = ufs_rw32(cgp->cg_initediblk, fsopts->needswap);
-	if (ffs_opts->version == 2 &&
+	while (ffs_opts->version == 2 &&
 	(uint32_t)(cgino + FFS_INOPB(fs)) > initediblk &&
 	initediblk < ufs_rw32(cgp->cg_niblk, fsopts->needswap)) {
 		memset(buf, 0, fs->fs_bsize);



CVS commit: [netbsd-8] src/sys/dev/pci

2018-06-09 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Jun  9 14:32:52 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: mpii.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #857):

sys/dev/pci/mpii.c: revision 1.9

PR/52330: Jia-Ju Bai: mpii driver: a sleep-in-interrupt bug in mpii_intr
Since the enclosing routime mpii_event_raid already calls malloc with
M_NOWAIT, fix the cache routine to do the same. While there check the
result of the cache routine and change some error prints to aprint.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/dev/pci/mpii.c

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

Modified files:

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.8 src/sys/dev/pci/mpii.c:1.8.10.1
--- src/sys/dev/pci/mpii.c:1.8	Mon May  2 19:18:29 2016
+++ src/sys/dev/pci/mpii.c	Sat Jun  9 14:32:52 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.8 2016/05/02 19:18:29 christos Exp $ */
+/* $NetBSD: mpii.c,v 1.8.10.1 2018/06/09 14:32:52 martin Exp $ */
 /*	OpenBSD: mpii.c,v 1.51 2012/04/11 13:29:14 naddy Exp 	*/
 /*
  * Copyright (c) 2010 Mike Belopuhov 
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8 2016/05/02 19:18:29 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.8.10.1 2018/06/09 14:32:52 martin Exp $");
 
 #include "bio.h"
 
@@ -3434,26 +3434,34 @@ mpii_event_raid(struct mpii_softc *sc, s
 			case MPII_EVT_IR_CFG_ELEMENT_RC_VOLUME_CREATED:
 if (mpii_find_dev(sc,
 le16toh(ce->vol_dev_handle))) {
-	printf("%s: device %#x is already "
-	"configured\n", DEVNAME(sc),
+	aprint_error_dev(sc->sc_dev,
+	"device %#x is already "
+	"configured\n",
 	le16toh(ce->vol_dev_handle));
 	break;
 }
 dev = malloc(sizeof(*dev), M_DEVBUF,
 M_NOWAIT | M_ZERO);
 if (!dev) {
-	printf("%s: failed to allocate a "
-	"device structure\n", DEVNAME(sc));
+	aprint_error_dev(sc->sc_dev,
+	"can't allocate device structure\n");
 	break;
 }
 SET(dev->flags, MPII_DF_VOLUME);
 dev->slot = sc->sc_vd_id_low;
 dev->dev_handle = le16toh(ce->vol_dev_handle);
 if (mpii_insert_dev(sc, dev)) {
+	aprint_error_dev(sc->sc_dev,
+	"can't insert device structure\n");
+	free(dev, M_DEVBUF);
+	break;
+}
+if (mpii_cache_enable(sc, dev)) {
+	aprint_error_dev(sc->sc_dev,
+	"can't enable device cache\n");
 	free(dev, M_DEVBUF);
 	break;
 }
-mpii_cache_enable(sc, dev);
 sc->sc_vd_count++;
 break;
 			case MPII_EVT_IR_CFG_ELEMENT_RC_REMOVED:
@@ -3515,15 +3523,15 @@ mpii_event_sas(struct mpii_softc *sc, st
 		switch (pe->phy_status & MPII_EVENT_SAS_TOPO_PS_RC_MASK) {
 		case MPII_EVENT_SAS_TOPO_PS_RC_ADDED:
 			if (mpii_find_dev(sc, le16toh(pe->dev_handle))) {
-printf("%s: device %#x is already "
-"configured\n", DEVNAME(sc),
+aprint_error_dev(sc->sc_dev,
+"device %#x is already configured\n",
 le16toh(pe->dev_handle));
 break;
 			}
 			dev = malloc(sizeof(*dev), M_DEVBUF, M_NOWAIT | M_ZERO);
 			if (!dev) {
-printf("%s: failed to allocate a "
-"device structure\n", DEVNAME(sc));
+aprint_error_dev(sc->sc_dev, "can't allocate "
+"device structure\n");
 break;
 			}
 			dev->slot = sc->sc_pd_id_start + tcl->start_phy_num + i;
@@ -3534,6 +3542,8 @@ mpii_event_sas(struct mpii_softc *sc, st
 			dev->enclosure = le16toh(tcl->enclosure_handle);
 			dev->expander = le16toh(tcl->expander_handle);
 			if (mpii_insert_dev(sc, dev)) {
+aprint_error_dev(sc->sc_dev, "can't insert "
+"device structure\n");
 free(dev, M_DEVBUF);
 break;
 			}
@@ -3550,9 +3560,9 @@ mpii_event_sas(struct mpii_softc *sc, st
 DVACT_DEACTIVATE);
 if (scsi_task(mpii_event_defer, sc,
 dev, 0) != 0)
-	printf("%s: unable to run device "
-	"detachment routine\n",
-	DEVNAME(sc));
+	aprint_error_dev(sc->sc_dev, 
+	"unable to run device "
+	"detachment routine\n");
 			}
 #else
 			mpii_event_defer(sc, dev);
@@ -4979,7 +4989,7 @@ mpii_cache_enable(struct mpii_softc *sc,
 		return (EINVAL);
 
 	pagelen = hdr.page_length * 4;
-	vpg = malloc(pagelen, M_TEMP, M_WAITOK | M_CANFAIL | M_ZERO);
+	vpg = malloc(pagelen, M_TEMP, M_NOWAIT | M_ZERO);
 	if (vpg == NULL)
 		return (ENOMEM);