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

2020-06-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jun 17 05:52:13 UTC 2020

Modified Files:
src/sys/arch/alpha/common: sgmap_typedep.c

Log Message:
Typo: vmem_free -> vmem_xfree


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/alpha/common/sgmap_typedep.c

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

Modified files:

Index: src/sys/arch/alpha/common/sgmap_typedep.c
diff -u src/sys/arch/alpha/common/sgmap_typedep.c:1.38 src/sys/arch/alpha/common/sgmap_typedep.c:1.39
--- src/sys/arch/alpha/common/sgmap_typedep.c:1.38	Wed Jun 17 04:12:39 2020
+++ src/sys/arch/alpha/common/sgmap_typedep.c	Wed Jun 17 05:52:13 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap_typedep.c,v 1.38 2020/06/17 04:12:39 thorpej Exp $ */
+/* $NetBSD: sgmap_typedep.c,v 1.39 2020/06/17 05:52:13 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.38 2020/06/17 04:12:39 thorpej Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.39 2020/06/17 05:52:13 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -438,7 +438,7 @@ __C(SGMAP_TYPE,_unload)(bus_dma_tag_t t,
 		alpha_mb();
 
 		/* Free the virtual address space used by the mapping. */
-		vmem_free(sgmap->aps_arena, osgva, (esgva - osgva));
+		vmem_xfree(sgmap->aps_arena, osgva, (esgva - osgva));
 	}
 
 	map->_dm_flags &= ~(BUS_DMA_READ|BUS_DMA_WRITE);



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

2020-06-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jun 17 04:12:39 UTC 2020

Modified Files:
src/sys/arch/alpha/common: sgmap_common.c sgmap_typedep.c sgmapvar.h

Log Message:
Switch from an extent mao to a vmem arena to manage SGMAP address space.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/alpha/common/sgmap_common.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/alpha/common/sgmap_typedep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/alpha/common/sgmapvar.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/alpha/common/sgmap_common.c
diff -u src/sys/arch/alpha/common/sgmap_common.c:1.26 src/sys/arch/alpha/common/sgmap_common.c:1.27
--- src/sys/arch/alpha/common/sgmap_common.c:1.26	Fri Jan 27 18:52:48 2012
+++ src/sys/arch/alpha/common/sgmap_common.c	Wed Jun 17 04:12:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap_common.c,v 1.26 2012/01/27 18:52:48 para Exp $ */
+/* $NetBSD: sgmap_common.c,v 1.27 2020/06/17 04:12:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sgmap_common.c,v 1.26 2012/01/27 18:52:48 para Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sgmap_common.c,v 1.27 2020/06/17 04:12:39 thorpej Exp $");
 
 #include 
 #include 
@@ -103,16 +103,22 @@ alpha_sgmap_init(bus_dma_tag_t t, struct
 	}
 
 	/*
-	 * Create the extent map used to manage the virtual address
+	 * Create the arena used to manage the virtual address
 	 * space.
+	 *
+	 * XXX Consider using a quantum cache up to MAXPHYS+PAGE_SIZE
+	 * XXX (extra page to handle the spill page).  For now, we don't,
+	 * XXX because we are using constrained allocations everywhere.
 	 */
-	sgmap->aps_ex = extent_create(name, sgvabase, sgvasize - 1,
-	NULL, 0, EX_NOWAIT|EX_NOCOALESCE);
-	if (sgmap->aps_ex == NULL) {
-		printf("unable to create extent map for sgmap `%s'\n",
-		name);
-		goto die;
-	}
+	sgmap->aps_arena = vmem_create(name, sgvabase, sgvasize,
+   PAGE_SIZE,	/* quantum */
+   NULL,		/* importfn */
+   NULL,		/* releasefn */
+   NULL,		/* source */
+   0,		/* qcache_max */
+   VM_SLEEP,
+   IPL_VM);
+	KASSERT(sgmap->aps_arena != NULL);
 
 	/*
 	 * Allocate a spill page if that hasn't already been done.

Index: src/sys/arch/alpha/common/sgmap_typedep.c
diff -u src/sys/arch/alpha/common/sgmap_typedep.c:1.37 src/sys/arch/alpha/common/sgmap_typedep.c:1.38
--- src/sys/arch/alpha/common/sgmap_typedep.c:1.37	Wed Dec 15 01:28:24 2010
+++ src/sys/arch/alpha/common/sgmap_typedep.c	Wed Jun 17 04:12:39 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: sgmap_typedep.c,v 1.37 2010/12/15 01:28:24 matt Exp $ */
+/* $NetBSD: sgmap_typedep.c,v 1.38 2020/06/17 04:12:39 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.37 2010/12/15 01:28:24 matt Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sgmap_typedep.c,v 1.38 2020/06/17 04:12:39 thorpej Exp $");
 
 #include "opt_ddb.h"
 
@@ -66,7 +66,7 @@ __C(SGMAP_TYPE,_load_buffer)(bus_dma_tag
 	bus_addr_t dmaoffset, sgva;
 	bus_size_t sgvalen, boundary, alignment;
 	SGMAP_PTE_TYPE *pte, *page_table = sgmap->aps_pt;
-	int s, pteidx, error, spill;
+	int pteidx, error, spill;
 
 	/* Initialize the spill page PTE if it hasn't been already. */
 	if (__C(SGMAP_TYPE,_prefetch_spill_page_pte) == 0)
@@ -131,10 +131,17 @@ __C(SGMAP_TYPE,_load_buffer)(bus_dma_tag
 	}
 #endif
 
-	s = splvm();
-	error = extent_alloc(sgmap->aps_ex, sgvalen, alignment, boundary,
-	(flags & BUS_DMA_NOWAIT) ? EX_NOWAIT : EX_WAITOK, );
-	splx(s);
+	const vm_flag_t vmflags = VM_INSTANTFIT |
+	((flags & BUS_DMA_NOWAIT) ? VM_SLEEP : VM_NOSLEEP);
+
+	error = vmem_xalloc(sgmap->aps_arena, sgvalen,
+			alignment,		/* alignment */
+			0,			/* phase */
+			boundary,		/* nocross */
+			VMEM_ADDR_MIN,	/* minaddr */
+			VMEM_ADDR_MAX,	/* maxaddr */
+			vmflags,
+			);
 	if (error)
 		return (error);
 
