CVS commit: src/usr.bin/calendar/calendars

2019-12-15 Thread John Nemeth
Module Name:src
Committed By:   jnemeth
Date:   Mon Dec 16 07:18:11 UTC 2019

Modified Files:
src/usr.bin/calendar/calendars: calendar.christian calendar.holiday
calendar.usholiday

Log Message:
update calendar files with all dates in 2020 as next release is expect late 2019


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/calendar/calendars/calendar.christian
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/calendar/calendars/calendar.holiday
cvs rdiff -u -r1.9 -r1.10 src/usr.bin/calendar/calendars/calendar.usholiday

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/calendar/calendars/calendar.christian
diff -u src/usr.bin/calendar/calendars/calendar.christian:1.7 src/usr.bin/calendar/calendars/calendar.christian:1.8
--- src/usr.bin/calendar/calendars/calendar.christian:1.7	Sat Jun  2 05:55:47 2018
+++ src/usr.bin/calendar/calendars/calendar.christian	Mon Dec 16 07:18:11 2019
@@ -1,17 +1,17 @@
 01/06*	Epiphany
-03/05*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
-03/06*	Ash Wednesday (First day of Lent)
-04/14*	Palm Sunday (7 days before Easter)
-04/17*	Maundy Thursday (3 days before Easter)
-04/18*	Good Friday (2 days before Easter)
-04/20*	Easter Sunday
-05/26*	Rogation Sunday
-05/30*	Ascension Day (10 days before Pentecost)
-06/09*	Pentecost (Whitsunday)
-06/10*	Whitmonday
-06/16*	Trinity Sunday (7 days after Pentecost)
-06/20*	Corpus Christi (11 days after Pentecost)
+02/25*	Shrove Tuesday / Mardi Gras (day before Ash Wednesday)
+02/26*	Ash Wednesday (First day of Lent)
+04/05*	Palm Sunday (7 days before Easter)
+04/09*	Maundy Thursday (3 days before Easter)
+04/10*	Good Friday (2 days before Easter)
+04/12*	Easter Sunday
+05/17*	Rogation Sunday
+05/21*	Ascension Day (10 days before Pentecost)
+05/31*	Pentecost (Whitsunday)
+06/01*	Whitmonday
+06/07*	Trinity Sunday (7 days after Pentecost)
+06/11*	Corpus Christi (11 days after Pentecost)
 10/18	Feast Day of St. Luke
-12/02*	First Sunday of Advent (4th Sunday before Christmas)
+11/29*	First Sunday of Advent (4th Sunday before Christmas)
 12/06	St. Nicholas' Day
 12/25	Feast of the Nativity (Christmas)

Index: src/usr.bin/calendar/calendars/calendar.holiday
diff -u src/usr.bin/calendar/calendars/calendar.holiday:1.29 src/usr.bin/calendar/calendars/calendar.holiday:1.30
--- src/usr.bin/calendar/calendars/calendar.holiday:1.29	Sat Jun  2 05:55:47 2018
+++ src/usr.bin/calendar/calendars/calendar.holiday	Mon Dec 16 07:18:11 2019
@@ -24,9 +24,9 @@
 01/19	Nameday of Archbishop Makarios in Cyprus
 01/20	Army Day in Mali 
 01/20	National Heroes Day in Guinea-Bissau
-01/20*	Martin Luther King Day in New York (3rd Sunday)
-01/21*	Lee-Jackson Day in Virginia (3rd Monday)
-01/21*	Robert E. Lee's Birthday in Alabama & Mississippi (3rd Monday)
+01/19*	Martin Luther King Day in New York (3rd Sunday)
+01/20*	Lee-Jackson Day in Virginia (3rd Monday)
+01/20*	Robert E. Lee's Birthday in Alabama & Mississippi (3rd Monday)
 01/21	Our Lady of Altagracia in Dominican Republic
 01/23	Feast of St. Ildefonsus
 01/23	National Handwriting Day
@@ -59,7 +59,7 @@
 03/04	Vermont Admission Day (admitted as 14th state in 1791)
 03/05	Independence Day in Equatorial Guinea
 03/06	Lantern Day, Bejing
-03/20*	Purim - Feast of Lots 
+03/09*	Purim - Feast of Lots 
 03/08	First Annual International Women's Day, 1909
 03/08	International Women's Day in U.S.S.R.
 03/08	Syrian National Day in Libyan Arab Republic
@@ -91,7 +91,7 @@
 03/25	Lady Day (a.k.a. the Feast of the Annunciation)
 03/25	Maryland Day in Maryland
 03/25	National Holiday in Greece
-03/25*	Seward's Day in Alaska (last Monday)
+03/30*	Seward's Day in Alaska (last Monday)
 03/26	Independence Day in Bangladesh
 03/26	Prince Jonah Kuhio Kalanianaole Day in Hawaii
 03/27	Armed Forces Day in Burma
@@ -114,7 +114,7 @@
 04/13	Songkran Day in Thailand
 04/14	Day of the Americas in Honduras
 04/15	Bengali New Year in Bangladesh
-04/15*	Patriot's Day in Maine & Massachusetts (3rd Monday)
+04/20*	Patriot's Day in Maine & Massachusetts (3rd Monday)
 04/16	De Diego's Birthday (celebrated in Puerto Rico)
 04/16	Holy Week (5 days) in Venezuela
 04/16	Tourist Week (5 days) in Uruguay
@@ -126,15 +126,15 @@
 04/22	Arbor Day in Nebraska & Delaware
 04/22	Oklahoma Day in Oklahoma
 04/24	Victory Day in Togo
-04/19*	Pesach - First Day of Passover - Festival of Freedom
+04/08*	Pesach - First Day of Passover - Festival of Freedom
 04/25	Anzac Day in Australia, New Zealand, Tonga, Western Samoa
 04/25	Liberation Day in Italy 
 04/25	National Flag Day in Swaziland
 04/26	Confederate Memorial Day in Florida & Georgia
 04/26	Union Day in Tanzania
 04/27	Independence Day in Togo
-04/29*	Arbor Day in Wyoming (last Monday)
-04/29*	Confederate Memorial Day in Alabama & Mississippi (last Monday)
+04/27*	Arbor Day in Wyoming (last Monday)
+04/27*	Confederate Memorial Day in Alabama & Mississippi (last Monday)

CVS commit: src/sys/dev/pci/ixgbe

2019-12-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 16 02:50:54 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: if_bypass.c ix_txrx.c ixgbe.h ixgbe_common.c
ixgbe_osdep.c ixgbe_osdep.h ixgbe_phy.c ixv.c

Log Message:
No functional change:

 - Remove unused code.
 - Remove extra spaces.
 - KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/ixgbe/if_bypass.c \
