CVS commit: src/sys/ufs

2022-11-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov 28 04:52:04 UTC 2022

Modified Files:
src/sys/ufs: files.ufs
src/sys/ufs/ffs: ffs_extattr.c ffs_extern.h

Log Message:
the UFS_EXTATTR option was supposed to affect only UFS1 file systems,
but when the UFS2 extattr code was merged, the UFS_EXTATTR option was
mistakenly changed to affect UFS2 file systems as well.  this commit
changes UFS_EXTATTR back to affecting only UFS1 file systems as originally
intended.  in UFS2 (or rather UFS2ea in NetBSD), extattrs are a
native feature and are always supported.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/ufs/files.ufs
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ffs/ffs_extattr.c
cvs rdiff -u -r1.86 -r1.87 src/sys/ufs/ffs/ffs_extern.h

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



CVS commit: src/sys/ufs

2022-11-27 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Mon Nov 28 04:52:04 UTC 2022

Modified Files:
src/sys/ufs: files.ufs
src/sys/ufs/ffs: ffs_extattr.c ffs_extern.h

Log Message:
the UFS_EXTATTR option was supposed to affect only UFS1 file systems,
but when the UFS2 extattr code was merged, the UFS_EXTATTR option was
mistakenly changed to affect UFS2 file systems as well.  this commit
changes UFS_EXTATTR back to affecting only UFS1 file systems as originally
intended.  in UFS2 (or rather UFS2ea in NetBSD), extattrs are a
native feature and are always supported.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/ufs/files.ufs
cvs rdiff -u -r1.9 -r1.10 src/sys/ufs/ffs/ffs_extattr.c
cvs rdiff -u -r1.86 -r1.87 src/sys/ufs/ffs/ffs_extern.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/ufs/files.ufs
diff -u src/sys/ufs/files.ufs:1.49 src/sys/ufs/files.ufs:1.50
--- src/sys/ufs/files.ufs:1.49	Thu Sep 24 17:20:53 2020
+++ src/sys/ufs/files.ufs	Mon Nov 28 04:52:04 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ufs,v 1.49 2020/09/24 17:20:53 riastradh Exp $
+#	$NetBSD: files.ufs,v 1.50 2022/11/28 04:52:04 chs Exp $
 
 deffs	FFS
 deffs	EXT2FS
@@ -52,7 +52,7 @@ define	ffs: vfs, ufs
 file	ufs/ffs/ffs_alloc.c		ffs
 file	ufs/ffs/ffs_balloc.c		ffs
 file	ufs/ffs/ffs_bswap.c		(ffs | mfs) & ffs_ei
-file	ufs/ffs/ffs_extattr.c		ffs & ufs_extattr
+file	ufs/ffs/ffs_extattr.c		ffs
 file	ufs/ffs/ffs_inode.c		ffs
 file	ufs/ffs/ffs_snapshot.c		ffs
 file	ufs/ffs/ffs_subr.c		ffs