@@ -395,7 +402,7 @@ __C(SGMAP_TYPE,_unload)(bus_dma_tag_t t,
 {
 	SGMAP_PTE_TYPE *pte, *page_table = sgmap->aps_pt;
 	bus_addr_t osgva, sgva, esgva;
-	int s, error, spill, seg, pteidx;
+	int spill, seg, pteidx;
 
 	for (seg = 0; seg < map->dm_nsegs; seg++) {
 		/*
@@ -431,12 +438,7 @@ __C(SGMAP_TYPE,_unload)(bus_dma_tag_t t,
 		alpha_mb();
 
 		/* Free the virtual address space used by the mapping. */
-		s = splvm();
-		error = extent_free(sgmap->aps_ex, osgva, (esgva - osgva),
-		EX_NOWAIT);
-		splx(s);
-		if (error)
-			panic(__S(__C(SGMAP_TYPE,_unload)));
+		vmem_free(sgmap->aps_arena, osgva, (esgva - osgva));
 	}
 
 	map->_dm_flags &= ~(BUS_DMA_READ|BUS_DMA_WRITE);

Index: src/sys/arch/alpha/common/sgmapvar.h
diff -u src/sys/arch/alpha/common/sgmapvar.h:1.16 

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

2020-06-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Jun 17 03:50:05 UTC 2020

Modified Files:
src/sys/arch/alpha/pci: tsvar.h ttwogavar.h

Log Message:
#include  explicitly.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/alpha/pci/tsvar.h
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/alpha/pci/ttwogavar.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/alpha/pci/tsvar.h
diff -u src/sys/arch/alpha/pci/tsvar.h:1.13 src/sys/arch/alpha/pci/tsvar.h:1.14
--- src/sys/arch/alpha/pci/tsvar.h:1.13	Sun Dec 22 23:23:29 2019
+++ src/sys/arch/alpha/pci/tsvar.h	Wed Jun 17 03:50:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: tsvar.h,v 1.13 2019/12/22 23:23:29 thorpej Exp $ */
+/* $NetBSD: tsvar.h,v 1.14 2020/06/17 03:50:04 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 by Ross Harvey.  All rights reserved.
@@ -31,6 +31,7 @@
  *
  */
 
+#include 
 #include 
 #include 
 #include 

Index: src/sys/arch/alpha/pci/ttwogavar.h
diff -u src/sys/arch/alpha/pci/ttwogavar.h:1.4 src/sys/arch/alpha/pci/ttwogavar.h:1.5
--- src/sys/arch/alpha/pci/ttwogavar.h:1.4	Mon Feb  6 02:14:15 2012
+++ src/sys/arch/alpha/pci/ttwogavar.h	Wed Jun 17 03:50:04 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ttwogavar.h,v 1.4 2012/02/06 02:14:15 matt Exp $ */
+/* $NetBSD: ttwogavar.h,v 1.5 2020/06/17 03:50:04 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -29,6 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include 
 #include 
 #include 
 #include 



CVS commit: src/crypto/external/bsd/openssl/dist/crypto

2020-06-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jun 17 03:22:06 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto: ppccap.c

Log Message:
fix pasto (noted by Viktor Duchovny)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 \
src/crypto/external/bsd/openssl/dist/crypto/ppccap.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/ppccap.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.13 src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.14
--- src/crypto/external/bsd/openssl/dist/crypto/ppccap.c:1.13	Sat Apr 11 18:41:06 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/ppccap.c	Tue Jun 16 23:22:06 2020
@@ -185,7 +185,7 @@ size_t SHA3_absorb(uint64_t A[5][5], con
 void SHA3_squeeze(uint64_t A[5][5], unsigned char *out, size_t len, size_t r)
 {
 OPENSSL_ppccap_P & PPC_CRYPTO207
-? SHA3_absorb_vsx(A, out, len, r)
+? SHA3_squeeze_vsx(A, out, len, r)
 : SHA3_squeeze_default(A, out, len, r);
 }
 



CVS commit: src/sys/conf

2020-06-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Jun 17 02:40:43 UTC 2020

Modified Files:
src/sys/conf: Makefile.kern.inc

Log Message:
Add -fstack-usage to kernel builds. Produces .su files that can be
analysed to find large stack users.


To generate a diff of this commit:
cvs rdiff -u -r1.270 -r1.271 src/sys/conf/Makefile.kern.inc

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

Modified files:

Index: src/sys/conf/Makefile.kern.inc
diff -u src/sys/conf/Makefile.kern.inc:1.270 src/sys/conf/Makefile.kern.inc:1.271
--- src/sys/conf/Makefile.kern.inc:1.270	Thu May 21 18:44:19 2020
+++ src/sys/conf/Makefile.kern.inc	Wed Jun 17 02:40:43 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.kern.inc,v 1.270 2020/05/21 18:44:19 christos Exp $
+#	$NetBSD: Makefile.kern.inc,v 1.271 2020/06/17 02:40:43 simonb Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -104,6 +104,9 @@ CFLAGS+=	-ffreestanding -fno-zero-initia
 CFLAGS+=	${${ACTIVE_CC} == "gcc":? -fno-delete-null-pointer-checks :}
 CFLAGS+=	${DEBUG} ${COPTS}
 AFLAGS+=	-D_LOCORE -Wa,--fatal-warnings
+# example usage to find largest stack users in kernel compile directory:
+#find . -name \*.su | xargs awk '{ printf "%6d %s\n", $2, $1 }' | sort -n
+CFLAGS+=	-fstack-usage
 
 # XXX
 .if defined(HAVE_GCC) || defined(HAVE_LLVM)
@@ -338,8 +341,8 @@ ${_s:T:R}.o: ${_s}
 .if !target(__CLEANKERNEL)
 __CLEANKERNEL: .USE
 	${_MKMSG} "${.TARGET}ing the kernel objects"
-	rm -f ${KERNELS} *.map eddep tags *.[io] *.ko *.ln [a-z]*.s vers.c \
-	[Ee]rrs linterrs makelinks assym.h.tmp assym.h \
+	rm -f ${KERNELS} *.map *.[io] *.ko *.ln [a-z]*.s *.su vers.c \
+	eddep tags [Ee]rrs linterrs makelinks assym.h.tmp assym.h \
 	${EXTRA_KERNELS} ${EXTRA_CLEAN}
 .endif
 



CVS commit: src

2020-06-16 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Wed Jun 17 00:16:22 UTC 2020

Modified Files:
src/lib/libc/rpc: svc_fdset.h
src/sbin/fsck_lfs: kernelops.c
src/tests/fs/common: fstest_ext2fs.c fstest_ffs.c fstest_lfs.c
fstest_msdosfs.c fstest_nfs.c fstest_puffs.c fstest_rumpfs.c
fstest_sysvbfs.c fstest_tmpfs.c fstest_udf.c fstest_v7fs.c
fstest_zfs.c
src/tests/fs/nfs/nfsservice: getmntinfo.c rumpnfsd.c
src/usr.sbin/mountd: mountd.c
src/usr.sbin/nfsd: nfsd.c
src/usr.sbin/rpcbind: check_bound.c rpcb_svc_com.c rpcbind.c util.c

Log Message:
Include explicitly  for previous indirect users
via .


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libc/rpc/svc_fdset.h
cvs rdiff -u -r1.3 -r1.4 src/sbin/fsck_lfs/kernelops.c
cvs rdiff -u -r1.2 -r1.3 src/tests/fs/common/fstest_ext2fs.c \
src/tests/fs/common/fstest_rumpfs.c src/tests/fs/common/fstest_sysvbfs.c \
src/tests/fs/common/fstest_tmpfs.c src/tests/fs/common/fstest_zfs.c
cvs rdiff -u -r1.6 -r1.7 src/tests/fs/common/fstest_ffs.c
cvs rdiff -u -r1.7 -r1.8 src/tests/fs/common/fstest_lfs.c
cvs rdiff -u -r1.3 -r1.4 src/tests/fs/common/fstest_msdosfs.c
cvs rdiff -u -r1.11 -r1.12 src/tests/fs/common/fstest_nfs.c
cvs rdiff -u -r1.12 -r1.13 src/tests/fs/common/fstest_puffs.c
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/common/fstest_udf.c
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/common/fstest_v7fs.c
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/nfs/nfsservice/getmntinfo.c
cvs rdiff -u -r1.10 -r1.11 src/tests/fs/nfs/nfsservice/rumpnfsd.c
cvs rdiff -u -r1.131 -r1.132 src/usr.sbin/mountd/mountd.c
cvs rdiff -u -r1.68 -r1.69 src/usr.sbin/nfsd/nfsd.c
cvs rdiff -u -r1.8 -r1.9 src/usr.sbin/rpcbind/check_bound.c
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/rpcbind/rpcb_svc_com.c
cvs rdiff -u -r1.28 -r1.29 src/usr.sbin/rpcbind/rpcbind.c
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/rpcbind/util.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/rpc/svc_fdset.h
diff -u src/lib/libc/rpc/svc_fdset.h:1.4 src/lib/libc/rpc/svc_fdset.h:1.5
--- src/lib/libc/rpc/svc_fdset.h:1.4	Sun Nov  8 02:46:53 2015
+++ src/lib/libc/rpc/svc_fdset.h	Wed Jun 17 00:16:21 2020
@@ -1,7 +1,8 @@
-/*	$NetBSD: svc_fdset.h,v 1.4 2015/11/08 02:46:53 christos Exp $	*/
+/*	$NetBSD: svc_fdset.h,v 1.5 2020/06/17 00:16:21 kamil Exp $	*/
 
 # ifdef RUMP_RPC
 #  include 
+#  include 
 #  include 
 #  undef	close
 #  define	close(a)		rump_sys_close(a)

Index: src/sbin/fsck_lfs/kernelops.c
diff -u src/sbin/fsck_lfs/kernelops.c:1.3 src/sbin/fsck_lfs/kernelops.c:1.4
--- src/sbin/fsck_lfs/kernelops.c:1.3	Tue Oct 13 22:04:31 2009
+++ src/sbin/fsck_lfs/kernelops.c	Wed Jun 17 00:16:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernelops.c,v 1.3 2009/10/13 22:04:31 pooka Exp $	*/
+/*	$NetBSD: kernelops.c,v 1.4 2020/06/17 00:16:21 kamil Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: kernelops.c,v 1.3 2009/10/13 22:04:31 pooka Exp $");
+__RCSID("$NetBSD: kernelops.c,v 1.4 2020/06/17 00:16:21 kamil Exp $");
 #endif /* !lint */
 
 /*
@@ -52,6 +52,7 @@ __RCSID("$NetBSD: kernelops.c,v 1.3 2009
 #ifdef USE_RUMP
 
 #include 
+#include 
 #include 
 
 const struct kernelops kops = {

Index: src/tests/fs/common/fstest_ext2fs.c
diff -u src/tests/fs/common/fstest_ext2fs.c:1.2 src/tests/fs/common/fstest_ext2fs.c:1.3
--- src/tests/fs/common/fstest_ext2fs.c:1.2	Fri Jul 30 16:15:05 2010
+++ src/tests/fs/common/fstest_ext2fs.c	Wed Jun 17 00:16:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_ext2fs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $	*/
+/*	$NetBSD: fstest_ext2fs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -41,6 +41,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include "h_fsmacros.h"
Index: src/tests/fs/common/fstest_rumpfs.c
diff -u src/tests/fs/common/fstest_rumpfs.c:1.2 src/tests/fs/common/fstest_rumpfs.c:1.3
--- src/tests/fs/common/fstest_rumpfs.c:1.2	Sun Mar 16 10:28:03 2014
+++ src/tests/fs/common/fstest_rumpfs.c	Wed Jun 17 00:16:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_rumpfs.c,v 1.2 2014/03/16 10:28:03 njoly Exp $	*/
+/*	$NetBSD: fstest_rumpfs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -39,6 +39,7 @@
 #include 
 
 #include 
+#include 
 #include 
 
 #include "h_fsmacros.h"
Index: src/tests/fs/common/fstest_sysvbfs.c
diff -u src/tests/fs/common/fstest_sysvbfs.c:1.2 src/tests/fs/common/fstest_sysvbfs.c:1.3
--- src/tests/fs/common/fstest_sysvbfs.c:1.2	Fri Jul 30 16:15:05 2010
+++ src/tests/fs/common/fstest_sysvbfs.c	Wed Jun 17 00:16:21 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: fstest_sysvbfs.c,v 1.2 2010/07/30 16:15:05 pooka Exp $	*/
+/*	$NetBSD: fstest_sysvbfs.c,v 1.3 2020/06/17 00:16:21 kamil Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD 

CVS commit: src/libexec/ld.elf_so/arch/arm

2020-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jun 16 21:02:20 UTC 2020

Modified Files:
src/libexec/ld.elf_so/arch/arm: mdreloc.c

Log Message:
R_ARM_TLS_TPOFF32 needs to adjust the existing value, not blindly
overwrite it.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/libexec/ld.elf_so/arch/arm/mdreloc.c

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

Modified files:

Index: src/libexec/ld.elf_so/arch/arm/mdreloc.c
diff -u src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.44 src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.45
--- src/libexec/ld.elf_so/arch/arm/mdreloc.c:1.44	Tue Apr  3 21:10:27 2018
+++ src/libexec/ld.elf_so/arch/arm/mdreloc.c	Tue Jun 16 21:02:20 2020
@@ -1,8 +1,8 @@
-/*	$NetBSD: mdreloc.c,v 1.44 2018/04/03 21:10:27 joerg Exp $	*/
+/*	$NetBSD: mdreloc.c,v 1.45 2020/06/16 21:02:20 joerg Exp $	*/
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.44 2018/04/03 21:10:27 joerg Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.45 2020/06/16 21:02:20 joerg Exp $");
 #endif /* not lint */
 
 #include 
@@ -232,8 +232,11 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 			_rtld_tls_offset_allocate(obj))
 return -1;
 
-			tmp = (Elf_Addr)def->st_value + defobj->tlsoffset +
-			sizeof(struct tls_tcb);
+			if (__predict_true(RELOC_ALIGNED_P(where)))
+tmp = *where;
+			else
+tmp = load_ptr(where);
+			tmp += (Elf_Addr)def->st_value + defobj->tlsoffset + sizeof(struct tls_tcb);
 			if (__predict_true(RELOC_ALIGNED_P(where)))
 *where = tmp;
 			else



CVS commit: src/libexec/ld.elf_so/arch/aarch64

2020-06-16 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Jun 16 21:01:30 UTC 2020

Modified Files:
src/libexec/ld.elf_so/arch/aarch64: mdreloc.c

Log Message:
Honor addend for R_AARCH64_TLS_TPREL relocation.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c

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

Modified files:

Index: src/libexec/ld.elf_so/arch/aarch64/mdreloc.c
diff -u src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.13 src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.14
--- src/libexec/ld.elf_so/arch/aarch64/mdreloc.c:1.13	Fri Jan 18 11:59:03 2019
+++ src/libexec/ld.elf_so/arch/aarch64/mdreloc.c	Tue Jun 16 21:01:30 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $ */
+/* $NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: mdreloc.c,v 1.13 2019/01/18 11:59:03 skrll Exp $");
+__RCSID("$NetBSD: mdreloc.c,v 1.14 2020/06/16 21:01:30 joerg Exp $");
 #endif /* not lint */
 
 #include 
@@ -296,8 +296,9 @@ _rtld_relocate_nonplt_objects(Obj_Entry 
 			_rtld_tls_offset_allocate(obj))
 return -1;
 
-			*where = (Elf_Addr)def->st_value + defobj->tlsoffset +
-			sizeof(struct tls_tcb);
+			*where = (Elf_Addr)(def->st_value + defobj->tlsoffset +
+			rela->r_addend + sizeof(struct tls_tcb));
+
 			rdbg(("TLS_TPREL %s in %s --> %p in %s",
 			obj->strtab + obj->symtab[symnum].st_name,
 			obj->path, (void *)*where, defobj->path));



CVS commit: src/sys/dev/usb

2020-06-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jun 16 17:25:56 UTC 2020

Modified Files:
src/sys/dev/usb: usbdi_util.c usbdi_util.h

Log Message:
remove unused


To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/sys/dev/usb/usbdi_util.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/usb/usbdi_util.h

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

Modified files:

Index: src/sys/dev/usb/usbdi_util.c
diff -u src/sys/dev/usb/usbdi_util.c:1.83 src/sys/dev/usb/usbdi_util.c:1.84
--- src/sys/dev/usb/usbdi_util.c:1.83	Fri May 15 07:51:49 2020
+++ src/sys/dev/usb/usbdi_util.c	Tue Jun 16 17:25:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi_util.c,v 1.83 2020/05/15 07:51:49 maxv Exp $	*/
+/*	$NetBSD: usbdi_util.c,v 1.84 2020/06/16 17:25:56 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.83 2020/05/15 07:51:49 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.84 2020/06/16 17:25:56 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -138,14 +138,6 @@ usbd_get_bos_desc(struct usbd_device *de
 }
 
 usbd_status
-usbd_get_bos_desc_full(struct usbd_device *dev, int conf, void *d, int size)
-{
-	USBHIST_FUNC(); USBHIST_CALLARGS(usbdebug, "conf=%jd", conf, 0, 0, 0);
-
-	return usbd_get_desc(dev, UDESC_BOS, conf, size, d);
-}
-
-usbd_status
 usbd_get_device_desc(struct usbd_device *dev, usb_device_descriptor_t *d)
 {
 	USBHIST_FUNC(); USBHIST_CALLED(usbdebug);

Index: src/sys/dev/usb/usbdi_util.h
diff -u src/sys/dev/usb/usbdi_util.h:1.53 src/sys/dev/usb/usbdi_util.h:1.54
--- src/sys/dev/usb/usbdi_util.h:1.53	Sun Feb 16 09:40:35 2020
+++ src/sys/dev/usb/usbdi_util.h	Tue Jun 16 17:25:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi_util.h,v 1.53 2020/02/16 09:40:35 maxv Exp $	*/
+/*	$NetBSD: usbdi_util.h,v 1.54 2020/06/16 17:25:56 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -42,7 +42,6 @@ usbd_status	usbd_get_config_desc_full(st
 		int);
 usbd_status	usbd_get_bos_desc(struct usbd_device *, int,
 		usb_bos_descriptor_t *);
-usbd_status	usbd_get_bos_desc_full(struct usbd_device *, int, void *, int);
 usbd_status	usbd_get_device_desc(struct usbd_device *,
 		usb_device_descriptor_t *);
 usbd_status	usbd_get_initial_ddesc(struct usbd_device *,



CVS commit: src/sys/netinet6

2020-06-16 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jun 16 17:12:18 UTC 2020

Modified Files:
src/sys/netinet6: in6.c in6_var.h scope6.c scope6_var.h

Log Message:
remove unused


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/sys/netinet6/in6.c
cvs rdiff -u -r1.103 -r1.104 src/sys/netinet6/in6_var.h
cvs rdiff -u -r1.22 -r1.23 src/sys/netinet6/scope6.c
cvs rdiff -u -r1.4 -r1.5 src/sys/netinet6/scope6_var.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/netinet6/in6.c
diff -u src/sys/netinet6/in6.c:1.280 src/sys/netinet6/in6.c:1.281
--- src/sys/netinet6/in6.c:1.280	Sun Jun 14 14:26:17 2020
+++ src/sys/netinet6/in6.c	Tue Jun 16 17:12:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6.c,v 1.280 2020/06/14 14:26:17 roy Exp $	*/
+/*	$NetBSD: in6.c,v 1.281 2020/06/16 17:12:18 maxv Exp $	*/
 /*	$KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.280 2020/06/14 14:26:17 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.281 2020/06/16 17:12:18 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2000,32 +2000,6 @@ in6_matchlen(struct in6_addr *src, struc
 	return match;
 }
 
-/* XXX: to be scope conscious */
-int
-in6_are_prefix_equal(struct in6_addr *p1, struct in6_addr *p2, int len)
-{
-	int bytelen, bitlen;
-
-	/* sanity check */
-	if (len < 0 || len > 128) {
-		log(LOG_ERR, "in6_are_prefix_equal: invalid prefix length(%d)\n",
-		len);
-		return 0;
-	}
-
-	bytelen = len / NBBY;
-	bitlen = len % NBBY;
-
-	if (memcmp(>s6_addr, >s6_addr, bytelen))
-		return 0;
-	if (bitlen != 0 &&
-	p1->s6_addr[bytelen] >> (NBBY - bitlen) !=
-	p2->s6_addr[bytelen] >> (NBBY - bitlen))
-		return 0;
-
-	return 1;
-}
-
 void
 in6_prefixlen2mask(struct in6_addr *maskp, int len)
 {

Index: src/sys/netinet6/in6_var.h
diff -u src/sys/netinet6/in6_var.h:1.103 src/sys/netinet6/in6_var.h:1.104
--- src/sys/netinet6/in6_var.h:1.103	Fri Jun 12 11:04:45 2020
+++ src/sys/netinet6/in6_var.h	Tue Jun 16 17:12:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_var.h,v 1.103 2020/06/12 11:04:45 roy Exp $	*/
+/*	$NetBSD: in6_var.h,v 1.104 2020/06/16 17:12:18 maxv Exp $	*/
 /*	$KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -624,7 +624,6 @@ struct in6_ifaddr *
 	struct psref *);
 struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t);
 int	in6_matchlen(struct in6_addr *, struct in6_addr *);
-int	in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int);
 void	in6_prefixlen2mask(struct in6_addr *, int);
 void	in6_purge_mcast_references(struct in6_multi *);
 

Index: src/sys/netinet6/scope6.c
diff -u src/sys/netinet6/scope6.c:1.22 src/sys/netinet6/scope6.c:1.23
--- src/sys/netinet6/scope6.c:1.22	Mon Sep 23 23:12:47 2019
+++ src/sys/netinet6/scope6.c	Tue Jun 16 17:12:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scope6.c,v 1.22 2019/09/23 23:12:47 kamil Exp $	*/
+/*	$NetBSD: scope6.c,v 1.23 2020/06/16 17:12:18 maxv Exp $	*/
 /*	$KAME$	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.22 2019/09/23 23:12:47 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scope6.c,v 1.23 2020/06/16 17:12:18 maxv Exp $");
 
 #include 
 #include 
@@ -95,78 +95,6 @@ scope6_ifdetach(struct scope6_id *sid)
 	free(sid, M_IFADDR);
 }
 
-int
-scope6_set(struct ifnet *ifp, const struct scope6_id *idlist)
-{
-	int i;
-	int error = 0;
-	struct scope6_id *sid = SID(ifp);
-
-	if (!sid)	/* paranoid? */
-		return EINVAL;
-
-	/*
-	 * XXX: We need more consistency checks of the relationship among
-	 * scopes (e.g. an organization should be larger than a site).
-	 */
-
-	/*
-	 * TODO(XXX): after setting, we should reflect the changes to
-	 * interface addresses, routing table entries, PCB entries...
-	 */
-
-	for (i = 0; i < 16; i++) {
-		if (idlist->s6id_list[i] &&
-		idlist->s6id_list[i] != sid->s6id_list[i]) {
-			int s;
-			/*
-			 * An interface zone ID must be the corresponding
-			 * interface index by definition.
-			 */
-			if (i == IPV6_ADDR_SCOPE_INTFACELOCAL &&
-			idlist->s6id_list[i] != ifp->if_index)
-return EINVAL;
-
-			s = pserialize_read_enter();
-			if (i == IPV6_ADDR_SCOPE_LINKLOCAL &&
-			!if_byindex(idlist->s6id_list[i])) {
-/*
- * XXX: theoretically, there should be no
- * relationship between link IDs and interface
- * IDs, but we check the consistency for
- * safety in later use.
- */
-pserialize_read_exit(s);
-return EINVAL;
-			}
-			pserialize_read_exit(s);
-
-			/*
-			 * XXX: we must need lots of work in this case,
-			 * but we simply set the new value in this initial
-			 * implementation.
-			 */
-			sid->s6id_list[i] = idlist->s6id_list[i];
-		}
-	}
-
-	return error;
-}
-
-int
-scope6_get(const struct ifnet *ifp, struct scope6_id *idlist)
-{
-	/* We only need to lock the interface's afdata for SID() to work. */
-	const 

CVS commit: src/sys/dev/raidframe

2020-06-16 Thread Greg Oster
Module Name:src
Committed By:   oster
Date:   Tue Jun 16 14:45:08 UTC 2020

Modified Files:
src/sys/dev/raidframe: rf_netbsdkintf.c

Log Message:
Improve wording in comments in raid_dumpblock().


To generate a diff of this commit:
cvs rdiff -u -r1.382 -r1.383 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.382 src/sys/dev/raidframe/rf_netbsdkintf.c:1.383
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.382	Mon Apr 13 00:27:17 2020
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Tue Jun 16 14:45:08 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.382 2020/04/13 00:27:17 chs Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.383 2020/06/16 14:45:08 oster Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  ***/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.382 2020/04/13 00:27:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.383 2020/06/16 14:45:08 oster Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_raid_autoconfig.h"
@@ -689,10 +689,10 @@ raid_dumpblocks(device_t dev, void *va, 
 	/* 
 	   Look for a component to dump to.  The preference for the
 	   component to dump to is as follows:
-	   1) the master
-	   2) a used_spare of the master
-	   3) the slave
-	   4) a used_spare of the slave
+	   1) the first component
+	   2) a used_spare of the first component
+	   3) the second component
+	   4) a used_spare of the second component
 	*/
 
 	dumpto = -1;
@@ -705,10 +705,9 @@ raid_dumpblocks(device_t dev, void *va, 
 	}
 	
 	/* 
-	   At this point we have possibly selected a live master or a
-	   live slave.  We now check to see if there is a spared
-	   master (or a spared slave), if we didn't find a live master
-	   or a live slave.  
+	   At this point we have possibly selected a live component.
+	   If we didn't find a live ocmponent, we now check to see
+	   if there is a relevant spared component.
 	*/
 
 	for (c = 0; c < raidPtr->numSpare; c++) {
@@ -724,24 +723,25 @@ raid_dumpblocks(device_t dev, void *va, 
 			}
 			if (scol == 0) {
 /* 
-   We must have found a spared master!
-   We'll take that over anything else
-   found so far.  (We couldn't have
-   found a real master before, since
-   this is a used spare, and it's
-   saying that it's replacing the
-   master.)  On reboot (with
+   We must have found a spared first
+   component!  We'll take that over
+   anything else found so far.  (We
+   couldn't have found a real first
+   component before, since this is a
+   used spare, and it's saying that
+   it's replacing the first
+   component.)  On reboot (with
    autoconfiguration turned on)
-   sparecol will become the 1st
-   component (component0) of this set.  
+   sparecol will become the first
+   component (component0) of this set.
 */
 dumpto = sparecol;
 break;
 			} else if (scol != -1) {
 /* 
-   Must be a spared slave.  We'll dump
-   to that if we havn't found anything
-   else so far. 
+   Must be a spared second component.  
+   We'll dump to that if we havn't found 
+   anything else so far. 
 */
 if (dumpto == -1)
 	dumpto = sparecol;



CVS commit: src/usr.sbin/mtree

2020-06-16 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jun 16 14:26:39 UTC 2020

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
Use more markup. Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/usr.sbin/mtree/mtree.8

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/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.75 src/usr.sbin/mtree/mtree.8:1.76
--- src/usr.sbin/mtree/mtree.8:1.75	Tue Jun 16 13:34:38 2020
+++ src/usr.sbin/mtree/mtree.8	Tue Jun 16 14:26:39 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.75 2020/06/16 13:34:38 sborrill Exp $
+.\"	$NetBSD: mtree.8,v 1.76 2020/06/16 14:26:39 wiz Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -56,7 +56,7 @@
 .\"
 .\" @(#)mtree.8	8.2 (Berkeley) 12/11/93
 .\"
-.Dd January 22, 2015
+.Dd June 16, 2020
 .Dt MTREE 8
 .Os
 .Sh NAME
@@ -618,7 +618,9 @@ they match.
 .Nm
 uses
 .Xr strsvis 3
-(in VIS_OCTAL format) to encode path names containing
+(in
+.Dv VIS_OCTAL
+format) to encode path names containing
 non-printable characters.
 Whitespace characters are encoded as
 .Ql \e040
@@ -631,7 +633,9 @@ When flavor
 .Sy netbsd6
 is selected,
 .Xr strsvis 3
-(in VIS_CSTYLE format) is used and whitespace characters are encoded as
+(in
+.Dv VIS_CSTYLE
+format) is used and whitespace characters are encoded as
 .Ql \es
 (space),
 .Ql \et



CVS commit: src/usr.sbin/mtree

2020-06-16 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Tue Jun 16 13:34:38 UTC 2020

Modified Files:
src/usr.sbin/mtree: mtree.8

Log Message:
Describe correctly how whitespace is formatted as the docs did not
match the source.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/mtree/mtree.8

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/mtree/mtree.8
diff -u src/usr.sbin/mtree/mtree.8:1.74 src/usr.sbin/mtree/mtree.8:1.75
--- src/usr.sbin/mtree/mtree.8:1.74	Thu Dec 13 07:34:03 2018
+++ src/usr.sbin/mtree/mtree.8	Tue Jun 16 13:34:38 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mtree.8,v 1.74 2018/12/13 07:34:03 wiz Exp $
+.\"	$NetBSD: mtree.8,v 1.75 2020/06/16 13:34:38 sborrill Exp $
 .\"
 .\" Copyright (c) 1989, 1990, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -618,9 +618,20 @@ they match.
 .Nm
 uses
 .Xr strsvis 3
-(in VIS_CSTYLE format) to encode path names containing
+(in VIS_OCTAL format) to encode path names containing
 non-printable characters.
 Whitespace characters are encoded as
+.Ql \e040
+(space),
+.Ql \e011
+(tab), and
+.Ql \e012
+(new line).
+When flavor
+.Sy netbsd6
+is selected,
+.Xr strsvis 3
+(in VIS_CSTYLE format) is used and whitespace characters are encoded as
 .Ql \es
 (space),
 .Ql \et



CVS commit: [netbsd-7] src/doc

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:36:03 UTC 2020

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

Log Message:
tickets 1734, 1735


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

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

Modified files:

Index: src/doc/CHANGES-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.85 src/doc/CHANGES-7.3:1.1.2.86
--- src/doc/CHANGES-7.3:1.1.2.85	Sun Jun  7 16:46:01 2020
+++ src/doc/CHANGES-7.3	Tue Jun 16 10:36:03 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.85 2020/06/07 16:46:01 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.86 2020/06/16 10:36:03 bouyer Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -867,3 +867,16 @@ sys/dev/sysmon/sysmon_envsys.c			1.145
 	Do not queue sysmon refresh until the rndsource is attached.
 	[riastradh, ticket #1733]
 
+sys/dev/usb/if_otus.c1.45 via patch
+
+	Stricter bounds check for some packet length we get from the usb chip,
+	to make sure we do not corrupt kernel memory.
+	Pointed out by Ilja Van Sprundel.
+	[martin, ticket #1734]
+
+sys/dev/usb/if_run.c1.41
+
+	Better bounds checking for oversized packets, to avoid kernel memory
+	corruption. Pointed out by Ilja Van Sprundel.
+	[martin, ticket #1735]
+



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

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:34:49 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by martin in ticket #1735):
sys/dev/usb/if_run.c: revision 1.41
Better bounds checking for oversized packets, to avoid kernel memory
corruption. Pointed out by Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.4 -r1.10.4.5 src/sys/dev/usb/if_run.c

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

Modified files:

Index: src/sys/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.10.4.4 src/sys/dev/usb/if_run.c:1.10.4.5
--- src/sys/dev/usb/if_run.c:1.10.4.4	Wed Aug  8 10:17:11 2018
+++ src/sys/dev/usb/if_run.c	Tue Jun 16 10:34:49 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.10.4.4 2018/08/08 10:17:11 martin Exp $	*/
+/*	$NetBSD: if_run.c,v 1.10.4.5 2020/06/16 10:34:49 bouyer Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.4.4 2018/08/08 10:17:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.10.4.5 2020/06/16 10:34:49 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2067,7 +2067,8 @@ run_rx_frame(struct run_softc *sc, uint8
 		return;
 	}
 	if (len > MHLEN) {
-		MCLGET(m, M_DONTWAIT);
+		if (__predict_true(len <= MCLBYTES))
+			MCLGET(m, M_DONTWAIT);
 		if (__predict_false(!(m->m_flags & M_EXT))) {
 			ifp->if_ierrors++;
 			m_freem(m);



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

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:33:38 UTC 2020

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

Log Message:
Pull up following revision(s) (requested by martin in ticket #1734):
sys/dev/usb/if_otus.c: revision 1.45 via patch
Stricter bounds check for some packet length we get from the usb chip,
to make sure we do not corrupt kernel memory.
Pointed out by Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.25.4.3 -r1.25.4.4 src/sys/dev/usb/if_otus.c

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

Modified files:

Index: src/sys/dev/usb/if_otus.c
diff -u src/sys/dev/usb/if_otus.c:1.25.4.3 src/sys/dev/usb/if_otus.c:1.25.4.4
--- src/sys/dev/usb/if_otus.c:1.25.4.3	Wed Aug  8 10:17:11 2018
+++ src/sys/dev/usb/if_otus.c	Tue Jun 16 10:33:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_otus.c,v 1.25.4.3 2018/08/08 10:17:11 martin Exp $	*/
+/*	$NetBSD: if_otus.c,v 1.25.4.4 2020/06/16 10:33:38 bouyer Exp $	*/
 /*	$OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.25.4.3 2018/08/08 10:17:11 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.25.4.4 2020/06/16 10:33:38 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1750,6 +1750,10 @@ otus_sub_rxeof(struct otus_softc *sc, ui
 	}
 	/* Compute MPDU's length. */
 	mlen = len - AR_PLCP_HDR_LEN - sizeof(*tail);
+	if (__predict_false(mlen < IEEE80211_CRC_LEN)) {
+		ifp->if_ierrors++;
+		return;
+	}
 	mlen -= IEEE80211_CRC_LEN;	/* strip 802.11 FCS */
 	/* Make sure there's room for an 802.11 header. */
 	/*
@@ -1770,7 +1774,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui
 		return;
 	}
 	if (align + mlen > MHLEN) {
-		MCLGET(m, M_DONTWAIT);
+		if (__predict_true(align + mlen <= MCLBYTES))
+			MCLGET(m, M_DONTWAIT);
 		if (__predict_false(!(m->m_flags & M_EXT))) {
 			ifp->if_ierrors++;
 			m_freem(m);



CVS commit: [netbsd-8] src/doc

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:29:16 UTC 2020

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

Log Message:
tickets 1557-1559


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

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.13 src/doc/CHANGES-8.3:1.1.2.14
--- src/doc/CHANGES-8.3:1.1.2.13	Sun Jun  7 17:09:33 2020
+++ src/doc/CHANGES-8.3	Tue Jun 16 10:29:16 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.13 2020/06/07 17:09:33 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.14 2020/06/16 10:29:16 bouyer Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -184,3 +184,21 @@ sys/kern/subr_pcu.c1.22
 	gracefully exit when an error occurs in _lwp_create(2).
 	[thorpej, ticket #1556]
 
+sys/arch/mac68k/dev/ams.c			1.23
+
+	Fix inverted Y-axis value passed to wsmouse_input(9).
+	[tsutsui, ticket #1557]
+
+sys/dev/usb/if_otus.c1.45 via patch
+
+	Stricter bounds check for some packet length we get from the usb chip,
+	to make sure we do not corrupt kernel memory.
+	Pointed out by Ilja Van Sprundel.
+	[martin, ticket #1558]
+
+sys/dev/usb/if_run.c1.41
+
+	Better bounds checking for oversized packets, to avoid kernel memory
+	corruption. Pointed out by Ilja Van Sprundel.
+	[martin, ticket #1559]
+



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

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:28:29 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-8]: if_run.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1559):
sys/dev/usb/if_run.c: revision 1.41
Better bounds checking for oversized packets, to avoid kernel memory
corruption. Pointed out by Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.22.2.2 -r1.22.2.3 src/sys/dev/usb/if_run.c

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

Modified files:

Index: src/sys/dev/usb/if_run.c
diff -u src/sys/dev/usb/if_run.c:1.22.2.2 src/sys/dev/usb/if_run.c:1.22.2.3
--- src/sys/dev/usb/if_run.c:1.22.2.2	Wed Aug  8 10:28:35 2018
+++ src/sys/dev/usb/if_run.c	Tue Jun 16 10:28:29 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_run.c,v 1.22.2.2 2018/08/08 10:28:35 martin Exp $	*/
+/*	$NetBSD: if_run.c,v 1.22.2.3 2020/06/16 10:28:29 bouyer Exp $	*/
 /*	$OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.22.2.2 2018/08/08 10:28:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.22.2.3 2020/06/16 10:28:29 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -2255,7 +2255,8 @@ run_rx_frame(struct run_softc *sc, uint8
 		return;
 	}
 	if (len > MHLEN) {
-		MCLGET(m, M_DONTWAIT);
+		if (__predict_true(len <= MCLBYTES))
+			MCLGET(m, M_DONTWAIT);
 		if (__predict_false(!(m->m_flags & M_EXT))) {
 			ifp->if_ierrors++;
 			m_freem(m);



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

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:27:04 UTC 2020

Modified Files:
src/sys/dev/usb [netbsd-8]: if_otus.c

Log Message:
Pull up following revision(s) (requested by martin in ticket #1558):
sys/dev/usb/if_otus.c: revision 1.45 via patch
Stricter bounds check for some packet length we get from the usb chip,
to make sure we do not corrupt kernel memory.
Pointed out by Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.31.2.2 -r1.31.2.3 src/sys/dev/usb/if_otus.c

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

Modified files:

Index: src/sys/dev/usb/if_otus.c
diff -u src/sys/dev/usb/if_otus.c:1.31.2.2 src/sys/dev/usb/if_otus.c:1.31.2.3
--- src/sys/dev/usb/if_otus.c:1.31.2.2	Wed Aug  8 10:28:35 2018
+++ src/sys/dev/usb/if_otus.c	Tue Jun 16 10:27:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_otus.c,v 1.31.2.2 2018/08/08 10:28:35 martin Exp $	*/
+/*	$NetBSD: if_otus.c,v 1.31.2.3 2020/06/16 10:27:03 bouyer Exp $	*/
 /*	$OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $	*/
 
 /*-
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.31.2.2 2018/08/08 10:28:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.31.2.3 2020/06/16 10:27:03 bouyer Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -1745,6 +1745,10 @@ otus_sub_rxeof(struct otus_softc *sc, ui
 	}
 	/* Compute MPDU's length. */
 	mlen = len - AR_PLCP_HDR_LEN - sizeof(*tail);
+	if (__predict_false(mlen < IEEE80211_CRC_LEN)) {
+		ifp->if_ierrors++;
+		return;
+	}
 	mlen -= IEEE80211_CRC_LEN;	/* strip 802.11 FCS */
 	/* Make sure there's room for an 802.11 header. */
 	/*
@@ -1765,7 +1769,8 @@ otus_sub_rxeof(struct otus_softc *sc, ui
 		return;
 	}
 	if (align + mlen > MHLEN) {
-		MCLGET(m, M_DONTWAIT);
+		if (__predict_true(align + mlen <= MCLBYTES))
+			MCLGET(m, M_DONTWAIT);
 		if (__predict_false(!(m->m_flags & M_EXT))) {
 			ifp->if_ierrors++;
 			m_freem(m);



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

2020-06-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Jun 16 10:23:04 UTC 2020

Modified Files:
src/sys/arch/mac68k/dev [netbsd-8]: ams.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1557):
sys/arch/mac68k/dev/ams.c: revision 1.23
Fix inverted Y-axis value passed to wsmouse_input(9).
Note this is what src/sys/arch/macppc/dev/ams.c does as
"upward (moving the mouse forward) is positive" as noted in wsmouse(9):
 http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/macppc/dev/ams.c#rev1.4
Reported and tested by @NonameInsect on his SE/30 and Xorg server.
Should be pulled up to netbsd-8 and netbsd-9.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.22.1 src/sys/arch/mac68k/dev/ams.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/mac68k/dev/ams.c
diff -u src/sys/arch/mac68k/dev/ams.c:1.22 src/sys/arch/mac68k/dev/ams.c:1.22.22.1
--- src/sys/arch/mac68k/dev/ams.c:1.22	Sat Oct 19 16:23:17 2013
+++ src/sys/arch/mac68k/dev/ams.c	Tue Jun 16 10:23:04 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $	*/
+/*	$NetBSD: ams.c,v 1.22.22.1 2020/06/16 10:23:04 bouyer Exp $	*/
 
 /*
  * Copyright (C) 1998	Colin Wood
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.22 2013/10/19 16:23:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ams.c,v 1.22.22.1 2020/06/16 10:23:04 bouyer Exp $");
 
 #include 
 #include 
@@ -506,7 +506,7 @@ ms_processevent(adb_event_t *event, stru
 		if (amsc->sc_wsmousedev != NULL) /* wsmouse is attached? */
 			wsmouse_input(amsc->sc_wsmousedev,
 			new_event.u.m.buttons,
-			new_event.u.m.dx, new_event.u.m.dy, 0, 0,
+			new_event.u.m.dx, -new_event.u.m.dy, 0, 0,
 			WSMOUSE_INPUT_DELTA);
 #else
 		/* do nothing */ ;



CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Tue Jun 16 09:47:11 UTC 2020

Modified Files:
src/tests/lib/libarchive: t_libarchive.sh

Log Message:
Improve sentence


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libarchive/t_libarchive.sh

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

Modified files:

Index: src/tests/lib/libarchive/t_libarchive.sh
diff -u src/tests/lib/libarchive/t_libarchive.sh:1.5 src/tests/lib/libarchive/t_libarchive.sh:1.6
--- src/tests/lib/libarchive/t_libarchive.sh:1.5	Tue Jun 16 07:59:07 2020
+++ src/tests/lib/libarchive/t_libarchive.sh	Tue Jun 16 09:47:11 2020
@@ -1,4 +1,4 @@
-#   $NetBSD: t_libarchive.sh,v 1.5 2020/06/16 07:59:07 martin Exp $
+#   $NetBSD: t_libarchive.sh,v 1.6 2020/06/16 09:47:11 sevan Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -37,7 +37,7 @@ libarchive_body()
 {
 	local m=$(( $( sysctl -n hw.usermem64 ) / 1024 / 1024 ))
 	if [ $m -lt 400 ]; then
-		atf_skip "too few RAM"
+		atf_skip "Not enough RAM"
 	fi
 	local ncpu=$( sysctl -n hw.ncpuonline )
 	if [ $ncpu -lt 2 ]; then



CVS commit: src/tests/lib/libarchive

2020-06-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Jun 16 07:59:07 UTC 2020

Modified Files:
src/tests/lib/libarchive: t_libarchive.sh

Log Message:
PR kern/55272: skip this test on uniprocessor machines, it is too dangerous
and can kill the host kernel if a userland watchdog is running


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libarchive/t_libarchive.sh

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

Modified files:

Index: src/tests/lib/libarchive/t_libarchive.sh
diff -u src/tests/lib/libarchive/t_libarchive.sh:1.4 src/tests/lib/libarchive/t_libarchive.sh:1.5
--- src/tests/lib/libarchive/t_libarchive.sh:1.4	Wed Jun  3 18:07:26 2020
+++ src/tests/lib/libarchive/t_libarchive.sh	Tue Jun 16 07:59:07 2020
@@ -1,4 +1,4 @@
-#   $NetBSD: t_libarchive.sh,v 1.4 2020/06/03 18:07:26 martin Exp $
+#   $NetBSD: t_libarchive.sh,v 1.5 2020/06/16 07:59:07 martin Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -39,6 +39,10 @@ libarchive_body()
 	if [ $m -lt 400 ]; then
 		atf_skip "too few RAM"
 	fi
+	local ncpu=$( sysctl -n hw.ncpuonline )
+	if [ $ncpu -lt 2 ]; then
+		atf_skip "PR kern/55272: too dangerous to run this test"
+	fi
 	local d=$(atf_get_srcdir)
 	atf_check -s exit:0 -o 'not-match:^Details for failing tests:.*' \
 	"$d/h_libarchive" -r "$d"



CVS commit: src/sys/sys

2020-06-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jun 16 06:42:36 UTC 2020

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

Log Message:
Tidy up the function prototypes.  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/sys/vmem.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/vmem.h
diff -u src/sys/sys/vmem.h:1.21 src/sys/sys/vmem.h:1.22
--- src/sys/sys/vmem.h:1.21	Tue Jun 16 01:29:00 2020
+++ src/sys/sys/vmem.h	Tue Jun 16 06:42:36 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmem.h,v 1.21 2020/06/16 01:29:00 thorpej Exp $	*/
+/*	$NetBSD: vmem.h,v 1.22 2020/06/16 06:42:36 thorpej Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -45,43 +45,46 @@ typedef size_t vmem_size_t;
 #define	VMEM_ADDR_MIN	0
 #define	VMEM_ADDR_MAX	(~(vmem_addr_t)0)
 
-typedef int (vmem_import_t)(vmem_t *, vmem_size_t, vm_flag_t, vmem_addr_t *);
-typedef void (vmem_release_t)(vmem_t *, vmem_addr_t, vmem_size_t);
+typedef int	(vmem_import_t)(vmem_t *, vmem_size_t, vm_flag_t,
+		vmem_addr_t *);
+typedef void	(vmem_release_t)(vmem_t *, vmem_addr_t, vmem_size_t);
 
-typedef int (vmem_ximport_t)(vmem_t *, vmem_size_t, vmem_size_t *,
-vm_flag_t, vmem_addr_t *);
+typedef int	(vmem_ximport_t)(vmem_t *, vmem_size_t, vmem_size_t *,
+		vm_flag_t, vmem_addr_t *);
 
 extern vmem_t *kmem_arena;
 extern vmem_t *kmem_meta_arena;
 extern vmem_t *kmem_va_arena;
 
-void vmem_subsystem_init(vmem_t *vm);
+void		vmem_subsystem_init(vmem_t *vm);
 
-vmem_t *vmem_create(const char *, vmem_addr_t, vmem_size_t, vmem_size_t,
-vmem_import_t *, vmem_release_t *, vmem_t *, vmem_size_t,
-vm_flag_t, int);
-vmem_t *vmem_xcreate(const char *, vmem_addr_t, vmem_size_t, vmem_size_t,
-vmem_ximport_t *, vmem_release_t *, vmem_t *, vmem_size_t,
-vm_flag_t, int);
-vmem_t *vmem_init(vmem_t *, const char *, vmem_addr_t, vmem_size_t, vmem_size_t,
-vmem_import_t *, vmem_release_t *, vmem_t *, vmem_size_t,
-vm_flag_t, int);
-void vmem_destroy(vmem_t *);
-int vmem_alloc(vmem_t *, vmem_size_t, vm_flag_t, vmem_addr_t *);
-void vmem_free(vmem_t *, vmem_addr_t, vmem_size_t);
-int vmem_xalloc(vmem_t *, vmem_size_t, vmem_size_t, vmem_size_t,
-vmem_size_t, vmem_addr_t, vmem_addr_t, vm_flag_t, vmem_addr_t *);
-void vmem_xfree(vmem_t *, vmem_addr_t, vmem_size_t);
-void vmem_xfreeall(vmem_t *);
-int vmem_add(vmem_t *, vmem_addr_t, vmem_size_t, vm_flag_t);
-vmem_size_t vmem_roundup_size(vmem_t *, vmem_size_t);
-vmem_size_t vmem_size(vmem_t *, int typemask);
-void vmem_rehash_start(void);
-void vmem_whatis(uintptr_t, void (*)(const char *, ...) __printflike(1, 2));
-void vmem_print(uintptr_t, const char *, void (*)(const char *, ...)
-__printflike(1, 2));
-void vmem_printall(const char *, void (*)(const char *, ...)
-__printflike(1, 2));
+vmem_t *	vmem_create(const char *, vmem_addr_t, vmem_size_t, vmem_size_t,
+		vmem_import_t *, vmem_release_t *, vmem_t *, vmem_size_t,
+		vm_flag_t, int);
+vmem_t *	vmem_xcreate(const char *, vmem_addr_t, vmem_size_t,
+		vmem_size_t, vmem_ximport_t *, vmem_release_t *, vmem_t *,
+		vmem_size_t, vm_flag_t, int);
+vmem_t *	vmem_init(vmem_t *, const char *, vmem_addr_t, vmem_size_t,
+		vmem_size_t, vmem_import_t *, vmem_release_t *, vmem_t *,
+		vmem_size_t, vm_flag_t, int);
+void		vmem_destroy(vmem_t *);
+int		vmem_alloc(vmem_t *, vmem_size_t, vm_flag_t, vmem_addr_t *);
+void		vmem_free(vmem_t *, vmem_addr_t, vmem_size_t);
+int		vmem_xalloc(vmem_t *, vmem_size_t, vmem_size_t, vmem_size_t,
+		vmem_size_t, vmem_addr_t, vmem_addr_t, vm_flag_t,
+		vmem_addr_t *);
+void		vmem_xfree(vmem_t *, vmem_addr_t, vmem_size_t);
+void		vmem_xfreeall(vmem_t *);
+int		vmem_add(vmem_t *, vmem_addr_t, vmem_size_t, vm_flag_t);
+vmem_size_t	vmem_roundup_size(vmem_t *, vmem_size_t);
+vmem_size_t	vmem_size(vmem_t *, int typemask);
+void		vmem_rehash_start(void);
+void		vmem_whatis(uintptr_t, void (*)(const char *, ...)
+		__printflike(1, 2));
+void		vmem_print(uintptr_t, const char *, void (*)(const char *, ...)
+		__printflike(1, 2));
+void		vmem_printall(const char *, void (*)(const char *, ...)
+		__printflike(1, 2));
 
 /* vm_flag_t */
 #define	VM_SLEEP	0x0001



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

2020-06-16 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jun 16 06:36:56 UTC 2020

Modified Files:
src/sys/arch/cobalt/conf: GENERIC

Log Message:
Disable DEBUG.


To generate a diff of this commit:
cvs rdiff -u -r1.167 -r1.168 src/sys/arch/cobalt/conf/GENERIC

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

Modified files:

Index: src/sys/arch/cobalt/conf/GENERIC
diff -u src/sys/arch/cobalt/conf/GENERIC:1.167 src/sys/arch/cobalt/conf/GENERIC:1.168
--- src/sys/arch/cobalt/conf/GENERIC:1.167	Wed Mar 25 17:06:18 2020
+++ src/sys/arch/cobalt/conf/GENERIC	Tue Jun 16 06:36:56 2020
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.167 2020/03/25 17:06:18 jdolecek Exp $
+# $NetBSD: GENERIC,v 1.168 2020/06/16 06:36:56 thorpej Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/cobalt/conf/std.cobalt"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.167 $"
+#ident 		"GENERIC-$Revision: 1.168 $"
 
 maxusers	32
 
@@ -43,7 +43,7 @@ options 	BUFQ_PRIOCSCAN
 
 # Debugging options
 options 	DIAGNOSTIC	# extra kernel sanity checking
-options 	DEBUG		# extra kernel debugging support
+#options 	DEBUG		# extra kernel debugging support
 options 	DDB		# kernel dynamic debugger
 #options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions	DEBUG="-g"	# compile full symbol table