src/sys/dev/pci/ixgbe/ixgbe_osdep.c
cvs rdiff -u -r1.57 -r1.58 src/sys/dev/pci/ixgbe/ix_txrx.c
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/pci/ixgbe/ixgbe.h
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/pci/ixgbe/ixgbe_osdep.h
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/pci/ixgbe/ixgbe_phy.c
cvs rdiff -u -r1.141 -r1.142 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/if_bypass.c
diff -u src/sys/dev/pci/ixgbe/if_bypass.c:1.4 src/sys/dev/pci/ixgbe/if_bypass.c:1.5
--- src/sys/dev/pci/ixgbe/if_bypass.c:1.4	Wed Apr  4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/if_bypass.c	Mon Dec 16 02:50:54 2019
@@ -101,7 +101,7 @@ ixgbe_get_bypass_time(u32 *year, u32 *se
 	nanotime();
 	*sec = current.tv_sec;
 
-	while(*sec > SEC_THIS_YEAR(*year)) {
+	while (*sec > SEC_THIS_YEAR(*year)) {
 		*sec -= SEC_THIS_YEAR(*year);
 		(*year)++;
 	}
Index: src/sys/dev/pci/ixgbe/ixgbe_osdep.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4 src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.5
--- src/sys/dev/pci/ixgbe/ixgbe_osdep.c:1.4	Wed Apr  4 08:13:07 2018
+++ src/sys/dev/pci/ixgbe/ixgbe_osdep.c	Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_osdep.c,v 1.4 2018/04/04 08:13:07 msaitoh Exp $ */
+/* $NetBSD: ixgbe_osdep.c,v 1.5 2019/12/16 02:50:54 msaitoh Exp $ */
 
 /**
 
@@ -56,7 +56,7 @@ ixgbe_read_pci_cfg(struct ixgbe_hw *hw, 
 		return __SHIFTOUT(pci_conf_read(pc, tag, reg - 2),
 		__BITS(31, 16));
 	default:
-		panic("%s: invalid register (%" PRIx32, __func__, reg); 
+		panic("%s: invalid register (%" PRIx32, __func__, reg);
 		break;
 	}
 }
@@ -79,7 +79,7 @@ ixgbe_write_pci_cfg(struct ixgbe_hw *hw,
 		__SHIFTIN(value, __BITS(31, 16)) | old);
 		break;
 	default:
-		panic("%s: invalid register (%" PRIx32, __func__, reg); 
+		panic("%s: invalid register (%" PRIx32, __func__, reg);
 		break;
 	}
 

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.57 src/sys/dev/pci/ixgbe/ix_txrx.c:1.58
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.57	Sun Nov 10 21:16:36 2019
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.57 2019/11/10 21:16:36 chs Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.58 2019/12/16 02:50:54 msaitoh Exp $ */
 
 /**
 
@@ -148,7 +148,7 @@ ixgbe_legacy_start_locked(struct ifnet *
 		return (ENETDOWN);
 	if (txr->txr_no_space)
 		return (ENETDOWN);
-	
+
 	while (!IFQ_IS_EMPTY(>if_snd)) {
 		if (txr->tx_avail <= IXGBE_QUEUE_MIN_FREE)
 			break;

Index: src/sys/dev/pci/ixgbe/ixgbe.h
diff -u src/sys/dev/pci/ixgbe/ixgbe.h:1.59 src/sys/dev/pci/ixgbe/ixgbe.h:1.60
--- src/sys/dev/pci/ixgbe/ixgbe.h:1.59	Wed Oct 30 07:27:51 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.h	Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.h,v 1.59 2019/10/30 07:27:51 msaitoh Exp $ */
+/* $NetBSD: ixgbe.h,v 1.60 2019/12/16 02:50:54 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -134,9 +134,9 @@
  * RxDescriptors Valid Range: 64-4096 Default Value: 256 This value is the
  * number of receive descriptors allocated for each RX queue. Increasing this
  * value allows the driver to buffer more incoming packets. Each descriptor
- * is 16 bytes.  A receive buffer is also allocated for each descriptor. 
- * 
- * Note: with 8 rings and a dual port card, it is possible to bump up 
+ * is 16 bytes.  A receive buffer is also allocated for each descriptor.
+ *
+ * Note: with 8 rings and a dual port card, it is possible to bump up
  *	against the system mbuf pool limit, you can tune nmbclusters
  *	to adjust for this.
  */

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.26
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.25	Thu Jul 25 09:01:56 2019
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Mon Dec 16 02:50:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.25 2019/07/25 09:01:56 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.26 2019/12/16 02:50:54 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -5520,7 +5520,7 @@ s32 ixgbe_setup_mac_link_multispeed_fibe
 
 		goto 

CVS commit: src/sys/arch

2019-12-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Mon Dec 16 00:03:51 UTC 2019

Modified Files:
src/sys/arch/aarch64/aarch64: efi_machdep.c
src/sys/arch/arm/arm: efi_runtime.c efi_runtime.h

Log Message:
Enable FP access for EFI RT and improve error handling.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/aarch64/aarch64/efi_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/arm/efi_runtime.c \
src/sys/arch/arm/arm/efi_runtime.h

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

Modified files:

Index: src/sys/arch/aarch64/aarch64/efi_machdep.c
diff -u src/sys/arch/aarch64/aarch64/efi_machdep.c:1.4 src/sys/arch/aarch64/aarch64/efi_machdep.c:1.5
--- src/sys/arch/aarch64/aarch64/efi_machdep.c:1.4	Mon Aug 12 15:47:02 2019
+++ src/sys/arch/aarch64/aarch64/efi_machdep.c	Mon Dec 16 00:03:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_machdep.c,v 1.4 2019/08/12 15:47:02 skrll Exp $ */
+/* $NetBSD: efi_machdep.c,v 1.5 2019/12/16 00:03:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi_machdep.c,v 1.4 2019/08/12 15:47:02 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_machdep.c,v 1.5 2019/12/16 00:03:50 jmcneill Exp $");
 
 #include 
 #include 
@@ -38,6 +38,13 @@ __KERNEL_RCSID(0, "$NetBSD: efi_machdep.
 
 #include 
 
+#include 
+
+static struct {
+	struct faultbuf	faultbuf;
+	bool		fpu_used;
+} arm_efirt_state;
+
 void
 arm_efirt_md_map_range(vaddr_t va, paddr_t pa, size_t sz, enum arm_efirt_mem_type type)
 {
@@ -70,3 +77,41 @@ arm_efirt_md_map_range(vaddr_t va, paddr
 		sz -= PAGE_SIZE;
 	}
 }
+
+int
+arm_efirt_md_enter(void)
+{
+	struct lwp *l = curlwp;
+
+	/* Save FPU state */
+	arm_efirt_state.fpu_used = fpu_used_p(l) != 0;
+	if (arm_efirt_state.fpu_used)
+		fpu_save(l);
+
+	/* Enable FP access (AArch64 UEFI calling convention) */
+	reg_cpacr_el1_write(CPACR_FPEN_ALL);
+	__asm __volatile ("isb");
+
+	/*
+	 * Install custom fault handler. EFI lock is held across calls so
+	 * shared faultbuf is safe here.
+	 */
+	return cpu_set_onfault(_efirt_state.faultbuf);
+}
+
+void
+arm_efirt_md_exit(void)
+{
+	struct lwp *l = curlwp;
+
+	/* Disable FP access */
+	reg_cpacr_el1_write(CPACR_FPEN_NONE);
+	__asm __volatile ("isb");
+
+	/* Restore FPU state */
+	if (arm_efirt_state.fpu_used)
+		fpu_load(l);
+
+	/* Remove custom fault handler */
+	cpu_unset_onfault();
+}

Index: src/sys/arch/arm/arm/efi_runtime.c
diff -u src/sys/arch/arm/arm/efi_runtime.c:1.2 src/sys/arch/arm/arm/efi_runtime.c:1.3
--- src/sys/arch/arm/arm/efi_runtime.c:1.2	Thu Jul 25 02:00:40 2019
+++ src/sys/arch/arm/arm/efi_runtime.c	Mon Dec 16 00:03:50 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $ */
+/* $NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.2 2019/07/25 02:00:40 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi_runtime.c,v 1.3 2019/12/16 00:03:50 jmcneill Exp $");
 
 #include 
 #include 
@@ -79,42 +79,46 @@ arm_efirt_init(paddr_t efi_system_table)
 int
 arm_efirt_gettime(struct efi_tm *tm)
 {
-	efi_status status;
+	int error;
 
 	if (RT == NULL || RT->rt_gettime == NULL)
 		return ENXIO;
 
 	mutex_enter(_lock);
-	status = RT->rt_gettime(tm, NULL);
+	if ((error = arm_efirt_md_enter()) == 0) {
+		if (RT->rt_gettime(tm, NULL) != 0)
+			error = EIO;
+	}
+	arm_efirt_md_exit();
 	mutex_exit(_lock);
-	if (status)
-		return EIO;
 
-	return 0;
+	return error;
 }
 
 int
 arm_efirt_settime(struct efi_tm *tm)
 {
-	efi_status status;
+	int error;
 
 	if (RT == NULL || RT->rt_settime == NULL)
 		return ENXIO;
 
 	mutex_enter(_lock);
-	status = RT->rt_settime(tm);
+	if ((error = arm_efirt_md_enter()) == 0) {
+		if (RT->rt_settime(tm) != 0)
+			error = EIO;
+	}
+	arm_efirt_md_exit();
 	mutex_exit(_lock);
-	if (status)
-		return EIO;
 
-	return 0;
+	return error;
 }
 
 int
 arm_efirt_reset(enum efi_reset type)
 {
 	static int reset_called = false;
-	efi_status status;
+	int error;
 
 	if (RT == NULL || RT->rt_reset == NULL)
 		return ENXIO;
@@ -122,13 +126,15 @@ arm_efirt_reset(enum efi_reset type)
 	mutex_enter(_lock);
 	if (reset_called == false) {
 		reset_called = true;
-		status = RT->rt_reset(type, 0, 0, NULL);
+		if ((error = arm_efirt_md_enter()) == 0) {
+			if (RT->rt_reset(type, 0, 0, NULL) != 0)
+error = EIO;
+		}
+		arm_efirt_md_exit();
 	} else {
-		status = 1;
+		error = EPERM;
 	}
 	mutex_exit(_lock);
-	if (status)
-		return EIO;
 
-	return 0;
+	return error;
 }
Index: src/sys/arch/arm/arm/efi_runtime.h
diff -u src/sys/arch/arm/arm/efi_runtime.h:1.2 src/sys/arch/arm/arm/efi_runtime.h:1.3
--- src/sys/arch/arm/arm/efi_runtime.h:1.2	Wed Oct 31 13:01:48 2018
+++ src/sys/arch/arm/arm/efi_runtime.h	Mon Dec 16 00:03:50 2019
@@ -1,4 +1,4 @@

CVS commit: src/lib/libpthread

2019-12-15 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Dec 15 23:13:33 UTC 2019

Modified Files:
src/lib/libpthread: pthread_rwlock.c

Log Message:
_DIAGASSERT that RW_FLAGMASK bits are not set in a thread pointer.

rwlock uses lower bits of a thread pointer for flags in the lock owner
field.  Assert that the pointer is properly aligned and those bits are
actually free to use.  This may not be the case when a program uses
its own allocator that can return less aligned pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/lib/libpthread/pthread_rwlock.c

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

Modified files:

Index: src/lib/libpthread/pthread_rwlock.c
diff -u src/lib/libpthread/pthread_rwlock.c:1.34 src/lib/libpthread/pthread_rwlock.c:1.35
--- src/lib/libpthread/pthread_rwlock.c:1.34	Sun Jul  3 14:24:58 2016
+++ src/lib/libpthread/pthread_rwlock.c	Sun Dec 15 23:13:33 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pthread_rwlock.c,v 1.34 2016/07/03 14:24:58 christos Exp $ */
+/*	$NetBSD: pthread_rwlock.c,v 1.35 2019/12/15 23:13:33 uwe Exp $ */
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -30,11 +30,12 @@
  */
 
 #include 
-__RCSID("$NetBSD: pthread_rwlock.c,v 1.34 2016/07/03 14:24:58 christos Exp $");
+__RCSID("$NetBSD: pthread_rwlock.c,v 1.35 2019/12/15 23:13:33 uwe Exp $");
 
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -275,6 +276,7 @@ pthread__rwlock_wrlock(pthread_rwlock_t 
 	int error;
 
 	self = pthread__self();
+	_DIAGASSERT(((uintptr_t)self & RW_FLAGMASK) == 0);
 
 #ifdef ERRORCHECK
 	if (ptr->ptr_magic != _PT_RWLOCK_MAGIC)
@@ -373,6 +375,7 @@ pthread_rwlock_trywrlock(pthread_rwlock_
 #endif
 
 	self = pthread__self();
+	_DIAGASSERT(((uintptr_t)self & RW_FLAGMASK) == 0);
 
 	for (owner = (uintptr_t)ptr->ptr_owner;; owner = next) {
 		if (owner != 0)
@@ -509,6 +512,7 @@ pthread_rwlock_unlock(pthread_rwlock_t *
 		 */
 		self = pthread__self();
 		if ((thread = PTQ_FIRST(>ptr_wblocked)) != NULL) {
+			_DIAGASSERT(((uintptr_t)thread & RW_FLAGMASK) == 0);
 			new = (uintptr_t)thread | RW_WRITE_LOCKED;
 
 			if (PTQ_NEXT(thread, pt_sleep) != NULL)



CVS commit: src/doc

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 22:57:26 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new heimdal


To generate a diff of this commit:
cvs rdiff -u -r1.1676 -r1.1677 src/doc/3RDPARTY
cvs rdiff -u -r1.2622 -r1.2623 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1676 src/doc/3RDPARTY:1.1677
--- src/doc/3RDPARTY:1.1676	Sun Dec 15 12:10:00 2019
+++ src/doc/3RDPARTY	Sun Dec 15 17:57:26 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1676 2019/12/15 17:10:00 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1677 2019/12/15 22:57:26 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -517,10 +517,10 @@ Only double-precision addressed at this 
 
 
 Package:	heimdal
-Version:	7.1.0 (HEAD-2017-01-28)
-Current Vers:	7.5.0
+Version:	7.7.0
+Current Vers:	7.7.0
 Maintainer:	Heimdal 
-Archive Site:	ftp://ftp.h5l.org/pub/heimdal/src/
+Archive Site:	https://github.com/heimdal/heimdal/releases/download/
 Home Page:	http://www.h5l.org/
 Date:		2019-01-09
 Mailing List:	heimdal-disc...@sics.se

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2622 src/doc/CHANGES:1.2623
--- src/doc/CHANGES:1.2622	Sun Dec 15 12:10:00 2019
+++ src/doc/CHANGES	Sun Dec 15 17:57:26 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2622 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2623 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -81,4 +81,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	nsd: Import 4.2.4. [christos 20191215]
 	unbound(8): Import 1.9.6. [christos 20191215]
 	openpam(3): update to 20190224 (tabebuia) [christos 20191215]
-
+ 	kerberos(8): Update to Heimdal-7.7.0 [christos 20191215]



CVS commit: src/lib/libpthread

2019-12-15 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Dec 15 22:32:29 UTC 2019

Modified Files:
src/lib/libpthread: tss.c

Log Message:
Drop bogus _DIAGASSERT that don't even compile.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libpthread/tss.c

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

Modified files:

Index: src/lib/libpthread/tss.c
diff -u src/lib/libpthread/tss.c:1.1 src/lib/libpthread/tss.c:1.2
--- src/lib/libpthread/tss.c:1.1	Wed Apr 24 11:43:19 2019
+++ src/lib/libpthread/tss.c	Sun Dec 15 22:32:29 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tss.c,v 1.1 2019/04/24 11:43:19 kamil Exp $	*/
+/*	$NetBSD: tss.c,v 1.2 2019/12/15 22:32:29 uwe Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: tss.c,v 1.1 2019/04/24 11:43:19 kamil Exp $");
+__RCSID("$NetBSD: tss.c,v 1.2 2019/12/15 22:32:29 uwe Exp $");
 
 #include 
 #include 
@@ -53,8 +53,6 @@ void
 tss_delete(tss_t key)
 {
 
-	_DIAGASSERT(key != NULL);
-
 	/*
 	 * The tss_delete(3) function that conforms to C11 returns no value.
 	 */
@@ -65,8 +63,6 @@ void *
 tss_get(tss_t key)
 {
 
-	_DIAGASSERT(key != NULL);
-
 	return pthread_getspecific(key);
 }
 
@@ -74,8 +70,6 @@ int
 tss_set(tss_t key, void *val)
 {
 
-	_DIAGASSERT(key != NULL);
-
 	if (pthread_setspecific(key, val) == 0)
 		return thrd_success;
 



CVS commit: src/sys/sys

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 21:56:13 UTC 2019

Modified Files:
src/sys/sys: vnode.h

Log Message:
Add missing proto for vfs_mount_print_all().


To generate a diff of this commit:
cvs rdiff -u -r1.284 -r1.285 src/sys/sys/vnode.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/sys/vnode.h
diff -u src/sys/sys/vnode.h:1.284 src/sys/sys/vnode.h:1.285
--- src/sys/sys/vnode.h:1.284	Sun Dec  1 13:56:29 2019
+++ src/sys/sys/vnode.h	Sun Dec 15 21:56:13 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode.h,v 1.284 2019/12/01 13:56:29 ad Exp $	*/
+/*	$NetBSD: vnode.h,v 1.285 2019/12/15 21:56:13 ad Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -596,6 +596,8 @@ void	vfs_vnode_lock_print(void *, int, v
 __printflike(1, 2));
 void	vfs_mount_print(struct mount *, int, void (*)(const char *, ...)
 __printflike(1, 2));
+void	vfs_mount_print_all(int, void (*)(const char *, ...)
+__printflike(1, 2));
 #endif /* DDB */
 
 #endif /* _KERNEL */



CVS commit: src/sys/miscfs/genfs

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 21:43:42 UTC 2019

Modified Files:
src/sys/miscfs/genfs: genfs_io.c

Log Message:
Fix DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/miscfs/genfs/genfs_io.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/miscfs/genfs/genfs_io.c
diff -u src/sys/miscfs/genfs/genfs_io.c:1.78 src/sys/miscfs/genfs/genfs_io.c:1.79
--- src/sys/miscfs/genfs/genfs_io.c:1.78	Sun Dec 15 21:11:34 2019
+++ src/sys/miscfs/genfs/genfs_io.c	Sun Dec 15 21:43:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfs_io.c,v 1.78 2019/12/15 21:11:34 ad Exp $	*/
+/*	$NetBSD: genfs_io.c,v 1.79 2019/12/15 21:43:42 ad Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.78 2019/12/15 21:11:34 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfs_io.c,v 1.79 2019/12/15 21:43:42 ad Exp $");
 
 #include 
 #include 
@@ -1232,7 +1232,13 @@ retry:
 	if (cleanall && wasclean && gp->g_dirtygen == dirtygen &&
 	(vp->v_iflag & VI_ONWORKLST) != 0) {
 #if defined(DEBUG)
-		TAILQ_FOREACH(pg, >memq, listq.queue) {
+		uvm_page_array_init();
+		for (nextoff = 0;; nextoff = pg->offset + PAGE_SIZE) {
+			pg = uvm_page_array_fill_and_peek(, uobj, nextoff,
+			0, 0);
+			if (pg == NULL) {
+break;
+			}
 			if ((pg->flags & (PG_FAKE | PG_MARKER)) != 0) {
 continue;
 			}
@@ -1243,6 +1249,7 @@ retry:
 printf("%s: %p: modified\n", __func__, pg);
 			}
 		}
+		uvm_page_array_fini();
 #endif /* defined(DEBUG) */
 		vp->v_iflag &= ~VI_WRMAPDIRTY;
 		if (LIST_FIRST(>v_dirtyblkhd) == NULL)



CVS commit: src/sys/sys

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 21:12:40 UTC 2019

Modified Files:
src/sys/sys: param.h

Log Message:
NetBSD 9.99.25 - UVM changes


To generate a diff of this commit:
cvs rdiff -u -r1.625 -r1.626 src/sys/sys/param.h

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

Modified files:

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.625 src/sys/sys/param.h:1.626
--- src/sys/sys/param.h:1.625	Fri Dec 13 20:50:08 2019
+++ src/sys/sys/param.h	Sun Dec 15 21:12:40 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.625 2019/12/13 20:50:08 ad Exp $	*/
+/*	$NetBSD: param.h,v 1.626 2019/12/15 21:12:40 ad Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -67,7 +67,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	999002400	/* NetBSD 9.99.24 */
+#define	__NetBSD_Version__	999002500	/* NetBSD 9.99.25 */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)



CVS commit: src/sys

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 21:11:35 UTC 2019

Modified Files:
src/sys/arch/hppa/hppa: pmap.c
src/sys/arch/sparc64/include: pmap.h
src/sys/arch/sparc64/sparc64: pmap.c
src/sys/miscfs/genfs: genfs_io.c
src/sys/nfs: nfs_subs.c
src/sys/rump/librump/rumpkern: Makefile.rumpkern vm.c
src/sys/ufs/lfs: lfs_pages.c
src/sys/uvm: files.uvm uvm_aobj.c uvm_loan.c uvm_object.c uvm_object.h
uvm_page.c uvm_page.h
Added Files:
src/sys/uvm: uvm_page_array.c uvm_page_array.h

Log Message:
Merge from yamt-pagecache:

- do gang lookup of pages using radixtree.
- remove now unused uvm_object::uo_memq and vm_page::listq.queue.


To generate a diff of this commit:
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/hppa/hppa/pmap.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/sparc64/include/pmap.h
cvs rdiff -u -r1.310 -r1.311 src/sys/arch/sparc64/sparc64/pmap.c
cvs rdiff -u -r1.77 -r1.78 src/sys/miscfs/genfs/genfs_io.c
cvs rdiff -u -r1.235 -r1.236 src/sys/nfs/nfs_subs.c
cvs rdiff -u -r1.178 -r1.179 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.175 -r1.176 src/sys/rump/librump/rumpkern/vm.c
cvs rdiff -u -r1.16 -r1.17 src/sys/ufs/lfs/lfs_pages.c
cvs rdiff -u -r1.30 -r1.31 src/sys/uvm/files.uvm
cvs rdiff -u -r1.131 -r1.132 src/sys/uvm/uvm_aobj.c
cvs rdiff -u -r1.90 -r1.91 src/sys/uvm/uvm_loan.c
cvs rdiff -u -r1.17 -r1.18 src/sys/uvm/uvm_object.c
cvs rdiff -u -r1.34 -r1.35 src/sys/uvm/uvm_object.h
cvs rdiff -u -r1.202 -r1.203 src/sys/uvm/uvm_page.c
cvs rdiff -u -r1.86 -r1.87 src/sys/uvm/uvm_page.h
cvs rdiff -u -r0 -r1.2 src/sys/uvm/uvm_page_array.c \
src/sys/uvm/uvm_page_array.h

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

Modified files:

Index: src/sys/arch/hppa/hppa/pmap.c
diff -u src/sys/arch/hppa/hppa/pmap.c:1.100 src/sys/arch/hppa/hppa/pmap.c:1.101
--- src/sys/arch/hppa/hppa/pmap.c:1.100	Thu Dec 22 14:47:57 2016
+++ src/sys/arch/hppa/hppa/pmap.c	Sun Dec 15 21:11:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.100 2016/12/22 14:47:57 cherry Exp $	*/
+/*	$NetBSD: pmap.c,v 1.101 2019/12/15 21:11:34 ad Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.100 2016/12/22 14:47:57 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.101 2019/12/15 21:11:34 ad Exp $");
 
 #include "opt_cputype.h"
 
@@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.1
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -395,7 +396,7 @@ pmap_pde_release(pmap_t pmap, vaddr_t va
 		pmap_pde_set(pmap, va, 0);
 		pmap->pm_stats.resident_count--;
 		if (pmap->pm_ptphint == ptp)
-			pmap->pm_ptphint = TAILQ_FIRST(>pm_obj.memq);
+			pmap->pm_ptphint = NULL;
 		ptp->wire_count = 0;
 
 		KASSERT((ptp->flags & PG_BUSY) == 0);
@@ -1101,7 +1102,9 @@ void
 pmap_destroy(pmap_t pmap)
 {
 #ifdef DIAGNOSTIC
+	struct uvm_page_array a;
 	struct vm_page *pg;
+	off_t off;
 #endif
 	int refs;
 
@@ -1115,12 +1118,18 @@ pmap_destroy(pmap_t pmap)
 		return;
 
 #ifdef DIAGNOSTIC
-	while ((pg = TAILQ_FIRST(>pm_obj.memq))) {
+	uvm_page_array_init();
+	off = 0;
+	mutex_enter(pmap->pm_lock);
+	while ((pg = uvm_page_array_fill_and_peek(, >pm_obj, off, 0, 0))
+	!= NULL) {
 		pt_entry_t *pde, *epde;
 		struct vm_page *spg;
 		struct pv_entry *pv, *npv;
 		paddr_t pa;
 
+		off = pg->offset + PAGE_SIZE;
+		uvm_page_array_advance();
 		KASSERT(pg != pmap->pm_pdir_pg);
 		pa = VM_PAGE_TO_PHYS(pg);
 
@@ -1152,6 +1161,8 @@ pmap_destroy(pmap_t pmap)
 		}
 		DPRINTF(PDB_FOLLOW, ("\n"));
 	}
+	mutex_exit(pmap->pm_lock);
+	uvm_page_array_fini();
 #endif
 	pmap_sdir_set(pmap->pm_space, 0);
 	mutex_enter(pmap->pm_lock);

Index: src/sys/arch/sparc64/include/pmap.h
diff -u src/sys/arch/sparc64/include/pmap.h:1.62 src/sys/arch/sparc64/include/pmap.h:1.63
--- src/sys/arch/sparc64/include/pmap.h:1.62	Thu Jan 10 10:33:49 2019
+++ src/sys/arch/sparc64/include/pmap.h	Sun Dec 15 21:11:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.62 2019/01/10 10:33:49 mrg Exp $	*/
+/*	$NetBSD: pmap.h,v 1.63 2019/12/15 21:11:34 ad Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -126,10 +126,8 @@ extern struct page_size_map page_size_ma
 #endif
 
 struct pmap {
-	struct uvm_object pm_obj;
-	kmutex_t pm_obj_lock;
-#define pm_lock pm_obj.vmobjlock
-#define pm_refs pm_obj.uo_refs
+	unsigned int pm_refs;
+	TAILQ_HEAD(, vm_page) pm_ptps;
 	LIST_ENTRY(pmap) pm_list[PMAP_LIST_MAXNUMCPU];	/* per cpu ctx used list */
 
 	struct pmap_statistics pm_stats;

Index: src/sys/arch/sparc64/sparc64/pmap.c
diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.310 src/sys/arch/sparc64/sparc64/pmap.c:1.311
--- src/sys/arch/sparc64/sparc64/pmap.c:1.310	Thu Jan 10 10:33:49 2019
+++ src/sys/arch/sparc64/sparc64/pmap.c	Sun Dec 15 21:11:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.310 2019/01/10 10:33:49 mrg Exp $	*/
+/*	

CVS commit: src/sys/arch/x86/x86

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 20:33:22 UTC 2019

Modified Files:
src/sys/arch/x86/x86: pmap.c

Log Message:
- Share common code between pmap_load() and pmap_map_ptes().
- Make pmap_map_ptes() better tolerate recovery from blocking.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/x86/x86/pmap.c

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

Modified files:

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.344 src/sys/arch/x86/x86/pmap.c:1.345
--- src/sys/arch/x86/x86/pmap.c:1.344	Sun Dec 15 19:24:11 2019
+++ src/sys/arch/x86/x86/pmap.c	Sun Dec 15 20:33:22 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.344 2019/12/15 19:24:11 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.345 2019/12/15 20:33:22 ad Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.344 2019/12/15 19:24:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.345 2019/12/15 20:33:22 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -470,6 +470,7 @@ static void pmap_remove_ptes(struct pmap
 
 static void pmap_alloc_level(struct pmap *, vaddr_t, long *);
 
+static void pmap_load1(struct lwp *, struct pmap *, struct pmap *);
 static void pmap_reactivate(struct pmap *);
 
 /*
@@ -642,20 +643,12 @@ pmap_map_ptes(struct pmap *pmap, struct 
 		pmap_reactivate(pmap);
 	} else {
 		/*
-		 * Toss current pmap from CPU, but keep a reference to it.
-		 * The reference will be dropped by pmap_unmap_ptes().
-		 * Can happen if we block during exit().
+		 * Toss current pmap from CPU and install new pmap, but keep
+		 * a reference to the old one - dropping the reference can
+		 * block, so we'll defer to pmap_unmap_ptes().
 		 */
-		const cpuid_t cid = cpu_index(ci);
-
-		kcpuset_atomic_clear(curpmap->pm_cpus, cid);
-		kcpuset_atomic_clear(curpmap->pm_kernel_cpus, cid);
-		ci->ci_pmap = pmap;
-		ci->ci_tlbstate = TLBSTATE_VALID;
-		ci->ci_want_pmapload = 0;
-		kcpuset_atomic_set(pmap->pm_cpus, cid);
-		kcpuset_atomic_set(pmap->pm_kernel_cpus, cid);
-		cpu_load_pmap(pmap, curpmap);
+		pmap_reference(pmap);
+		pmap_load1(l, pmap, curpmap);
 	}
 	pmap->pm_ncsw = lwp_pctr();
 	*pmap2 = curpmap;
@@ -714,7 +707,7 @@ pmap_unmap_ptes(struct pmap *pmap, struc
 	 * Mark whatever's on the CPU now as lazy and unlock.
 	 * If the pmap was already installed, we are done.
 	 */
-	if (ci->ci_tlbstate == TLBSTATE_VALID) {
+	if (ci->ci_pmap != mypmap && ci->ci_tlbstate == TLBSTATE_VALID) {
 		ci->ci_tlbstate = TLBSTATE_LAZY;
 		ci->ci_want_pmapload = (mypmap != pmap_kernel());
 	} else {
@@ -722,21 +715,17 @@ pmap_unmap_ptes(struct pmap *pmap, struc
 		 * This can happen when undoing after pmap_get_ptp blocked.
 		 */ 
 	}
+
 	/* Now safe to free PTPs, with the pmap still locked. */
 	if (ptp_tofree != NULL) {
 		pmap_freepages(pmap, ptp_tofree);
 	}
 	mutex_exit(>pm_lock);
-	if (pmap == pmap2) {
-		return;
-	}
 
-	/*
-	 * We installed another pmap on the CPU.  Grab a reference to
-	 * it and leave in place.  Toss the evicted pmap (can block).
-	 */
-	pmap_reference(pmap);
-	pmap_destroy(pmap2);
+	/* Toss the pmap we evicted earlier (can block). */
+	if (pmap != pmap2) {
+		pmap_destroy(pmap2);
+	}
 }
 
 inline static void
@@ -2884,8 +2873,6 @@ pmap_load(void)
 	struct cpu_info *ci;
 	struct pmap *pmap, *oldpmap;
 	struct lwp *l;
-	struct pcb *pcb;
-	cpuid_t cid;
 	uint64_t ncsw;
 
 	kpreempt_disable();
@@ -2912,7 +2899,6 @@ pmap_load(void)
 	pmap = vm_map_pmap(>l_proc->p_vmspace->vm_map);
 	KASSERT(pmap != pmap_kernel());
 	oldpmap = ci->ci_pmap;
-	pcb = lwp_getpcb(l);
 
 	if (pmap == oldpmap) {
 		pmap_reactivate(pmap);
@@ -2926,8 +2912,41 @@ pmap_load(void)
 	 */
 
 	pmap_reference(pmap);
+	pmap_load1(l, pmap, oldpmap);
+	ci->ci_want_pmapload = 0;
+
+	/*
+	 * we're now running with the new pmap.  drop the reference
+	 * to the old pmap.  if we block, we need to go around again.
+	 */
+
+	pmap_destroy(oldpmap);
+	__insn_barrier();
+	if (l->l_ncsw != ncsw) {
+		goto retry;
+	}
+
+	kpreempt_enable();
+}
 
+/*
+ * pmap_load1: the guts of pmap load, shared by pmap_map_ptes() and
+ * pmap_load().  It's critically important that this function does not
+ * block.
+ */
+static void
+pmap_load1(struct lwp *l, struct pmap *pmap, struct pmap *oldpmap)
+{
+	struct cpu_info *ci;
+	struct pcb *pcb;
+	cpuid_t cid;
+
+	KASSERT(kpreempt_disabled());
+
+	pcb = lwp_getpcb(l);
+	ci = l->l_cpu;
 	cid = cpu_index(ci);
+
 	kcpuset_atomic_clear(oldpmap->pm_cpus, cid);
 	kcpuset_atomic_clear(oldpmap->pm_kernel_cpus, cid);
 
@@ -2970,21 +2989,6 @@ pmap_load(void)
 	lldt(pmap->pm_ldt_sel);
 
 	cpu_load_pmap(pmap, oldpmap);
-
-	ci->ci_want_pmapload = 0;
-
-	/*
-	 * we're now running with the new pmap.  drop the reference
-	 * to the old pmap.  if we block, we need to go around again.
-	 */
-
-	

CVS commit: src/sys/miscfs/nullfs

2019-12-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 15 20:30:56 UTC 2019

Modified Files:
src/sys/miscfs/nullfs: null_vfsops.c

Log Message:
Set IMNT_MPSAFE before creating the vnode for the root of the
filesystem. Otherwise, it won't be created with VV_MPSAFE and require
the kernel_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/miscfs/nullfs/null_vfsops.c

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

Modified files:

Index: src/sys/miscfs/nullfs/null_vfsops.c
diff -u src/sys/miscfs/nullfs/null_vfsops.c:1.95 src/sys/miscfs/nullfs/null_vfsops.c:1.96
--- src/sys/miscfs/nullfs/null_vfsops.c:1.95	Wed Feb 20 10:06:00 2019
+++ src/sys/miscfs/nullfs/null_vfsops.c	Sun Dec 15 20:30:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $	*/
+/*	$NetBSD: null_vfsops.c,v 1.96 2019/12/15 20:30:56 joerg Exp $	*/
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -76,7 +76,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.96 2019/12/15 20:30:56 joerg Exp $");
 
 #include 
 #include 
@@ -140,6 +140,7 @@ nullfs_mount(struct mount *mp, const cha
 	/* Create the mount point. */
 	nmp = kmem_zalloc(sizeof(struct null_mount), KM_SLEEP);
 	mp->mnt_data = nmp;
+	mp->mnt_iflag |= IMNT_MPSAFE;
 
 	/*
 	 * Make sure that the mount point is sufficiently initialized
@@ -168,7 +169,6 @@ nullfs_mount(struct mount *mp, const cha
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 	vp->v_vflag |= VV_ROOT;
 	nmp->nullm_rootvp = vp;
-	mp->mnt_iflag |= IMNT_MPSAFE;
 	VOP_UNLOCK(vp);
 
 	error = set_statvfs_info(path, UIO_USERSPACE, args->la.target,



CVS commit: src/sys/kern

2019-12-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 15 20:30:03 UTC 2019

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

Log Message:
Teach ddb(4)'s "show vnode_lock" about matching by v_interlock.


To generate a diff of this commit:
cvs rdiff -u -r1.476 -r1.477 src/sys/kern/vfs_subr.c

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

Modified files:

Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.476 src/sys/kern/vfs_subr.c:1.477
--- src/sys/kern/vfs_subr.c:1.476	Sun Dec 15 20:29:09 2019
+++ src/sys/kern/vfs_subr.c	Sun Dec 15 20:30:03 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.476 2019/12/15 20:29:09 joerg Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.477 2019/12/15 20:30:03 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.476 2019/12/15 20:29:09 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.477 2019/12/15 20:30:03 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1543,9 +1543,9 @@ vfs_vnode_lock_print(void *vlock, int fu
 
 	for (mp = _mountlist_next(NULL); mp; mp = _mountlist_next(mp)) {
 		TAILQ_FOREACH(vip, >mnt_vnodelist, vi_mntvnodes) {
-			if (vip->vi_lock != vlock)
-continue;
-			vfs_vnode_print(VIMPL_TO_VNODE(vip), full, pr);
+			if (vip->vi_lock == vlock ||
+			VIMPL_TO_VNODE(vip)->v_interlock == vlock)
+vfs_vnode_print(VIMPL_TO_VNODE(vip), full, pr);
 		}
 	}
 }



CVS commit: src

2019-12-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 15 20:29:09 UTC 2019

Modified Files:
src/share/man/man4: ddb.4
src/sys/ddb: db_command.c
src/sys/kern: vfs_subr.c

Log Message:
Teach ddb(4) about printing the full mount list.


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/share/man/man4/ddb.4
cvs rdiff -u -r1.164 -r1.165 src/sys/ddb/db_command.c
cvs rdiff -u -r1.475 -r1.476 src/sys/kern/vfs_subr.c

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

Modified files:

Index: src/share/man/man4/ddb.4
diff -u src/share/man/man4/ddb.4:1.187 src/share/man/man4/ddb.4:1.188
--- src/share/man/man4/ddb.4:1.187	Tue Sep 10 09:32:04 2019
+++ src/share/man/man4/ddb.4	Sun Dec 15 20:29:08 2019
@@ -1,6 +1,6 @@
-.\"	$NetBSD: ddb.4,v 1.187 2019/09/10 09:32:04 ryo Exp $
+.\"	$NetBSD: ddb.4,v 1.188 2019/12/15 20:29:08 joerg Exp $
 .\"
-.\" Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc.
+.\" Copyright (c) 1997 - 2019 The NetBSD Foundation, Inc.
 .\" All rights reserved.
 .\"
 .\" This code is derived from software contributed to The NetBSD Foundation
@@ -56,7 +56,7 @@
 .\" any improvements or extensions that they make and grant Carnegie Mellon
 .\" the rights to redistribute these changes.
 .\"
-.Dd September 10, 2019
+.Dd December 15, 2019
 .Dt DDB 4
 .Os
 .Sh NAME
@@ -575,6 +575,11 @@ If
 is specified, stack traces of LWPs holding locks are also printed.
 This command is only useful if a kernel is compiled with
 .Cd options LOCKDEBUG .
+.It Ic show all mount Ns Op Cm /f
+Display all mount points.
+If
+.Cm /f
+is specified, the complete vnode list is printed.
 .It Ic show all pages
 Display basic information about all physical pages managed by the VM system.
 For more detailed information about a single page, use

Index: src/sys/ddb/db_command.c
diff -u src/sys/ddb/db_command.c:1.164 src/sys/ddb/db_command.c:1.165
--- src/sys/ddb/db_command.c:1.164	Sun Sep 29 02:49:59 2019
+++ src/sys/ddb/db_command.c	Sun Dec 15 20:29:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_command.c,v 1.164 2019/09/29 02:49:59 uwe Exp $	*/
+/*	$NetBSD: db_command.c,v 1.165 2019/12/15 20:29:08 joerg Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2009 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.164 2019/09/29 02:49:59 uwe Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_command.c,v 1.165 2019/12/15 20:29:08 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_aio.h"
@@ -194,6 +194,7 @@ static void	db_lock_print_cmd(db_expr_t,
 static void	db_show_all_locks(db_expr_t, bool, db_expr_t, const char *);
 static void	db_show_lockstats(db_expr_t, bool, db_expr_t, const char *);
 static void	db_mount_print_cmd(db_expr_t, bool, db_expr_t, const char *);
+static void	db_show_all_mount(db_expr_t, bool, db_expr_t, const char *);
 static void	db_mbuf_print_cmd(db_expr_t, bool, db_expr_t, const char *);
 static void	db_map_print_cmd(db_expr_t, bool, db_expr_t, const char *);
 static void	db_namecache_print_cmd(db_expr_t, bool, db_expr_t,
@@ -231,6 +232,8 @@ static const struct db_command db_show_c
 	0 ,"Show all pools",NULL,NULL) },
 	{ DDB_ADD_CMD("locks",	db_show_all_locks,
 	0 ,"Show all held locks", "[/t]", NULL) },
+	{ DDB_ADD_CMD("mount",	db_show_all_mount,	0,
+	"Print all mount structures.", "[/f]", NULL) },
 #ifdef AIO
 	/*added from all sub cmds*/
 	{ DDB_ADD_CMD("aio_jobs",	db_show_aio_jobs,	0,
@@ -1178,6 +1181,19 @@ db_mount_print_cmd(db_expr_t addr, bool 
 #endif
 }
 
+static void
+db_show_all_mount(db_expr_t addr, bool have_addr, db_expr_t count, const char *modif)
+{
+#ifdef _KERNEL	/* XXX CRASH(8) */
+	bool full = false;
+
+	if (modif[0] == 'f')
+		full = true;
+
+	vfs_mount_print_all(full, db_printf);
+#endif
+}
+
 /*ARGSUSED*/
 static void
 db_mbuf_print_cmd(db_expr_t addr, bool have_addr,

Index: src/sys/kern/vfs_subr.c
diff -u src/sys/kern/vfs_subr.c:1.475 src/sys/kern/vfs_subr.c:1.476
--- src/sys/kern/vfs_subr.c:1.475	Sun Dec  1 13:56:29 2019
+++ src/sys/kern/vfs_subr.c	Sun Dec 15 20:29:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.475 2019/12/01 13:56:29 ad Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.476 2019/12/15 20:29:09 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.475 2019/12/01 13:56:29 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.476 2019/12/15 20:29:09 joerg Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1551,6 +1551,14 @@ vfs_vnode_lock_print(void *vlock, int fu
 }
 
 void
+vfs_mount_print_all(int full, void (*pr)(const char *, ...))
+{
+	struct mount *mp;
+	for (mp = _mountlist_next(NULL); mp; mp = _mountlist_next(mp))
+		vfs_mount_print(mp, full, pr);
+}
+
+void
 vfs_mount_print(struct mount *mp, int full, void (*pr)(const char *, ...))
 {
 	char sbuf[256];



CVS commit: src

2019-12-15 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun Dec 15 20:25:25 UTC 2019

Modified Files:
src/lib/libc/gen: sysconf.c
src/sys/kern: uipc_sem.c

Log Message:
PR 54619: Remove semaphore limit introduce as part of GSoC 2016 with
_SC_SEM_NSEMS_MAX. Report no limit for getconf(3). The ressource is
naturally limited by the backing file descriptor, so no separate limit
is necessary. Keep the accounting for debugging as it is part of the
sysctl ABI exposed by the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/lib/libc/gen/sysconf.c
cvs rdiff -u -r1.55 -r1.56 src/sys/kern/uipc_sem.c

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

Modified files:

Index: src/lib/libc/gen/sysconf.c
diff -u src/lib/libc/gen/sysconf.c:1.42 src/lib/libc/gen/sysconf.c:1.43
--- src/lib/libc/gen/sysconf.c:1.42	Wed Oct 16 20:43:18 2019
+++ src/lib/libc/gen/sysconf.c	Sun Dec 15 20:25:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysconf.c,v 1.42 2019/10/16 20:43:18 maya Exp $	*/
+/*	$NetBSD: sysconf.c,v 1.43 2019/12/15 20:25:25 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)sysconf.c	8.2 (Berkeley) 3/20/94";
 #else
-__RCSID("$NetBSD: sysconf.c,v 1.42 2019/10/16 20:43:18 maya Exp $");
+__RCSID("$NetBSD: sysconf.c,v 1.43 2019/12/15 20:25:25 joerg Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -424,7 +424,7 @@ yesno:		if (sysctl(mib, mib_len, ,
 	case _SC_TIMER_MAX:
 		return _POSIX_TIMER_MAX;
 	case _SC_SEM_NSEMS_MAX:
-		return _POSIX_SEM_NSEMS_MAX;
+		return LONG_MAX;
 	case _SC_CPUTIME:
 		return _POSIX_CPUTIME;
 	case _SC_THREAD_CPUTIME:

Index: src/sys/kern/uipc_sem.c
diff -u src/sys/kern/uipc_sem.c:1.55 src/sys/kern/uipc_sem.c:1.56
--- src/sys/kern/uipc_sem.c:1.55	Fri Mar  1 03:03:19 2019
+++ src/sys/kern/uipc_sem.c	Sun Dec 15 20:25:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_sem.c,v 1.55 2019/03/01 03:03:19 christos Exp $	*/
+/*	$NetBSD: uipc_sem.c,v 1.56 2019/12/15 20:25:25 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.55 2019/03/01 03:03:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_sem.c,v 1.56 2019/12/15 20:25:25 joerg Exp $");
 
 #include 
 #include 
@@ -92,7 +92,6 @@ MODULE(MODULE_CLASS_MISC, ksem, NULL);
 
 #define	SEM_MAX_NAMELEN		NAME_MAX
 
-#define	SEM_NSEMS_MAX		256
 #define	KS_UNLINKED		0x01
 
 static kmutex_t		ksem_lock	__cacheline_aligned;
@@ -468,14 +467,7 @@ ksem_create(lwp_t *l, const char *name, 
 		len = 0;
 	}
 
-	u_int cnt;
-	uid_t uid = kauth_cred_getuid(l->l_cred);
-	if ((cnt = chgsemcnt(uid, 1)) > SEM_NSEMS_MAX) {
-		chgsemcnt(uid, -1);
-		if (kname != NULL)
-			kmem_free(kname, len);
-		return ENOSPC;
-	}
+	chgsemcnt(kauth_cred_getuid(l->l_cred), 1);
 
 	ks = kmem_zalloc(sizeof(ksem_t), KM_SLEEP);
 	mutex_init(>ks_lock, MUTEX_DEFAULT, IPL_NONE);



CVS commit: src/sys/arch

2019-12-15 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sun Dec 15 19:24:11 UTC 2019

Modified Files:
src/sys/arch/x86/include: pmap.h
src/sys/arch/x86/x86: pmap.c
src/sys/arch/xen/x86: xen_pmap.c

Log Message:
uvm_pagerealloc() can now block because of radixtree manipulation, so defer
freeing PTPs until pmap_unmap_ptes(), where we still have the pmap locked
but can finally tolerate context switches again.

To be revisited soon: pmap_map_ptes() seems broken WRT other pmap load.

Reported-by: syzbot+689fb7dab41abff8e...@syzkaller.appspotmail.com
Reported-by: syzbot+3e7bbf37d37d451b2...@syzkaller.appspotmail.com
Reported-by: syzbot+689fb7dab41abff8e...@syzkaller.appspotmail.com
Reported-by: syzbot+689fb7dab41abff8e...@syzkaller.appspotmail.com
Reported-by: syzbot+3e7bbf37d37d451b2...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/x86/include/pmap.h
cvs rdiff -u -r1.343 -r1.344 src/sys/arch/x86/x86/pmap.c
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/xen/x86/xen_pmap.c

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

Modified files:

Index: src/sys/arch/x86/include/pmap.h
diff -u src/sys/arch/x86/include/pmap.h:1.106 src/sys/arch/x86/include/pmap.h:1.107
--- src/sys/arch/x86/include/pmap.h:1.106	Sun Dec  8 20:42:48 2019
+++ src/sys/arch/x86/include/pmap.h	Sun Dec 15 19:24:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.106 2019/12/08 20:42:48 ad Exp $	*/
+/*	$NetBSD: pmap.h,v 1.107 2019/12/15 19:24:11 ad Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -374,7 +374,7 @@ void		pmap_pv_untrack(paddr_t, psize_t);
 
 void		pmap_map_ptes(struct pmap *, struct pmap **, pd_entry_t **,
 		pd_entry_t * const **);
-void		pmap_unmap_ptes(struct pmap *, struct pmap *);
+void		pmap_unmap_ptes(struct pmap *, struct pmap *, struct vm_page *);
 
 bool		pmap_pdes_valid(vaddr_t, pd_entry_t * const *, pd_entry_t *,
 		int *lastlvl);

Index: src/sys/arch/x86/x86/pmap.c
diff -u src/sys/arch/x86/x86/pmap.c:1.343 src/sys/arch/x86/x86/pmap.c:1.344
--- src/sys/arch/x86/x86/pmap.c:1.343	Sun Dec  8 20:42:48 2019
+++ src/sys/arch/x86/x86/pmap.c	Sun Dec 15 19:24:11 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.343 2019/12/08 20:42:48 ad Exp $	*/
+/*	$NetBSD: pmap.c,v 1.344 2019/12/15 19:24:11 ad Exp $	*/
 
 /*
  * Copyright (c) 2008, 2010, 2016, 2017, 2019 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.343 2019/12/08 20:42:48 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.344 2019/12/15 19:24:11 ad Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -460,9 +460,9 @@ static void pmap_remap_largepages(void);
 static int pmap_get_ptp(struct pmap *, vaddr_t,
 pd_entry_t * const *, int, struct vm_page **);
 static struct vm_page *pmap_find_ptp(struct pmap *, vaddr_t, paddr_t, int);
-static void pmap_freepage(struct pmap *, struct vm_page *, int);
+static void pmap_freepages(struct pmap *, struct vm_page *);
 static void pmap_free_ptp(struct pmap *, struct vm_page *, vaddr_t,
-pt_entry_t *, pd_entry_t * const *);
+pt_entry_t *, pd_entry_t * const *, struct vm_page **);
 static bool pmap_remove_pte(struct pmap *, struct vm_page *, pt_entry_t *,
 vaddr_t, struct pv_entry **);
 static void pmap_remove_ptes(struct pmap *, struct vm_page *, vaddr_t, vaddr_t,
@@ -476,7 +476,7 @@ static void pmap_reactivate(struct pmap 
  * p m a p   h e l p e r   f u n c t i o n s
  */
 
-static inline void
+static void
 pmap_stats_update(struct pmap *pmap, int resid_diff, int wired_diff)
 {
 
@@ -490,7 +490,7 @@ pmap_stats_update(struct pmap *pmap, int
 	}
 }
 
-static inline void
+static void
 pmap_stats_update_bypte(struct pmap *pmap, pt_entry_t npte, pt_entry_t opte)
 {
 	int resid_diff = ((npte & PTE_P) ? 1 : 0) - ((opte & PTE_P) ? 1 : 0);
@@ -657,7 +657,7 @@ pmap_map_ptes(struct pmap *pmap, struct 
 		kcpuset_atomic_set(pmap->pm_kernel_cpus, cid);
 		cpu_load_pmap(pmap, curpmap);
 	}
-	pmap->pm_ncsw = l->l_ncsw;
+	pmap->pm_ncsw = lwp_pctr();
 	*pmap2 = curpmap;
 	*ptepp = PTE_BASE;
 
@@ -674,7 +674,8 @@ pmap_map_ptes(struct pmap *pmap, struct 
  * pmap_unmap_ptes: unlock the PTE mapping of "pmap"
  */
 void
-pmap_unmap_ptes(struct pmap *pmap, struct pmap *pmap2)
+pmap_unmap_ptes(struct pmap *pmap, struct pmap *pmap2,
+struct vm_page *ptp_tofree)
 {
 	struct cpu_info *ci;
 	struct pmap *mypmap;
@@ -683,6 +684,7 @@ pmap_unmap_ptes(struct pmap *pmap, struc
 
 	/* The kernel's pmap is always accessible. */
 	if (pmap == pmap_kernel()) {
+		KASSERT(ptp_tofree == NULL);
 		return;
 	}
 
@@ -697,9 +699,13 @@ pmap_unmap_ptes(struct pmap *pmap, struc
 	 * We cannot tolerate context switches while mapped in.
 	 * If it is our own pmap all we have to do is unlock.
 	 */
-	KASSERT(pmap->pm_ncsw == curlwp->l_ncsw);
+	KASSERT(pmap->pm_ncsw == lwp_pctr());
 	mypmap = 

CVS commit: src/sys/arch

2019-12-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Dec 15 17:17:16 UTC 2019

Modified Files:
src/sys/arch/amd64/conf: ALL
src/sys/arch/i386/conf: ALL

Log Message:
Add vhci to x86/ALL.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/amd64/conf/ALL
cvs rdiff -u -r1.475 -r1.476 src/sys/arch/i386/conf/ALL

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/conf/ALL
diff -u src/sys/arch/amd64/conf/ALL:1.131 src/sys/arch/amd64/conf/ALL:1.132
--- src/sys/arch/amd64/conf/ALL:1.131	Tue Dec 10 12:08:52 2019
+++ src/sys/arch/amd64/conf/ALL	Sun Dec 15 17:17:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.131 2019/12/10 12:08:52 yamaguchi Exp $
+# $NetBSD: ALL,v 1.132 2019/12/15 17:17:16 riastradh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.131 $"
+#ident		"ALL-$Revision: 1.132 $"
 
 maxusers	64		# estimated number of users
 
@@ -1128,6 +1128,9 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # USB Controller and Devices
 
+# Virtual USB controller
+pseudo-device	vhci
+
 # PCI USB controllers
 xhci*	at pci?	dev ? function ?	# eXtensible Host Controller
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
@@ -1152,6 +1155,7 @@ usb*	at ehci?
 usb*	at ohci?
 usb*	at slhci?
 usb*	at uhci?
+usb*	at vhci?
 usb*	at xhci?
 
 # USB Hubs

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.475 src/sys/arch/i386/conf/ALL:1.476
--- src/sys/arch/i386/conf/ALL:1.475	Tue Dec 10 12:08:52 2019
+++ src/sys/arch/i386/conf/ALL	Sun Dec 15 17:17:16 2019
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.475 2019/12/10 12:08:52 yamaguchi Exp $
+# $NetBSD: ALL,v 1.476 2019/12/15 17:17:16 riastradh Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@ include 	"arch/i386/conf/std.i386"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"ALL-$Revision: 1.475 $"
+#ident		"ALL-$Revision: 1.476 $"
 
 maxusers	64		# estimated number of users
 
@@ -1231,6 +1231,9 @@ urlphy* at mii? phy ?			# Realtek RTL815
 
 # USB Controller and Devices
 
+# Virtual USB controller
+pseudo-device	vhci
+
 # PCI USB controllers
 ehci*	at pci?	dev ? function ?	# Enhanced Host Controller
 gcscehci* at pci? dev ? function ?	# Enhanced Host Controller (Geode CSC)
@@ -1255,6 +1258,7 @@ usb*	at gcscehci?
 usb*	at ohci?
 usb*	at slhci?
 usb*	at uhci?
+usb*	at vhci?
 usb*	at xhci?
 
 # USB Hubs



CVS commit: src/doc

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 17:10:00 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new OpenPAM


To generate a diff of this commit:
cvs rdiff -u -r1.1675 -r1.1676 src/doc/3RDPARTY
cvs rdiff -u -r1.2621 -r1.2622 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1675 src/doc/3RDPARTY:1.1676
--- src/doc/3RDPARTY:1.1675	Sun Dec 15 11:27:43 2019
+++ src/doc/3RDPARTY	Sun Dec 15 12:10:00 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1675 2019/12/15 16:27:43 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1676 2019/12/15 17:10:00 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1004,12 +1004,12 @@ Location:	external/bsd/openldap/dist
 Notes:
 
 Package:	OpenPAM
-Version:	20170430 (Resedacea)
+Version:	20190224 (Tabebuia)
 Current Vers:	20190224 (Tabebuia)
 Maintainer:	Dag-Erling Smørgrav 
 Archive Site:	http://www.openpam.org/
 Home Page:	http://www.openpam.org/
-Date:		2019-10-09
+Date:		2019-12-15
 Mailing List:
 Responsible:	christos
 License:	BSD (3-clause)

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2621 src/doc/CHANGES:1.2622
--- src/doc/CHANGES:1.2621	Sun Dec 15 11:27:43 2019
+++ src/doc/CHANGES	Sun Dec 15 12:10:00 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2621 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2622 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -80,3 +80,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	acpi(4): Updated ACPICA to 20191213. [christos 20191214]
 	nsd: Import 4.2.4. [christos 20191215]
 	unbound(8): Import 1.9.6. [christos 20191215]
+	openpam(3): update to 20190224 (tabebuia) [christos 20191215]
+



CVS commit: src/external/bsd/openpam/dist

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 17:08:21 UTC 2019

Modified Files:
src/external/bsd/openpam/dist: config.sub
src/external/bsd/openpam/dist/bin/pamtest: pamtest.1
src/external/bsd/openpam/dist/bin/su: su.1
src/external/bsd/openpam/dist/doc/man: openpam.3 openpam_borrow_cred.3
openpam_free_data.3 openpam_free_envlist.3 openpam_get_feature.3
openpam_get_option.3 openpam_log.3 openpam_nullconv.3
openpam_readline.3 openpam_readlinev.3 openpam_readword.3
openpam_restore_cred.3 openpam_set_feature.3 openpam_set_option.3
openpam_straddch.3 openpam_subst.3 openpam_ttyconv.3 pam.3
pam.conf.5 pam_acct_mgmt.3 pam_authenticate.3 pam_chauthtok.3
pam_close_session.3 pam_conv.3 pam_end.3 pam_error.3
pam_get_authtok.3 pam_get_data.3 pam_get_item.3 pam_get_user.3
pam_getenv.3 pam_getenvlist.3 pam_info.3 pam_open_session.3
pam_prompt.3 pam_putenv.3 pam_set_data.3 pam_set_item.3
pam_setcred.3 pam_setenv.3 pam_sm_acct_mgmt.3 pam_sm_authenticate.3
pam_sm_chauthtok.3 pam_sm_close_session.3 pam_sm_open_session.3
pam_sm_setcred.3 pam_start.3 pam_strerror.3 pam_verror.3
pam_vinfo.3 pam_vprompt.3
src/external/bsd/openpam/dist/include/security: openpam_version.h
src/external/bsd/openpam/dist/lib/libpam: pam_getenv.c

Log Message:
resolve conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/openpam/dist/config.sub
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/openpam/dist/bin/pamtest/pamtest.1
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/openpam/dist/bin/su/su.1
cvs rdiff -u -r1.10 -r1.11 src/external/bsd/openpam/dist/doc/man/openpam.3 \
src/external/bsd/openpam/dist/doc/man/pam.3
cvs rdiff -u -r1.7 -r1.8 \
src/external/bsd/openpam/dist/doc/man/openpam_borrow_cred.3 \
src/external/bsd/openpam/dist/doc/man/openpam_free_data.3 \
src/external/bsd/openpam/dist/doc/man/openpam_get_option.3 \
src/external/bsd/openpam/dist/doc/man/openpam_log.3 \
src/external/bsd/openpam/dist/doc/man/openpam_nullconv.3 \
src/external/bsd/openpam/dist/doc/man/openpam_readline.3 \
src/external/bsd/openpam/dist/doc/man/openpam_restore_cred.3 \
src/external/bsd/openpam/dist/doc/man/openpam_set_option.3 \
src/external/bsd/openpam/dist/doc/man/openpam_ttyconv.3 \
src/external/bsd/openpam/dist/doc/man/pam_acct_mgmt.3 \
src/external/bsd/openpam/dist/doc/man/pam_authenticate.3 \
src/external/bsd/openpam/dist/doc/man/pam_chauthtok.3 \
src/external/bsd/openpam/dist/doc/man/pam_close_session.3 \
src/external/bsd/openpam/dist/doc/man/pam_end.3 \
src/external/bsd/openpam/dist/doc/man/pam_error.3 \
src/external/bsd/openpam/dist/doc/man/pam_get_data.3 \
src/external/bsd/openpam/dist/doc/man/pam_get_item.3 \
src/external/bsd/openpam/dist/doc/man/pam_getenv.3 \
src/external/bsd/openpam/dist/doc/man/pam_getenvlist.3 \
src/external/bsd/openpam/dist/doc/man/pam_info.3 \
src/external/bsd/openpam/dist/doc/man/pam_open_session.3 \
src/external/bsd/openpam/dist/doc/man/pam_prompt.3 \
src/external/bsd/openpam/dist/doc/man/pam_putenv.3 \
src/external/bsd/openpam/dist/doc/man/pam_set_data.3 \
src/external/bsd/openpam/dist/doc/man/pam_set_item.3 \
src/external/bsd/openpam/dist/doc/man/pam_setcred.3 \
src/external/bsd/openpam/dist/doc/man/pam_setenv.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_acct_mgmt.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_authenticate.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_chauthtok.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_close_session.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_open_session.3 \
src/external/bsd/openpam/dist/doc/man/pam_sm_setcred.3 \
src/external/bsd/openpam/dist/doc/man/pam_start.3 \
src/external/bsd/openpam/dist/doc/man/pam_verror.3 \
src/external/bsd/openpam/dist/doc/man/pam_vinfo.3 \
src/external/bsd/openpam/dist/doc/man/pam_vprompt.3
cvs rdiff -u -r1.8 -r1.9 \
src/external/bsd/openpam/dist/doc/man/openpam_free_envlist.3 \
src/external/bsd/openpam/dist/doc/man/openpam_subst.3 \
src/external/bsd/openpam/dist/doc/man/pam_conv.3 \
src/external/bsd/openpam/dist/doc/man/pam_get_authtok.3 \
src/external/bsd/openpam/dist/doc/man/pam_get_user.3 \
src/external/bsd/openpam/dist/doc/man/pam_strerror.3
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/openpam/dist/doc/man/openpam_get_feature.3 \
src/external/bsd/openpam/dist/doc/man/openpam_readlinev.3 \
src/external/bsd/openpam/dist/doc/man/openpam_readword.3 \
src/external/bsd/openpam/dist/doc/man/openpam_set_feature.3 \
src/external/bsd/openpam/dist/doc/man/openpam_straddch.3
cvs rdiff -u -r1.9 -r1.10 src/external/bsd/openpam/dist/doc/man/pam.conf.5
cvs rdiff -u -r1.6 -r1.7 \

CVS commit: src/sys

2019-12-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Dec 15 16:48:27 UTC 2019

Modified Files:
src/sys/arch/amigappc/include: intr.h
src/sys/arch/arm/at91: at91dbgu.c
src/sys/arch/hpc/stand/hpcboot/arm: arm_pxa2x0_asm.asm
arm_sa1100_asm.asm
src/sys/arch/hpcarm/include: kloader.h
src/sys/arch/ia64/ia64: bus_space.c
src/sys/arch/ia64/include: bus.h
src/sys/arch/mips/cavium: octeon_dma.c
src/sys/arch/x68k/dev: intiovar.h mfp.c
src/sys/arch/zaurus/include: kloader.h
src/sys/compat/common: kern_time_30.c sysv_msg_50.c sysv_sem_50.c
sysv_shm_50.c uipc_syscalls_50.c vfs_syscalls_50.c
src/sys/compat/net: if.h
src/sys/compat/netbsd32: netbsd32_compat_16.c netbsd32_compat_50.c
netbsd32_compat_50_sysv.c netbsd32_compat_60.c
src/sys/compat/netinet6: in6_var.h
src/sys/compat/ultrix: ultrix_exec.h
src/sys/dev/ic: adv.c adv.h advlib.c advlib.h advmcode.c advmcode.h
adw.c adw.h adwlib.c adwlib.h adwmcode.c adwmcode.h
src/sys/dev/raidframe: rf_compat50.c rf_compat50.h
src/sys/dev/usb: uberry.c uipad.c

Log Message:
Remove clause 3 and 4 leftovers from TNF licenses in more sources.

Confirmed by martin@ in PR/54760.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amigappc/include/intr.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/at91/at91dbgu.c
cvs rdiff -u -r1.1 -r1.2 \
src/sys/arch/hpc/stand/hpcboot/arm/arm_pxa2x0_asm.asm \
src/sys/arch/hpc/stand/hpcboot/arm/arm_sa1100_asm.asm
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/hpcarm/include/kloader.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/ia64/bus_space.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/bus.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/octeon_dma.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/x68k/dev/intiovar.h
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/x68k/dev/mfp.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/zaurus/include/kloader.h
cvs rdiff -u -r1.7 -r1.8 src/sys/compat/common/kern_time_30.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/common/sysv_msg_50.c \
src/sys/compat/common/sysv_sem_50.c src/sys/compat/common/sysv_shm_50.c
cvs rdiff -u -r1.9 -r1.10 src/sys/compat/common/uipc_syscalls_50.c
cvs rdiff -u -r1.23 -r1.24 src/sys/compat/common/vfs_syscalls_50.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/net/if.h
cvs rdiff -u -r1.2 -r1.3 src/sys/compat/netbsd32/netbsd32_compat_16.c \
src/sys/compat/netbsd32/netbsd32_compat_50_sysv.c
cvs rdiff -u -r1.42 -r1.43 src/sys/compat/netbsd32/netbsd32_compat_50.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netbsd32/netbsd32_compat_60.c
cvs rdiff -u -r1.4 -r1.5 src/sys/compat/netinet6/in6_var.h
cvs rdiff -u -r1.6 -r1.7 src/sys/compat/ultrix/ultrix_exec.h
cvs rdiff -u -r1.49 -r1.50 src/sys/dev/ic/adv.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/adv.h src/sys/dev/ic/adw.h
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/ic/advlib.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/ic/advlib.h
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/advmcode.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/advmcode.h
cvs rdiff -u -r1.55 -r1.56 src/sys/dev/ic/adw.c
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/ic/adwlib.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/adwlib.h
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/ic/adwmcode.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/adwmcode.h
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/raidframe/rf_compat50.c
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/raidframe/rf_compat50.h
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/uberry.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/usb/uipad.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/amigappc/include/intr.h
diff -u src/sys/arch/amigappc/include/intr.h:1.26 src/sys/arch/amigappc/include/intr.h:1.27
--- src/sys/arch/amigappc/include/intr.h:1.26	Sun Jun 19 08:00:56 2011
+++ src/sys/arch/amigappc/include/intr.h	Sun Dec 15 16:48:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.26 2011/06/19 08:00:56 matt Exp $	*/
+/*	$NetBSD: intr.h,v 1.27 2019/12/15 16:48:25 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -15,13 +15,6 @@
  * 2. Redistributions in binary form must reproduce the above copyright
  *notice, this list of conditions and the following disclaimer in the
  *documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *must display the following acknowledgement:
- *This product includes software developed by the NetBSD
- *Foundation, Inc. and its contributors.
- * 4. Neither the name of The NetBSD Foundation nor the names of its
- *contributors may be used to endorse or promote products derived
- *from this software without specific prior written permission.
  *
  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  * 

CVS import: src/external/bsd/openpam/dist

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 16:44:31 UTC 2019

Update of /cvsroot/src/external/bsd/openpam/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv6996

Log Message:
OpenPAM Tabebuia2019-02-24

 - BUGFIX: Fix off-by-one bug in pam_getenv(3) which was introduced in
   OpenPAM Radula.

 - ENHANCE: Add unit tests for pam_{get,put,set}env(3).

Status:

Vendor Tag: OPENPAM
Release Tags:   tabebuia-20190224

U src/external/bsd/openpam/dist/INSTALL
U src/external/bsd/openpam/dist/Makefile.in
U src/external/bsd/openpam/dist/aclocal.m4
U src/external/bsd/openpam/dist/install-sh
U src/external/bsd/openpam/dist/LICENSE
U src/external/bsd/openpam/dist/Makefile.am
U src/external/bsd/openpam/dist/TODO
U src/external/bsd/openpam/dist/ltmain.sh
U src/external/bsd/openpam/dist/config.guess
U src/external/bsd/openpam/dist/mkpkgng.in
U src/external/bsd/openpam/dist/test-driver
U src/external/bsd/openpam/dist/README
U src/external/bsd/openpam/dist/RELNOTES
C src/external/bsd/openpam/dist/config.sub
U src/external/bsd/openpam/dist/configure.ac
U src/external/bsd/openpam/dist/config.h.in
U src/external/bsd/openpam/dist/HISTORY
U src/external/bsd/openpam/dist/compile
U src/external/bsd/openpam/dist/CREDITS
U src/external/bsd/openpam/dist/configure
U src/external/bsd/openpam/dist/autogen.sh
U src/external/bsd/openpam/dist/missing
U src/external/bsd/openpam/dist/depcomp
U src/external/bsd/openpam/dist/doc/Makefile.in
U src/external/bsd/openpam/dist/doc/Makefile.am
C src/external/bsd/openpam/dist/doc/man/openpam_nullconv.3
C src/external/bsd/openpam/dist/doc/man/pam_getenvlist.3
C src/external/bsd/openpam/dist/doc/man/openpam_borrow_cred.3
C src/external/bsd/openpam/dist/doc/man/openpam_ttyconv.3
U src/external/bsd/openpam/dist/doc/man/pam.man
U src/external/bsd/openpam/dist/doc/man/openpam.man
C src/external/bsd/openpam/dist/doc/man/pam_sm_chauthtok.3
C src/external/bsd/openpam/dist/doc/man/pam.conf.5
C src/external/bsd/openpam/dist/doc/man/openpam_readword.3
C src/external/bsd/openpam/dist/doc/man/pam_prompt.3
C src/external/bsd/openpam/dist/doc/man/openpam_get_feature.3
C src/external/bsd/openpam/dist/doc/man/pam_authenticate.3
U src/external/bsd/openpam/dist/doc/man/Makefile.am
C src/external/bsd/openpam/dist/doc/man/pam_sm_close_session.3
C src/external/bsd/openpam/dist/doc/man/pam_close_session.3
C src/external/bsd/openpam/dist/doc/man/pam_get_user.3
C src/external/bsd/openpam/dist/doc/man/pam_open_session.3
C src/external/bsd/openpam/dist/doc/man/pam_chauthtok.3
C src/external/bsd/openpam/dist/doc/man/pam_get_item.3
C src/external/bsd/openpam/dist/doc/man/pam_getenv.3
C src/external/bsd/openpam/dist/doc/man/pam_info.3
C src/external/bsd/openpam/dist/doc/man/pam_set_data.3
C src/external/bsd/openpam/dist/doc/man/pam_error.3
C src/external/bsd/openpam/dist/doc/man/openpam_straddch.3
C src/external/bsd/openpam/dist/doc/man/pam_vprompt.3
C src/external/bsd/openpam/dist/doc/man/pam_get_authtok.3
C src/external/bsd/openpam/dist/doc/man/pam_strerror.3
C src/external/bsd/openpam/dist/doc/man/openpam_readline.3
C src/external/bsd/openpam/dist/doc/man/pam_sm_acct_mgmt.3
U src/external/bsd/openpam/dist/doc/man/Makefile.in
C src/external/bsd/openpam/dist/doc/man/pam_sm_open_session.3
C src/external/bsd/openpam/dist/doc/man/openpam_set_option.3
C src/external/bsd/openpam/dist/doc/man/openpam_subst.3
C src/external/bsd/openpam/dist/doc/man/pam_conv.3
C src/external/bsd/openpam/dist/doc/man/openpam_restore_cred.3
C src/external/bsd/openpam/dist/doc/man/pam_setenv.3
C src/external/bsd/openpam/dist/doc/man/openpam_readlinev.3
C src/external/bsd/openpam/dist/doc/man/pam_verror.3
C src/external/bsd/openpam/dist/doc/man/openpam_free_data.3
C src/external/bsd/openpam/dist/doc/man/openpam.3
C src/external/bsd/openpam/dist/doc/man/pam_start.3
C src/external/bsd/openpam/dist/doc/man/openpam_set_feature.3
C src/external/bsd/openpam/dist/doc/man/pam_get_data.3
C src/external/bsd/openpam/dist/doc/man/pam_putenv.3
C src/external/bsd/openpam/dist/doc/man/pam.3
C src/external/bsd/openpam/dist/doc/man/pam_sm_authenticate.3
C src/external/bsd/openpam/dist/doc/man/pam_acct_mgmt.3
C src/external/bsd/openpam/dist/doc/man/pam_set_item.3
C src/external/bsd/openpam/dist/doc/man/openpam_free_envlist.3
C src/external/bsd/openpam/dist/doc/man/openpam_log.3
C src/external/bsd/openpam/dist/doc/man/pam_vinfo.3
C src/external/bsd/openpam/dist/doc/man/openpam_get_option.3
C src/external/bsd/openpam/dist/doc/man/pam_sm_setcred.3
C src/external/bsd/openpam/dist/doc/man/pam_end.3
C src/external/bsd/openpam/dist/doc/man/pam_setcred.3
U src/external/bsd/openpam/dist/include/Makefile.in
U src/external/bsd/openpam/dist/include/Makefile.am
C src/external/bsd/openpam/dist/include/security/openpam_version.h
U src/external/bsd/openpam/dist/include/security/openpam_attr.h
U src/external/bsd/openpam/dist/include/security/Makefile.in
U 

CVS commit: src/doc

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 16:27:43 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new nsd and unbound


To generate a diff of this commit:
cvs rdiff -u -r1.1674 -r1.1675 src/doc/3RDPARTY
cvs rdiff -u -r1.2620 -r1.2621 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1674 src/doc/3RDPARTY:1.1675
--- src/doc/3RDPARTY:1.1674	Sat Dec 14 11:57:48 2019
+++ src/doc/3RDPARTY	Sun Dec 15 11:27:43 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1674 2019/12/14 16:57:48 christos Exp $
+#	$NetBSD: 3RDPARTY,v 1.1675 2019/12/15 16:27:43 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -139,12 +139,12 @@ Then binclude4netbsd script to import in
 The libc and include parts of the resolver are now part of libbind.
 
 Package:	unbound
-Version:	1.9.1
-Current Vers:	1.9.4
+Version:	1.9.6
+Current Vers:	1.9.6
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.unbound.net/downloads/unbound-latest.tar.gz
 Home Page:	https://www.unbound.net/
-Date:		2019-10-09
+Date:		2019-12-15
 Mailing List:	https://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users
 Responsible:	christos
 License:	BSD-like
@@ -154,12 +154,12 @@ Use cleantags to import
 run configure and update config files in include
 
 Package:	nsd
-Version:	4.1.27
-Current Vers:	4.2.2
+Version:	4.2.4
+Current Vers:	4.2.4
 Maintainer:	Nlnetlabs
 Archive Site:	https://www.nlnetlabs.nl/svn/nsd/
 Home Page:	https://www.nlnetlabs.nl/projects/nsd/
-Date:		2019-10-09
+Date:		2019-12-15
 Mailing List:	https://open.nlnetlabs.nl/mailman/listinfo/nsd-users/
 Responsible:	christos
 License:	BSD-like

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2620 src/doc/CHANGES:1.2621
--- src/doc/CHANGES:1.2620	Sat Dec 14 11:57:48 2019
+++ src/doc/CHANGES	Sun Dec 15 11:27:43 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2620 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2621 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -78,3 +78,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	ixl(4): Ported driver for Intel Ethernet 700 series
 		[yamaguchi 20191210]
 	acpi(4): Updated ACPICA to 20191213. [christos 20191214]
+	nsd: Import 4.2.4. [christos 20191215]
+	unbound(8): Import 1.9.6. [christos 20191215]



CVS commit: src/external/bsd/unbound

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 16:16:34 UTC 2019

Modified Files:
src/external/bsd/unbound/dist: config.guess config.sub
src/external/bsd/unbound/dist/util: mini_event.c netevent.c
src/external/bsd/unbound/include: config.h
Removed Files:
src/external/bsd/unbound/dist: .gitattributes .gitignore

Log Message:
resolve conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/unbound/dist/.gitattributes
cvs rdiff -u -r1.1.1.3 -r0 src/external/bsd/unbound/dist/.gitignore
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/unbound/dist/config.guess \
src/external/bsd/unbound/dist/config.sub
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/unbound/dist/util/mini_event.c \
src/external/bsd/unbound/dist/util/netevent.c
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/unbound/include/config.h

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/unbound/dist/config.guess
diff -u src/external/bsd/unbound/dist/config.guess:1.3 src/external/bsd/unbound/dist/config.guess:1.4
--- src/external/bsd/unbound/dist/config.guess:1.3	Sat May 25 17:31:28 2019
+++ src/external/bsd/unbound/dist/config.guess	Sun Dec 15 11:16:34 2019
@@ -1,8 +1,8 @@
-#!/usr/bin/sh
+#! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2017 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2017-01-01'
+timestamp='2018-02-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2017-01-01'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see .
+# along with this program; if not, see .
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2017-01-01'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to .
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version  print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2017 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdi
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)echo "int x;" > $dummy.c ;
+ ,,)echo "int x;" > "$dummy.c" ;
 	for c in cc gcc c89 c99 ; do
-	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	  if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
 	 CC_FOR_BUILD="$c"; break ;
 	  fi ;
 	done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
 	# If the system lacks a compiler, then just pick glibc.
 	# We could probably try harder.
 	LIBC=gnu
 
-	eval $set_cc_for_build
-	cat <<-EOF > $dummy.c
+	eval "$set_cc_for_build"
+	cat <<-EOF > "$dummy.c"
 	#include 
 	#if defined(__UCLIBC__)
 	LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
 	LIBC=gnu
 	#endif
 	EOF
-	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+	# If ldd exists, use it to detect musl libc.
+	if command -v ldd >/dev/null && \
+		ldd --version 2>&1 | grep -q ^musl
+	then
+	LIBC=musl
+	fi
 	;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
 *:NetBSD:*:*)
 	# NetBSD (nbsd) targets should (where applicable) match one or
 	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
 	# portion of the name.  We always set it to 

CVS commit: src/sys/dev/dm

2019-12-15 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Sun Dec 15 16:14:27 UTC 2019

Modified Files:
src/sys/dev/dm: device-mapper.c dm.h dm_target_linear.c
dm_target_snapshot.c dm_target_stripe.c

Log Message:
dm: Rename dm specific atoi() to atoi64()

This is uint64_t version, not sys/lib/libsa/atoi.c.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.35 -r1.36 src/sys/dev/dm/dm_target_snapshot.c
cvs rdiff -u -r1.38 -r1.39 src/sys/dev/dm/dm_target_stripe.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.54 src/sys/dev/dm/device-mapper.c:1.55
--- src/sys/dev/dm/device-mapper.c:1.54	Sun Dec 15 14:39:42 2019
+++ src/sys/dev/dm/device-mapper.c	Sun Dec 15 16:14:27 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.54 2019/12/15 14:39:42 tkusumi Exp $ */
+/*$NetBSD: device-mapper.c,v 1.55 2019/12/15 16:14:27 tkusumi Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -700,3 +700,23 @@ dmgetproperties(struct disk *disk, dm_ta
 
 	disk_set_info(NULL, disk, "ESDI");
 }
+
+/*
+ * Transform char s to uint64_t offset number.
+ */
+uint64_t
+atoi64(const char *s)
+{
+	uint64_t n;
+	n = 0;
+
+	while (*s != '\0') {
+		if (!isdigit(*s))
+			break;
+
+		n = (10 * n) + (*s - '0');
+		s++;
+	}
+
+	return n;
+}

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.45 src/sys/dev/dm/dm.h:1.46
--- src/sys/dev/dm/dm.h:1.45	Sun Dec 15 10:12:45 2019
+++ src/sys/dev/dm/dm.h	Sun Dec 15 16:14:27 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.45 2019/12/15 10:12:45 tkusumi Exp $  */
+/*$NetBSD: dm.h,v 1.46 2019/12/15 16:14:27 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -210,6 +210,9 @@ typedef struct dm_target {
 /* device-mapper */
 void dmgetproperties(struct disk *, dm_table_head_t *);
 
+/* Generic function used to convert char to string */
+uint64_t atoi64(const char *);
+
 /* dm_ioctl.c */
 int dm_dev_create_ioctl(prop_dictionary_t);
 int dm_dev_list_ioctl(prop_dictionary_t);
@@ -253,9 +256,6 @@ int dm_target_linear_destroy(dm_table_en
 int dm_target_linear_upcall(dm_table_entry_t *, struct buf *);
 int dm_target_linear_secsize(dm_table_entry_t *, unsigned int *);
 
-/* Generic function used to convert char to string */
-uint64_t atoi(const char *);
-
 /* dm_target_stripe.c */
 int dm_target_stripe_init(dm_table_entry_t *, int, char **);
 char *dm_target_stripe_table(void *);

Index: src/sys/dev/dm/dm_target_linear.c
diff -u src/sys/dev/dm/dm_target_linear.c:1.31 src/sys/dev/dm/dm_target_linear.c:1.32
--- src/sys/dev/dm/dm_target_linear.c:1.31	Sun Dec 15 14:39:42 2019
+++ src/sys/dev/dm/dm_target_linear.c	Sun Dec 15 16:14:27 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_linear.c,v 1.31 2019/12/15 14:39:42 tkusumi Exp $  */
+/*$NetBSD: dm_target_linear.c,v 1.32 2019/12/15 16:14:27 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.31 2019/12/15 14:39:42 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_linear.c,v 1.32 2019/12/15 16:14:27 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper dklinear target.
@@ -75,7 +75,7 @@ dm_target_linear_init(dm_table_entry_t *
 
 	tlc = kmem_alloc(sizeof(dm_target_linear_config_t), KM_SLEEP);
 	tlc->pdev = dmp;
-	tlc->offset = atoi(argv[1]);
+	tlc->offset = atoi64(argv[1]);
 
 	table_en->target_config = tlc;
 
@@ -213,23 +213,3 @@ dm_target_linear_secsize(dm_table_entry_
 
 	return 0;
 }
-
-/*
- * Transform char s to uint64_t offset number.
- */
-uint64_t
-atoi(const char *s)
-{
-	uint64_t n;
-	n = 0;
-
-	while (*s != '\0') {
-		if (!isdigit(*s))
-			break;
-
-		n = (10 * n) + (*s - '0');
-		s++;
-	}
-
-	return n;
-}

Index: src/sys/dev/dm/dm_target_snapshot.c
diff -u src/sys/dev/dm/dm_target_snapshot.c:1.35 src/sys/dev/dm/dm_target_snapshot.c:1.36
--- src/sys/dev/dm/dm_target_snapshot.c:1.35	Sun Dec 15 14:39:42 2019
+++ src/sys/dev/dm/dm_target_snapshot.c	Sun Dec 15 16:14:27 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_snapshot.c,v 1.35 2019/12/15 14:39:42 tkusumi Exp $  */
+/*$NetBSD: dm_target_snapshot.c,v 1.36 2019/12/15 16:14:27 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_snapshot.c,v 1.35 2019/12/15 14:39:42 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_snapshot.c,v 1.36 2019/12/15 16:14:27 tkusumi Exp $");
 
 /*
  * 1. Suspend my_data to temporarily stop any I/O while the snapshot is 

CVS import: src/external/bsd/nsd/dist

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 16:00:58 UTC 2019

Update of /cvsroot/src/external/bsd/nsd/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv7733

Log Message:
3 December 2019: Wouter
- Fix #52: do not log transient network full errors unless higher
  verbosity is set.
- Fix checkconf test for new error output string.
- tag for 4.2.4rc1 release.

27 November 2017 Jeroen
- Fix regressions in configparser.y

22 November 2019: Wouter
- Fix #48: Add make distclean that removes config.h made by configure.
  And add maintainer-clean that removes bison and flex output.

18 November 2019: Wouter
- Detect fixed time memcmp for openssl 0.9.8 compatibility.
- Detect EC_KEY_new_by_curve_name for openssl 0.9.8.
- include limits.h for UINT_MAX.
- If no recvmmsg, dont use msg_flags member, but errno for error,
  where our fallback function left it, msg_flags also does not exist
  on some systems.
- Remove unused variable warning for portability.

14 November 2019: Wouter
- Fix checkconf test with filenames that sort in the same order.
- Tag for 4.2.3rc1.  Branch master is 4.2.4 in development.

11 November 2019: Wouter
- Fix #44: document that remote-control is a top-level nsd.conf
  attribute.
- Fix compile on OSX.
- Fix for #44: nicer top-level clause documentation.

22 October 2019: Jeroen
- Number of different UDP handlers has been reduced to one. recvmmsg
  and sendmmsg implementations are now used on all platforms.
  Compatible implementations are in place for systems that lack the
  system calls.
- Socket options are now set in designated functions for easy reuse.
- Socket setup has been simplified for easy reuse.
- Configuration parser is now aware of the context in which an option
  was specified.

21 October 2019: Wouter
- For #21 add
  contrib/patch_for_s6_startup_and_other_service_supervisors.diff
  that adds support for readiness notification with READY_FD from
  Cameron Nemo.

17 October 2019: Jeroen
- Fix #40: Merge small fixes for confine-to-zone by Greg Bock.

15 October 2019: Jeroen
- For #39: Merge confine-to-zone feature contributes by Greg Bock.

26 September 2019: Wouter
- Fix #38: log address and failure reason with tls handshake errors,
  squelches (the same as unbound) some unless high verbosity is used.
- Fixup clang analysis warning in xfrd_parse_received_xfr_packet
  master dereference.

25 September 2019: Wouter
- The nsd.conf includes are sorted ascending, for include statements
  with a '*' from glob.

16 September 2019: Wouter
- Fixup warnings during --disable-ipv6 compile.
- Fixup unit test executable to run without IPv6.

4 September 2019: Wouter
- Fix #35: excessive logging of ixfr failures, it stops the log when
  fallback to axfr is possible. log is enabled at high verbosity.

2 September 2019: Wouter
- For #21: pidfile "" allows to run NSD without a pidfile, for
  startup management tools like daemontools.

28 August 2019: Wouter
- In tests check for tls test tool availability.

19 August 2019: Wouter
- Tag for 4.2.2 release.  Git master contains 4.2.3 in development.

13 August 2019: Wouter
- Fix error message for out of zone data to have more information.
- Tag for 4.2.2rc2.

12 August 2019: Wouter
- Fix #33: Fix segfault in service of remaining streams on exit.

6 August 2019: Wouter
- Tag for 4.2.2rc1.

5 August 2019: Wouter
- PR #31: nsd-control: Add missing stdio header.
- PR #32: tsig: Fix compilation without HAVE_SSL.
- Cleanup tls context on xfrd exit.

31 July 2019: Wouter
- Fix #29: SSHFP check NULL pointer dereference.
- Fix #30: SSHFP check failure due to missing domain name.
- Fix to timeval_add in minievent for remaining second in microseconds.

22 July 2019: Wouter
- Set timeout for refetch immediately, only spread load when there
  are retries.

19 July 2019: Wouter
- Set no renegotiation on the SSL context to stop client
  session renegotiation.

18 July 2019: Wouter
- Fix #25: NSD doesn't refresh zones after extended downtime,
  it refreshes the old zones, with a random delay of a couple of
  seconds to spread the load.
- Fix so that expired zones stay expired when server is down a
  long time.

17 July 2019: Wouter
- Fix that NSD warns for wrong length of the hash in SSHFP records.

15 July 2019: Wouter
- PR #23: Fix typo in nsd.conf man-page.

4 July 2019: Wouter
- Set version to 4.2.2 in development.
- clean memory on exit of nsd-checkzone for memory debug.

CVS import: src/external/bsd/unbound/dist

2019-12-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Dec 15 15:28:51 UTC 2019

Update of /cvsroot/src/external/bsd/unbound/dist
In directory ivanova.netbsd.org:/tmp/cvs-serv1203

Log Message:
Import unbound 1.9.6:

6 December 2019: Wouter
- Fix ipsecmod compile.
- Fix Makefile.in for ipset module compile, from Adi Prasaja.

5 December 2019: Wouter
- unbound-fuzzers.tar.bz2: three programs for fuzzing, that are 1:1
  replacements for unbound-fuzzme.c that gets created after applying
  the contrib/unbound-fuzzme.patch.  They are contributed by
  Eric Sesterhenn from X41 D-Sec.
- tag for 1.9.6rc1.

4 December 2019: Wouter
- Fix lock type for memory purify log lock deletion.
- Fix testbound for alloccheck runs, memory purify and lock checks.
- update contrib/fastrpz.patch to apply more cleanly.
- Fix Make Test Fails when Configured With --enable-alloc-nonregional,
  reported by X41 D-Sec.

3 December 2019: Wouter
- Merge pull request #124 from rmetrich: Changed log lock
  from 'quick' to 'basic' because this is an I/O lock.
- Fix text around serial arithmatic used for RRSIG times to refer
  to correct RFC number.
- Fix Assert Causing DoS in synth_cname(),
  reported by X41 D-Sec.
- Fix similar code in auth_zone synth cname to add the extra checks.
- Fix Assert Causing DoS in dname_pkt_copy(),
  reported by X41 D-Sec.
- Fix OOB Read in sldns_wire2str_dname_scan(),
  reported by X41 D-Sec.
- Fix Out of Bounds Write in sldns_str2wire_str_buf(),
  reported by X41 D-Sec.
- Fix Out of Bounds Write in sldns_b64_pton(),
  fixed by check in sldns_str2wire_int16_data_buf(),
  reported by X41 D-Sec.
- Fix Insufficient Handling of Compressed Names in dname_pkt_copy(),
  reported by X41 D-Sec.
- Fix Out of Bound Write Compressed Names in rdata_copy(),
  reported by X41 D-Sec.
- Fix Hang in sldns_wire2str_pkt_scan(),
  reported by X41 D-Sec.
  This further lowers the max to 256.
- Fix snprintf() supports the n-specifier,
  reported by X41 D-Sec.
- Fix Bad Indentation, in dnscrypt.c,
  reported by X41 D-Sec.
- Fix Client NONCE Generation used for Server NONCE,
  reported by X41 D-Sec.
- Fix compile error in dnscrypt.
- Fix _vfixed not Used, removed from sbuffer code,
  reported by X41 D-Sec.
- Fix Hardcoded Constant, reported by X41 D-Sec.
- make depend

2 December 2019: Wouter
- Merge pull request #122 from he32: In tcp_callback_writer(),
  don't disable time-out when changing to read.

22 November 2019: George
- Fix compiler warnings.

22 November 2019: Wouter
- Fix dname loop maximum, reported by Eric Sesterhenn from X41 D-Sec.
- Add make distclean that removes everything configure produced,
  and make maintainer-clean that removes bison and flex output.

20 November 2019: Wouter
- Fix Out of Bounds Read in rrinternal_get_owner(),
  reported by X41 D-Sec.
- Fix Race Condition in autr_tp_create(),
  reported by X41 D-Sec.
- Fix Shared Memory World Writeable,
  reported by X41 D-Sec.
- Adjust unbound-control to make stats_shm a read only operation.
- Fix Weak Entropy Used For Nettle,
  reported by X41 D-Sec.
- Fix Randomness Error not Handled Properly,
  reported by X41 D-Sec.
- Fix Out-of-Bounds Read in dname_valid(),
  reported by X41 D-Sec.
- Fix Config Injection in create_unbound_ad_servers.sh,
  reported by X41 D-Sec.
- Fix Local Memory Leak in cachedb_init(),
  reported by X41 D-Sec.
- Fix Integer Underflow in Regional Allocator,
  reported by X41 D-Sec.
- Upgrade compat/getentropy_linux.c to version 1.46 from OpenBSD.
- Synchronize compat/getentropy_win.c with version 1.5 from
  OpenBSD, no changes but makes the file, comments, identical.
- Upgrade compat/getentropy_solaris.c to version 1.13 from OpenBSD.
- Upgrade compat/getentropy_osx.c to version 1.12 from OpenBSD.
- Changes to compat/getentropy files for,
  no link to openssl if using nettle, and hence config.h for
  HAVE_NETTLE variable.
  compat definition of MAP_ANON, for older systems.
  ifdef stdint.h inclusion for older systems.
  ifdef sha2.h inclusion for older systems.
- Fixed Compat Code Diverging from Upstream, reported by X41 D-Sec.
- Fix compile with --enable-alloc-checks, reported by X41 D-Sec.
- Fix Terminating Quotes not Written, reported by X41 D-Sec.
- Fix Useless memset() in validator, reported by X41 D-Sec.
- Fix Unrequired Checks, reported by X41 

CVS commit: src/sys/dev/dm

2019-12-15 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Sun Dec 15 14:39:43 UTC 2019

Modified Files:
src/sys/dev/dm: device-mapper.c dm_dev.c dm_ioctl.c dm_pdev.c
dm_table.c dm_target.c dm_target_error.c dm_target_linear.c
dm_target_mirror.c dm_target_snapshot.c dm_target_stripe.c
dm_target_zero.c

Log Message:
dm: Style cleanups (no functional changes)


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/dm/dm_dev.c src/sys/dev/dm/dm_table.c
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/dm/dm_ioctl.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dm/dm_pdev.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/dm/dm_target.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dm/dm_target_error.c
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dm/dm_target_mirror.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/dm/dm_target_snapshot.c
cvs rdiff -u -r1.37 -r1.38 src/sys/dev/dm/dm_target_stripe.c
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/dm/dm_target_zero.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.53 src/sys/dev/dm/device-mapper.c:1.54
--- src/sys/dev/dm/device-mapper.c:1.53	Sun Dec 15 10:12:45 2019
+++ src/sys/dev/dm/device-mapper.c	Sun Dec 15 14:39:42 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.53 2019/12/15 10:12:45 tkusumi Exp $ */
+/*$NetBSD: device-mapper.c,v 1.54 2019/12/15 14:39:42 tkusumi Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -35,7 +35,6 @@
 
 #include 
 #include 
-
 #include 
 #include 
 #include 
@@ -236,7 +235,7 @@ dm_match(device_t parent, cfdata_t match
 {
 
 	/* Pseudo-device; always present. */
-	return (1);
+	return 1;
 }
 
 /*
@@ -247,10 +246,8 @@ dm_match(device_t parent, cfdata_t match
 static void
 dm_attach(device_t parent, device_t self, void *aux)
 {
-	return;
 }
 
-
 /*
  * dm_detach:
  *
@@ -291,6 +288,7 @@ dm_detach(device_t self, int flags)
 static void
 dm_doinit(void)
 {
+
 	dm_target_init();
 	dm_dev_init();
 	dm_pdev_init();
@@ -303,12 +301,11 @@ dmattach(int n)
 	int error;
 
 	error = config_cfattach_attach(dm_cd.cd_name, _ca);
-	if (error) {
+	if (error)
 		aprint_error("%s: unable to register cfattach\n",
 		dm_cd.cd_name);
-	} else {
+	else
 		dm_doinit();
-	}
 }
 
 #ifdef _MODULE
@@ -388,16 +385,14 @@ cleanup_exit:
  */
 static int
 dm_cmd_to_fun(prop_dictionary_t dm_dict)
- {
+{
 	int i, r;
 	prop_string_t command;
 
-	r = 0;
-
 	if ((command = prop_dictionary_get(dm_dict, DM_IOCTL_COMMAND)) == NULL)
 		return EINVAL;
 
-	for(i = 0; cmd_fn[i].cmd != NULL; i++)
+	for (i = 0; cmd_fn[i].cmd != NULL; i++)
 		if (prop_string_equals_cstring(command, cmd_fn[i].cmd))
 			break;
 
@@ -412,9 +407,8 @@ dm_cmd_to_fun(prop_dictionary_t dm_dict)
 	aprint_debug("ioctl %s called %p\n", cmd_fn[i].cmd, cmd_fn[i].fn);
 	if (cmd_fn[i].fn == NULL)
 		return 0;
-	r = cmd_fn[i].fn(dm_dict);
 
-	return r;
+	return cmd_fn[i].fn(dm_dict);
 }
 
 /* Call apropriate ioctl handler function. */
@@ -469,7 +463,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		dm_dev_unbusy(dmv);
 		break;
 	}
-
 	case DIOCGDISKINFO:
 	{
 		struct plistref *pref = (struct plistref *) data;
@@ -487,7 +480,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		dm_dev_unbusy(dmv);
 		break;
 	}
-
 	case DIOCCACHESYNC:
 	{
 		dm_table_entry_t *table_en;
@@ -510,7 +502,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		dm_dev_unbusy(dmv);
 		break;
 	}
-
 	case DIOCGSECTORSIZE:
 	{
 		u_int *valp = data;
@@ -528,7 +519,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		dm_dev_unbusy(dmv);
 		break;
 	}
-
 	case DIOCGMEDIASIZE:
 	{
 		off_t *valp = data;
@@ -546,7 +536,6 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		dm_dev_unbusy(dmv);
 		break;
 	}
-
 	default:
 		aprint_debug("unknown disk_ioctl called\n");
 		return ENOTTY;
@@ -563,7 +552,7 @@ static void
 dmstrategy(struct buf *bp)
 {
 	dm_dev_t *dmv;
-	dm_table_t  *tbl;
+	dm_table_t *tbl;
 	dm_table_entry_t *table_en;
 	struct buf *nestbuf;
 
@@ -574,8 +563,6 @@ dmstrategy(struct buf *bp)
 	buf_start = bp->b_blkno * DEV_BSIZE;
 	buf_len = bp->b_bcount;
 
-	tbl = NULL;
-
 	table_end = 0;
 	issued_len = 0;
 
@@ -620,9 +607,7 @@ dmstrategy(struct buf *bp)
 		 * off by one error
 		 */
 		table_end = table_start + table_en->length * DEV_BSIZE;
-
 		start = MAX(table_start, buf_start);
-
 		end = MIN(table_end, buf_start + buf_len);
 
 		aprint_debug("\n");
@@ -639,15 +624,11 @@ dmstrategy(struct buf *bp)
 		if (start < end) {
 			/* create nested buffer  */
 			nestbuf = getiobuf(NULL, true);
-
 			nestiobuf_setup(bp, nestbuf, start - buf_start,
-			(end - start));
-
+			end - start);
 			issued_len += end - start;
-
 			/* I need number of blocks. */
 			nestbuf->b_blkno = (start - 

CVS commit: src/sys/rump/librump/rumpkern

2019-12-15 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Dec 15 14:21:34 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Initialize the module_hook synchronization variables in rump, too.

Fixes recently reported test failures for dev/sysmon/t_swsensor
and net/if_vlan/t_vlan


To generate a diff of this commit:
cvs rdiff -u -r1.337 -r1.338 src/sys/rump/librump/rumpkern/rump.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/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.337 src/sys/rump/librump/rumpkern/rump.c:1.338
--- src/sys/rump/librump/rumpkern/rump.c:1.337	Sat Dec  7 14:55:58 2019
+++ src/sys/rump/librump/rumpkern/rump.c	Sun Dec 15 14:21:34 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.337 2019/12/07 14:55:58 riastradh Exp $	*/
+/*	$NetBSD: rump.c,v 1.338 2019/12/15 14:21:34 pgoyette Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.337 2019/12/07 14:55:58 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.338 2019/12/15 14:21:34 pgoyette Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -52,6 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.3
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -412,6 +413,7 @@ rump_init(void)
 	iostat_init();
 	fd_sys_init();
 	module_init();
+	module_hook_init();
 	devsw_init();
 	pipe_init();
 	resource_init();



CVS commit: src/sys/dev/fdt

2019-12-15 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sun Dec 15 14:18:16 UTC 2019

Modified Files:
src/sys/dev/fdt: fdt_port.c

Log Message:
style fix/KNF


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/fdt/fdt_port.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/fdt/fdt_port.c
diff -u src/sys/dev/fdt/fdt_port.c:1.4 src/sys/dev/fdt/fdt_port.c:1.5
--- src/sys/dev/fdt/fdt_port.c:1.4	Sun Nov 24 09:34:38 2019
+++ src/sys/dev/fdt/fdt_port.c	Sun Dec 15 14:18:16 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: fdt_port.c,v 1.4 2019/11/24 09:34:38 skrll Exp $	*/
+/*	$NetBSD: fdt_port.c,v 1.5 2019/12/15 14:18:16 jakllsch Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: fdt_port.c,v 1.4 2019/11/24 09:34:38 skrll Exp $");
+__KERNEL_RCSID(1, "$NetBSD: fdt_port.c,v 1.5 2019/12/15 14:18:16 jakllsch Exp $");
 
 #include 
 #include 
@@ -190,8 +190,8 @@ fdt_endpoint_activate(struct fdt_endpoin
 		return EBUSY;
 
 	rdp = rep->ep_port->port_dp;
-device_printf(rdp->dp_dev, "activating port %d endpoint %d\n",
-fdt_endpoint_port_index(rep), fdt_endpoint_index(rep));
+	device_printf(rdp->dp_dev, "activating port %d endpoint %d\n",
+	fdt_endpoint_port_index(rep), fdt_endpoint_index(rep));
 	if (rdp->dp_ep_activate)
 		error = rdp->dp_ep_activate(rdp->dp_dev, rep, activate);
 



CVS commit: src/usr.sbin/sysinst/arch

2019-12-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 15 13:39:25 UTC 2019

Modified Files:
src/usr.sbin/sysinst/arch/alpha: md.c
src/usr.sbin/sysinst/arch/emips: md.c
src/usr.sbin/sysinst/arch/hp300: md.c
src/usr.sbin/sysinst/arch/mipsco: md.c
src/usr.sbin/sysinst/arch/mvme68k: md.c
src/usr.sbin/sysinst/arch/pmax: md.c
src/usr.sbin/sysinst/arch/x68k: md.c

Log Message:
After installing boot blocks with RUN_NO_CLEAR (and handling the
potential errors) make sure to clear the stdscreen.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/alpha/md.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/arch/emips/md.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/hp300/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/mipsco/md.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/sysinst/arch/mvme68k/md.c
cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/sysinst/arch/pmax/md.c
cvs rdiff -u -r1.8 -r1.9 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/arch/alpha/md.c
diff -u src/usr.sbin/sysinst/arch/alpha/md.c:1.6 src/usr.sbin/sysinst/arch/alpha/md.c:1.7
--- src/usr.sbin/sysinst/arch/alpha/md.c:1.6	Sat Jul 13 17:13:36 2019
+++ src/usr.sbin/sysinst/arch/alpha/md.c	Sun Dec 15 13:39:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.6 2019/07/13 17:13:36 martin Exp $ */
+/*	$NetBSD: md.c,v 1.7 2019/12/15 13:39:24 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -166,6 +166,11 @@ md_post_newfs(struct install_partition_d
 		process_menu(MENU_ok,
 		__UNCONST("Warning: disk is probably not bootable"));
 
+	wclear(stdscr);
+	touchwin(stdscr);
+	clearok(stdscr, 1);
+	refresh();
+
 	return 0;
 }
 

Index: src/usr.sbin/sysinst/arch/emips/md.c
diff -u src/usr.sbin/sysinst/arch/emips/md.c:1.7 src/usr.sbin/sysinst/arch/emips/md.c:1.8
--- src/usr.sbin/sysinst/arch/emips/md.c:1.7	Sat Jul 13 17:13:37 2019
+++ src/usr.sbin/sysinst/arch/emips/md.c	Sun Dec 15 13:39:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.7 2019/07/13 17:13:37 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.8 2019/12/15 13:39:24 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -175,6 +175,11 @@ md_post_extract(struct install_partition
 		"/bin/dd if=%s of=/dev/reflash0c bs=512", ldr_path))
 			process_menu(MENU_ok, __UNCONST("Warning: the system "
 			"is probably not bootable"));
+
+		wclear(stdscr);
+		touchwin(stdscr);
+		clearok(stdscr, 1);
+		refresh();
 	}
 
 	return 0;

Index: src/usr.sbin/sysinst/arch/hp300/md.c
diff -u src/usr.sbin/sysinst/arch/hp300/md.c:1.8 src/usr.sbin/sysinst/arch/hp300/md.c:1.9
--- src/usr.sbin/sysinst/arch/hp300/md.c:1.8	Sat Jul 13 17:13:37 2019
+++ src/usr.sbin/sysinst/arch/hp300/md.c	Sun Dec 15 13:39:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8 2019/07/13 17:13:37 martin Exp $ */
+/*	$NetBSD: md.c,v 1.9 2019/12/15 13:39:24 martin Exp $ */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -187,6 +187,12 @@ md_post_newfs(struct install_partition_d
 	"/usr/sbin/installboot /dev/r%sc /usr/mdec/uboot.lif", pm->diskdev))
 		process_menu(MENU_ok,
 		__UNCONST("Warning: disk is probably not bootable"));
+
+	wclear(stdscr);
+	touchwin(stdscr);
+	clearok(stdscr, 1);
+	refresh();
+
 	return 0;
 }
 

Index: src/usr.sbin/sysinst/arch/mipsco/md.c
diff -u src/usr.sbin/sysinst/arch/mipsco/md.c:1.6 src/usr.sbin/sysinst/arch/mipsco/md.c:1.7
--- src/usr.sbin/sysinst/arch/mipsco/md.c:1.6	Sat Jul 13 17:13:39 2019
+++ src/usr.sbin/sysinst/arch/mipsco/md.c	Sun Dec 15 13:39:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.6 2019/07/13 17:13:39 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.7 2019/12/15 13:39:24 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -168,6 +168,12 @@ md_post_newfs(struct install_partition_d
 	"/usr/mdec/installboot /dev/r%sc /usr/mdec/bootxx_ffs", pm->diskdev))
 		process_menu(MENU_ok,
 			__UNCONST("Warning: disk is probably not bootable"));
+
+	wclear(stdscr);
+	touchwin(stdscr);
+	clearok(stdscr, 1);
+	refresh();
+
 	return 0;
 }
 

Index: src/usr.sbin/sysinst/arch/mvme68k/md.c
diff -u src/usr.sbin/sysinst/arch/mvme68k/md.c:1.8 src/usr.sbin/sysinst/arch/mvme68k/md.c:1.9
--- src/usr.sbin/sysinst/arch/mvme68k/md.c:1.8	Sat Jul 13 17:13:39 2019
+++ src/usr.sbin/sysinst/arch/mvme68k/md.c	Sun Dec 15 13:39:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.8 2019/07/13 17:13:39 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.9 2019/12/15 13:39:24 martin Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -190,6 +190,12 @@ md_post_newfs(struct install_partition_d
 	target_expand("/.bootsd"), pm->diskdev))
 		process_menu(MENU_ok,
 			__UNCONST("Warning: disk is probably not bootable"));
+
+	wclear(stdscr);
+	touchwin(stdscr);
+	clearok(stdscr, 1);
+	refresh();
+
 	return 0;
 }
 

Index: 

CVS commit: src/sys/arch/pmax/pmax

2019-12-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 15 12:50:39 UTC 2019

Modified Files:
src/sys/arch/pmax/pmax: disksubr.c

Log Message:
Disable (pretty useless and obscure) message when checking for Ultrix
comaptible labels.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/disksubr.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/pmax/pmax/disksubr.c
diff -u src/sys/arch/pmax/pmax/disksubr.c:1.55 src/sys/arch/pmax/pmax/disksubr.c:1.56
--- src/sys/arch/pmax/pmax/disksubr.c:1.55	Wed Apr  3 22:10:51 2019
+++ src/sys/arch/pmax/pmax/disksubr.c	Sun Dec 15 12:50:39 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disksubr.c,v 1.55 2019/04/03 22:10:51 christos Exp $	*/
+/*	$NetBSD: disksubr.c,v 1.56 2019/12/15 12:50:39 martin Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.55 2019/04/03 22:10:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.56 2019/12/15 12:50:39 martin Exp $");
 
 #include "opt_compat_ultrix.h"
 
@@ -146,7 +146,9 @@ compat_label(dev_t dev, void (*strat)(st
 		int part;
 
 		if (dlp->magic != DEC_LABEL_MAGIC) {
+#if 0
 			printf("label: %x\n",dlp->magic);
+#endif
 			msg = ((msg != NULL) ? msg: "no disk label");
 			goto done;
 		}



CVS commit: src/usr.sbin/sysinst

2019-12-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 15 12:09:55 UTC 2019

Modified Files:
src/usr.sbin/sysinst: disklabel.c

Log Message:
Do not show disklabel command invocation by default (only if there are
errors).


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/sysinst/disklabel.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/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.26 src/usr.sbin/sysinst/disklabel.c:1.27
--- src/usr.sbin/sysinst/disklabel.c:1.26	Sun Dec 15 12:01:05 2019
+++ src/usr.sbin/sysinst/disklabel.c	Sun Dec 15 12:09:55 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.26 2019/12/15 12:01:05 martin Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.27 2019/12/15 12:09:55 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -415,7 +415,7 @@ disklabel_write_to_disk(struct disk_part
 	 */
 #ifdef DISKLABEL_CMD
 	/* disklabel the disk */
-	rv = run_program(RUN_DISPLAY, "%s -f %s %s '%s' '%s'",
+	rv = run_program(0, "%s -f %s %s '%s' '%s'",
 	DISKLABEL_CMD, fname, disk, disktype, packname);
 #endif
 



CVS commit: src/usr.sbin/sysinst

2019-12-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 15 12:01:05 UTC 2019

Modified Files:
src/usr.sbin/sysinst: disklabel.c partitions.c partitions.h

Log Message:
Reject (what we consider) empty/invalid fake disklabels no matter whether
we have other partitioning schemes available or not.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/usr.sbin/sysinst/disklabel.c
cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/partitions.c
cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/sysinst/partitions.h

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/disklabel.c
diff -u src/usr.sbin/sysinst/disklabel.c:1.25 src/usr.sbin/sysinst/disklabel.c:1.26
--- src/usr.sbin/sysinst/disklabel.c:1.25	Sat Dec 14 20:41:58 2019
+++ src/usr.sbin/sysinst/disklabel.c	Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: disklabel.c,v 1.25 2019/12/14 20:41:58 martin Exp $	*/
+/*	$NetBSD: disklabel.c,v 1.26 2019/12/15 12:01:05 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -171,7 +171,6 @@ disklabel_parts_read(const char *disk, d
 	char diskpath[MAXPATHLEN];
 	uint flags;
 #ifndef DISKLABEL_NO_ONDISK_VERIFY
-	bool only_dl = only_have_disklabel();
 	bool have_raw_label = false;
 
 	/*
@@ -267,7 +266,7 @@ disklabel_parts_read(const char *disk, d
 	close(fd);
 
 #ifndef DISKLABEL_NO_ONDISK_VERIFY
-	if (!have_raw_label && !only_dl) {
+	if (!have_raw_label) {
 		bool found_real_part = false;
 
 		if (parts->l.d_npartitions <= RAW_PART ||

Index: src/usr.sbin/sysinst/partitions.c
diff -u src/usr.sbin/sysinst/partitions.c:1.7 src/usr.sbin/sysinst/partitions.c:1.8
--- src/usr.sbin/sysinst/partitions.c:1.7	Fri Dec 13 22:12:41 2019
+++ src/usr.sbin/sysinst/partitions.c	Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partitions.c,v 1.7 2019/12/13 22:12:41 martin Exp $	*/
+/*	$NetBSD: partitions.c,v 1.8 2019/12/15 12:01:05 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -131,20 +131,6 @@ static bool have_only_disklabel_boot_sup
 }
 #endif
 
-bool
-only_have_disklabel(void)
-{
-
-	if (num_available_part_schemes > 1)
-		return false;
-
-#if RAW_PART != 2
-	if (available_part_schemes[0] == _disklabel_parts)
-		return true;
-#endif
-	return available_part_schemes[0] == _parts;
-}
-
 /*
  * One time initialization
  */

Index: src/usr.sbin/sysinst/partitions.h
diff -u src/usr.sbin/sysinst/partitions.h:1.10 src/usr.sbin/sysinst/partitions.h:1.11
--- src/usr.sbin/sysinst/partitions.h:1.10	Fri Dec 13 22:12:41 2019
+++ src/usr.sbin/sysinst/partitions.h	Sun Dec 15 12:01:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: partitions.h,v 1.10 2019/12/13 22:12:41 martin Exp $	*/
+/*	$NetBSD: partitions.h,v 1.11 2019/12/15 12:01:05 martin Exp $	*/
 
 /*
  * Copyright 2018 The NetBSD Foundation, Inc.
@@ -580,5 +580,4 @@ bool generic_adapt_foreign_part_info(
  */
 void partitions_init(void);
 void partitions_cleanup(void);
-bool only_have_disklabel(void);
 



CVS commit: src/sbin/fdisk

2019-12-15 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Dec 15 11:49:28 UTC 2019

Modified Files:
src/sbin/fdisk: fdisk.8

Log Message:
Fix xrefs.


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sbin/fdisk/fdisk.8

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

Modified files:

Index: src/sbin/fdisk/fdisk.8
diff -u src/sbin/fdisk/fdisk.8:1.89 src/sbin/fdisk/fdisk.8:1.90
--- src/sbin/fdisk/fdisk.8:1.89	Sat Dec 14 20:46:13 2019
+++ src/sbin/fdisk/fdisk.8	Sun Dec 15 11:49:28 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fdisk.8,v 1.89 2019/12/14 20:46:13 christos Exp $
+.\"	$NetBSD: fdisk.8,v 1.90 2019/12/15 11:49:28 wiz Exp $
 .\"
 .Dd December 14, 2019
 .Dt FDISK 8
@@ -175,7 +175,7 @@ On an i386 or amd64 system, interactivel
 These include the default boot partition and the timeout value for the prompt.
 (The boot selector permits the user to interactively select the boot
 partition, and thus which operating system is run, at system boot time; see
-.Xr mbr 8
+.Xr x86/mbr 8
 for more information.)
 .It Fl b Ar cylinders/heads/sectors
 Specify the BIOS geometry parameters for
@@ -651,8 +651,8 @@ partition using whole disk without promp
 .Xr disklabel 8 ,
 .Xr gpt 8 ,
 .Xr installboot 8 ,
-.Xr mbr 8 ,
-.Xr mbrlabel 8
+.Xr mbrlabel 8 ,
+.Xr x86/mbr 8
 .Sh HISTORY
 A version of
 .Nm



CVS commit: src/usr.sbin/sysinst

2019-12-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Dec 15 11:22:46 UTC 2019

Modified Files:
src/usr.sbin/sysinst: label.c

Log Message:
Fix overlapping partitions display


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/sysinst/label.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/label.c
diff -u src/usr.sbin/sysinst/label.c:1.16 src/usr.sbin/sysinst/label.c:1.17
--- src/usr.sbin/sysinst/label.c:1.16	Fri Dec 13 22:12:41 2019
+++ src/usr.sbin/sysinst/label.c	Sun Dec 15 11:22:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: label.c,v 1.16 2019/12/13 22:12:41 martin Exp $	*/
+/*	$NetBSD: label.c,v 1.17 2019/12/15 11:22:46 martin Exp $	*/
 
 /*
  * Copyright 1997 Jonathan Stone
@@ -36,7 +36,7 @@
 
 #include 
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: label.c,v 1.16 2019/12/13 22:12:41 martin Exp $");
+__RCSID("$NetBSD: label.c,v 1.17 2019/12/15 11:22:46 martin Exp $");
 #endif
 
 #include 
@@ -60,8 +60,7 @@ __RCSID("$NetBSD: label.c,v 1.16 2019/12
  * local prototypes
  */
 static bool boringpart(const struct disk_part_info *info);
-static bool checklabel(struct disk_partitions*, char[MENUSTRSIZE],
-char[MENUSTRSIZE]);
+static bool checklabel(struct disk_partitions*, char *, char *);
 static void show_partition_adder(menudesc *, struct partition_usage_set*);
 
 /*
@@ -107,7 +106,7 @@ real_partition(const struct partition_us
  */
 static bool
 checklabel(struct disk_partitions *parts,
-char ovl1[MENUSTRSIZE], char ovl2[MENUSTRSIZE])
+char *ovl1, char *ovl2)
 {
 	part_id i, j;
 	struct disk_part_info info;
@@ -124,7 +123,7 @@ checklabel(struct disk_partitions *parts
 
 		/*
 		 * check succeeding partitions for overlap.
-		 * O(n^2), but n is small (currently <= 16).
+		 * O(n^2), but n is small.
 		 */
 		istart = info.start;
 		iend = istart + info.size;
@@ -146,12 +145,12 @@ checklabel(struct disk_partitions *parts
 			/* overlap? */
 			if ((istart <= jstart && jstart < iend) ||
 			(jstart <= istart && istart < jend)) {
-snprintf(ovl1, sizeof(*ovl1),
+snprintf(ovl1, MENUSTRSIZE,
 "%" PRIu64 " - %" PRIu64 " %s, %s",
 istart / sizemult, iend / sizemult,
 multname,
 getfslabelname(fs_type, fs_sub_type));
-snprintf(ovl2, sizeof(*ovl2),
+snprintf(ovl2, MENUSTRSIZE,
 "%" PRIu64 " - %" PRIu64 " %s, %s",
 jstart / sizemult, jend / sizemult,
 multname,



CVS commit: src/sys/dev/dm

2019-12-15 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Sun Dec 15 10:12:45 UTC 2019

Modified Files:
src/sys/dev/dm: device-mapper.c dm.h dm_target.c dm_target_error.c
dm_target_snapshot.c dm_target_zero.c

Log Message:
dm: Make targets' ->sync() optional

Apparently some targets have nothing to sync, so make it optional.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.44 -r1.45 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.30 -r1.31 src/sys/dev/dm/dm_target.c
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/dm/dm_target_error.c
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/dm/dm_target_snapshot.c
cvs rdiff -u -r1.24 -r1.25 src/sys/dev/dm/dm_target_zero.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.52 src/sys/dev/dm/device-mapper.c:1.53
--- src/sys/dev/dm/device-mapper.c:1.52	Sun Dec 15 09:22:28 2019
+++ src/sys/dev/dm/device-mapper.c	Sun Dec 15 10:12:45 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.52 2019/12/15 09:22:28 tkusumi Exp $ */
+/*$NetBSD: device-mapper.c,v 1.53 2019/12/15 10:12:45 tkusumi Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -504,7 +504,8 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 		 * routine basically call DIOCCACHESYNC on underlying devices.
 		 */
 		SLIST_FOREACH(table_en, tbl, next)
-			table_en->target->sync(table_en);
+			if (table_en->target->sync)
+table_en->target->sync(table_en);
 		dm_table_release(>table_head, DM_TABLE_ACTIVE);
 		dm_dev_unbusy(dmv);
 		break;

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.44 src/sys/dev/dm/dm.h:1.45
--- src/sys/dev/dm/dm.h:1.44	Sun Dec 15 09:42:29 2019
+++ src/sys/dev/dm/dm.h	Sun Dec 15 10:12:45 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.44 2019/12/15 09:42:29 tkusumi Exp $  */
+/*$NetBSD: dm.h,v 1.45 2019/12/15 10:12:45 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -191,11 +191,11 @@ typedef struct dm_target {
 	char *(*info)(void *);
 	char *(*table)(void *);
 	int (*strategy)(dm_table_entry_t *, struct buf *);
-	int (*sync)(dm_table_entry_t *);
 	int (*upcall)(dm_table_entry_t *, struct buf *);
 	/*
 	 * Optional routines.
 	 */
+	int (*sync)(dm_table_entry_t *);
 	int (*secsize)(dm_table_entry_t *, unsigned int *);
 
 	uint32_t version[3];

Index: src/sys/dev/dm/dm_target.c
diff -u src/sys/dev/dm/dm_target.c:1.30 src/sys/dev/dm/dm_target.c:1.31
--- src/sys/dev/dm/dm_target.c:1.30	Sun Dec 15 09:42:29 2019
+++ src/sys/dev/dm/dm_target.c	Sun Dec 15 10:12:45 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target.c,v 1.30 2019/12/15 09:42:29 tkusumi Exp $  */
+/*$NetBSD: dm_target.c,v 1.31 2019/12/15 10:12:45 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.30 2019/12/15 09:42:29 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.31 2019/12/15 10:12:45 tkusumi Exp $");
 
 #include 
 #include 
@@ -180,10 +180,6 @@ dm_target_insert(dm_target_t *dm_target)
 		printf("%s missing upcall\n", dm_target->name);
 		return EINVAL;
 	}
-	if (dm_target->sync == NULL) {
-		printf("%s missing sync\n", dm_target->name);
-		return EINVAL;
-	}
 
 	mutex_enter(_target_mutex);
 

Index: src/sys/dev/dm/dm_target_error.c
diff -u src/sys/dev/dm/dm_target_error.c:1.22 src/sys/dev/dm/dm_target_error.c:1.23
--- src/sys/dev/dm/dm_target_error.c:1.22	Sun Dec 15 09:42:29 2019
+++ src/sys/dev/dm/dm_target_error.c	Sun Dec 15 10:12:45 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_error.c,v 1.22 2019/12/15 09:42:29 tkusumi Exp $  */
+/*$NetBSD: dm_target_error.c,v 1.23 2019/12/15 10:12:45 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.22 2019/12/15 09:42:29 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.23 2019/12/15 10:12:45 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper error target.
@@ -45,7 +45,6 @@ __KERNEL_RCSID(0, "$NetBSD: dm_target_er
 int dm_target_error_init(dm_table_entry_t*, int, char **);
 char *dm_target_error_table(void *);
 int dm_target_error_strategy(dm_table_entry_t *, struct buf *);
-int dm_target_error_sync(dm_table_entry_t *);
 int dm_target_error_deps(dm_table_entry_t *, prop_array_t);
 int dm_target_error_destroy(dm_table_entry_t *);
 int dm_target_error_upcall(dm_table_entry_t *, struct buf *);
@@ -84,7 +83,6 @@ dm_target_error_modcmd(modcmd_t cmd, voi
 		dmt->init = _target_error_init;
 		dmt->table = _target_error_table;
 		dmt->strategy = _target_error_strategy;
-		dmt->sync = _target_error_sync;
 		dmt->deps = 

CVS commit: src/sys/dev/dm

2019-12-15 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Sun Dec 15 09:42:29 UTC 2019

Modified Files:
src/sys/dev/dm: dm.h dm_table.c dm_target.c dm_target_error.c
dm_target_mirror.c dm_target_snapshot.c dm_target_zero.c

Log Message:
dm: Make targets' ->secsize() optional

and make a caller assume secsize 0 if ->secsize not present.
This allows a dummy function to be removed which was added in
"dm: Add dummy target ->sync()/->secsize() to prevent panic on modload(8)".


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/dm/dm_table.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dm/dm_target.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/dm/dm_target_error.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/dm/dm_target_mirror.c
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/dm/dm_target_snapshot.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/dm/dm_target_zero.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/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.43 src/sys/dev/dm/dm.h:1.44
--- src/sys/dev/dm/dm.h:1.43	Sun Dec 15 09:22:28 2019
+++ src/sys/dev/dm/dm.h	Sun Dec 15 09:42:29 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.43 2019/12/15 09:22:28 tkusumi Exp $  */
+/*$NetBSD: dm.h,v 1.44 2019/12/15 09:42:29 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -193,6 +193,9 @@ typedef struct dm_target {
 	int (*strategy)(dm_table_entry_t *, struct buf *);
 	int (*sync)(dm_table_entry_t *);
 	int (*upcall)(dm_table_entry_t *, struct buf *);
+	/*
+	 * Optional routines.
+	 */
 	int (*secsize)(dm_table_entry_t *, unsigned int *);
 
 	uint32_t version[3];
@@ -298,13 +301,6 @@ int dm_pdev_destroy(void);
 int dm_pdev_init(void);
 dm_pdev_t* dm_pdev_insert(const char *);
 
-/* XXX dummy */
-static __inline int
-dm_target_dummy_secsize(dm_table_entry_t *table_en, unsigned int *secsizep)
-{
-	return 0;
-}
-
 #endif /*_KERNEL*/
 
 #endif /*_DM_DEV_H_*/

Index: src/sys/dev/dm/dm_table.c
diff -u src/sys/dev/dm/dm_table.c:1.14 src/sys/dev/dm/dm_table.c:1.15
--- src/sys/dev/dm/dm_table.c:1.14	Sun Dec 15 09:22:28 2019
+++ src/sys/dev/dm/dm_table.c	Sun Dec 15 09:42:29 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_table.c,v 1.14 2019/12/15 09:22:28 tkusumi Exp $  */
+/*$NetBSD: dm_table.c,v 1.15 2019/12/15 09:42:29 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.14 2019/12/15 09:22:28 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.15 2019/12/15 09:42:29 tkusumi Exp $");
 
 #include 
 #include 
@@ -248,7 +248,10 @@ dm_table_disksize(dm_table_head_t *head,
 	secsize = 0;
 	SLIST_FOREACH(table_en, tbl, next) {
 		length += table_en->length;
-		table_en->target->secsize(table_en, );
+		if (table_en->target->secsize)
+			table_en->target->secsize(table_en, );
+		else
+			tsecsize = 0;
 		if (secsize < tsecsize)
 			secsize = tsecsize;
 	}

Index: src/sys/dev/dm/dm_target.c
diff -u src/sys/dev/dm/dm_target.c:1.29 src/sys/dev/dm/dm_target.c:1.30
--- src/sys/dev/dm/dm_target.c:1.29	Sun Dec 15 05:56:02 2019
+++ src/sys/dev/dm/dm_target.c	Sun Dec 15 09:42:29 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target.c,v 1.29 2019/12/15 05:56:02 tkusumi Exp $  */
+/*$NetBSD: dm_target.c,v 1.30 2019/12/15 09:42:29 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.29 2019/12/15 05:56:02 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target.c,v 1.30 2019/12/15 09:42:29 tkusumi Exp $");
 
 #include 
 #include 
@@ -184,10 +184,6 @@ dm_target_insert(dm_target_t *dm_target)
 		printf("%s missing sync\n", dm_target->name);
 		return EINVAL;
 	}
-	if (dm_target->secsize == NULL) {
-		printf("%s missing secsize\n", dm_target->name);
-		return EINVAL;
-	}
 
 	mutex_enter(_target_mutex);
 

Index: src/sys/dev/dm/dm_target_error.c
diff -u src/sys/dev/dm/dm_target_error.c:1.21 src/sys/dev/dm/dm_target_error.c:1.22
--- src/sys/dev/dm/dm_target_error.c:1.21	Sun Dec 15 05:56:02 2019
+++ src/sys/dev/dm/dm_target_error.c	Sun Dec 15 09:42:29 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_target_error.c,v 1.21 2019/12/15 05:56:02 tkusumi Exp $  */
+/*$NetBSD: dm_target_error.c,v 1.22 2019/12/15 09:42:29 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.21 2019/12/15 05:56:02 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_target_error.c,v 1.22 2019/12/15 09:42:29 tkusumi Exp $");
 
 /*
  * This file implements initial version of device-mapper error target.
@@ -88,7 +88,6 @@ dm_target_error_modcmd(modcmd_t 

CVS commit: src/sys/arch/powerpc/ibm4xx/dev

2019-12-15 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Sun Dec 15 09:38:40 UTC 2019

Modified Files:
src/sys/arch/powerpc/ibm4xx/dev: com_opb.c

Log Message:
Belatedly catch up with MI com(4) change in com.c rev. 1.351:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/com.c#rev1.351

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/powerpc/ibm4xx/dev/com_opb.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/powerpc/ibm4xx/dev/com_opb.c
diff -u src/sys/arch/powerpc/ibm4xx/dev/com_opb.c:1.22 src/sys/arch/powerpc/ibm4xx/dev/com_opb.c:1.23
--- src/sys/arch/powerpc/ibm4xx/dev/com_opb.c:1.22	Sat Dec  8 17:46:12 2018
+++ src/sys/arch/powerpc/ibm4xx/dev/com_opb.c	Sun Dec 15 09:38:40 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: com_opb.c,v 1.22 2018/12/08 17:46:12 thorpej Exp $ */
+/* $NetBSD: com_opb.c,v 1.23 2019/12/15 09:38:40 rin Exp $ */
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: com_opb.c,v 1.22 2018/12/08 17:46:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com_opb.c,v 1.23 2019/12/15 09:38:40 rin Exp $");
 
 #include 
 #include 
@@ -143,9 +143,6 @@ void
 com_opb_cnattach(int com_freq, int conaddr, int conspeed, int conmode)
 {
 	static int attached = 0;
-#if (NCOM > 0)
-	struct com_regs	regs;
-#endif
 
 	if (attached)
 		return;
@@ -153,12 +150,8 @@ com_opb_cnattach(int com_freq, int conad
 
 #if (NCOM > 0)
 	/* We *know* the com-console attaches to opb */
-	regs.cr_iot = opb_get_bus_space_tag();
-	regs.cr_iobase = conaddr;
-	regs.cr_nports = COM_NPORTS;
-	/* regs.ioh is initialized by comcnattach */
-
-	if (comcnattach1(, conspeed, com_freq, COM_TYPE_NORMAL, conmode))
+	if (comcnattach(opb_get_bus_space_tag(), conaddr, conspeed, com_freq,
+	COM_TYPE_NORMAL, conmode))
 		panic("can't init serial console @%x", conaddr);
 	else
 		return;



CVS commit: src/sys/dev/dm

2019-12-15 Thread Tomohiro Kusumi
Module Name:src
Committed By:   tkusumi
Date:   Sun Dec 15 09:22:29 UTC 2019

Modified Files:
src/sys/dev/dm: device-mapper.c dm.h dm_table.c dm_target_linear.c
dm_target_stripe.c

Log Message:
dm: "unsigned" -> "unsigned int" for consistency

Use either one, but not both.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/dm/device-mapper.c
cvs rdiff -u -r1.42 -r1.43 src/sys/dev/dm/dm.h
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dm/dm_table.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/dm/dm_target_linear.c
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/dm/dm_target_stripe.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/dm/device-mapper.c
diff -u src/sys/dev/dm/device-mapper.c:1.51 src/sys/dev/dm/device-mapper.c:1.52
--- src/sys/dev/dm/device-mapper.c:1.51	Sat Dec 14 11:20:51 2019
+++ src/sys/dev/dm/device-mapper.c	Sun Dec 15 09:22:28 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: device-mapper.c,v 1.51 2019/12/14 11:20:51 tkusumi Exp $ */
+/*$NetBSD: device-mapper.c,v 1.52 2019/12/15 09:22:28 tkusumi Exp $ */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -451,7 +451,7 @@ disk_ioctl_switch(dev_t dev, u_long cmd,
 	case DIOCGWEDGEINFO:
 	{
 		struct dkwedge_info *dkw = (void *) data;
-		unsigned secsize;
+		unsigned int secsize;
 
 		if ((dmv = dm_dev_lookup(NULL, NULL, minor(dev))) == NULL)
 			return ENODEV;
@@ -703,7 +703,7 @@ void
 dmgetproperties(struct disk *disk, dm_table_head_t *head)
 {
 	uint64_t numsec;
-	unsigned secsize;
+	unsigned int secsize;
 
 	dm_table_disksize(head, , );
 

Index: src/sys/dev/dm/dm.h
diff -u src/sys/dev/dm/dm.h:1.42 src/sys/dev/dm/dm.h:1.43
--- src/sys/dev/dm/dm.h:1.42	Sun Dec 15 05:56:02 2019
+++ src/sys/dev/dm/dm.h	Sun Dec 15 09:22:28 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm.h,v 1.42 2019/12/15 05:56:02 tkusumi Exp $  */
+/*$NetBSD: dm.h,v 1.43 2019/12/15 09:22:28 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@ typedef struct dm_pdev {
 
 	struct vnode *pdev_vnode;
 	uint64_t pdev_numsec;
-	unsigned pdev_secsize;
+	unsigned int pdev_secsize;
 	int ref_cnt; /* reference counter for users ofthis pdev */
 
 	SLIST_ENTRY(dm_pdev) next_pdev;
@@ -193,7 +193,7 @@ typedef struct dm_target {
 	int (*strategy)(dm_table_entry_t *, struct buf *);
 	int (*sync)(dm_table_entry_t *);
 	int (*upcall)(dm_table_entry_t *, struct buf *);
-	int (*secsize)(dm_table_entry_t *, unsigned *);
+	int (*secsize)(dm_table_entry_t *, unsigned int *);
 
 	uint32_t version[3];
 	uint32_t ref_cnt;
@@ -248,7 +248,7 @@ int dm_target_linear_sync(dm_table_entry
 int dm_target_linear_deps(dm_table_entry_t *, prop_array_t);
 int dm_target_linear_destroy(dm_table_entry_t *);
 int dm_target_linear_upcall(dm_table_entry_t *, struct buf *);
-int dm_target_linear_secsize(dm_table_entry_t *, unsigned *);
+int dm_target_linear_secsize(dm_table_entry_t *, unsigned int *);
 
 /* Generic function used to convert char to string */
 uint64_t atoi(const char *);
@@ -261,7 +261,7 @@ int dm_target_stripe_sync(dm_table_entry
 int dm_target_stripe_deps(dm_table_entry_t *, prop_array_t);
 int dm_target_stripe_destroy(dm_table_entry_t *);
 int dm_target_stripe_upcall(dm_table_entry_t *, struct buf *);
-int dm_target_stripe_secsize(dm_table_entry_t *, unsigned *);
+int dm_target_stripe_secsize(dm_table_entry_t *, unsigned int *);
 
 /* dm_table.c  */
 #define DM_TABLE_ACTIVE 0
@@ -270,7 +270,7 @@ int dm_target_stripe_secsize(dm_table_en
 int dm_table_destroy(dm_table_head_t *, uint8_t);
 uint64_t dm_table_size(dm_table_head_t *);
 uint64_t dm_inactive_table_size(dm_table_head_t *);
-void dm_table_disksize(dm_table_head_t *, uint64_t *, unsigned *);
+void dm_table_disksize(dm_table_head_t *, uint64_t *, unsigned int *);
 dm_table_t *dm_table_get_entry(dm_table_head_t *, uint8_t);
 int dm_table_get_target_count(dm_table_head_t *, uint8_t);
 void dm_table_release(dm_table_head_t *, uint8_t s);
@@ -300,7 +300,7 @@ dm_pdev_t* dm_pdev_insert(const char *);
 
 /* XXX dummy */
 static __inline int
-dm_target_dummy_secsize(dm_table_entry_t *table_en, unsigned *secsizep)
+dm_target_dummy_secsize(dm_table_entry_t *table_en, unsigned int *secsizep)
 {
 	return 0;
 }

Index: src/sys/dev/dm/dm_table.c
diff -u src/sys/dev/dm/dm_table.c:1.13 src/sys/dev/dm/dm_table.c:1.14
--- src/sys/dev/dm/dm_table.c:1.13	Sat Dec 14 10:49:30 2019
+++ src/sys/dev/dm/dm_table.c	Sun Dec 15 09:22:28 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: dm_table.c,v 1.13 2019/12/14 10:49:30 tkusumi Exp $  */
+/*$NetBSD: dm_table.c,v 1.14 2019/12/15 09:22:28 tkusumi Exp $  */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.13 2019/12/14 10:49:30 tkusumi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dm_table.c,v 1.14 2019/12/15