Index: src/sys/ufs/ffs/ffs_extattr.c
diff -u src/sys/ufs/ffs/ffs_extattr.c:1.9 src/sys/ufs/ffs/ffs_extattr.c:1.10
--- src/sys/ufs/ffs/ffs_extattr.c:1.9	Thu Nov 17 06:40:40 2022
+++ src/sys/ufs/ffs/ffs_extattr.c	Mon Nov 28 04:52:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_extattr.c,v 1.9 2022/11/17 06:40:40 chs Exp $	*/
+/*	$NetBSD: ffs_extattr.c,v 1.10 2022/11/28 04:52:04 chs Exp $	*/
 
 /*-
  * SPDX-License-Identifier: (BSD-2-Clause-FreeBSD AND BSD-3-Clause)
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ffs_extattr.c,v 1.9 2022/11/17 06:40:40 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_extattr.c,v 1.10 2022/11/28 04:52:04 chs Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -114,7 +114,7 @@ __KERNEL_RCSID(0, "$NetBSD: ffs_extattr.
 #define VI_UNLOCK(vp)		mutex_exit((vp)->v_interlock)
 #define UFS_INODE_SET_FLAG(ip, f)	((ip)->i_flag |= (f))
 #define ASSERT_VOP_ELOCKED(vp, m)	KASSERT(VOP_ISLOCKED(vp))
-#define I_IS_UFS2(ip)		(ITOFS(ip)->fs_magic == FS_UFS2_MAGIC)
+#define I_IS_UFS2(ip)		((ip)->i_ump->um_fstype == UFS2)
 #define	lblktosize(fs, o)	ffs_lblktosize(fs, o)
 #define	lblkno(fs, o)		ffs_lblkno(fs, o)
 #define	blkoff(fs, o)		ffs_blkoff(fs, o)
@@ -151,7 +151,7 @@ ffs_extread(struct vnode *vp, struct uio
 	dp = ip->i_din2;
 
 #ifdef INVARIANTS
-	if (uio->uio_rw != UIO_READ || fs->fs_magic != FS_UFS2_MAGIC)
+	if (uio->uio_rw != UIO_READ || ip->i_ump->um_fstype != UFS2)
 		panic("ffs_extread: mode");
 
 #endif
@@ -269,7 +269,7 @@ ffs_extwrite(struct vnode *vp, struct ui
 	dp = ip->i_din2;
 
 #ifdef INVARIANTS
-	if (uio->uio_rw != UIO_WRITE || fs->fs_magic != FS_UFS2_MAGIC)
+	if (uio->uio_rw != UIO_WRITE || ip->i_ump->um_fstype != UFS2)
 		panic("ffs_extwrite: mode");
 #endif
 
@@ -585,10 +585,9 @@ ffs_openextattr(void *v)
 		struct proc *a_p;
 	} */ *ap = v;
 	struct inode *ip = VTOI(ap->a_vp);
-	struct fs *fs = ip->i_fs;
 
 	/* Not supported for UFS1 file systems. */
-	if (fs->fs_magic == FS_UFS1_MAGIC)
+	if (ip->i_ump->um_fstype == UFS1)
 		return (EOPNOTSUPP);
 
 #ifdef __FreeBSD__
@@ -612,10 +611,9 @@ ffs_closeextattr(void *v)
 		struct proc *a_p;
 	} */ *ap = v;
 	struct inode *ip = VTOI(ap->a_vp);
-	struct fs *fs = ip->i_fs;
 
 	/* Not supported for UFS1 file systems. */
-	if (fs->fs_magic == FS_UFS1_MAGIC)
+	if (ip->i_ump->um_fstype == UFS1)
 		return (EOPNOTSUPP);
 
 #ifdef __FreeBSD__
@@ -646,11 +644,15 @@ ffs_getextattr(void *v)
 	} */ *ap = v;
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
-	struct fs *fs = ip->i_fs;
 
 	KASSERT(VOP_ISLOCKED(vp));
