CVS commit: src/crypto/external/bsd/netpgp/dist/src/lib

2021-07-28 Thread Jason High
Module Name:src
Committed By:   jhigh
Date:   Wed Jul 28 22:31:45 UTC 2021

Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: packet-print.c
packet-show.c

Log Message:
print Issuer Fingerprint subpacket 33 (rfc4880bis-08:5.2.3.28) rather than 
Unknown


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 \
src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c
cvs rdiff -u -r1.21 -r1.22 \
src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c

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

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c:1.42 src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c:1.43
--- src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c:1.42	Wed Feb 22 06:29:40 2012
+++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c	Wed Jul 28 22:31:45 2021
@@ -58,7 +58,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: packet-print.c,v 1.42 2012/02/22 06:29:40 agc Exp $");
+__RCSID("$NetBSD: packet-print.c,v 1.43 2021/07/28 22:31:45 jhigh Exp $");
 #endif
 
 #include 
@@ -1090,6 +1090,14 @@ pgp_print_packet(pgp_printstate_t *print
 		end_subpacket(>indent);
 		break;
 
+	case PGP_PTAG_SS_ISSUER_FINGERPRINT:
+		start_subpacket(>indent, pkt->tag);
+		print_hexdump(print->indent, "Issuer Fingerprint",
+			  content->ss_issuer_fingerprint.fingerprint, 
+			  content->ss_issuer_fingerprint.len);
+		end_subpacket(>indent);
+		break;
+
 	case PGP_PTAG_SS_PREFERRED_SKA:
 		start_subpacket(>indent, pkt->tag);
 		print_data(print->indent, "Preferred Symmetric Algorithms",

Index: src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.21 src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.22
--- src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c:1.21	Sun Aug 14 11:19:51 2011
+++ src/crypto/external/bsd/netpgp/dist/src/lib/packet-show.c	Wed Jul 28 22:31:45 2021
@@ -60,7 +60,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: packet-show.c,v 1.21 2011/08/14 11:19:51 christos Exp $");
+__RCSID("$NetBSD: packet-show.c,v 1.22 2021/07/28 22:31:45 jhigh Exp $");
 #endif
 
 #include 
@@ -115,6 +115,7 @@ static pgp_map_t packet_tag_map[] =
 	{PGP_PTAG_SS_PREFERRED_SKA, "SS: Preferred Secret Key Algorithm"},
 	{PGP_PTAG_SS_REVOCATION_KEY, "SS: Revocation Key"},
 	{PGP_PTAG_SS_ISSUER_KEY_ID, "SS: Issuer Key Id"},
+	{PGP_PTAG_SS_ISSUER_FINGERPRINT, "SS: Issuer Fingerprint"},
 	{PGP_PTAG_SS_NOTATION_DATA, "SS: Notation Data"},
 	{PGP_PTAG_SS_PREFERRED_HASH, "SS: Preferred Hash Algorithm"},
 	{PGP_PTAG_SS_PREF_COMPRESS, "SS: Preferred Compression Algorithm"},
@@ -164,6 +165,7 @@ static pgp_map_t ss_type_map[] =
 	{PGP_PTAG_SS_PREFERRED_SKA, "Preferred Symmetric Algorithms"},
 	{PGP_PTAG_SS_REVOCATION_KEY, "Revocation Key"},
 	{PGP_PTAG_SS_ISSUER_KEY_ID, "Issuer key ID"},
+	{PGP_PTAG_SS_ISSUER_FINGERPRINT, "Issuer Fingerprint"},
 	{PGP_PTAG_SS_NOTATION_DATA, "Notation Data"},
 	{PGP_PTAG_SS_PREFERRED_HASH, "Preferred Hash Algorithms"},
 	{PGP_PTAG_SS_PREF_COMPRESS, "Preferred Compression Algorithms"},



CVS commit: src/sys/arch/xen/xen

2021-07-28 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Jul 28 22:17:49 UTC 2021

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
fix off-by-one check in another KASSERT() for bcount

still related to PR port-xen/56328


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.98 src/sys/arch/xen/xen/xbdback_xenbus.c:1.99
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.98	Wed Jul 28 21:38:50 2021
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Jul 28 22:17:49 2021
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.99 2021/07/28 22:17:49 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.99 2021/07/28 22:17:49 jdolecek Exp $");
 
 #include 
 #include 
@@ -1311,7 +1311,7 @@ xbdback_co_io_gotio(struct xbdback_insta
 
 	KASSERT(bcount <= MAXPHYS);
 	KASSERT(xbd_io->xio_start_offset < PAGE_SIZE);
-	KASSERT(bcount + xbd_io->xio_start_offset < VBD_VA_SIZE);
+	KASSERT(bcount + xbd_io->xio_start_offset <= VBD_VA_SIZE);
 
 	/* Fill-in the buf */
 	if (xbdi->xbdi_xen_req.operation == BLKIF_OP_WRITE) {



CVS commit: src/sys/arch/xen/xen

2021-07-28 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Wed Jul 28 21:38:50 UTC 2021

Modified Files:
src/sys/arch/xen/xen: xbdback_xenbus.c

Log Message:
fix intentional, but eventually faulty off-by-one for the maximum number
of segments for I/O - this was supposed to allow MAXPHYS-size I/O even
with page offset, but actually ended up letting through I/O up to
MAXPHYS+PAGE_SIZE

the KASSERT(bcount < MAXPHYS) is kept as-is, since at that place the number
of segments should already be validated, so it's kernel bug if the size
is still too big there

fixes PR port-xen/56328 by Greg Oster


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c
diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.97 src/sys/arch/xen/xen/xbdback_xenbus.c:1.98
--- src/sys/arch/xen/xen/xbdback_xenbus.c:1.97	Sun Feb 21 20:02:25 2021
+++ src/sys/arch/xen/xen/xbdback_xenbus.c	Wed Jul 28 21:38:50 2021
@@ -1,4 +1,4 @@
-/*  $NetBSD: xbdback_xenbus.c,v 1.97 2021/02/21 20:02:25 jdolecek Exp $  */
+/*  $NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.97 2021/02/21 20:02:25 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.98 2021/07/28 21:38:50 jdolecek Exp $");
 
 #include 
 #include 
@@ -71,8 +71,7 @@ __KERNEL_RCSID(0, "$NetBSD: xbdback_xenb
 #define VBD_BSIZE 512
 #define VBD_MAXSECT ((PAGE_SIZE / VBD_BSIZE) - 1)
 
-/* Need to alloc one extra page to account for possible mapping offset */
-#define VBD_VA_SIZE	(MAXPHYS + PAGE_SIZE)
+#define VBD_VA_SIZE			MAXPHYS
 #define VBD_MAX_INDIRECT_SEGMENTS	VBD_VA_SIZE >> PAGE_SHIFT
 
 CTASSERT(XENSHM_MAX_PAGES_PER_REQUEST >= VBD_MAX_INDIRECT_SEGMENTS);



CVS commit: [netbsd-9] src/doc

2021-07-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul 28 15:00:31 UTC 2021

Modified Files:
src/doc [netbsd-9]: CHANGES-9.3

Log Message:
tickets 132[45]


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.17 -r1.1.2.18 src/doc/CHANGES-9.3

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

Modified files:

Index: src/doc/CHANGES-9.3
diff -u src/doc/CHANGES-9.3:1.1.2.17 src/doc/CHANGES-9.3:1.1.2.18
--- src/doc/CHANGES-9.3:1.1.2.17	Wed Jul 14 18:05:25 2021
+++ src/doc/CHANGES-9.3	Wed Jul 28 15:00:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.3,v 1.1.2.17 2021/07/14 18:05:25 martin Exp $
+# $NetBSD: CHANGES-9.3,v 1.1.2.18 2021/07/28 15:00:31 snj Exp $
 
 A complete list of changes from the NetBSD 9.2 release to the NetBSD 9.3
 release:
@@ -376,3 +376,14 @@ sys/arch/hp300/stand/common/rd.c		1.11
 	hp300: various rd(4) improvements.
 	[tsutsui, ticket #1323]
 
+sys/arch/arm/rockchip/rk_anxdp.c		1.4
+
+	Fix display init on Pinebook Pro w/ U-Boot 2021.07.
+	[jmcneill, ticket #1324]
+
+sys/dev/audio/audio.c1.105
+
+	AUDIO_SETINFO: fix a bug that the gain and the balance could
+	not be set at the same time.  PR kern/56308.
+	[isaki, ticket #1325]
+



CVS commit: [netbsd-9] src/sys/dev/audio

2021-07-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul 28 14:59:02 UTC 2021

Modified Files:
src/sys/dev/audio [netbsd-9]: audio.c

Log Message:
Pull up following revision(s) (requested by isaki in ticket #1325):
sys/dev/audio/audio.c: revision 1.105
AUDIO_SETINFO: fix a bug that the gain and the balance could not be set
at the same time.  Fix PR kern/56308.


To generate a diff of this commit:
cvs rdiff -u -r1.28.2.22 -r1.28.2.23 src/sys/dev/audio/audio.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/audio/audio.c
diff -u src/sys/dev/audio/audio.c:1.28.2.22 src/sys/dev/audio/audio.c:1.28.2.23
--- src/sys/dev/audio/audio.c:1.28.2.22	Wed May  5 17:01:41 2021
+++ src/sys/dev/audio/audio.c	Wed Jul 28 14:59:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.28.2.22 2021/05/05 17:01:41 martin Exp $	*/
+/*	$NetBSD: audio.c,v 1.28.2.23 2021/07/28 14:59:02 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -138,7 +138,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.22 2021/05/05 17:01:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.28.2.23 2021/07/28 14:59:02 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -7381,59 +7381,46 @@ audio_hw_setinfo(struct audio_softc *sc,
 		}
 	}
 
-	/* Backup play.{gain,balance} */
+	/* play.{gain,balance} */
 	if (SPECIFIED(newpi->gain) || SPECIFIED_CH(newpi->balance)) {
 		au_get_gain(sc, >sc_outports, , );
 		if (oldai) {
 			oldpi->gain = pgain;
 			oldpi->balance = pbalance;
 		}
+
+		if (SPECIFIED(newpi->gain))
+			pgain = newpi->gain;
+		if (SPECIFIED_CH(newpi->balance))
+			pbalance = newpi->balance;
+		error = au_set_gain(sc, >sc_outports, pgain, pbalance);
+		if (error) {
+			audio_printf(sc,
+			"setting play.gain=%d/balance=%d failed: "
+			"errno=%d\n",
+			pgain, pbalance, error);
+			goto abort;
+		}
 	}
-	/* Backup record.{gain,balance} */
+
+	/* record.{gain,balance} */
 	if (SPECIFIED(newri->gain) || SPECIFIED_CH(newri->balance)) {
 		au_get_gain(sc, >sc_inports, , );
 		if (oldai) {
 			oldri->gain = rgain;
 			oldri->balance = rbalance;
 		}
-	}
-	if (SPECIFIED(newpi->gain)) {
-		error = au_set_gain(sc, >sc_outports,
-		newpi->gain, pbalance);
-		if (error) {
-			audio_printf(sc,
-			"setting play.gain=%d failed: errno=%d\n",
-			newpi->gain, error);
-			goto abort;
-		}
-	}
-	if (SPECIFIED(newri->gain)) {
-		error = au_set_gain(sc, >sc_inports,
-		newri->gain, rbalance);
-		if (error) {
-			audio_printf(sc,
-			"setting record.gain=%d failed: errno=%d\n",
-			newri->gain, error);
-			goto abort;
-		}
-	}
-	if (SPECIFIED_CH(newpi->balance)) {
-		error = au_set_gain(sc, >sc_outports,
-		pgain, newpi->balance);
-		if (error) {
-			audio_printf(sc,
-			"setting play.balance=%d failed: errno=%d\n",
-			newpi->balance, error);
-			goto abort;
-		}
-	}
-	if (SPECIFIED_CH(newri->balance)) {
-		error = au_set_gain(sc, >sc_inports,
-		rgain, newri->balance);
+
+		if (SPECIFIED(newri->gain))
+			rgain = newri->gain;
+		if (SPECIFIED_CH(newri->balance))
+			rbalance = newri->balance;
+		error = au_set_gain(sc, >sc_inports, rgain, rbalance);
 		if (error) {
 			audio_printf(sc,
-			"setting record.balance=%d failed: errno=%d\n",
-			newri->balance, error);
+			"setting record.gain=%d/balance=%d failed: "
+			"errno=%d\n",
+			rgain, rbalance, error);
 			goto abort;
 		}
 	}



CVS commit: [netbsd-9] src/sys/arch/arm/rockchip

2021-07-28 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul 28 14:56:35 UTC 2021

Modified Files:
src/sys/arch/arm/rockchip [netbsd-9]: rk_anxdp.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1324):
sys/arch/arm/rockchip/rk_anxdp.c: revision 1.4
rockchip: edp: Force VOPB as CRTC for eDP.
Fixes display init on Pinebook Pro w/ U-Boot 2021.07.


To generate a diff of this commit:
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/sys/arch/arm/rockchip/rk_anxdp.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/arm/rockchip/rk_anxdp.c
diff -u src/sys/arch/arm/rockchip/rk_anxdp.c:1.2.4.2 src/sys/arch/arm/rockchip/rk_anxdp.c:1.2.4.3
--- src/sys/arch/arm/rockchip/rk_anxdp.c:1.2.4.2	Tue Jan 21 10:39:59 2020
+++ src/sys/arch/arm/rockchip/rk_anxdp.c	Wed Jul 28 14:56:35 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_anxdp.c,v 1.2.4.2 2020/01/21 10:39:59 martin Exp $ */
+/* $NetBSD: rk_anxdp.c,v 1.2.4.3 2021/07/28 14:56:35 snj Exp $ */
 
 /*-
  * Copyright (c) 2019 Jonathan A. Kollasch 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rk_anxdp.c,v 1.2.4.2 2020/01/21 10:39:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_anxdp.c,v 1.2.4.3 2021/07/28 14:56:35 snj Exp $");
 
 #include 
 #include 
@@ -172,7 +172,7 @@ rk_anxdp_ep_activate(device_t dev, struc
 		break;
 	}
 
-	sc->sc_encoder.possible_crtcs = 0x3; /* XXX */
+	sc->sc_encoder.possible_crtcs = 0x2; /* VOPB only */
 	drm_encoder_init(crtc->dev, >sc_encoder, _anxdp_encoder_funcs,
 	DRM_MODE_ENCODER_TMDS);
 	drm_encoder_helper_add(>sc_encoder, _anxdp_encoder_helper_funcs);



CVS commit: src/share/man/man7

2021-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 28 11:32:21 UTC 2021

Modified Files:
src/share/man/man7: sysctl.7

Log Message:
Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.153 -r1.154 src/share/man/man7/sysctl.7

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

Modified files:

Index: src/share/man/man7/sysctl.7
diff -u src/share/man/man7/sysctl.7:1.153 src/share/man/man7/sysctl.7:1.154
--- src/share/man/man7/sysctl.7:1.153	Tue Jul 27 09:32:55 2021
+++ src/share/man/man7/sysctl.7	Wed Jul 28 11:32:21 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sysctl.7,v 1.153 2021/07/27 09:32:55 manu Exp $
+.\"	$NetBSD: sysctl.7,v 1.154 2021/07/28 11:32:21 wiz Exp $
 .\"
 .\" Copyright (c) 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -756,10 +756,10 @@ Memory Mapped Files Option is available 
 otherwise\ 0.
 .It Li kern.maxfiles ( Dv KERN_MAXFILES )
 The maximum number of open files that may be open in the system.
-This also controls the maximum file locks per unprivilegied user 
+This also controls the maximum file locks per unprivileged user
 enforced by
-.Xr fnctl 2
-and 
+.Xr fcntl 2
+and
 .Xr flock 2 .
 .It Li kern.maxpartitions ( Dv KERN_MAXPARTITIONS )
 The maximum number of partitions allowed per disk.



CVS commit: src/lib/libc/sys

2021-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 28 11:31:07 UTC 2021

Modified Files:
src/lib/libc/sys: flock.2

Log Message:
Fix typos, improve wording.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/lib/libc/sys/flock.2

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/sys/flock.2
diff -u src/lib/libc/sys/flock.2:1.23 src/lib/libc/sys/flock.2:1.24
--- src/lib/libc/sys/flock.2:1.23	Tue Jul 27 09:32:55 2021
+++ src/lib/libc/sys/flock.2	Wed Jul 28 11:31:06 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: flock.2,v 1.23 2021/07/27 09:32:55 manu Exp $
+.\"	$NetBSD: flock.2,v 1.24 2021/07/28 11:31:06 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -138,9 +138,11 @@ does not include exactly one of
 or
 .Dv LOCK_UN .
 .It Bq Eq ENOMEM
-The file lock limit for the current unprivilegied user 
-has been reached. It can be modifed using sysctl
-.Li kern.maxfiles .
+The file lock limit for the current unprivileged user
+has been reached.
+It can be modified using the
+.Li kern.maxfiles
+.Xr sysctl 7 .
 .It Bq Er EOPNOTSUPP
 The argument
 .Fa fd



CVS commit: src/lib/libc/sys

2021-07-28 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Wed Jul 28 11:29:59 UTC 2021

Modified Files:
src/lib/libc/sys: fcntl.2

Log Message:
Fix typos, improve wording.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/sys/fcntl.2

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/sys/fcntl.2
diff -u src/lib/libc/sys/fcntl.2:1.46 src/lib/libc/sys/fcntl.2:1.47
--- src/lib/libc/sys/fcntl.2:1.46	Tue Jul 27 09:32:55 2021
+++ src/lib/libc/sys/fcntl.2	Wed Jul 28 11:29:59 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: fcntl.2,v 1.46 2021/07/27 09:32:55 manu Exp $
+.\"	$NetBSD: fcntl.2,v 1.47 2021/07/28 11:29:59 wiz Exp $
 .\"
 .\" Copyright (c) 1983, 1993
 .\"	The Regents of the University of California.  All rights reserved.
@@ -557,9 +557,11 @@ is
 .Dv F_SETLK ,
 or
 .Dv F_SETLKW ,
-and the file lock limit for the current unprivilegied user
-has been reached. It can be modifed using sysctl
-.Li kern.maxfiles .
+and the file lock limit for the current unprivileged user
+has been reached.
+It can be modified using the
+.Li kern.maxfiles
+.Xr sysctl 7 .
 .It Bq Er ERANGE
 The argument
 .Fa cmd



CVS commit: src/common/lib/libc/arch/arm/atomic

2021-07-28 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Wed Jul 28 08:01:10 UTC 2021

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_op_asm.h

Log Message:
#define consistency.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h

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

Modified files:

Index: src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h
diff -u src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h:1.9 src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h:1.10
--- src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h:1.9	Wed Jul 28 07:32:20 2021
+++ src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h	Wed Jul 28 08:01:10 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: atomic_op_asm.h,v 1.9 2021/07/28 07:32:20 skrll Exp $	*/
+/*	$NetBSD: atomic_op_asm.h,v 1.10 2021/07/28 08:01:10 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -75,11 +75,11 @@
 #endif
 
 #ifdef _ARM_ARCH_7
-#define DMB	dmb	ish
+#define	DMB	dmb	ish
 #define	DMBST	dmb	ishst
 #else
-#define DMB	mcr	p15, 0, r0, c7, c10, 5	/* Data Memory Barrier */
-#define DMBST	DMB
+#define	DMB	mcr	p15, 0, r0, c7, c10, 5	/* Data Memory Barrier */
+#define	DMBST	DMB
 #endif
 
 #endif /* _ATOMIC_OP_ASM_H_ */



CVS commit: src/common/lib/libc/arch/arm/atomic

2021-07-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Wed Jul 28 07:32:20 UTC 2021

Modified Files:
src/common/lib/libc/arch/arm/atomic: atomic_add_16.S atomic_add_32.S
atomic_add_64.S atomic_add_8.S atomic_and_16.S atomic_and_32.S
atomic_and_64.S atomic_and_8.S atomic_cas_16.S atomic_cas_32.S
atomic_cas_64.S atomic_cas_8.S atomic_dec_32.S atomic_dec_64.S
atomic_inc_32.S atomic_inc_64.S atomic_nand_16.S atomic_nand_32.S
atomic_nand_64.S atomic_nand_8.S atomic_op_asm.h atomic_or_16.S
atomic_or_32.S atomic_or_64.S atomic_or_8.S atomic_sub_64.S
atomic_swap.S atomic_swap_16.S atomic_swap_64.S atomic_xor_16.S
atomic_xor_32.S atomic_xor_64.S atomic_xor_8.S membar_ops.S
sync_bool_compare_and_swap_1.S sync_bool_compare_and_swap_2.S
sync_bool_compare_and_swap_4.S sync_bool_compare_and_swap_8.S
sync_fetch_and_add_8.S sync_fetch_and_and_8.S
sync_fetch_and_nand_8.S sync_fetch_and_or_8.S
sync_fetch_and_sub_8.S sync_fetch_and_xor_8.S

Log Message:
Remove memory barriers from the atomic_ops(3) atomic operations.  They're
not needed for correctness.

Add the correct memory barriers to the gcc legacy __sync built-in
functions for atomic memory access.  From the gcc documentation:

In most cases, these built-in functions are considered a full barrier.
That is, no memory operand is moved across the operation, either forward
or backward. Further, instructions are issued as necessary to prevent the
processor from speculating loads across the operation and from queuing
stores after the operation.

type __sync_lock_test_and_set (type *ptr, type value, ...)

   This built-in function is not a full barrier, but rather an acquire
   barrier. This means that references after the operation cannot move to
   (or be speculated to) before the operation, but previous memory stores
   may not be globally visible yet, and previous memory loads may not yet
   be satisfied.

void __sync_lock_release (type *ptr, ...)

   This built-in function is not a full barrier, but rather a release
   barrier. This means that all previous memory stores are globally
   visible, and all previous memory loads have been satisfied, but
   following memory reads are not prevented from being speculated to
   before the barrier.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/common/lib/libc/arch/arm/atomic/atomic_add_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_add_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_sub_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_8.S \
src/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_8.S
cvs rdiff -u -r1.9 -r1.10 src/common/lib/libc/arch/arm/atomic/atomic_add_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_and_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_32.S
cvs rdiff -u -r1.13 -r1.14 \
src/common/lib/libc/arch/arm/atomic/atomic_add_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_or_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_swap_64.S
cvs rdiff -u -r1.12 -r1.13 \
src/common/lib/libc/arch/arm/atomic/atomic_and_64.S
cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/arm/atomic/atomic_cas_16.S
cvs rdiff -u -r1.7 -r1.8 src/common/lib/libc/arch/arm/atomic/atomic_cas_32.S
cvs rdiff -u -r1.11 -r1.12 \
src/common/lib/libc/arch/arm/atomic/atomic_cas_64.S
cvs rdiff -u -r1.8 -r1.9 src/common/lib/libc/arch/arm/atomic/atomic_cas_8.S \
src/common/lib/libc/arch/arm/atomic/atomic_dec_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_inc_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_op_asm.h \
src/common/lib/libc/arch/arm/atomic/membar_ops.S
cvs rdiff -u -r1.6 -r1.7 src/common/lib/libc/arch/arm/atomic/atomic_dec_32.S \
src/common/lib/libc/arch/arm/atomic/atomic_nand_64.S \
src/common/lib/libc/arch/arm/atomic/atomic_swap_16.S \
src/common/lib/libc/arch/arm/atomic/atomic_xor_64.S
cvs rdiff -u -r1.10 -r1.11 \
src/common/lib/libc/arch/arm/atomic/atomic_inc_64.S
cvs rdiff -u -r1.18 -r1.19 src/common/lib/libc/arch/arm/atomic/atomic_swap.S
cvs rdiff -u -r1.3 -r1.4 \
src/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_1.S \
src/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_2.S \
src/common/lib/libc/arch/arm/atomic/sync_bool_compare_and_swap_4.S
cvs rdiff -u -r1.5 -r1.6 \