CVS commit: src/sys/arch/i386/stand/lib

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Dec 28 00:37:16 UTC 2021

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
In biosdisk_findpartition() check if part_name isn't NULL before
assigning *part_name.

Thanks to manu@ for the pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/stand/lib/biosdisk.c

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



CVS commit: src/sys/arch/i386/stand/lib

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Dec 28 00:37:16 UTC 2021

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
In biosdisk_findpartition() check if part_name isn't NULL before
assigning *part_name.

Thanks to manu@ for the pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/i386/stand/lib/biosdisk.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/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.56 src/sys/arch/i386/stand/lib/biosdisk.c:1.57
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.56	Tue Dec 28 00:34:30 2021
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Tue Dec 28 00:37:16 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.56 2021/12/28 00:34:30 simonb Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.57 2021/12/28 00:37:16 simonb Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -1028,7 +1028,8 @@ biosdisk_findpartition(int biosdev, dadd
 {
 #if defined(NO_DISKLABEL) && defined(NO_GPT)
 	*partition = 0;
-	*part_name = NULL;
+	if (part_name)
+		*part_name = NULL;
 	return 0;
 #else
 	int i;
@@ -1047,7 +1048,8 @@ biosdisk_findpartition(int biosdev, dadd
 
 	/* default to first partition */
 	*partition = 0;
-	*part_name = NULL;
+	if (part_name)
+		*part_name = NULL;
 
 	/* Look for netbsd partition that is the dos boot one */
 	d = alloc_biosdisk(biosdev);



Re: CVS commit: src/sys/arch/i386/stand/efiboot

2021-12-27 Thread Simon Burge
Emmanuel Dreyfus wrote:

> In src/sys/arch/i386/stand/lib/biosdisk.c
> int
> biosdisk_findpartition(int biosdev, daddr_t sector,
>int *partition, const char **part_name)
> {
> (...)
> /* default ot first partition */
> *partition = 0;
> *part_name = NULL;
>
> part_name is NULL, *part_name crashes. How do you avoid that?

Aha, I have this elsewhere in my zfs tree:

*partition = 0;
-   *part_name = NULL;
+   if (part_name)
+   *part_name = NULL;

I'll commit that now (as well as the same check for the
NO_DISKLABEL && NO_GPT case.  Thanks for the digging!

Cheers,
Simon.


CVS commit: src/sys/arch/i386/stand/lib

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Dec 28 00:34:30 UTC 2021

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Fix a tyop.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/i386/stand/lib/biosdisk.c

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



CVS commit: src/sys/arch/i386/stand/lib

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Dec 28 00:34:30 UTC 2021

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Fix a tyop.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/i386/stand/lib/biosdisk.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/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.55 src/sys/arch/i386/stand/lib/biosdisk.c:1.56
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.55	Sun May 30 05:59:23 2021
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Tue Dec 28 00:34:30 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.55 2021/05/30 05:59:23 mlelstv Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.56 2021/12/28 00:34:30 simonb Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -1045,7 +1045,7 @@ biosdisk_findpartition(int biosdev, dadd
 	printf("looking for partition device %x, sector %"PRId64"\n", biosdev, sector);
 #endif
 
-	/* default ot first partition */
+	/* default to first partition */
 	*partition = 0;
 	*part_name = NULL;
 



CVS commit: src/sys/arch/i386/stand/efiboot

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 27 12:19:27 UTC 2021

Modified Files:
src/sys/arch/i386/stand/efiboot: devopen.c

Log Message:
Revert rev 1.12 of devopen.c.  This had the unintented side effect
of breaking opens on non-root filesystems (eg trying to open/read
"esp:/EFI/NetBSD/boot.cfg" on the EFI system partition).

Ok manu@.  Original problem to be re-addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/efiboot/devopen.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/i386/stand/efiboot/devopen.c
diff -u src/sys/arch/i386/stand/efiboot/devopen.c:1.12 src/sys/arch/i386/stand/efiboot/devopen.c:1.13
--- src/sys/arch/i386/stand/efiboot/devopen.c:1.12	Thu Nov 18 16:18:13 2021
+++ src/sys/arch/i386/stand/efiboot/devopen.c	Mon Dec 27 12:19:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: devopen.c,v 1.12 2021/11/18 16:18:13 manu Exp $	 */
+/*	$NetBSD: devopen.c,v 1.13 2021/12/27 12:19:27 simonb Exp $	 */
 
 /*-
  * Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -288,9 +288,8 @@ neterr:
 	 * biosdisk
 	 */
 	if (strcmp(devname, "esp") == 0) {
-		const char *part_name = NULL;
 		bios2dev(boot_biosdev, boot_biossector, , ,
-		, _name);
+		, NULL);
 		if (efidisk_get_efi_system_partition(boot_biosdev, ))
 			return ENXIO;
 	}



CVS commit: src/sys/arch/i386/stand/efiboot

2021-12-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 27 12:19:27 UTC 2021

Modified Files:
src/sys/arch/i386/stand/efiboot: devopen.c

Log Message:
Revert rev 1.12 of devopen.c.  This had the unintented side effect
of breaking opens on non-root filesystems (eg trying to open/read
"esp:/EFI/NetBSD/boot.cfg" on the EFI system partition).

Ok manu@.  Original problem to be re-addressed.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/i386/stand/efiboot/devopen.c

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



Re: CVS commit: src/sys/arch/i386/stand/efiboot

2021-12-27 Thread Simon Burge
Emmanuel Dreyfus wrote:

> On Mon, Dec 27, 2021 at 01:08:15PM +1100, Simon Burge wrote:
> > What crash did this fix?  All the use of part_name by the
> > called functions should check if it is NULL before trying
> > to assign anything to *part_name.
>
> I do not recall the details now, but I had a crash because
> of this. Please revert my change, I will get back to it when
> I find some time.

Thanks.  I'll revert that now.

If you have a way of preproducing this, I'm happy to have a look.

Cheers,
Simon.


Re: CVS commit: src/sys/arch/i386/stand/efiboot

2021-12-26 Thread Simon Burge
Hi Emmanuel,

"Emmanuel Dreyfus" wrote:

> Module Name:  src
> Committed By: manu
> Date: Thu Nov 18 16:18:13 UTC 2021
>
> Modified Files:
>
>   src/sys/arch/i386/stand/efiboot: devopen.c
>
> Log Message:
>
> Fix crash because of NULL pointer reference

What crash did this fix?  All the use of part_name by the
called functions should check if it is NULL before trying
to assign anything to *part_name.

This change has broken loading boot.cfg via the EFI path
"esp:/EFI/NetBSD/boot.cfg" since the call to bios_boot() at
https://nxr.netbsd.org/xref/src/sys/arch/i386/stand/efiboot/devopen.c#292
with a non-NULL last argument means devname gets updated and
now points to the partition with a root filesystem rather
than the EFI system partition.

Cheers,
Simon.


CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-12-22 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Dec 22 14:04:10 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
In zfs_setattr() don't recheck the auth policy for a "nodump" flags
change. zfs_netbsd_setattr() has already checked if this request is
authorised, and our secpolicy_xvattr() doesn't check kauth chflags.

XXX: Fix this propery when we migrate to openzfs.

riastradh@: Seems reasonable.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.76 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.77
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.76	Wed Oct 20 03:08:19 2021
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Wed Dec 22 14:04:10 2021
@@ -3503,7 +3503,17 @@ zfs_setattr(vnode_t *vp, vattr_t *vap, i
 		if (XVA_ISSET_REQ(xvap, XAT_NODUMP)) {
 			if (xoap->xoa_nodump !=
 			((zp->z_pflags & ZFS_NODUMP) != 0)) {
+#if 0
+/*
+ * XXXSB - zfs_netbsd_setattr()
+ * has already checked if this
+ * request is authorised, and our
+ * secpolicy_xvattr() doesn't check
+ * kauth chflags.  Fix this when we
+ * migrate to openzfs.
+ */
 need_policy = TRUE;
+#endif
 			} else {
 XVA_CLR_REQ(xvap, XAT_NODUMP);
 XVA_SET_REQ(, XAT_NODUMP);



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-12-22 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Dec 22 14:04:10 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
In zfs_setattr() don't recheck the auth policy for a "nodump" flags
change. zfs_netbsd_setattr() has already checked if this request is
authorised, and our secpolicy_xvattr() doesn't check kauth chflags.

XXX: Fix this propery when we migrate to openzfs.

riastradh@: Seems reasonable.


To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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



CVS commit: src/sys/external/bsd/dwc2/conf

2021-12-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 20 11:54:33 UTC 2021

Modified Files:
src/sys/external/bsd/dwc2/conf: files.dwc2

Log Message:
Explicitly use -I$S/external/bsd/dwc2/dist for dwc2 instead of possibly
getting that include path via DRM.  Fixes evbmips cavium kernel build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/dwc2/conf/files.dwc2

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

Modified files:

Index: src/sys/external/bsd/dwc2/conf/files.dwc2
diff -u src/sys/external/bsd/dwc2/conf/files.dwc2:1.3 src/sys/external/bsd/dwc2/conf/files.dwc2:1.4
--- src/sys/external/bsd/dwc2/conf/files.dwc2:1.3	Wed Feb 24 22:17:54 2016
+++ src/sys/external/bsd/dwc2/conf/files.dwc2	Mon Dec 20 11:54:32 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.dwc2,v 1.3 2016/02/24 22:17:54 skrll Exp $
+#	$NetBSD: files.dwc2,v 1.4 2021/12/20 11:54:32 simonb Exp $
 
 # DesignWare HS OTG Controller
 #
@@ -6,7 +6,9 @@
 device dwctwo: usbus, usbroothub, usb_dma, linux
 file	external/bsd/dwc2/dwc2.c			dwctwo	needs-flag
 
-makeoptions	dwctwo	CPPFLAGS+="-I$S/external/bsd -I$S/external/bsd/dwc2/dist"
+makeoptions	dwctwo	CPPFLAGS+="-I$S/external/bsd"
+makeoptions	dwctwo	CPPFLAGS+="-I$S/external/bsd/common/include"
+makeoptions	dwctwo	CPPFLAGS+="-I$S/external/bsd/dwc2/dist"
 
 file	external/bsd/dwc2/dist/dwc2_core.c		dwctwo
 file	external/bsd/dwc2/dist/dwc2_coreintr.c		dwctwo



CVS commit: src/sys/external/bsd/dwc2/conf

2021-12-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 20 11:54:33 UTC 2021

Modified Files:
src/sys/external/bsd/dwc2/conf: files.dwc2

Log Message:
Explicitly use -I$S/external/bsd/dwc2/dist for dwc2 instead of possibly
getting that include path via DRM.  Fixes evbmips cavium kernel build.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/dwc2/conf/files.dwc2

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



CVS commit: src/external/cddl/osnet/sys/sys

2021-12-17 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Dec 17 08:07:12 UTC 2021

Modified Files:
src/external/cddl/osnet/sys/sys: vnode.h

Log Message:
In vattr_init_mask() check for va_flags and if set add to the mask of
to the things that setattr is interested in.
Fixes chflags(2) on ZFS.

Thanks riastradh@ for fix.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/cddl/osnet/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/external/cddl/osnet/sys/sys/vnode.h
diff -u src/external/cddl/osnet/sys/sys/vnode.h:1.20 src/external/cddl/osnet/sys/sys/vnode.h:1.21
--- src/external/cddl/osnet/sys/sys/vnode.h:1.20	Sun Jul 18 07:22:22 2021
+++ src/external/cddl/osnet/sys/sys/vnode.h	Fri Dec 17 08:07:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode.h,v 1.20 2021/07/18 07:22:22 kardel Exp $	*/
+/*	$NetBSD: vnode.h,v 1.21 2021/12/17 08:07:12 simonb Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -227,6 +227,8 @@ vattr_init_mask(vattr_t *vap)
 		vap->va_mask |= AT_MTIME;
 	if (vap->va_mode != (mode_t)VNOVAL)
 		vap->va_mask |= AT_MODE;
+	if (vap->va_flags != VNOVAL)
+		vap->va_mask |= AT_XVATTR;
 }
 
 #define	FCREAT	O_CREAT



CVS commit: src/external/cddl/osnet/sys/sys

2021-12-17 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Fri Dec 17 08:07:12 UTC 2021

Modified Files:
src/external/cddl/osnet/sys/sys: vnode.h

Log Message:
In vattr_init_mask() check for va_flags and if set add to the mask of
to the things that setattr is interested in.
Fixes chflags(2) on ZFS.

Thanks riastradh@ for fix.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/cddl/osnet/sys/sys/vnode.h

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



CVS commit: src/usr.bin/vmstat

2021-12-13 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 13 08:19:12 UTC 2021

Modified Files:
src/usr.bin/vmstat: vmstat.1

Log Message:
Update -m description to reflect reality.  Kernel dynamic memory tracking
was removed long ago; only pool usage is reported.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/vmstat/vmstat.1

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/vmstat/vmstat.1
diff -u src/usr.bin/vmstat/vmstat.1:1.24 src/usr.bin/vmstat/vmstat.1:1.25
--- src/usr.bin/vmstat/vmstat.1:1.24	Tue Dec 25 03:38:59 2018
+++ src/usr.bin/vmstat/vmstat.1	Mon Dec 13 08:19:12 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: vmstat.1,v 1.24 2018/12/25 03:38:59 sevan Exp $
+.\"	$NetBSD: vmstat.1,v 1.25 2021/12/13 08:19:12 simonb Exp $
 .\"
 .\" Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -53,7 +53,7 @@
 .\"
 .\"	@(#)vmstat.8	8.1 (Berkeley) 6/6/93
 .\"
-.Dd December 25, 2018
+.Dd December 13, 2021
 .Dt VMSTAT 1
 .Os
 .Sh NAME
@@ -119,9 +119,7 @@ Extract values associated with the name 
 instead of the default
 .Pa /dev/mem .
 .It Fl m
-Report on the usage of kernel dynamic memory listed first by size of
-allocation and then by type of usage,
-followed by a list of the kernel memory pools and their usage.
+Report on the list of the kernel memory pools and their usage.
 .It Fl N Ar system
 Extract the name list from the specified system instead of the default
 .Pa /netbsd .



CVS commit: src/usr.bin/vmstat

2021-12-13 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Dec 13 08:19:12 UTC 2021

Modified Files:
src/usr.bin/vmstat: vmstat.1

Log Message:
Update -m description to reflect reality.  Kernel dynamic memory tracking
was removed long ago; only pool usage is reported.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/usr.bin/vmstat/vmstat.1

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-11-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 30 12:37:38 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c

Log Message:
In zfs_statvfs(), set f_bresvd and f_fresvd to 0.  Fixes random kernel
accounting suspend/resumes with erroneous values leaking out.

Note: no userland leakage as statvfs(2) handler memset 0's the buffer.

XXX: Should be fixed with a memset in VFS_STATVFS().


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_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/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.29 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.30
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c:1.29	Thu Aug 27 09:57:33 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c	Tue Nov 30 12:37:38 2021
@@ -2182,6 +2182,7 @@ zfs_statvfs(vfs_t *vfsp, struct statvfs 
 	statp->f_blocks = (refdbytes + availbytes) >> SPA_MINBLOCKSHIFT;
 	statp->f_bfree = availbytes / statp->f_bsize;
 	statp->f_bavail = statp->f_bfree; /* no root reservation */
+	statp->f_bresvd = 0;
 
 	/*
 	 * statvfs() should really be called statufs(), because it assumes
@@ -2196,6 +2197,7 @@ zfs_statvfs(vfs_t *vfsp, struct statvfs 
 	statp->f_favail = statp->f_ffree;	/* no "root reservation" */
 #endif
 	statp->f_files = statp->f_ffree + usedobjs;
+	statp->f_fresvd = 0;
 
 #ifdef __FreeBSD__
 	(void) cmpldev(, vfsp->vfs_dev);



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-11-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 30 12:37:38 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vfsops.c

Log Message:
In zfs_statvfs(), set f_bresvd and f_fresvd to 0.  Fixes random kernel
accounting suspend/resumes with erroneous values leaking out.

Note: no userland leakage as statvfs(2) handler memset 0's the buffer.

XXX: Should be fixed with a memset in VFS_STATVFS().


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vfsops.c

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



CVS commit: src/etc/mtree

2021-11-29 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 30 06:21:58 UTC 2021

Modified Files:
src/etc/mtree: special

Log Message:
Add /etc/sshd/ssh_host_ed25519_key* .


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/etc/mtree/special

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



CVS commit: src/etc/mtree

2021-11-29 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 30 06:21:58 UTC 2021

Modified Files:
src/etc/mtree: special

Log Message:
Add /etc/sshd/ssh_host_ed25519_key* .


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/etc/mtree/special

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

Modified files:

Index: src/etc/mtree/special
diff -u src/etc/mtree/special:1.171 src/etc/mtree/special:1.172
--- src/etc/mtree/special:1.171	Fri Feb 26 18:39:10 2021
+++ src/etc/mtree/special	Tue Nov 30 06:21:58 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.171 2021/02/26 18:39:10 jakllsch Exp $
+#	$NetBSD: special,v 1.172 2021/11/30 06:21:58 simonb Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -338,6 +338,8 @@
 ./etc/ssh/ssh_host_dsa_key.pub	type=file mode=0644 optional
 ./etc/ssh/ssh_host_ecdsa_key	type=file mode=0600 optional tags=nodiff
 ./etc/ssh/ssh_host_ecdsa_key.pub	type=file mode=0644 optional
+./etc/ssh/ssh_host_ed25519_key	type=file mode=0600 optional tags=nodiff
+./etc/ssh/ssh_host_ed25519_key.pub	type=file mode=0644 optional
 ./etc/ssh/ssh_host_key		type=file mode=0600 optional tags=nodiff tags=nodiff
 ./etc/ssh/ssh_host_key.pub	type=file mode=0644 optional
 ./etc/ssh/ssh_host_rsa_key	type=file mode=0600 optional tags=nodiff



CVS commit: src/bin/df

2021-11-28 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Nov 29 05:59:58 UTC 2021

Modified Files:
src/bin/df: df.c

Log Message:
Set totals.f_frsize to DEV_BSIZE instead of totals.f_bsize so that
addstat() uses an initialised value for total size calculations.
Fixes core dump for "df -c".


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/bin/df/df.c

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

Modified files:

Index: src/bin/df/df.c
diff -u src/bin/df/df.c:1.98 src/bin/df/df.c:1.99
--- src/bin/df/df.c:1.98	Sun Jan  3 01:43:12 2021
+++ src/bin/df/df.c	Mon Nov 29 05:59:58 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: df.c,v 1.98 2021/01/03 01:43:12 ginsbach Exp $ */
+/*	$NetBSD: df.c,v 1.99 2021/11/29 05:59:58 simonb Exp $ */
 
 /*
  * Copyright (c) 1980, 1990, 1993, 1994
@@ -45,7 +45,7 @@ __COPYRIGHT(
 #if 0
 static char sccsid[] = "@(#)df.c	8.7 (Berkeley) 4/2/94";
 #else
-__RCSID("$NetBSD: df.c,v 1.98 2021/01/03 01:43:12 ginsbach Exp $");
+__RCSID("$NetBSD: df.c,v 1.99 2021/11/29 05:59:58 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -213,7 +213,7 @@ main(int argc, char *argv[])
 
 	if (cflag) {
 		memset(, 0, sizeof(totals));
-		totals.f_bsize = DEV_BSIZE;
+		totals.f_frsize = DEV_BSIZE;
 		strlcpy(totals.f_mntfromname, "total",
 			sizeof(totals.f_mntfromname));
 	}



CVS commit: src/bin/df

2021-11-28 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Nov 29 05:59:58 UTC 2021

Modified Files:
src/bin/df: df.c

Log Message:
Set totals.f_frsize to DEV_BSIZE instead of totals.f_bsize so that
addstat() uses an initialised value for total size calculations.
Fixes core dump for "df -c".


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/bin/df/df.c

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



CVS commit: src/sbin/mount

2021-11-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Nov 21 05:09:15 UTC 2021

Modified Files:
src/sbin/mount: mount.c

Log Message:
Add some { } around an if body that is followed by an "else {".


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sbin/mount/mount.c

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



CVS commit: src/sbin/mount

2021-11-20 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Nov 21 05:09:15 UTC 2021

Modified Files:
src/sbin/mount: mount.c

Log Message:
Add some { } around an if body that is followed by an "else {".


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sbin/mount/mount.c

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

Modified files:

Index: src/sbin/mount/mount.c
diff -u src/sbin/mount/mount.c:1.104 src/sbin/mount/mount.c:1.105
--- src/sbin/mount/mount.c:1.104	Fri Jun  4 11:55:45 2021
+++ src/sbin/mount/mount.c	Sun Nov 21 05:09:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount.c,v 1.104 2021/06/04 11:55:45 simonb Exp $	*/
+/*	$NetBSD: mount.c,v 1.105 2021/11/21 05:09:15 simonb Exp $	*/
 
 /*
  * Copyright (c) 1980, 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 19
 #if 0
 static char sccsid[] = "@(#)mount.c	8.25 (Berkeley) 5/8/95";
 #else
-__RCSID("$NetBSD: mount.c,v 1.104 2021/06/04 11:55:45 simonb Exp $");
+__RCSID("$NetBSD: mount.c,v 1.105 2021/11/21 05:09:15 simonb Exp $");
 #endif
 #endif /* not lint */
 
@@ -173,7 +173,7 @@ main(int argc, char *argv[])
 	rval = 0;
 	switch (argc) {
 	case 0:
-		if (all)
+		if (all) {
 			while ((fs = getfsent()) != NULL) {
 if (BADTYPE(fs->fs_type))
 	continue;
@@ -199,7 +199,7 @@ main(int argc, char *argv[])
 fs->fs_mntops, !forceall, NULL, 0))
 	rval = 1;
 			}
-		else {
+		} else {
 			if ((mntsize = getmntinfo(, MNT_NOWAIT)) == 0)
 err(EXIT_FAILURE, "getmntinfo");
 			for (i = 0; i < mntsize; i++) {



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:46:41 UTC 2021

Modified Files:
src/sys/arch/evbmips/conf: MIPSSIM

Log Message:
Use 50Hz ticks so that time works accurately on hosts with 100Hz ticks.

Note: The 20Kc CPU isn't handled correctly by QEMU, use the 5Kc CPU for
a 64-bit guest for accurate time.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/conf/MIPSSIM

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/evbmips/conf/MIPSSIM
diff -u src/sys/arch/evbmips/conf/MIPSSIM:1.4 src/sys/arch/evbmips/conf/MIPSSIM:1.5
--- src/sys/arch/evbmips/conf/MIPSSIM:1.4	Tue Jun 15 16:43:48 2021
+++ src/sys/arch/evbmips/conf/MIPSSIM	Tue Nov 16 06:46:41 2021
@@ -1,4 +1,4 @@
-# $NetBSD: MIPSSIM,v 1.4 2021/06/15 16:43:48 nia Exp $
+# $NetBSD: MIPSSIM,v 1.5 2021/11/16 06:46:41 simonb Exp $
 #
 # Kernel config for the QEMU MIPS "mipssim" simulator
 #
@@ -8,7 +8,7 @@
 
 include 	"arch/evbmips/conf/std.mipssim"
 
-#ident 		"GENERIC-$Revision: 1.4 $"
+#ident 		"GENERIC-$Revision: 1.5 $"
 
 maxusers	32
 
@@ -16,7 +16,7 @@ options 	MIPS32
 options 	MIPS32R2
 options 	NOFPU		# No FPU
 options 	FPEMUL		# emulate FPU insn
-#options 	HZ=512		# for profiling
+options 	HZ=50		# half usual host speed
 
 #options 	LOCKDEBUG
 options 	SOSEND_COUNTERS



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:46:41 UTC 2021

Modified Files:
src/sys/arch/evbmips/conf: MIPSSIM

Log Message:
Use 50Hz ticks so that time works accurately on hosts with 100Hz ticks.

Note: The 20Kc CPU isn't handled correctly by QEMU, use the 5Kc CPU for
a 64-bit guest for accurate time.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/conf/MIPSSIM

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



CVS commit: src/sys/arch/evbmips/mipssim

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:44:40 UTC 2021

Modified Files:
src/sys/arch/evbmips/mipssim: machdep.c

Log Message:
Use CPU frequencies defined in QEMU for mipssim - 6 MHz for 64-bit
guests and 12 MHz for 32-bit guests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/mipssim/machdep.c

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

Modified files:

Index: src/sys/arch/evbmips/mipssim/machdep.c
diff -u src/sys/arch/evbmips/mipssim/machdep.c:1.2 src/sys/arch/evbmips/mipssim/machdep.c:1.3
--- src/sys/arch/evbmips/mipssim/machdep.c:1.2	Mon Feb 15 22:39:46 2021
+++ src/sys/arch/evbmips/mipssim/machdep.c	Tue Nov 16 06:44:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.2 2021/02/15 22:39:46 reinoud Exp $ */
+/* $NetBSD: machdep.c,v 1.3 2021/11/16 06:44:40 simonb Exp $ */
 
 /*-
  * Copyright (c) 2001,2021 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2021/02/15 22:39:46 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2021/11/16 06:44:40 simonb Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -73,6 +73,16 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #define	COMCNRATE	115200		/* not important, emulated device */
 #define	COM_FREQ	1843200		/* not important, emulated device */
 
+/*
+ * QEMU/mipssim sets the CPU frequency to 6 MHz for 64-bit guests and
+ * 12 MHz for 32-bit guests.
+ */
+#ifdef _LP64
+#define	CPU_FREQ	6	/* MHz */
+#else
+#define	CPU_FREQ	12	/* MHz */
+#endif
+
 /* XXX move phys map decl to a general mips location */
 /* Maps for VM objects. */
 struct vm_map *phys_map = NULL;
@@ -113,11 +123,7 @@ cal_timer(void)
 {
 	uint32_t cntfreq;
 
-	/*
-	 * Qemu seems to default to 200 MHz; wall clock looks the right speed
-	 * but we don't have an RTC to check.
-	 */
-	cntfreq = curcpu()->ci_cpu_freq = 200 * 1000 * 1000;
+	cntfreq = curcpu()->ci_cpu_freq = CPU_FREQ * 1000 * 1000;
 
 	if (mips_options.mips_cpu_flags & CPU_MIPS_DOUBLE_COUNT)
 		cntfreq /= 2;
@@ -147,13 +153,14 @@ mach_init(u_long arg0, u_long arg1, u_lo
 	/* enough of a console for printf() to work */
 	cn_tab = _console;
 
-	cal_timer();
-
 	/* set CPU model info for sysctl_hw */
 	cpu_setmodel("MIPSSIM");
 
 	mips_vector_init(NULL, false);
 
+	/* must be after CPU is identified in mips_vector_init() */
+	cal_timer();
+
 	uvm_md_init();
 
 	/*



CVS commit: src/sys/arch/evbmips/mipssim

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:44:40 UTC 2021

Modified Files:
src/sys/arch/evbmips/mipssim: machdep.c

Log Message:
Use CPU frequencies defined in QEMU for mipssim - 6 MHz for 64-bit
guests and 12 MHz for 32-bit guests.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/mipssim/machdep.c

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



CVS commit: src/sys/arch/mips/mips

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:15:48 UTC 2021

Modified Files:
src/sys/arch/mips/mips: mips_emul.c

Log Message:
Use the register define MIPS_HWR_ULR instead of a magic number.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/mips/mips_emul.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/mips/mips/mips_emul.c
diff -u src/sys/arch/mips/mips/mips_emul.c:1.30 src/sys/arch/mips/mips/mips_emul.c:1.31
--- src/sys/arch/mips/mips/mips_emul.c:1.30	Sat May 29 12:35:27 2021
+++ src/sys/arch/mips/mips/mips_emul.c	Tue Nov 16 06:15:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_emul.c,v 1.30 2021/05/29 12:35:27 simonb Exp $ */
+/*	$NetBSD: mips_emul.c,v 1.31 2021/11/16 06:15:48 simonb Exp $ */
 
 /*
  * Copyright (c) 1999 Shuichiro URATA.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.30 2021/05/29 12:35:27 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_emul.c,v 1.31 2021/11/16 06:15:48 simonb Exp $");
 
 #include 
 #include 
@@ -461,7 +461,7 @@ mips_emul_special3(uint32_t inst, struct
 	}
 	case OP_RDHWR:
 		switch (instfmt.RType.rd) {
-		case 29:
+		case MIPS_HWR_ULR:
 			tf->tf_regs[instfmt.RType.rt] =
 			(mips_reg_t)(intptr_t)curlwp->l_private;
 			goto done;



CVS commit: src/sys/arch/mips/mips

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:15:48 UTC 2021

Modified Files:
src/sys/arch/mips/mips: mips_emul.c

Log Message:
Use the register define MIPS_HWR_ULR instead of a magic number.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/mips/mips_emul.c

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



CVS commit: src/sys/arch/mips

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:11:52 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
Use the architecture documented name ULR for the RDHWR user local
register.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/mips/include/cpuregs.h
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/mips/cpu_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/arch/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.115 src/sys/arch/mips/include/cpuregs.h:1.116
--- src/sys/arch/mips/include/cpuregs.h:1.115	Tue Nov 16 06:04:52 2021
+++ src/sys/arch/mips/include/cpuregs.h	Tue Nov 16 06:11:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.115 2021/11/16 06:04:52 simonb Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.116 2021/11/16 06:11:52 simonb Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -880,7 +880,7 @@
 #define	MIPS_HWR_SYNCI_STEP		_(1)	/* Address step size for SYNCI */
 #define	MIPS_HWR_CC			_(2)	/* Hi-res cycle counter */
 #define	MIPS_HWR_CCRES			_(3)	/* Cycle counter resolution */
-#define	MIPS_HWR_UL			_(29)	/* Userlocal */
+#define	MIPS_HWR_ULR			_(29)	/* Userlocal */
 #define	MIPS_HWR_IMPL30			_(30)	/* Implementation dependent use */
 #define	MIPS_HWR_IMPL31			_(31)	/* Implementation dependent use */
 
@@ -889,7 +889,7 @@
  */
 #define	MIPS_HWRENA_IMPL31		__BIT(MIPS_HWR_IMPL31)
 #define	MIPS_HWRENA_IMPL30		__BIT(MIPS_HWR_IMPL30)
-#define	MIPS_HWRENA_UL			__BIT(MIPS_HWR_UL)
+#define	MIPS_HWRENA_ULR			__BIT(MIPS_HWR_ULR)
 #define	MIPS_HWRENA_CCRES		__BIT(MIPS_HWR_CCRES)
 #define	MIPS_HWRENA_CC			__BIT(MIPS_HWR_CC)
 #define	MIPS_HWRENA_SYNCI_STEP		__BIT(MIPS_HWR_SYNCI_STEP)

Index: src/sys/arch/mips/mips/cpu_subr.c
diff -u src/sys/arch/mips/mips/cpu_subr.c:1.58 src/sys/arch/mips/mips/cpu_subr.c:1.59
--- src/sys/arch/mips/mips/cpu_subr.c:1.58	Mon Aug 17 15:22:51 2020
+++ src/sys/arch/mips/mips/cpu_subr.c	Tue Nov 16 06:11:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.58 2020/08/17 15:22:51 skrll Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.59 2021/11/16 06:11:52 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2010, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.58 2020/08/17 15:22:51 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.59 2021/11/16 06:11:52 simonb Exp $");
 
 #include "opt_cputype.h"
 #include "opt_ddb.h"
@@ -217,7 +217,7 @@ cpu_hwrena_setup(void)
 
 	if (CPUISMIPSNNR2) {
 		mipsNN_cp0_hwrena_write(
-		(MIPS_HAS_USERLOCAL ? MIPS_HWRENA_UL : 0)
+		(MIPS_HAS_USERLOCAL ? MIPS_HWRENA_ULR : 0)
 		| MIPS_HWRENA_CCRES
 		| MIPS_HWRENA_CC
 		| MIPS_HWRENA_SYNCI_STEP



CVS commit: src/sys/arch/mips

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:11:52 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h
src/sys/arch/mips/mips: cpu_subr.c

Log Message:
Use the architecture documented name ULR for the RDHWR user local
register.


To generate a diff of this commit:
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/mips/include/cpuregs.h
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/mips/mips/cpu_subr.c

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



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:04:53 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Add some comments for the RDHWR register numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.114 src/sys/arch/mips/include/cpuregs.h:1.115
--- src/sys/arch/mips/include/cpuregs.h:1.114	Tue Nov 16 06:04:00 2021
+++ src/sys/arch/mips/include/cpuregs.h	Tue Nov 16 06:04:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.114 2021/11/16 06:04:00 simonb Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.115 2021/11/16 06:04:52 simonb Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -876,13 +876,13 @@
 /*
  * RDHWR register numbers
  */
-#define	MIPS_HWR_CPUNUM			_(0)
-#define	MIPS_HWR_SYNCI_STEP		_(1)
-#define	MIPS_HWR_CC			_(2)
-#define	MIPS_HWR_CCRES			_(3)
+#define	MIPS_HWR_CPUNUM			_(0)	/* Which CPU are we on? */
+#define	MIPS_HWR_SYNCI_STEP		_(1)	/* Address step size for SYNCI */
+#define	MIPS_HWR_CC			_(2)	/* Hi-res cycle counter */
+#define	MIPS_HWR_CCRES			_(3)	/* Cycle counter resolution */
 #define	MIPS_HWR_UL			_(29)	/* Userlocal */
-#define	MIPS_HWR_IMPL30			_(30)
-#define	MIPS_HWR_IMPL31			_(31)
+#define	MIPS_HWR_IMPL30			_(30)	/* Implementation dependent use */
+#define	MIPS_HWR_IMPL31			_(31)	/* Implementation dependent use */
 
 /*
  * Bits defined for HWREna (CP0 register 7, select 0).



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:04:53 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Add some comments for the RDHWR register numbers.


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/mips/include/cpuregs.h

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



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:04:00 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Only need one #define for MIPS_HWR_CPUNUM.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/mips/include/cpuregs.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/mips/include/cpuregs.h
diff -u src/sys/arch/mips/include/cpuregs.h:1.113 src/sys/arch/mips/include/cpuregs.h:1.114
--- src/sys/arch/mips/include/cpuregs.h:1.113	Mon Nov  1 21:28:02 2021
+++ src/sys/arch/mips/include/cpuregs.h	Tue Nov 16 06:04:00 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuregs.h,v 1.113 2021/11/01 21:28:02 andvar Exp $	*/
+/*	$NetBSD: cpuregs.h,v 1.114 2021/11/16 06:04:00 simonb Exp $	*/
 
 /*
  * Copyright (c) 2009 Miodrag Vallat.
@@ -883,7 +883,6 @@
 #define	MIPS_HWR_UL			_(29)	/* Userlocal */
 #define	MIPS_HWR_IMPL30			_(30)
 #define	MIPS_HWR_IMPL31			_(31)
-#define	MIPS_HWR_CPUNUM			_(0)
 
 /*
  * Bits defined for HWREna (CP0 register 7, select 0).



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

2021-11-15 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Tue Nov 16 06:04:00 UTC 2021

Modified Files:
src/sys/arch/mips/include: cpuregs.h

Log Message:
Only need one #define for MIPS_HWR_CPUNUM.


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/mips/include/cpuregs.h

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



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

2021-11-12 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Nov 13 01:09:51 UTC 2021

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

Log Message:
Fix tyop in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/cputypes.h

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

Modified files:

Index: src/sys/arch/arm/include/cputypes.h
diff -u src/sys/arch/arm/include/cputypes.h:1.15 src/sys/arch/arm/include/cputypes.h:1.16
--- src/sys/arch/arm/include/cputypes.h:1.15	Fri Nov 12 06:44:46 2021
+++ src/sys/arch/arm/include/cputypes.h	Sat Nov 13 01:09:51 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cputypes.h,v 1.15 2021/11/12 06:44:46 skrll Exp $	*/
+/*	$NetBSD: cputypes.h,v 1.16 2021/11/13 01:09:51 simonb Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -209,7 +209,7 @@
 #define CPU_ID_THUNDERX2RX	0x43000af0
 
 /*
- * Chip-specific errata. This defines are intended to be
+ * Chip-specific errata. These defines are intended to be
  * booleans used within if statements. When an appropriate
  * kernel option is disabled, these defines must be defined
  * as 0 to allow the compiler to remove a dead code thus



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

2021-11-12 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Nov 13 01:09:51 UTC 2021

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

Log Message:
Fix tyop in a comment.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/arm/include/cputypes.h

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



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

2021-10-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Oct 31 00:31:48 UTC 2021

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

Log Message:
options


To generate a diff of this commit:
cvs rdiff -u -r1.592 -r1.593 src/sys/arch/amd64/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/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.592 src/sys/arch/amd64/conf/GENERIC:1.593
--- src/sys/arch/amd64/conf/GENERIC:1.592	Sat Oct 16 13:09:40 2021
+++ src/sys/arch/amd64/conf/GENERIC	Sun Oct 31 00:31:48 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.592 2021/10/16 13:09:40 jmcneill Exp $
+# $NetBSD: GENERIC,v 1.593 2021/10/31 00:31:48 simonb Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.592 $"
+#ident		"GENERIC-$Revision: 1.593 $"
 
 maxusers	64		# estimated number of users
 
@@ -138,7 +138,7 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 # Use KASAN_PANIC if you want panics instead of warnings.
 #makeoptions 	KASAN=1		# mandatory
 #options 	KASAN		# mandatory
-#no options	SVS		# mandatory
+#no options 	SVS		# mandatory
 #options 	POOL_QUARANTINE	# optional
 #options 	KASAN_PANIC	# optional
 
@@ -152,7 +152,7 @@ options 	KDTRACE_HOOKS	# kernel DTrace h
 # memory in pool caches. Note that KMSAN requires at least 4GB of RAM.
 #makeoptions 	KMSAN=1		# mandatory
 #options 	KMSAN		# mandatory
-#no options	SVS		# mandatory
+#no options 	SVS		# mandatory
 #no options 	MODULAR		# mandatory
 #no options 	MODULAR_DEFAULT_AUTOLOAD	# mandatory
 #options 	POOL_NOCACHE	# optional
@@ -201,7 +201,7 @@ options 	WAPBL		# File system journaling
 # Note that UFS_DIRHASH is suspected of causing kernel memory corruption.
 # It is not recommended for general use.
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
-options		UFS_ACL		# UFS Access Control Lists
+options 	UFS_ACL		# UFS Access Control Lists
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1
 # ext2fs
@@ -1153,7 +1153,7 @@ options 	RAID_AUTOCONFIG		# auto-configu
 pseudo-device	fss			# file system snapshot device
 
 pseudo-device	md			# memory disk device (ramdisk)
-options		MEMORY_DISK_HOOKS	# enable md specific hooks
+options 	MEMORY_DISK_HOOKS	# enable md specific hooks
 options 	MEMORY_DISK_DYNAMIC	# enable dynamic resizing
 
 pseudo-device	vnd			# disk-like interface to files



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

2021-10-30 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Oct 31 00:31:48 UTC 2021

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

Log Message:
options


To generate a diff of this commit:
cvs rdiff -u -r1.592 -r1.593 src/sys/arch/amd64/conf/GENERIC

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



CVS commit: src/external/cddl/osnet/dist/lib/libzpool/common

2021-10-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 11:35:23 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/lib/libzpool/common: kernel.c

Log Message:
Hacks to get zdb working on NetBSD:
 - Force accessing raw device but we're passed the block device.
 - Deal with wedges not returning their size on a stat(2) and use
   the DIOCGMEDIASIZE ioctl instead.

Ok chs@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c

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

Modified files:

Index: src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c
diff -u src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c:1.2 src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c:1.3
--- src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c:1.2	Mon May 28 21:05:06 2018
+++ src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c	Wed Oct 27 11:35:23 2021
@@ -41,6 +41,11 @@
 #include 
 #include 
 
+#ifdef __NetBSD__
+#include 
+#include 
+#endif
+
 /*
  * Emulation of kernel services in userland.
  */
@@ -447,6 +452,17 @@ vn_open(char *path, int x1, int flags, i
 	 */
 	if (strncmp(path, "/dev/", 5) == 0) {
 		char *dsk;
+#ifdef __NetBSD__
+		/*
+		 * For NetBSD, we've been passed in a block device name
+		 * but need to convert to the character device name.
+		 * XXX a bit ugly...
+		 */
+		char rawpath[MAXPATHLEN];
+
+		snprintf(rawpath, sizeof(rawpath), "/dev/r%s", path + 5);
+		path = rawpath;	/* gets strdup()'d below */
+#endif	/* __NetBSD__ */
 		fd = open64(path, O_RDONLY);
 		if (fd == -1)
 			return (errno);
@@ -454,6 +470,14 @@ vn_open(char *path, int x1, int flags, i
 			close(fd);
 			return (errno);
 		}
+#ifdef __NetBSD__
+		if (st.st_size == 0) {
+			off_t dsize;
+
+			if (ioctl(fd, DIOCGMEDIASIZE, ) == 0)
+st.st_size = dsize;
+		}
+#endif	/* __NetBSD__ */
 		close(fd);
 		(void) sprintf(realpath, "%s", path);
 		dsk = strstr(path, "/dsk/");
@@ -587,6 +611,14 @@ fop_getattr(vnode_t *vp, vattr_t *vap)
 		close(vp->v_fd);
 		return (errno);
 	}
+#ifdef __NetBSD__
+	if (st.st_size == 0) {
+		off_t dsize;
+
+		if (ioctl(vp->v_fd, DIOCGMEDIASIZE, ) == 0)
+			st.st_size = dsize;
+	}
+#endif	/* __NetBSD__ */
 
 	vap->va_size = st.st_size;
 	return (0);



CVS commit: src/external/cddl/osnet/dist/lib/libzpool/common

2021-10-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 11:35:23 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/lib/libzpool/common: kernel.c

Log Message:
Hacks to get zdb working on NetBSD:
 - Force accessing raw device but we're passed the block device.
 - Deal with wedges not returning their size on a stat(2) and use
   the DIOCGMEDIASIZE ioctl instead.

Ok chs@.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/external/cddl/osnet/dist/lib/libzpool/common/kernel.c

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



CVS commit: src/sys/uvm/pmap

2021-10-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 06:54:15 UTC 2021

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
TAB police.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.48 src/sys/uvm/pmap/pmap_tlb.c:1.49
--- src/sys/uvm/pmap/pmap_tlb.c:1.48	Wed Oct 27 05:33:59 2021
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Oct 27 06:54:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.48 2021/10/27 05:33:59 simonb Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.49 2021/10/27 06:54:15 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.48 2021/10/27 05:33:59 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.49 2021/10/27 06:54:15 simonb Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -1084,11 +1084,11 @@ pmap_tlb_asid_check(void)
 void
 pmap_tlb_check(pmap_t pm, bool (*func)(void *, vaddr_t, tlb_asid_t, pt_entry_t))
 {
-struct pmap_tlb_info * const ti = cpu_tlb_info(curcpu());
-struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
-TLBINFO_LOCK(ti);
-if (pm == pmap_kernel() || pai->pai_asid > KERNEL_PID)
+	struct pmap_tlb_info * const ti = cpu_tlb_info(curcpu());
+	struct pmap_asid_info * const pai = PMAP_PAI(pm, ti);
+	TLBINFO_LOCK(ti);
+	if (pm == pmap_kernel() || pai->pai_asid > KERNEL_PID)
 		tlb_walk(pm, func);
-TLBINFO_UNLOCK(ti);
+	TLBINFO_UNLOCK(ti);
 }
 #endif /* DEBUG */



CVS commit: src/sys/uvm/pmap

2021-10-27 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 06:54:15 UTC 2021

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
TAB police.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/uvm/pmap/pmap_tlb.c

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



CVS commit: src/sys/uvm/pmap

2021-10-26 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 05:33:59 UTC 2021

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
When adjusting the max ASID count, check if ti->ti_asid_max == 0 as
well.  This defaults to 0 for the non-PMAP_TLB_NUM_PIDS case, so would
skip the updated test.

Fix for port-pmax/56466 (which affects all MIPS).

ok srkll@


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/uvm/pmap/pmap_tlb.c

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



CVS commit: src/sys/uvm/pmap

2021-10-26 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Oct 27 05:33:59 UTC 2021

Modified Files:
src/sys/uvm/pmap: pmap_tlb.c

Log Message:
When adjusting the max ASID count, check if ti->ti_asid_max == 0 as
well.  This defaults to 0 for the non-PMAP_TLB_NUM_PIDS case, so would
skip the updated test.

Fix for port-pmax/56466 (which affects all MIPS).

ok srkll@


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/uvm/pmap/pmap_tlb.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/uvm/pmap/pmap_tlb.c
diff -u src/sys/uvm/pmap/pmap_tlb.c:1.47 src/sys/uvm/pmap/pmap_tlb.c:1.48
--- src/sys/uvm/pmap/pmap_tlb.c:1.47	Fri Oct  8 07:17:32 2021
+++ src/sys/uvm/pmap/pmap_tlb.c	Wed Oct 27 05:33:59 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_tlb.c,v 1.47 2021/10/08 07:17:32 skrll Exp $	*/
+/*	$NetBSD: pmap_tlb.c,v 1.48 2021/10/27 05:33:59 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.47 2021/10/08 07:17:32 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.48 2021/10/27 05:33:59 simonb Exp $");
 
 /*
  * Manages address spaces in a TLB.
@@ -379,7 +379,7 @@ pmap_tlb_info_init(struct pmap_tlb_info 
 #endif
 
 	const tlb_asid_t asid_max = pmap_md_tlb_asid_max();
-	if (asid_max < ti->ti_asid_max) {
+	if (ti->ti_asid_max == 0 || asid_max < ti->ti_asid_max) {
 		ti->ti_asid_max = asid_max;
 		ti->ti_asids_free = TLBINFO_ASID_INITIAL_FREE(ti->ti_asid_max);
 	}



CVS commit: src/sys/dev/dkwedge

2021-10-18 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Oct 18 11:40:57 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Whitespace nits.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.108 src/sys/dev/dkwedge/dk.c:1.109
--- src/sys/dev/dkwedge/dk.c:1.108	Sat Oct 16 07:05:45 2021
+++ src/sys/dev/dkwedge/dk.c	Mon Oct 18 11:40:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $	*/
+/*	$NetBSD: dk.c,v 1.109 2021/10/18 11:40:56 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.109 2021/10/18 11:40:56 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -1542,7 +1542,7 @@ dkioctl(dev_t dev, u_long cmd, void *dat
 		return (error);
 
 	error = 0;
-	
+
 	switch (cmd) {
 	case DIOCGSTRATEGY:
 	case DIOCGCACHE:
@@ -1773,4 +1773,3 @@ dkwedge_get_parent_name(dev_t dev)
 		return NULL;
 	return sc->sc_parent->dk_name;
 }
-



CVS commit: src/sys/dev/dkwedge

2021-10-18 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Oct 18 11:40:57 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Whitespace nits.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/sys/kern

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:12:01 UTC 2021

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

Log Message:
Spinkle some KNF spaces after commas.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 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.490 src/sys/kern/vfs_subr.c:1.491
--- src/sys/kern/vfs_subr.c:1.490	Thu Feb  4 21:07:06 2021
+++ src/sys/kern/vfs_subr.c	Sat Oct 16 07:12:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_subr.c,v 1.490 2021/02/04 21:07:06 jdolecek Exp $	*/
+/*	$NetBSD: vfs_subr.c,v 1.491 2021/10/16 07:12:01 simonb Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008, 2019, 2020
@@ -69,7 +69,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.490 2021/02/04 21:07:06 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.491 2021/10/16 07:12:01 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1619,10 +1619,10 @@ vfs_mount_print(struct mount *mp, int fu
 	char sbuf[256];
 
 	(*pr)("vnodecovered = %p data = %p\n",
-			mp->mnt_vnodecovered,mp->mnt_data);
+			mp->mnt_vnodecovered, mp->mnt_data);
 
 	(*pr)("fs_bshift %d dev_bshift = %d\n",
-			mp->mnt_fs_bshift,mp->mnt_dev_bshift);
+			mp->mnt_fs_bshift, mp->mnt_dev_bshift);
 
 	snprintb(sbuf, sizeof(sbuf), __MNT_FLAG_BITS, mp->mnt_flag);
 	(*pr)("flag = %s\n", sbuf);
@@ -1633,37 +1633,37 @@ vfs_mount_print(struct mount *mp, int fu
 	(*pr)("refcnt = %d updating @ %p\n", mp->mnt_refcnt, mp->mnt_updating);
 
 	(*pr)("statvfs cache:\n");
-	(*pr)("\tbsize = %lu\n",mp->mnt_stat.f_bsize);
-	(*pr)("\tfrsize = %lu\n",mp->mnt_stat.f_frsize);
-	(*pr)("\tiosize = %lu\n",mp->mnt_stat.f_iosize);
-
-	(*pr)("\tblocks = %"PRIu64"\n",mp->mnt_stat.f_blocks);
-	(*pr)("\tbfree = %"PRIu64"\n",mp->mnt_stat.f_bfree);
-	(*pr)("\tbavail = %"PRIu64"\n",mp->mnt_stat.f_bavail);
-	(*pr)("\tbresvd = %"PRIu64"\n",mp->mnt_stat.f_bresvd);
-
-	(*pr)("\tfiles = %"PRIu64"\n",mp->mnt_stat.f_files);
-	(*pr)("\tffree = %"PRIu64"\n",mp->mnt_stat.f_ffree);
-	(*pr)("\tfavail = %"PRIu64"\n",mp->mnt_stat.f_favail);
-	(*pr)("\tfresvd = %"PRIu64"\n",mp->mnt_stat.f_fresvd);
+	(*pr)("\tbsize = %lu\n", mp->mnt_stat.f_bsize);
+	(*pr)("\tfrsize = %lu\n", mp->mnt_stat.f_frsize);
+	(*pr)("\tiosize = %lu\n", mp->mnt_stat.f_iosize);
+
+	(*pr)("\tblocks = %"PRIu64"\n", mp->mnt_stat.f_blocks);
+	(*pr)("\tbfree = %"PRIu64"\n", mp->mnt_stat.f_bfree);
+	(*pr)("\tbavail = %"PRIu64"\n", mp->mnt_stat.f_bavail);
+	(*pr)("\tbresvd = %"PRIu64"\n", mp->mnt_stat.f_bresvd);
+
+	(*pr)("\tfiles = %"PRIu64"\n", mp->mnt_stat.f_files);
+	(*pr)("\tffree = %"PRIu64"\n", mp->mnt_stat.f_ffree);
+	(*pr)("\tfavail = %"PRIu64"\n", mp->mnt_stat.f_favail);
+	(*pr)("\tfresvd = %"PRIu64"\n", mp->mnt_stat.f_fresvd);
 
 	(*pr)("\tf_fsidx = { 0x%"PRIx32", 0x%"PRIx32" }\n",
 			mp->mnt_stat.f_fsidx.__fsid_val[0],
 			mp->mnt_stat.f_fsidx.__fsid_val[1]);
 
-	(*pr)("\towner = %"PRIu32"\n",mp->mnt_stat.f_owner);
-	(*pr)("\tnamemax = %lu\n",mp->mnt_stat.f_namemax);
+	(*pr)("\towner = %"PRIu32"\n", mp->mnt_stat.f_owner);
+	(*pr)("\tnamemax = %lu\n", mp->mnt_stat.f_namemax);
 
 	snprintb(sbuf, sizeof(sbuf), __MNT_FLAG_BITS, mp->mnt_stat.f_flag);
 
-	(*pr)("\tflag = %s\n",sbuf);
-	(*pr)("\tsyncwrites = %" PRIu64 "\n",mp->mnt_stat.f_syncwrites);
-	(*pr)("\tasyncwrites = %" PRIu64 "\n",mp->mnt_stat.f_asyncwrites);
-	(*pr)("\tsyncreads = %" PRIu64 "\n",mp->mnt_stat.f_syncreads);
-	(*pr)("\tasyncreads = %" PRIu64 "\n",mp->mnt_stat.f_asyncreads);
-	(*pr)("\tfstypename = %s\n",mp->mnt_stat.f_fstypename);
-	(*pr)("\tmntonname = %s\n",mp->mnt_stat.f_mntonname);
-	(*pr)("\tmntfromname = %s\n",mp->mnt_stat.f_mntfromname);
+	(*pr)("\tflag = %s\n", sbuf);
+	(*pr)("\tsyncwrites = %" PRIu64 "\n", mp->mnt_stat.f_syncwrites);
+	(*pr)("\tasyncwrites = %" PRIu64 "\n", mp->mnt_stat.f_asyncwrites);
+	(*pr)("\tsyncreads = %" PRIu64 "\n", mp->mnt_stat.f_syncreads);
+	(*pr)("\tasyncreads = %" PRIu64 "\n", mp->mnt_stat.f_asyncreads);
+	(*pr)("\tfstypename = %s\n", mp->mnt_stat.f_fstypename);
+	(*pr)("\tmntonname = %s\n", mp->mnt_stat.f_mntonname);
+	(*pr)("\tmntfromname = %s\n", mp->mnt_stat.f_mntfromname);
 
 	{
 		int cnt = 0;



CVS commit: src/sys/kern

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:12:01 UTC 2021

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

Log Message:
Spinkle some KNF spaces after commas.


To generate a diff of this commit:
cvs rdiff -u -r1.490 -r1.491 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.



CVS commit: src/sys/dev/dkwedge

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:05:45 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Remove funny straggling blank line.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c
diff -u src/sys/dev/dkwedge/dk.c:1.107 src/sys/dev/dkwedge/dk.c:1.108
--- src/sys/dev/dkwedge/dk.c:1.107	Sat Aug 21 11:55:25 2021
+++ src/sys/dev/dkwedge/dk.c	Sat Oct 16 07:05:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: dk.c,v 1.107 2021/08/21 11:55:25 andvar Exp $	*/
+/*	$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.107 2021/08/21 11:55:25 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.108 2021/10/16 07:05:45 simonb Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_dkwedge.h"
@@ -1339,7 +1339,6 @@ dkstart(struct dkwedge_softc *sc)
 
 	/* Do as much work as has been enqueued. */
 	while ((bp = bufq_peek(sc->sc_bufq)) != NULL) {
-
 		if (sc->sc_state != DKW_STATE_RUNNING) {
 			(void) bufq_get(sc->sc_bufq);
 			if (sc->sc_iopend-- == 1 &&



CVS commit: src/sys/dev/dkwedge

2021-10-16 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sat Oct 16 07:05:45 UTC 2021

Modified Files:
src/sys/dev/dkwedge: dk.c

Log Message:
Remove funny straggling blank line.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/dkwedge/dk.c

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-09-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Sep  6 08:37:43 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.74 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.75
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.74	Sun Jul 18 23:57:13 2021
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c	Mon Sep  6 08:37:43 2021
@@ -3116,7 +3116,8 @@ zfs_getattr(vnode_t *vp, vattr_t *vap, i
 		links = zp->z_links + 1;
 	else
 		links = zp->z_links;
-	vap->va_nlink = MIN(links, LINK_MAX);	/* nlink_t limit! */
+	/* XXX NetBSD: use LINK_MAX when that value matches 32-bit nlink_t */
+	vap->va_nlink = MIN(links, UINT32_MAX);	/* nlink_t limit! */
 	vap->va_size = zp->z_size;
 #ifdef illumos
 	vap->va_rdev = vp->v_rdev;



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2021-09-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Sep  6 08:37:43 UTC 2021

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c

Log Message:
Clamp zfs nlinks at UINT32_MAX (nlink_t max) instead of (much) smaller
16-bit LINK_MAX until we bump LINK_MAX.  Fixes fts(3) problems with
"rm -rf" on zfs directories with > 32766 subdirectories.

Thanks mlelstv@ and mrg@ for helping debug this.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c

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



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

2021-05-30 Thread Simon Burge
"Rin Okuyama" wrote:

> Module Name:  src
> Committed By: rin
> Date: Sun May 30 07:20:00 UTC 2021
>
> Modified Files:
>
>   src/sys/arch/arm/include/arm32: param.h
>
> Log Message:
>
> Include opt_param.h for MSGBUFSIZE ifdef _KERNEL_OPT.

Thanks Rin!  I thought I had checked all the ways MSGBUFSIZE
was pulled in.

Cheers,
Simon.


Re: CVS commit: xsrc/external/mit/xterm/dist

2021-05-16 Thread Simon Burge
Roland Illig wrote:

> 
> 16.05.2021 04:30:06 Simon Burge :
>
> > Hi Roland,
> >
> > Would using "%zu" and reverting the cast be a better fix here?
>
> I had considered this as well but found another instance in the same
> file where a size_t was fed to printf by casting it to unsigned long,
> therefore I did it this way, for consistency.

Good reason :)

Cheers,
Simon.


Re: CVS commit: xsrc/external/mit/xterm/dist

2021-05-15 Thread Simon Burge
Hi Roland,

"Roland Illig" wrote:

> Module Name:  xsrc
> Committed By: rillig
> Date: Sat May 15 19:30:15 UTC 2021
>
> Modified Files:
>
>   xsrc/external/mit/xterm/dist: misc.c
>
> Log Message:
>
> xterm: fix Clang build on i386
>
> xsrc/external/mit/xterm/dist/misc.c:3250:47: error: format specifies
> type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned
> int') [-Werror,-Wformat]

-   printf("color  (ignored, length %lu)\n", have);
+   printf("color  (ignored, length %lu)\n", (unsigned long)have);

Would using "%zu" and reverting the cast be a better fix here?

Cheers,
Simon.


Re: CVS commit: src/external/bsd/atf/dist/tools

2021-04-10 Thread Simon Burge
"Andreas Gustafsson" wrote:

> Module Name:  src
> Committed By: gson
> Date: Sat Apr 10 10:32:57 UTC 2021
>
> Modified Files:
>
>   src/external/bsd/atf/dist/tools: atf-run.1 atf-run.cpp
>
> Log Message:
>
> Add support for running individual test cases under isolation.

Thank you!  This will be useful to debug individual test case failures.

Cheers,
Simon.


Re: CVS commit: src

2021-04-07 Thread Simon Burge
Ryo ONODERA wrote:

> Hi,
>
> dtrace support of pkgsrc/lang/ruby30-base uses drti.o.
> Without drti.o, ruby30-base is not buildable with dtrace option
> and dtrace option is enabled by default.
>
> Could you please put drti.o back?

Thanks for the bug report.  I've reverted this change.

Background - I was having problems getting the MIPS dtrace build working
with all available ABIs and couldn't find any use of drti.o anywhere in
the tree.  It didn't occur to me that it might be used (actively!) by
packages.

Cheers,
Simon.


Re: CVS commit: src/sys/conf

2021-04-05 Thread Simon Burge
"Christos Zoulas" wrote:

> Module Name:  src
> Committed By: christos
> Date: Mon Apr  5 22:52:03 UTC 2021
>
> Modified Files:
>
>   src/sys/conf: Makefile.kern.inc
>
> Log Message:
>
> Don't use /usr/bin/time (it is not portable)

Oops, that bit wasn't meant to sneak in.  Thanks for noticing and
fixing.

Cheers,
Simon.


Re: CVS commit: src/usr.bin/at

2021-04-02 Thread Simon Burge
Robert Elz wrote:

> Date:Fri, 2 Apr 2021 06:31:53 +
> From:    "Simon Burge" 
> Message-ID:  <20210402063153.773c7f...@cvs.netbsd.org>
>
>   | Add an XXX reminder to convert at(1) to use parsedate(3) in .
>
> If that's intended as an optional facility (at -d ... or something),
> then fine, but please don't make parsedate the standard way to input
> at dates (just as it isn't the standard way to set the date using date(1),
> it is way too fragile and cantankerous for something that should be reliable.

That's good to know about parsedate(3).  I hadn't considered that what
looked more flexible could also be fragile and cantankerous :).  I'll
revert that comment.

Cheers,
Simon.


Re: CVS commit: src/sys/arch

2021-04-02 Thread Simon Burge
"Rin Okuyama" wrote:

> Module Name:  src
> Committed By: rin
> Date: Fri Apr  2 12:11:42 UTC 2021
>
> Log Message:
>
> For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived
> variables into u_int, to match with kern/subr_evcnt.c.

Thanks Rin!

Cheers,
Simon.


Re: CVS commit: othersrc/usr.bin/sleepto

2021-02-25 Thread Simon Burge
Christos Zoulas wrote:

> In article <20210225070357.a0c7bf...@cvs.netbsd.org>,
> Simon Burge  wrote:
> >-=-=-=-=-=-
> >
> >Module Name: othersrc
> >Committed By:simonb
> >Date:Thu Feb 25 07:03:57 UTC 2021
> >
> >Added Files:
> > othersrc/usr.bin/sleepto: Makefile parsetime.c parsetime.h sleepto.c
> > tzfile.h
> >
> >Log Message:
> >Jared's sleepto command from Dec 2007 - sleep to an at(1) style time
> >specification.
>
> We do have parsedate(3) in libutil which seems to do a lot more.

Cool, I will have a look at that.  Thinking about adding this to our
existing sleep(1), so anything in existing libraries that makes this
(much!) easier is welcome.

And will look at %jd and intmax_t too (ta).

Cheers,
Simon.


Re: CVS commit: src/doc

2021-01-27 Thread Simon Burge
Hi Reinoud,

Reinoud Zandijk wrote:

> Hi Simon,
>
> On Wed, Jan 27, 2021 at 05:27:01AM +0000, Simon Burge wrote:
> > Module Name:src
> > Committed By:   simonb
> > Date:   Wed Jan 27 05:27:01 UTC 2021
> > 
> > Modified Files:
> > src/doc: CHANGES
> > 
> > Log Message:
> > Note support for QEMU "mipssim" emulator.
>
> Is this machine also *able* to run big endian? Or/and can it also use virtio
> over either FDT/ACPI or PCI?

It can run either big- or little-endian, but has virtually no IO support
whatsoever - just a UART and an extremely simple eithernet driver.

I couldn't find any MIPS references to virtio with a quick look through
the QEMU 5.0 sources.

Cheers,
Simon.


Re: CVS commit: src/sys/compat/netbsd32

2021-01-17 Thread Simon Burge
Hi Roy,

Roy Marples wrote:

> On 15/01/2021 07:15, matthew green wrote:
> >> Oh, I quite agree. However, in6_nbrinfo predates my involvement with NetBSD
> >> and is the same struct on all BSD. While bringing the same functionality to
> >> IPv4, I elected to keep the same struct just to have the same API, warts
> >> and all. I like consistency.

Does anyone else have an in_nbrinfo?  I _think_ the "asked" member only
seems to get assigned a 0 for ipv4, and with a long being 32-bits on any
32 bit platform making it a long instead of an int doesn't buy anything.

I'm still keen to make this change (asked as an int instead of a long in
in_nbrinfo) and announce a mini flag day for arp for -current users so
that it's one less compat32 ioctl we have to maintain.

> > [ .. ]
> >> 
> >> That breaks API/ABI though yes? As such it would require stuff in compat
> >> anyway, but leaving it as it just needs n32 compat gunk instead which is
> >> less impactful on other systems.
> > 
> > in6_nbrinfo/in_nbrinfo are not in any published netbsd release so we can
> > choose to break them in -current.  there's a slight problem that -current 
> > has
> > a minor flag day here, but it's not the compat issue you seem to think.
>
> CVS disagrees - in6_nbrinfo is from NetBSD-1, only in_nbrinfo is recent:
> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/netinet6/nd6.h?rev=1.14.4.2=text/x-cvsweb-markup_with_tag=netbsd-1-5

Sorry, I only checked the history of in_nbrinfo and just assumed that
in6_nbrinfo was of a similar vintage.  I've committed compat32 support
for SIOCGNBRINFO_IN6 and in6_nbrinfo.

Cheers,
Simon.


Re: CVS commit: src/sys/compat/netbsd32

2021-01-14 Thread Simon Burge
Hi Roy,

Roy Marples wrote:

> On 14/01/2021 11:03, Simon Burge wrote:
> > Sure, I will have a look.  Anything IPv6 related I might need a helping
> > hand to get a test case though :).
>
> As they share a similar structure, you solve one you likely solve the other.
> I can assume you have working IPv4 ;)

In general where we can define the structure that are passed in an
interface, regardless if it's a ioctl or sysctl or whatever, we should
try to design the structure so that it's the same regardless of if it's
built with 32-bit or 64-bit userlands.  This is hard where you have
pointers, both otherwise is usually possible with a bit of planning.
You especially need to watch out for long which is a different size on
32-bit/64-bit userlands and also for int64_t which can align differently
depending on the architecture.  If you can do a printf of the struct
size with a variety of arches and they're all the same then good!  amd64,
i386, mips64 (n32), sparc would probably cover the range of cases to
test on (a compile test will do if you look at the generated code for
what is passed to printf).  The general rule is if we can avoid touching
compat/netbsd32 then life is easier!

The issue with in_nbrinfo and in6_nbrinfo is that there's a "long" in
the structure, so this has different sizes depending on your native long
size.

I _think_ this is the is value out of the la_asked member of struct
llentry which is a uint16_t so we can just make it an int the your
structures will align nicely.  In both cases the ifname name is 16
bytes.  For in_nbrinfo in_addr is effectively an int so we have just
four ints after the ifname.  For in6_nbrinfo the in6_addr is 128 bytes
so aligns nicely, then a couple more ints after that.

If "asked" is from struct llentry then the attached patch should work
without requiring any compat32 support.  If you're happy with this, I'll
test a bit more then commit.

Cheers,
Simon.

Index: netinet/in_var.h
===
RCS file: /cvsroot/src/sys/netinet/in_var.h,v
retrieving revision 1.98
diff -d -p -u -r1.98 in_var.h
--- netinet/in_var.h11 Sep 2020 15:22:12 -  1.98
+++ netinet/in_var.h15 Jan 2021 02:18:01 -
@@ -118,7 +118,7 @@ struct in_ifaddr {
 struct in_nbrinfo {
char ifname[IFNAMSIZ];  /* if name, e.g. "en0" */
struct in_addr addr;/* IPv4 address of the neighbor */
-   longasked;  /* number of queries already sent for this addr 
*/
+   int asked;  /* number of queries already sent for this addr 
*/
int state;  /* reachability state */
int expire; /* lifetime for NDP state transition */
 };
Index: netinet6/nd6.h
===
RCS file: /cvsroot/src/sys/netinet6/nd6.h,v
retrieving revision 1.91
diff -d -p -u -r1.91 nd6.h
--- netinet6/nd6.h  11 Sep 2020 15:03:33 -  1.91
+++ netinet6/nd6.h  15 Jan 2021 02:18:01 -
@@ -83,7 +83,7 @@ struct nd_kifinfo {
 struct in6_nbrinfo {
char ifname[IFNAMSIZ];  /* if name, e.g. "en0" */
struct in6_addr addr;   /* IPv6 address of the neighbor */
-   longasked;  /* number of queries already sent for this addr 
*/
+   int asked;  /* number of queries already sent for this addr 
*/
int isrouter;   /* if it acts as a router */
int state;  /* reachability state */
int expire; /* lifetime for NDP state transition */


Re: CVS commit: src/sys/compat/netbsd32

2021-01-14 Thread Simon Burge
Roy Marples wrote:

> On 14/01/2021 08:00, Simon Burge wrote:
> > Module Name:src
> > Committed By:   simonb
> > Date:   Thu Jan 14 08:00:45 UTC 2021
> > 
> > Modified Files:
> > src/sys/compat/netbsd32: netbsd32.h netbsd32_ioctl.c netbsd32_ioctl.h
> > 
> > Log Message:
> > Handle FSSIOCSET and FSSIOCGET; vndconfig(8) works with compat32 now.
> > XXX: FSSIOCSET50 and FSSIOCGET50 are not (yet) handled.
>
> Could I prompt you into looking at SIOCGNBRINFO (arp -a) and SIOCGNBRINFO_IN6 
> (ndp -a) please?
>
> I could never get that working.

Sure, I will have a look.  Anything IPv6 related I might need a helping
hand to get a test case though :).

Cheers,
Simon.


Re: CVS commit: src/usr.bin/sockstat

2020-08-26 Thread Simon Burge
"Christos Zoulas" wrote:

> Module Name:  src
> Committed By: christos
> Date: Wed Aug 26 22:57:56 UTC 2020
>
> Modified Files:
>
>   src/usr.bin/sockstat: Makefile sockstat.c
>
> Log Message:
>
> undo previous, now sockstat works without privs

Nice, thanks Christos!

Cheers,
Simon.


Re: CVS commit: src/usr.bin/make

2020-08-02 Thread Simon Burge
"Roland Illig" wrote:

> Module Name:  src
> Committed By: rillig
> Date: Sun Aug  2 09:43:22 UTC 2020
>
> Modified Files:
>
>   src/usr.bin/make: var.c
>
> Log Message:
>
> make(1): use shorter local variable names
>
> The c in cp was redundant since the context makes it obvious that this
> is a character pointer. In a tight loop where lots of characters are
> compared, every letter counts.

I don't understand the intent of this commit.  Are you saying the length
of a C variable name has some sort of impact on code execution speed?

Cheers,
Simon.


Re: CVS commit: src/sys/conf

2020-07-08 Thread Simon Burge
"Valeriy E. Ushakov" wrote:

> Module Name:  src
> Committed By: uwe
> Date: Wed Jul  8 19:39:22 UTC 2020
>
> Modified Files:
>
>   src/sys/conf: assym.mk
>
> Log Message:
>
> Drop -fstack-usage* from CFLAGS passed genassym.
> We don't want it to create a "-.su" file.

Thanks!

Cheers,
Simon.


Re: CVS commit: src/sys/arch/mips/cavium/dev

2020-06-26 Thread Simon Burge
Hi Rin,

Rin Okuyama wrote:

> Hi,
>
> On 2020/06/23 14:18, Simon Burge wrote:
> > Module Name:src
> > Committed By:   simonb
> > Date:   Tue Jun 23 05:18:43 UTC 2020
> > 
> > Modified Files:
> > src/sys/arch/mips/cavium/dev: octeon_uart.c
> > 
> > Log Message:
> > Add support for a very simple output-only console so early printf() can 
> > work.
> > Minor tweaks, remove some unused code.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/cavium/dev/octeon_uart.c
>
> Didn't you forget to ``cvs add octeon_uartvar.h''? Periodic build fails as:

Yep, indeed!  Added, thanks for pointing this out.

Cheers,
Simon.


Re: CVS commit: src/sys/arch/mips/mips

2020-06-09 Thread Simon Burge
Simon Burge wrote:

> > > Module Name:  src
> > > Committed By: simonb
> > > Date: Tue Jun  9 06:18:01 UTC 2020
> > > 
> > > Modified Files:
> > >   src/sys/arch/mips/mips: mips_machdep.c
> > > 
> > > Log Message:
> > > If we are on a SiByte or Cavium CPU with an FPU, report as "built-in FPU"
> > > instead of saying it's an unknown FPU type.
> > > 
> > > XXX - add any other CPUs to this list?
> >
> > This seems to cause build errors for non mipsNN:
>
> Oops, will fix.  Thanks for reporting.

Fixed, thanks!

Cheers,
Simon.


Re: CVS commit: src/sys/arch/mips/mips

2020-06-09 Thread Simon Burge
Izumi Tsutsui wrote:

> > Module Name:src
> > Committed By:   simonb
> > Date:   Tue Jun  9 06:18:01 UTC 2020
> > 
> > Modified Files:
> > src/sys/arch/mips/mips: mips_machdep.c
> > 
> > Log Message:
> > If we are on a SiByte or Cavium CPU with an FPU, report as "built-in FPU"
> > instead of saying it's an unknown FPU type.
> > 
> > XXX - add any other CPUs to this list?
>
> This seems to cause build errors for non mipsNN:

Oops, will fix.  Thanks for reporting.

Cheers,
Simon.


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

2020-06-06 Thread Simon Burge
"Kamil Rytarowski" wrote:

> Module Name:  src
> Committed By: kamil
> Date: Fri Jun  5 21:48:04 UTC 2020
>
> Modified Files:
>
>   src/sys/arch/x86/x86: cpu_rng.c
>
> Log Message:
>
> Change const unsigned to preprocessor define
>
> Fixes GCC -O0 build with the stack protector.

Surely a gcc bug?  This almost certainly needs an
/* XXX gcc stack protector -O0 bug */ comment and
possibly an entry in doc/HACKS as well otherwise
someone will come along later and de-uglify this
change.

Cheers,
Simon.


Re: CVS commit: src/lib/libcurses

2020-03-12 Thread Simon Burge
Hi Roy,

"Roy Marples" wrote:

> Module Name:  src
> Committed By: roy
> Date: Wed Mar 11 21:33:38 UTC 2020
>
> Modified Files:
>
>   src/lib/libcurses: initscr.c
>
> Log Message:
>
> curses: application should exit if initscr(3) fails
>
> POSIX defines this behaviour here:
> https://pubs.opengroup.org/onlinepubs/7908799/xcurses/initscr.html
>
> Partial fix for PR lib/23910

Can you please adjust the manpage to reflect this?  It currently says:

RETURN VALUES
 Functions returning pointers will return NULL if an error is detected.

Cheers,
Simon.


Re: CVS commit: src/sys/ufs/ufs

2020-02-26 Thread Simon Burge
"Maxime Villard" wrote:

> Module Name:  src
> Committed By: maxv
> Date: Wed Feb 26 18:00:12 UTC 2020
>
> Modified Files:
>
>   src/sys/ufs/ufs: ufs_vnops.c
>
> Log Message:
>
> Zero out the padding in 'd_namlen', to prevent info leaks. Same logic as
> ufs_makedirentry().

Is it cleaner to just call pool_cache_get() with PR_ZERO?

Cheers,
Simon.


Re: CVS commit: src/sys/kern

2020-01-21 Thread Simon Burge
"Christos Zoulas" wrote:

> Log Message:
>
> Don't crash if we are on a hippie trail, head full of zombie

+1 for any Australian references in a commit message :)

Cheers,
Simon.


Re: CVS commit: src/sys

2020-01-03 Thread Simon Burge
Hey Jason,

Jason Thorpe wrote:

> > On Jan 3, 2020, at 10:11 AM, Frank Kardel  wrote:
> > 
> > Hi Jason !
> > 
> > Could you please check that kmem using tools can cope with the missing 
> > _boottime symbol.
>
> Hey Frank... this should fix it:
>
>   $NetBSD: vmstat.c,v 1.231 2020/01/03 19:13:54 thorpej Exp $

Is it worth keeping the boottime symbol about so that a netbsd-9 vmstat
binary will still work with a -current kernel?  We could possibly wrap
boottime with a COMPAT_90 check too?.

Cheers,
Simon.


Re: CVS commit: src/sys

2020-01-03 Thread Simon Burge
Jason Thorpe wrote:

> > Is it worth keeping the boottime symbol about so that a netbsd-9 vmstat
> > binary will still work with a -current kernel?  We could possibly wrap
> > boottime with a COMPAT_90 check too?.
>
> Define "work".  A dummy symbol would have no valid contents.  I guess
> if you call that "work" then go ahead?
>
> The real problem here is that vmstat insists on finding the kernel
> symbols even if it's not going to use them, which is kind of silly.

That is indeed the silly(TM) thing.  Against a live kernel, it just
needs the boottime symbol to exist.  It uses the kern.boottime sysctl
to get the boottime from a live kernel.

Cheers,
Simon.


Re: Leak Sanitizer - how to suppress leaks

2019-09-12 Thread Simon Burge
Kamil Rytarowski wrote:

> I will revert it, but I am looking for a more generic approach.
>
> How about adding ifdef __NO_LEAKS like:
>
> #ifdef __NO_LEAKS
> free(3)?
> #endif
>
> And in lsan/asan/valgrind/etc checks use -D__NO_LEAKS.

Sorry if I'm missing something that has been already explained,
but why (practically) do we care about memory leaks for a utility
that is about to finish?

If we're doing some ugly #ifdef dance only when running the
sanitiser(s), then we haven't actually done anything to "fix"
the leak in the installed binaries so it seems that there was
no practical problem that we were trying to solve in the first
place.

Cheers,
Simon.


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

2019-02-27 Thread Simon Burge
Martin Husemann wrote:

> On Wed, Feb 27, 2019 at 07:33:11PM +1100, Simon Burge wrote:
> > Looking at the code in question, is reducing the number of calls to
> > addstr() really something that needs to be optimised?  A simple
> > 
> > for (n = 0; n < win->ws_col; n++)
> > addstr("-");
> > 
> > is a lot easier to understand!
>
> Yeah I wondered that too - are they going to show up sequentially
> though, or will it all be defered untill the next update? I often use
> it via a 9600bps serial console and would like to avoid incremental
> changes.

addstr() just adjusts stdscr.  The line after these is:

refresh();

which will do the actual screen refresh/update.

Cheers,
Simon.


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

2019-02-27 Thread Simon Burge
Martin Husemann wrote:

> On Tue, Feb 26, 2019 at 01:09:35PM +, Joerg Sonnenberger wrote:
> > Module Name:src
> > Committed By:   joerg
> > Date:   Tue Feb 26 13:09:35 UTC 2019
> > 
> > Modified Files:
> > src/usr.sbin/sysinst: run.c
> > 
> > Log Message:
> > Avoid string + int warning.
> > 
> > 
> > To generate a diff of this commit:
> > cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/sysinst/run.c
>
> What compiler warns and what are the exact details that make it warn?
> The idiom you used is IMHO extremely ugly, and I would usually rework
> it - but since I can't test that will likely break your build again.
>
> I would do: const char thirty_dashes[] = "---..---";
> and then const char * dashes = thirty_dashes +  m; addstr(dasches);

Looking at the code in question, is reducing the number of calls to
addstr() really something that needs to be optimised?  A simple

for (n = 0; n < win->ws_col; n++)
addstr("-");

is a lot easier to understand!

Cheers,
Simon.


Re: CVS commit: src/usr.bin/vmstat

2018-12-12 Thread Simon Burge
Hi Sevan,

Sevan Janiyan wrote:

> How about this?
>
> Index: usr.bin/vmstat/vmstat.1
> ===
> RCS file: /cvsroot/src/usr.bin/vmstat/vmstat.1,v
> retrieving revision 1.23
> diff -u -p -r1.23 vmstat.1
> --- usr.bin/vmstat/vmstat.1 13 Dec 2018 01:29:10 -  1.23
> +++ usr.bin/vmstat/vmstat.1 13 Dec 2018 02:50:00 -
> @@ -76,9 +76,17 @@ disk, trap, and CPU activity.
>  If
>  .Nm
>  is invoked without any options, it displays the summary of statistics since
> -boot and exits.
> +boot for all fields except memory and process statistic then exits.
> +The memory and process fields are live samples taken at the time
> +.Nm
> +was invoked in this implementation.
>  This is also referred to as the first line of
>  .Nm .
> +The
> +.Fl N ,
> +.Fl v ,
> +.Fl W
> +options adhere to this behaviour.
>  .Pp
>  The options are as follows:
>  .Bl -tag -width xxxhistname

While a bit wordier, I think that accurately describes the behaviour.
LGTM.

Cheers,
Simon.


Re: CVS commit: src/usr.bin/vmstat

2018-12-12 Thread Simon Burge
Hi Sevan,

"Sevan Janiyan" wrote:

> Module Name:  src
> Committed By: sevan
> Date: Thu Dec 13 01:29:11 UTC 2018
>
> Modified Files:
>
>   src/usr.bin/vmstat: vmstat.1
>
> Log Message:
>
> Describe what happens when you run vmstat witout any options aka the first 
> line
> of vmstat.

  +If
  +.Nm
  +is invoked without any options, it displays the summary of statistics since
  +boot and exits.

That's not true for the process and memory info though, right?  For
those two these are their current state, not a summary since boot.  Also
technically a few options don't change this behaviour either (at least
-M -N -v and -W?).

Not sure how we should document all this and be correct at the same
time. :)

Cheers,
Simon.


Re: CVS commit: src/sys/arch/mips/mips

2018-08-08 Thread Simon Burge
Martin Husemann wrote:

> On Wed, Aug 08, 2018 at 12:11:39PM +, m...@netbsd.org wrote:
> > On Wed, Aug 08, 2018 at 01:59:46PM +0200, Martin Husemann wrote:
> > > On Wed, Aug 08, 2018 at 11:49:21AM +, m...@netbsd.org wrote:
> > > > Can we use aprint_debug instead?
> > > 
> > > It is not even usefull for general debugging IMHO.
> > > 
> > > Martin
> > 
> > I like the idea of removing the messages entirely. The code was hard to
> > read when I had to do it, and I didn't find those messages helpful.
>
> I meant: I like the way Simon changed it - it will not show up unless
> you are explicitly debugging exec stuff.

On top of what Martin said, there's a DEBUG_EXEC already in
sys/kern/kern_exec.c .  Do these messages still serve a purpose
now that the compat stuff is working?  I can't answer that!

Cheers,
Simon.


Re: CVS commit: src

2012-07-08 Thread Simon Burge
Mindaugas Rasiukevicius wrote:

  [ ... ]
 
 Log Message:
 
 Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
 The code is taken from the upstream and is in the public domain.

I'm curious why you've chosen MurmurHash2 instead of MurmurHash3 given the
known problems with MurmurHash2?  Also, should the filename have a 2 in
it?

Cheers,
Simon.


Re: CVS commit: src

2012-07-08 Thread Simon Burge
Mindaugas Rasiukevicius wrote:

 Simon Burge sim...@netbsd.org wrote:
  
[ ... ]
   
   Log Message:
   
   Add MurmurHash2 -- a non-cryptographic hash function by Austin Appleby.
   The code is taken from the upstream and is in the public domain.
  
  I'm curious why you've chosen MurmurHash2 instead of MurmurHash3 given the
  known problems with MurmurHash2?  Also, should the filename have a 2 in
  it?
 
 It meets my needs.

What are your needs?  I don't see this change discussed anywhere.

 Are you referring to the weakness when using 4-bytes?
 Anyway, that is why the file name does not have 2 in it, so that we could
 add MurmurHash3 as well.

That's completely different to the other hashes we have in the source
tree.  Can you rename the file so that it's consistent please?

Cheers,
Simon.


Re: CVS commit: src

2012-07-08 Thread Simon Burge
Mindaugas Rasiukevicius wrote:
 Simon Burge sim...@netbsd.org wrote:
  Mindaugas Rasiukevicius wrote:
   Simon Burge sim...@netbsd.org wrote:

  [ ... ]
 
 Log Message:
 
 Add MurmurHash2 -- a non-cryptographic hash function by Austin
 Appleby. The code is taken from the upstream and is in the public
 domain.

I'm curious why you've chosen MurmurHash2 instead of MurmurHash3
given the known problems with MurmurHash2?  Also, should the filename
have a 2 in it?
   
   It meets my needs.
  
  What are your needs?  I don't see this change discussed anywhere.
 
 I am going to use it in NPF as it shows better characteristics than
 Jenkins lookup3.  It is a very small function.

Thanks for the explaination.

   Are you referring to the weakness when using 4-bytes?
   Anyway, that is why the file name does not have 2 in it, so that we
   could add MurmurHash3 as well.
  
  That's completely different to the other hashes we have in the source
  tree.  Can you rename the file so that it's consistent please?
 
 Because other hashes use very different interface, with a context and
 common template in libc (rather horrible macros).  There is no need to
 create a directory for every different version of MurmurHash.  Rather
 undesirable, I would say.

I wasn't talking about creating a directory for every variant of murmur,
just putting each variant in a separate .c file.  Eg:

src/common/lib/libc/hash/murmurhash/murmurhash2.c
src/common/lib/libc/hash/murmurhash/murmurhash3.c

Or do you intend on adding other variants of murmur to the current .c
file if/when needed?

Cheers,
Simon.


Re: CVS commit: src

2012-07-08 Thread Simon Burge
Mindaugas Rasiukevicius wrote:
 Simon Burge sim...@netbsd.org wrote:
 Are you referring to the weakness when using 4-bytes?
 Anyway, that is why the file name does not have 2 in it, so that we
 could add MurmurHash3 as well.

That's completely different to the other hashes we have in the source
tree.  Can you rename the file so that it's consistent please?
   
   Because other hashes use very different interface, with a context and
   common template in libc (rather horrible macros).  There is no need to
   create a directory for every different version of MurmurHash.  Rather
   undesirable, I would say.
  
  I wasn't talking about creating a directory for every variant of murmur,
  just putting each variant in a separate .c file.  Eg:
  
  src/common/lib/libc/hash/murmurhash/murmurhash2.c
  src/common/lib/libc/hash/murmurhash/murmurhash3.c
  
  Or do you intend on adding other variants of murmur to the current .c
  file if/when needed?
 
 Yes, I would like to add MurmurHash3 to the same module.  Having them in
 the same module enables easier code reuse, when it's the case.  Do you
 see a good reason to have them in separate modules?

There's practically no code to reuse between the two hashes.  It's also
worth noting that the reference implementation keeps the code for the
two (three including the original murmurhash1) in separate source files.

Cheers,
Simon.


Re: CVS commit: src

2011-12-20 Thread Simon Burge
Joerg Sonnenberger wrote:

 On which mailling list was this change discussed?

One thing that jumps out: Should this new code panic in sys_mmap() if it
can't handle a request instead of just failing the request?  That seems
a little ... heavy handed.

Please also stick to KNF (#defineTAB), especially when you add
something to the middle of an existing block of #defines (eg
sys/proc.h).

Cheers,
Simon.

 
 On Tue, Dec 20, 2011 at 03:39:36PM +, Reinoud Zandijk wrote:
  Module Name:src
  Committed By:   reinoud
  Date:   Tue Dec 20 15:39:36 UTC 2011
  
  Modified Files:
  src/lib/libc/sys: mmap.2
  src/sys/sys: mman.h proc.h
  src/sys/uvm: uvm_extern.h uvm_map.c uvm_mmap.c
  
  Log Message:
  Add a MAP_NOSYSCALLS flag to mmap. This flag prohibits executing of system
  calls from the mapped region. This can be used for emulation perposed or for
  extra security in the case of generated code.
  
  Its implemented by adding mapping-attributes to each uvm_map_entry. These 
  can
  then be queried when needed.
  
  Currently the MAP_NOSYSCALLS is only implemented for x86 but other
  architectures are easy to adapt; see the sys/arch/x86/x86/syscall.c patch.
  Port maintainers are encouraged to add them for their processor ports too.
  When this feature is not yet implemented for an architecture the
  MAP_NOSYSCALLS is simply ignored with virtually no cpu cost..
  
  
  To generate a diff of this commit:
  cvs rdiff -u -r1.44 -r1.45 src/lib/libc/sys/mmap.2
  cvs rdiff -u -r1.42 -r1.43 src/sys/sys/mman.h
  cvs rdiff -u -r1.311 -r1.312 src/sys/sys/proc.h
  cvs rdiff -u -r1.176 -r1.177 src/sys/uvm/uvm_extern.h
  cvs rdiff -u -r1.307 -r1.308 src/sys/uvm/uvm_map.c
  cvs rdiff -u -r1.139 -r1.140 src/sys/uvm/uvm_mmap.c
  
  Please note that diffs are not public domain; they are subject to the
  copyright notices on the relevant files.
  
 


Re: CVS commit: src/sys/arch/evbppc

2011-12-12 Thread Simon Burge
KIYOHARA Takashi wrote:

 Module Name:  src
 Committed By: kiyohara
 Date: Mon Dec 12 11:23:58 UTC 2011
 
 Modified Files:
 
   src/sys/arch/evbppc/explora: autoconf.c
   src/sys/arch/evbppc/obs405: obs200_autoconf.c obs266_autoconf.c
   obs600_autoconf.c
   src/sys/arch/evbppc/virtex: autoconf.c
   src/sys/arch/evbppc/walnut: autoconf.c
 
 Log Message:
 
 Fix hangs-up.  Remove wrteei 1 in board's cpu_configure().  Interrupt
 is enabled in powerpc-layer.

This code is pretty much unchanged for over a decade.  Did the interrupt
enable code in the powerpc layer change recently?  I'm curious about
how/why this broke.

Cheers,
Simon.


Re: CVS commit: src/external/bsd/libevent/dist

2011-09-18 Thread Simon Burge
Joerg Sonnenberger wrote:

 Which 15 changes in src/external are you talking about?

Some of them were only Makefile changes, so trimmed from the list;

src/crypto/external/bsd/openssh
  Message-Id: 20110825153701.1ff6b17...@cvs.netbsd.org
  Message-Id: 20110829210854.ee03417...@cvs.netbsd.org
  Message-Id: 20110916153601.9b20817...@cvs.netbsd.org
  Message-Id: 20110916153618.7009617...@cvs.netbsd.org
src/external/bsd/file (after I sent my previous email)
  Message-Id: 20110917104653.247c917...@cvs.netbsd.org
src/external/bsd/flex
  Message-Id: 20110827183603.d4dcd17...@cvs.netbsd.org
src/external/bsd/libarchive
  Message-Id: 20110916162736.e81bf17...@cvs.netbsd.org
src/external/bsd/libevent
  Message-Id: 20110916160903.c409c17...@cvs.netbsd.org
src/external/bsd/libpcap
  Message-Id: 20110916160925.83e7d17...@cvs.netbsd.org
src/external/bsd/tmux
  Message-Id: 20110825164151.6308017...@cvs.netbsd.org
src/external/historical/nawk
  Message-Id: 20110916160947.6659f17...@cvs.netbsd.org

 Most of them are
 either to pieces already heavily modified (OpenSSH),

Does that stop feeding changes back?

 very rarely updated
 (libpcap)

Does that stop feeding changes back?

 or where it is hard to impossible to get any chances included
 (nawk, byacc).

Why is that?

 In this case I am going to talk with upstream.

In light of your previous message, it wasn't obvious if you were also
doing that.

Cheers,
Simon.


Re: CVS commit: src/external/bsd/libevent/dist

2011-09-16 Thread Simon Burge
Joerg Sonnenberger wrote:

 Module Name:  src
 Committed By: joerg
 Date: Fri Sep 16 16:09:03 UTC 2011
 
 Modified Files:
 
   src/external/bsd/libevent/dist: log.h
 
 Log Message:
 
 Use __dead

Has this and the other 15 or so changes you've made to src/external in
the last month all been feed back to the relative maintainers?

 From: Joerg Sonnenberger jo...@britannica.bec.de
 To: source-chan...@netbsd.org
 Cc: source-changes-d@NetBSD.org
 Subject: Re: CVS commit: src/external/bsd/mdocml
 Date: Wed, 17 Aug 2011 23:28:05 +0200
 
 Could you please stop randomly changing 3rd party code without
 contacting the maintainer?
 
 Joerg

Cheers,
Simon.


Re: CVS commit: src/share/man/man4

2011-08-30 Thread Simon Burge
Martin Husemann wrote:

 Just curious: are there analog TV feeds out there, anywhere, still?

Some parts of Australia until the end of next year...

Cheers,
Simon.


Re: CVS commit: src/sys/arch

2011-06-09 Thread Simon Burge
Matt Thomas wrote:

 Module Name:  src
 Committed By: matt
 Date: Tue Jun  7 00:48:32 UTC 2011
 
 Modified Files:
 
   [ ... alpha files ... ]
   src/sys/arch/mips/mips: mips_machdep.c
   src/sys/arch/powerpc/powerpc: fpu.c powerpc_machdep.c
 
 Log Message:
 
 Switch alpha to use PCU to manage the FPU.
 Tested by mhitch and review by rmind.

Where the MIPS and PowerPC changes in this commit deliberate?

Cheers,
Simon.


Re: CVS commit: src/sys/kern

2011-06-03 Thread Simon Burge
Martin Husemann wrote:

 On Thu, Jun 02, 2011 at 09:21:11PM +0100, David Laight wrote:
  Passing 'l' is a register rename (or copy) so is almost zero cost.
  
  Recovering curlwp may involve a function call, and is, at best, a real
  memory access of global data (possibly via an asm statement) that will
  be slow and multiple accesses might need caching in a local anyway.
 
 I wonder on what archs we would be able to do the MIPS curlwp optimization
 (place curlwp in a reserved register).
 
 Sparc64 and sparc will likely follow this in the near future (needs some audit
 and will do some benchmarks first; it closely resembles TLS for userland).
 
 What's the cost on other archs and what optimizations are possible?

As far as I could tell, the change to put curlwp in a register was never
actually benchmarked on MIPS.  I asked a few times and never got an
answer, other than that a kernel was about 2.5kB smaller.

I'd be rather curious that if other arches investigate this, especially
if there's some performance data to back up the change this time around.

Cheers,
Simon.


Re: CVS commit: src

2011-01-30 Thread Simon Burge
Matt Thomas wrote:

 On Jan 28, 2011, at 3:38 PM, matthew green wrote:
 
  
  disklabel.h should export nothing to userland and values userland
  needs should be obtained via sysctl.
  
  I've been asking this question of various developers for a while.
  
  how do i create a disklabel on a file system image as a normal
  user a non-netbsd host with this method?
 
 But that would be a hosted tool and that's a different case than 
 a native tool.  

Where would the hosted tool get that information from?  If it's from a
MD header file we're back to where we started...

Cheers,
Simon.


Re: CVS commit: src

2011-01-28 Thread Simon Burge
Antti Kantee wrote:

 On Fri Jan 28 2011 at 18:05:50 +0900, Izumi Tsutsui wrote:
   Out of curiosity, was there any thought is adding this to evbmips
   instead of getting its own top-level arch subdir?
  
  emips already has native bootloader and src/distrib files,
  so it's enough reason to have own port dir.

Fair enough here, this isn't something that evb* handles well.  One day
I'd like to move sbmips under evbmips but sbmips/stand is the biggest
part of work there.

 additionally, userland is built with MKSOFTFLOAT=yes

Was softfloat vs kernel emulation ever benchmarked?  It's been many
years since I looked at this but my (very vague) recollection was that
there was no real difference and there are then the benefits of sharing
binaries with other MIPS ports.

 plus, what was said about a research platform,
 with implications for teaching too.

This is the only point you raise that I don't understand.  How does its
location in the source tree effect its use as a research platform?

Cheers,
Simon.


Re: CVS commit: src

2011-01-27 Thread Simon Burge
Hi Pooka,

Antti Kantee wrote:

 Module Name:  src
 Committed By: pooka
 Date: Wed Jan 26 01:18:55 UTC 2011
 
 Added Files:
 
   [ ... ]
   src/sys/arch/emips: Makefile

Out of curiosity, was there any thought is adding this to evbmips
instead of getting its own top-level arch subdir?  My understanding is
that its implementation is in FPGA only and in that respect is similar
to the PowerPC Virtex that lives in arch/evbppc/virtex.

Cheers,
Simon.


  1   2   >