-	if (fs->fs_magic == FS_UFS1_MAGIC) {
+
+	if (ip->i_ump->um_fstype == UFS1) {
+#ifdef UFS_EXTATTR
 		return ufs_getextattr(ap);
+#else
+		return EOPNOTSUPP;
+#endif
 	}
 
 	u_char *eae, *p;
@@ -708,8 +710,12 @@ ffs_setextattr(void *v)
 	struct fs *fs = ip->i_fs;
 
 	KASSERT(VOP_ISLOCKED(vp) == LK_EXCLUSIVE);
-	if (fs->fs_magic == FS_UFS1_MAGIC) {
+	if (ip->i_ump->um_fstype == UFS1) {
+#ifdef UFS_EXTATTR
 		return ufs_setextattr(ap);
+#else
+		return EOPNOTSUPP;
+#endif
 	}
 
 	struct extattr *eap;
@@ -829,10 +835,13 @@ ffs_listextattr(void *v)
 		struct proc *a_p;
 	} */ *ap = v;
 	struct inode *ip = VTOI(ap->a_vp);
-	struct fs *fs = ip->i_fs;
 
-	if (fs->fs_magic == FS_UFS1_MAGIC) {
+	if (ip->i_ump->um_fstype == UFS1) {
+#ifdef UFS_EXTATTR
 		return ufs_listextattr(ap);
+#else
+		return EOPNOTSUPP;
+#endif
 	}
 
 	

CVS commit: src/etc

2022-11-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Mon Nov 28 02:48:34 UTC 2022

Modified Files:
src/etc: services

Log Message:
regen from IANA 2022-11-22


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/etc/services

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

diffs are larger than 1MB and have been omitted


CVS commit: src/etc

2022-11-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Mon Nov 28 02:48:34 UTC 2022

Modified Files:
src/etc: services

Log Message:
regen from IANA 2022-11-22


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/etc/services

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



CVS commit: src/etc

2022-11-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Mon Nov 28 02:46:58 UTC 2022

Modified Files:
src/etc: protocols

Log Message:
regen from IANA 2022-09-28


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/etc/protocols

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

Modified files:

Index: src/etc/protocols
diff -u src/etc/protocols:1.31 src/etc/protocols:1.32
--- src/etc/protocols:1.31	Thu Apr  8 19:03:43 2021
+++ src/etc/protocols	Mon Nov 28 02:46:58 2022
@@ -1,8 +1,10 @@
-# $NetBSD: protocols,v 1.31 2021/04/08 19:03:43 christos Exp $
-# See also: protocols(5), http://www.sethwklein.net/projects/iana-etc/
+# $NetBSD: protocols,v 1.32 2022/11/28 02:46:58 jschauma Exp $
+# See also: protocols(5), https://www.iana.org/assignments/protocol-numbers/
 #
+#Protocol Numbers
+# 
 #Last Updated
-#2021-02-26
+#2022-09-28
 # 
 #Available Formats
 #[IMG]
@@ -50,7 +52,7 @@ igmp   2 IGMP # Internet
 ggp3 GGP  # Gateway-to-Gateway  [RFC823]
 ipv4   4 IPv4 # IPv4 encapsulation  [RFC2003]
 st 5 ST   # Stream  [RFC1190][RFC1819]
-tcp6 TCP  # Transmission Control[RFC793]
+tcp6 TCP  # Transmission Control[RFC9293]
 cbt7 CBT  # CBT [Tony_Ballardie]
 egp8 EGP  # Exterior Gateway Protocol   [RFC888][David_Mills]
 #   any private interior gateway
@@ -162,9 +164,9 @@ iso-ip80 ISO-IP   # ISO Inte
 vmtp  81 VMTP # VMTP[Dave_Cheriton]
 secure-vmtp   82 SECURE-VMTP  # SECURE-VMTP [Dave_Cheriton]
 vines 83 VINES# VINES   [Brian Horn]
-ttp   84 TTP iptm IPTM # Transaction Transport   [Jim_Stevens]
+ttp   84 TTP  # Transaction Transport   [Jim_Stevens]
 #   Protocol
-#iptm  84 IPTM # Internet Protocol Traffic   [Jim_Stevens]
+iptm  84 IPTM # Internet Protocol Traffic   [Jim_Stevens]
 #   Manager
 nsfnet-igp85 NSFNET-IGP   # NSFNET-IGP  [Hans_Werner_Braun]
 dgp   86 DGP  # Dissimilar Gateway Protocol [M/A-COM Government Systems, "Dissimilar Gateway Protocol Specification,
@@ -205,7 +207,7 @@ ipcomp   108 IPComp   # IP Paylo
 snp  109 SNP  # Sitara Networks Protocol[Manickam_R_Sridhar]
 compaq-peer  110 Compaq-Peer  # Compaq Peer Protocol[Victor_Volpe]
 ipx-in-ip111 IPX-in-IP# IPX in IP   [CJ_Lee]
-vrrp 112 VRRP carp# Virtual Router Redundancy   [RFC5798]
+vrrp 112 VRRP # Virtual Router Redundancy   [RFC5798]
 #   Protocol
 pgm  113 PGM  # PGM Reliable Transport  [Tony_Speakman]
 #   Protocol
@@ -238,16 +240,16 @@ rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # [R
 mobility 135 Mobility # Header   Y[RFC6275]
 udplite  136 UDPLite  # [RFC3828]
 mpls-in-ip   137 MPLS-in-IP   # [RFC4023]
-manet138 MANET# MANET Protocols [RFC5498]
+manet138 manet# MANET Protocols [RFC5498]
 hip  139 HIP  # Host Identity Protocol Y[RFC7401]
 shim6140 Shim6# Shim6 Protocol Y[RFC5533]
 wesp 141 WESP # Wrapped Encapsulating   [RFC5840]
 #   Security Payload
 rohc 142 ROHC # Robust Header Compression   [RFC5858]
 ethernet 143 Ethernet # Ethernet[RFC8986]
-#144-252Unassigned  [Internet_Assigned_Numbers_Authority]
-pfsync   240 PFSYNC   # PF Synchronization
-#241-252Unassigned  [Internet_Assigned_Numbers_Authority]
+aggfrag  144 AGGFRAG  # AGGFRAG encapsulation   [RFC-ietf-ipsecme-iptfs-19]
+#   payload for ESP
+#145-252Unassigned  

CVS commit: src/etc

2022-11-27 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Mon Nov 28 02:46:58 UTC 2022

Modified Files:
src/etc: protocols

Log Message:
regen from IANA 2022-09-28


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/etc/protocols

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



CVS commit: src/lib/libc/stdlib

2022-11-27 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Nov 27 20:17:20 UTC 2022

Modified Files:
src/lib/libc/stdlib: reallocarray.3

Log Message:
reallocarray.3: minor grammar and style tweaks


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdlib/reallocarray.3

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

Modified files:

Index: src/lib/libc/stdlib/reallocarray.3
diff -u src/lib/libc/stdlib/reallocarray.3:1.5 src/lib/libc/stdlib/reallocarray.3:1.6
--- src/lib/libc/stdlib/reallocarray.3:1.5	Fri Oct 28 09:43:59 2022
+++ src/lib/libc/stdlib/reallocarray.3	Sun Nov 27 20:17:20 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: reallocarray.3,v 1.5 2022/10/28 09:43:59 wiz Exp $
+.\" $NetBSD: reallocarray.3,v 1.6 2022/11/27 20:17:20 gutteridge Exp $
 .\"
 .\" Copyright (c) 2015 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -104,19 +104,19 @@ functions by centralizing the overflow c
 and
 .Fa size .
 .Pp
-There are still portability issues (it does not solve
-the
+There are still portability issues.
+(It does not solve the
 .Dv 0
 sized allocation return ambiguity in the C standard: does
 .Fn reallocarray
 return
 .Dv NULL
-or a unique pointer to memory that cannot be accessed? Does a
+or a unique pointer to memory that cannot be accessed?
+Does a
 .Dv NULL
 mean that an error occurred, and can someone check
 .Dv errno
-in that case to find out what happened?).
-.Pp
+in that case to find out what happened?)
 For this reason
 .Nx
 decided to go with an alternative implementation, and created



CVS commit: src/lib/libc/stdlib

2022-11-27 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Sun Nov 27 20:17:20 UTC 2022

Modified Files:
src/lib/libc/stdlib: reallocarray.3

Log Message:
reallocarray.3: minor grammar and style tweaks


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/stdlib/reallocarray.3

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/conf

2022-11-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Nov 27 14:54:25 UTC 2022

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

Log Message:
Bump MSGBUFSIZE to 32k; 4k just about overflows "by default" with qemu
and mipssim-virtio machine type.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 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.7 src/sys/arch/evbmips/conf/MIPSSIM:1.8
--- src/sys/arch/evbmips/conf/MIPSSIM:1.7	Tue Nov 15 14:49:14 2022
+++ src/sys/arch/evbmips/conf/MIPSSIM	Sun Nov 27 14:54:25 2022
@@ -1,4 +1,4 @@
-# $NetBSD: MIPSSIM,v 1.7 2022/11/15 14:49:14 simonb Exp $
+# $NetBSD: MIPSSIM,v 1.8 2022/11/27 14:54:25 he Exp $
 #
 # Kernel config for the QEMU MIPS "mipssim" simulator
 #
@@ -8,7 +8,7 @@
 
 include 	"arch/evbmips/conf/std.mipssim"
 
-#ident 		"GENERIC-$Revision: 1.7 $"
+#ident 		"GENERIC-$Revision: 1.8 $"
 
 maxusers	32
 
@@ -25,6 +25,8 @@ options 	TCP_CSUM_COUNTERS
 options 	UDP_CSUM_COUNTERS
 options 	TCP_OUTPUT_COUNTERS
 
+options 	MSGBUFSIZE=32768 # need a bit more than 4K for virtio qemu
+
 options 	NTP		# network time protocol
 
 # Debugging options



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

2022-11-27 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Sun Nov 27 14:54:25 UTC 2022

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

Log Message:
Bump MSGBUFSIZE to 32k; 4k just about overflows "by default" with qemu
and mipssim-virtio machine type.


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