CVS commit: src/sys/arch

2023-12-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Dec 31 04:20:40 UTC 2023

Modified Files:
src/sys/arch/m68k/include: float.h
src/sys/arch/x86/include: float.h

Log Message:
{x86,m68k}/float.h: document LDBL_MIN behavior

It seems that even though both these platforms have 12-byte floats
that are pretty much the same representation and both allegedly
IEEE-compliant, they manifest the top bit of the mantissa and then
differ slightly in the behavior of the extra encodings this permits.

Thanks to riastradh@ for helping sort this out.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/m68k/include/float.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/include/float.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/m68k/include/float.h
diff -u src/sys/arch/m68k/include/float.h:1.21 src/sys/arch/m68k/include/float.h:1.22
--- src/sys/arch/m68k/include/float.h:1.21	Tue Mar 18 18:20:41 2014
+++ src/sys/arch/m68k/include/float.h	Sun Dec 31 04:20:40 2023
@@ -1,8 +1,31 @@
-/*	$NetBSD: float.h,v 1.21 2014/03/18 18:20:41 riastradh Exp $	*/
+/*	$NetBSD: float.h,v 1.22 2023/12/31 04:20:40 dholland Exp $	*/
 
 #ifndef _M68K_FLOAT_H_
 #define _M68K_FLOAT_H_
 
+/*
+ * LDBL_MIN is half the x86 LDBL_MIN, even though both are 12-byte
+ * floats with the same base properties and both allegedly
+ * IEEE-compliant, because both these representations materialize the
+ * top (integer-part) bit of the mantissa. But on m68k if the exponent
+ * is 0 and the integer bit is set, it's a regular number, whereas on
+ * x86 it's called a pseudo-denormal and apparently treated as a
+ * denormal, so it doesn't count as a valid value for LDBL_MIN.
+ *
+ * x86 citation: Intel 64 and IA-32 Architectures Software Developer's
+ * Manual, vol. 1 (Order Number: 253665-077US, April 2022), Sec. 8.2.2
+ * `Unsupported Double Extended-Precision Floating-Point Encodings
+ * and Pseudo-Denormals', p. 8-14.
+ *
+ * m86k citation: MC68881/MC68882 Floating-Point Coprocessor User's
+ * Manual, Second Edition (Prentice-Hall, 1989, apparently issued by
+ * Freescale), Section 3.2 `Binary Real Data formats', pg. 3-3 bottom
+ * in particular and pp. 3-2 to 3-5 in general.
+ *
+ * If anyone needs to update this comment please make sure the copy in
+ * m68k/float.h also gets updated.
+ */
+
 #if defined(__LDBL_MANT_DIG__)
 #define LDBL_MANT_DIG	__LDBL_MANT_DIG__
 #define LDBL_EPSILON	__LDBL_EPSILON__

Index: src/sys/arch/x86/include/float.h
diff -u src/sys/arch/x86/include/float.h:1.6 src/sys/arch/x86/include/float.h:1.7
--- src/sys/arch/x86/include/float.h:1.6	Sat Apr 27 21:35:25 2013
+++ src/sys/arch/x86/include/float.h	Sun Dec 31 04:20:40 2023
@@ -1,10 +1,33 @@
-/*	$NetBSD: float.h,v 1.6 2013/04/27 21:35:25 joerg Exp $	*/
+/*	$NetBSD: float.h,v 1.7 2023/12/31 04:20:40 dholland Exp $	*/
 
 #ifndef _X86_FLOAT_H_
 #define _X86_FLOAT_H_
 
 #include 
 
+/*
+ * LDBL_MIN is twice the m68k LDBL_MIN, even though both are 12-byte
+ * floats with the same base properties and both allegedly
+ * IEEE-compliant, because both these representations materialize the
+ * top (integer-part) bit of the mantissa. But on m68k if the exponent
+ * is 0 and the integer bit is set, it's a regular number, whereas on
+ * x86 it's called a pseudo-denormal and apparently treated as a
+ * denormal, so it doesn't count as a valid value for LDBL_MIN.
+ *
+ * x86 citation: Intel 64 and IA-32 Architectures Software Developer's
+ * Manual, vol. 1 (Order Number: 253665-077US, April 2022), Sec. 8.2.2
+ * `Unsupported Double Extended-Precision Floating-Point Encodings
+ * and Pseudo-Denormals', p. 8-14.
+ *
+ * m86k citation: MC68881/MC68882 Floating-Point Coprocessor User's
+ * Manual, Second Edition (Prentice-Hall, 1989, apparently issued by
+ * Freescale), Section 3.2 `Binary Real Data formats', pg. 3-3 bottom
+ * in particular and pp. 3-2 to 3-5 in general.
+ *
+ * If anyone needs to update this comment please make sure the copy in
+ * x86/float.h also gets updated.
+ */
+
 #define	LDBL_MANT_DIG	64
 #define LDBL_EPSILON	1.0842021724855044340E-19L
 #define LDBL_DIG	18



CVS commit: src/sys/arch

2023-12-30 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Dec 31 04:20:40 UTC 2023

Modified Files:
src/sys/arch/m68k/include: float.h
src/sys/arch/x86/include: float.h

Log Message:
{x86,m68k}/float.h: document LDBL_MIN behavior

It seems that even though both these platforms have 12-byte floats
that are pretty much the same representation and both allegedly
IEEE-compliant, they manifest the top bit of the mantissa and then
differ slightly in the behavior of the extra encodings this permits.

Thanks to riastradh@ for helping sort this out.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/m68k/include/float.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/include/float.h

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



CVS commit: src/etc

2023-12-30 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Dec 31 03:57:48 UTC 2023

Modified Files:
src/etc: newsyslog.conf

Log Message:
newsyslog.conf: collate npflog0.pcap properly


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/etc/newsyslog.conf

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

Modified files:

Index: src/etc/newsyslog.conf
diff -u src/etc/newsyslog.conf:1.24 src/etc/newsyslog.conf:1.25
--- src/etc/newsyslog.conf:1.24	Thu May 16 20:12:35 2019
+++ src/etc/newsyslog.conf	Sun Dec 31 03:57:48 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: newsyslog.conf,v 1.24 2019/05/16 20:12:35 nakayama Exp $
+#	$NetBSD: newsyslog.conf,v 1.25 2023/12/31 03:57:48 uwe Exp $
 #
 # Configuration file for newsyslog(8).
 #
@@ -8,9 +8,9 @@
 /var/log/cron		root:wheel	600  3100  *Z
 /var/log/kerberos.log			640  7*24   ZN
 /var/log/lpd-errs			640  7100  *Z
-/var/log/npflog0.pcap			600  7100  *ZB /var/run/npfd.pid
 /var/log/maillog			600  7*24   Z
 /var/log/messages			644  10   250  *Z
+/var/log/npflog0.pcap			600  7100  *ZB /var/run/npfd.pid
 /var/log/wtmp		root:utmp	664  7*168  ZBN
 /var/log/wtmpx		root:utmp	664  7*168  ZBN
 /var/log/xferlog			640  7250  *Z



CVS commit: src/etc

2023-12-30 Thread Valery Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Dec 31 03:57:48 UTC 2023

Modified Files:
src/etc: newsyslog.conf

Log Message:
newsyslog.conf: collate npflog0.pcap properly


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/etc/newsyslog.conf

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



CVS commit: src/sys/dev/ic

2023-12-30 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Dec 31 03:19:22 UTC 2023

Modified Files:
src/sys/dev/ic: rtl80x9.c

Log Message:
ne(4): Write CR0 properly.
Writing 0b000 to RD2-0 in CR0 appears harmless, but it is "not allowed"
by the RTL8019AS (and several NE2000 derived) datasheets.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/rtl80x9.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/ic/rtl80x9.c
diff -u src/sys/dev/ic/rtl80x9.c:1.18 src/sys/dev/ic/rtl80x9.c:1.19
--- src/sys/dev/ic/rtl80x9.c:1.18	Thu Apr 25 10:44:52 2019
+++ src/sys/dev/ic/rtl80x9.c	Sun Dec 31 03:19:22 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl80x9.c,v 1.18 2019/04/25 10:44:52 msaitoh Exp $	*/
+/*	$NetBSD: rtl80x9.c,v 1.19 2023/12/31 03:19:22 isaki Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.18 2019/04/25 10:44:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl80x9.c,v 1.19 2023/12/31 03:19:22 isaki Exp $");
 
 #include 
 #include 
@@ -170,7 +170,8 @@ rtl80x9_media_init(struct dp8390_softc *
 	aprint_normal_dev(sc->sc_dev,
 	"10base2, 10baseT, 10baseT-FDX, auto, default ");
 
-	bus_space_write_1(sc->sc_regt, sc->sc_regh, ED_P0_CR, ED_CR_PAGE_3);
+	bus_space_write_1(sc->sc_regt, sc->sc_regh, ED_P0_CR,
+	sc->cr_proto | ED_CR_PAGE_3);
 
 	conf2 = bus_space_read_1(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG2);
 	conf3 = bus_space_read_1(sc->sc_regt, sc->sc_regh, NERTL_RTL3_CONFIG3);
@@ -201,7 +202,8 @@ rtl80x9_media_init(struct dp8390_softc *
 		break;
 	}
 
-	bus_space_write_1(sc->sc_regt, sc->sc_regh, ED_P0_CR, ED_CR_PAGE_0);
+	bus_space_write_1(sc->sc_regt, sc->sc_regh, ED_P0_CR,
+	sc->cr_proto | ED_CR_PAGE_0);
 
 	ifmedia_init(>sc_media, 0, dp8390_mediachange, dp8390_mediastatus);
 	for (i = 0; i < rtl80x9_nmedia; i++)



CVS commit: src/sys/dev/ic

2023-12-30 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Dec 31 03:19:22 UTC 2023

Modified Files:
src/sys/dev/ic: rtl80x9.c

Log Message:
ne(4): Write CR0 properly.
Writing 0b000 to RD2-0 in CR0 appears harmless, but it is "not allowed"
by the RTL8019AS (and several NE2000 derived) datasheets.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/rtl80x9.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/alpha/alpha

2023-12-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 30 23:07:42 UTC 2023

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

Log Message:
pmap_bootstrap(): When initializing the L2 PTEs, don't use l2pte_index(),
as it is designed to wrap from 1023->0 during the normal course of use.
However, when setting up the initial kernel page tables, if we have a
large enough config that we end up with more than L2 PT page, we rely
on being able to index > 1023 into the adjacent PT pages to initialize
those entries.

Fixes a MM fault panic during early boot on larger memory configs
(reported by Dave McGuire with an 8GB ES40 and John Klos with a 12GB
DS25).  I've successfully booted at 16GB config in Qemu with this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/alpha/alpha/pmap.c

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

Modified files:

Index: src/sys/arch/alpha/alpha/pmap.c
diff -u src/sys/arch/alpha/alpha/pmap.c:1.307 src/sys/arch/alpha/alpha/pmap.c:1.308
--- src/sys/arch/alpha/alpha/pmap.c:1.307	Sat Apr  9 23:38:31 2022
+++ src/sys/arch/alpha/alpha/pmap.c	Sat Dec 30 23:07:42 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $ */
+/* $NetBSD: pmap.c,v 1.308 2023/12/30 23:07:42 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008, 2020
@@ -135,7 +135,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.307 2022/04/09 23:38:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.308 2023/12/30 23:07:42 thorpej Exp $");
 
 #include 
 #include 
@@ -1204,13 +1204,15 @@ static bool	vtophys_internal(vaddr_t, pa
 	l1pte_ = pmap_l1pte(kernel_lev1map, va);			\
 	if (pmap_pte_v(l1pte_) == 0) {	\
 		printf("kernel level 1 PTE not valid, va 0x%lx "	\
-		"(line %d)\n", (va), __LINE__);			\
+		"(line %d) pte=%p *pte=0x%016lx\n", (va), __LINE__,	\
+		l1pte_, *l1pte_);	\
 		panic("PMAP_KERNEL_PTE");\
 	}\
 	l2pte_ = pmap_l2pte(kernel_lev1map, va, l1pte_);		\
 	if (pmap_pte_v(l2pte_) == 0) {	\
 		printf("kernel level 2 PTE not valid, va 0x%lx "	\
-		"(line %d)\n", (va), __LINE__);			\
+		"(line %d) pte=%p *pte=0x%016lx\n", (va), __LINE__,	\
+		l2pte_, *l2pte_);	\
 		panic("PMAP_KERNEL_PTE");\
 	}\
 	pmap_l3pte(kernel_lev1map, va, l2pte_);\
@@ -1358,8 +1360,19 @@ pmap_bootstrap(paddr_t ptaddr, u_int max
 		pte = (ALPHA_K0SEG_TO_PHYS(((vaddr_t)lev3map) +
 		(i*PAGE_SIZE)) >> PGSHIFT) << PG_SHIFT;
 		pte |= PG_V | PG_ASM | PG_KRE | PG_KWE | PG_WIRED;
-		lev2map[l2pte_index(VM_MIN_KERNEL_ADDRESS+
-		(i*PAGE_SIZE*NPTEPG))] = pte;
+		/*
+		 * No need to use l2pte_index() here; it's equivalent
+		 * to just indexing with our loop variable i, but will
+		 * fall over if we end up with more than 1 L2 PT page.
+		 *
+		 * In other words:
+		 *
+		 *	l2pte_index(VM_MIN_KERNEL_ADDRESS +
+		 *	(i*PAGE_SIZE*NPTEPG))
+		 *
+		 * ...is the same as 'i' so long as i stays below 1024.
+		 */
+		lev2map[i] = pte;
 	}
 
 	/* Initialize the pmap_growkernel_lock. */



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

2023-12-30 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Dec 30 23:07:42 UTC 2023

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

Log Message:
pmap_bootstrap(): When initializing the L2 PTEs, don't use l2pte_index(),
as it is designed to wrap from 1023->0 during the normal course of use.
However, when setting up the initial kernel page tables, if we have a
large enough config that we end up with more than L2 PT page, we rely
on being able to index > 1023 into the adjacent PT pages to initialize
those entries.

Fixes a MM fault panic during early boot on larger memory configs
(reported by Dave McGuire with an 8GB ES40 and John Klos with a 12GB
DS25).  I've successfully booted at 16GB config in Qemu with this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/sys/arch/alpha/alpha/pmap.c

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



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 22:44:22 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: expr_promote.exp-ln
expr_promote_trad.exp-ln

Log Message:
tests/lint: add spaces to expected files, for better readability


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln \
src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln
diff -u src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln:1.3 src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln:1.4
--- src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln:1.3	Wed Jan  4 05:47:19 2023
+++ src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln	Sat Dec 30 22:44:22 2023
@@ -1,5 +1,5 @@
-0sexpr_promote.c
-Sexpr_promote.c
-10d0.10e4sinkF2PcCEV
-59c0.59i4sinkf20PcCBIIuILuLQuQDDlDsXXlXeT331.0.0V
-37d0.37d6callerF1PsT116arithmetic_typesV
+0 s expr_promote.c
+S expr_promote.c
+10 d 0.10 e 4sink F2 PcC E V
+59 c 0.59 i 4sink f20 PcC B I I I I I I uI L uL Q uQ D D lD sX X lX eT3 31.0.0 V
+37 d 0.37 d 6caller F1 PsT1 16arithmetic_types V
Index: src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln
diff -u src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln:1.3 src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln:1.4
--- src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln:1.3	Wed Jan  4 05:47:19 2023
+++ src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln	Sat Dec 30 22:44:22 2023
@@ -1,5 +1,5 @@
-0sexpr_promote_trad.c
-Sexpr_promote_trad.c
-10d0.10e4sinkFI
-50c0.50s1""i4sinkf12PCIuIIuIIuILuLDDeT330.0.0I
-35d0.35do6callerf1PsT116arithmetic_typesI
+0 s expr_promote_trad.c
+S expr_promote_trad.c
+10 d 0.10 e 4sink F I
+50 c 0.50 s1"" i 4sink f12 PC I uI I uI I uI L uL D D eT3 30.0.0 I
+35 d 0.35 do 6caller f1 PsT1 16arithmetic_types I



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 22:44:22 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: expr_promote.exp-ln
expr_promote_trad.exp-ln

Log Message:
tests/lint: add spaces to expected files, for better readability


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/expr_promote.exp-ln \
src/tests/usr.bin/xlint/lint1/expr_promote_trad.exp-ln

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



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

2023-12-30 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Dec 30 21:46:52 UTC 2023

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

Log Message:
xennetback_xenbus.c: Nix trailing whitespace again.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/xen/xen/xennetback_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/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.124 src/sys/arch/xen/xen/xennetback_xenbus.c:1.125
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.124	Fri Dec 22 10:22:00 2023
+++ src/sys/arch/xen/xen/xennetback_xenbus.c	Sat Dec 30 21:46:52 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: xennetback_xenbus.c,v 1.124 2023/12/22 10:22:00 bouyer Exp $  */
+/*  $NetBSD: xennetback_xenbus.c,v 1.125 2023/12/30 21:46:52 riastradh Exp $  */
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.124 2023/12/22 10:22:00 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.125 2023/12/30 21:46:52 riastradh Exp $");
 
 #include 
 #include 
@@ -794,7 +794,7 @@ xennetback_tx_m0len_fragment(struct xnet
 			return -1;
 		if (RING_REQUEST_CONS_OVERFLOW(>xni_txring, req_cons))
 			return -1;
-			
+
 		m0_len -= txreq->size;
 		req_cons++;
 		(*cntp)++;



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

2023-12-30 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Dec 30 21:46:52 UTC 2023

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

Log Message:
xennetback_xenbus.c: Nix trailing whitespace again.

No functional change intended.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/xen/xen/xennetback_xenbus.c

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



CVS commit: [netbsd-10] src/doc

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:35:09 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #521 - #524


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.180 -r1.1.2.181 src/doc/CHANGES-10.0

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-10.0
diff -u src/doc/CHANGES-10.0:1.1.2.180 src/doc/CHANGES-10.0:1.1.2.181
--- src/doc/CHANGES-10.0:1.1.2.180	Fri Dec 29 20:43:17 2023
+++ src/doc/CHANGES-10.0	Sat Dec 30 19:35:09 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.0,v 1.1.2.180 2023/12/29 20:43:17 martin Exp $
+# $NetBSD: CHANGES-10.0,v 1.1.2.181 2023/12/30 19:35:09 martin Exp $
 
 A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16
 until the 10.0 release:
@@ -15005,3 +15005,26 @@ doc/3RDPARTY	1.1972 (patch)
 	Update tzdata to 2023d.
 	[kre, ticket #520]
 
+distrib/sets/lists/debug/module.md.i386		1.8
+distrib/sets/lists/modules/md.i386		1.97
+sys/modules/Makefile1.281
+
+	PR 57793: do not build and install the (legacy) radeondrm module.
+	[pgoyette, ticket #521]
+
+usr.sbin/makefs/msdos.c1.22
+
+	makefs(8): PR 57752: return a proper exit status on failure
+	on creating msdosfs.
+	[tsutsui, ticket #522]
+
+sbin/iscsid/iscsid_driverif.c			1.10
+
+	iscsid(8): treat port 0 (unset) as ISCSI_DEFAULT_PORT like before.
+	[mlelstv, ticket #523]
+
+sys/stand/efiboot/efinet.c			1.7,1.8
+
+	efiboot: fix PXE boot on some UEFI implementations.
+	[rin, ticket #524]
+



CVS commit: [netbsd-10] src/doc

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:35:09 UTC 2023

Modified Files:
src/doc [netbsd-10]: CHANGES-10.0

Log Message:
Tickets #521 - #524


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.180 -r1.1.2.181 src/doc/CHANGES-10.0

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



CVS commit: [netbsd-10] src/sys/stand/efiboot

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:33:25 UTC 2023

Modified Files:
src/sys/stand/efiboot [netbsd-10]: efinet.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #524):

sys/stand/efiboot/efinet.c: revision 1.7
sys/stand/efiboot/efinet.c: revision 1.8

MI efiboot: Stop using efi_bootdp after exclusive open for PXE

Once boot device is exclusively opened for Simple Network Protocol,
further access via device path (efi_bootdp) is illegal.

For some implementations, boot device path gets corrupted by
exclusive open, and subsequent access by efi_device_path_depth(),
e.g., causes infinite recursion.

Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions.
Thanks yamaguchi@ for comments and tests.

MI efiboot: efi_net_probe: Examine Messaging Device Path also
Network devices can be found as Hardware or Messaging Device Paths,
see Sec 10.4.4 of UEFI Spec 2.10.

In addition to Hardware Device Path, try Messaging Device Path also.

This fixes PXE boot on implementations with the latter choice, e.g.,
Raspberry Pi 4 UEFI firmware.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.32.1 src/sys/stand/efiboot/efinet.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/stand/efiboot/efinet.c
diff -u src/sys/stand/efiboot/efinet.c:1.6 src/sys/stand/efiboot/efinet.c:1.6.32.1
--- src/sys/stand/efiboot/efinet.c:1.6	Sun Mar 31 22:24:41 2019
+++ src/sys/stand/efiboot/efinet.c	Sat Dec 30 19:33:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: efinet.c,v 1.6 2019/03/31 22:24:41 jmcneill Exp $	*/
+/*	$NetBSD: efinet.c,v 1.6.32.1 2023/12/30 19:33:25 martin Exp $	*/
 
 /*-
  * Copyright (c) 2001 Doug Rabson
@@ -333,7 +333,7 @@ efi_net_probe(void)
 	EFI_STATUS status;
 	UINTN i, nhandles;
 	int nifs, depth = -1;
-	bool found;
+	bool found, is_bootdp;
 
 	status = LibLocateHandle(ByProtocol, , NULL,
 	, );
@@ -346,7 +346,15 @@ efi_net_probe(void)
 	memset(enis, 0, nhandles * sizeof(*enis));
 
 	if (efi_bootdp) {
+		/*
+		 * Either Hardware or Messaging Device Paths can be used
+		 * here, see Sec 10.4.4 of UEFI Spec 2.10. Try both.
+		 */
 		depth = efi_device_path_depth(efi_bootdp, HARDWARE_DEVICE_PATH);
+		if (depth == -1) {
+			depth = efi_device_path_depth(efi_bootdp,
+			MESSAGING_DEVICE_PATH);
+		}
 		if (depth == 0)
 			depth = 1;
 	}
@@ -369,6 +377,9 @@ efi_net_probe(void)
 		if (!found)
 			continue;
 
+		is_bootdp = depth > 0 &&
+		efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0;
+
 		status = uefi_call_wrapper(BS->OpenProtocol, 6, handles[i],
 		, (void **), IH, NULL,
 		EFI_OPEN_PROTOCOL_EXCLUSIVE);
@@ -396,10 +407,21 @@ efi_net_probe(void)
 			return;
 		}
 
-		if (depth > 0 && efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0) {
+		if (is_bootdp) {
+			/*
+			 * This is boot device...
+			 */
 			char devname[9];
+
 			snprintf(devname, sizeof(devname), "net%u", nifs);
 			set_default_device(devname);
+
+			/*
+			 * and now opened for us excluively. Therefore,
+			 * access via device path is illegal.
+			 */
+			efi_bootdp = NULL;
+			depth = -1;
 		}
 
 		nifs++;



CVS commit: [netbsd-10] src/sys/stand/efiboot

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:33:25 UTC 2023

Modified Files:
src/sys/stand/efiboot [netbsd-10]: efinet.c

Log Message:
Pull up following revision(s) (requested by rin in ticket #524):

sys/stand/efiboot/efinet.c: revision 1.7
sys/stand/efiboot/efinet.c: revision 1.8

MI efiboot: Stop using efi_bootdp after exclusive open for PXE

Once boot device is exclusively opened for Simple Network Protocol,
further access via device path (efi_bootdp) is illegal.

For some implementations, boot device path gets corrupted by
exclusive open, and subsequent access by efi_device_path_depth(),
e.g., causes infinite recursion.

Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions.
Thanks yamaguchi@ for comments and tests.

MI efiboot: efi_net_probe: Examine Messaging Device Path also
Network devices can be found as Hardware or Messaging Device Paths,
see Sec 10.4.4 of UEFI Spec 2.10.

In addition to Hardware Device Path, try Messaging Device Path also.

This fixes PXE boot on implementations with the latter choice, e.g.,
Raspberry Pi 4 UEFI firmware.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.32.1 src/sys/stand/efiboot/efinet.c

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



CVS commit: [netbsd-10] src/sbin/iscsid

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:21:29 UTC 2023

Modified Files:
src/sbin/iscsid [netbsd-10]: iscsid_driverif.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #523):

sbin/iscsid/iscsid_driverif.c: revision 1.10

Treat port 0 (unset) as ISCSI_DEFAULT_PORT like before.


To generate a diff of this commit:
cvs rdiff -u -r1.8.26.1 -r1.8.26.2 src/sbin/iscsid/iscsid_driverif.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/iscsid/iscsid_driverif.c
diff -u src/sbin/iscsid/iscsid_driverif.c:1.8.26.1 src/sbin/iscsid/iscsid_driverif.c:1.8.26.2
--- src/sbin/iscsid/iscsid_driverif.c:1.8.26.1	Mon Dec 18 14:12:35 2023
+++ src/sbin/iscsid/iscsid_driverif.c	Sat Dec 30 19:21:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsid_driverif.c,v 1.8.26.1 2023/12/18 14:12:35 martin Exp $	*/
+/*	$NetBSD: iscsid_driverif.c,v 1.8.26.2 2023/12/30 19:21:29 martin Exp $	*/
 
 /*-
  * Copyright (c) 2005,2006,2011 The NetBSD Foundation, Inc.
@@ -285,7 +285,8 @@ make_connection(session_t * sess, iscsid
 	memset(, 0, sizeof(hints));
 	hints.ai_family = AF_UNSPEC;
 	hints.ai_socktype = SOCK_STREAM;
-	snprintf(portnum, sizeof(portnum), "%u", addr->port);
+	snprintf(portnum, sizeof(portnum), "%u", addr->port
+	? addr->port : ISCSI_DEFAULT_PORT);
 	ret = getaddrinfo((char *)addr->address, portnum, , );
 	switch (ret) {
 	case 0:
@@ -553,7 +554,8 @@ event_recover_connection(uint32_t sid, u
 	memset(, 0, sizeof(hints));
 	hints.ai_family = AF_UNSPEC;
 	hints.ai_socktype = SOCK_STREAM;
-	snprintf(portnum, sizeof(portnum), "%u", addr->port);
+	snprintf(portnum, sizeof(portnum), "%u", addr->port
+	? addr->port : ISCSI_DEFAULT_PORT);
 	ret = getaddrinfo((char *)addr->address, portnum, , );
 	if (ret) {
 		DEB(1, ("getaddrinfo failed (%s)", gai_strerror(ret)));



CVS commit: [netbsd-10] src/sbin/iscsid

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:21:29 UTC 2023

Modified Files:
src/sbin/iscsid [netbsd-10]: iscsid_driverif.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #523):

sbin/iscsid/iscsid_driverif.c: revision 1.10

Treat port 0 (unset) as ISCSI_DEFAULT_PORT like before.


To generate a diff of this commit:
cvs rdiff -u -r1.8.26.1 -r1.8.26.2 src/sbin/iscsid/iscsid_driverif.c

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



CVS commit: [netbsd-8] src/doc

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:19:01 UTC 2023

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

Log Message:
Ticket #1928


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

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



CVS commit: [netbsd-9] src/doc

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:18:26 UTC 2023

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

Log Message:
Tickets #1781 - #1783


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/doc

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:18:26 UTC 2023

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

Log Message:
Tickets #1781 - #1783


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-9.4

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.4
diff -u src/doc/CHANGES-9.4:1.1.2.122 src/doc/CHANGES-9.4:1.1.2.123
--- src/doc/CHANGES-9.4:1.1.2.122	Mon Dec 25 12:58:57 2023
+++ src/doc/CHANGES-9.4	Sat Dec 30 19:18:25 2023
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.122 2023/12/25 12:58:57 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.123 2023/12/30 19:18:25 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -3987,3 +3987,49 @@ doc/3RDPARTY	(apply patch)
 	postfix(1): update to 3.8.4.
 	[kim, ticket #1779]
 
+external/bsd/blocklist/bin/blocklistd.c		1.4
+	(applied to external/bsd/blacklist/bin/blacklistd.c)
+
+	blacklistd(8): PR 57767: fix firewall ids on restart of the daemon.
+	[kim, ticket #1781]
+
+external/public-domain/tz/dist/checknow.awk up to 1.1.1.1
+external/public-domain/tz/dist/zonenow.tab  up to 1.1.1.1
+external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.8
+external/public-domain/tz/dist/Makefile up to 1.1.1.37
+external/public-domain/tz/dist/NEWS up to 1.1.1.44
+external/public-domain/tz/dist/README   up to 1.1.1.11
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.36
+external/public-domain/tz/dist/africa   up to 1.1.1.32
+external/public-domain/tz/dist/antarctica   up to 1.1.1.18
+external/public-domain/tz/dist/asia up to 1.11
+external/public-domain/tz/dist/australasia  up to 1.8
+external/public-domain/tz/dist/backward up to 1.11
+external/public-domain/tz/dist/backzone up to 1.1.1.27
+external/public-domain/tz/dist/checklinks.awk   up to 1.1.1.4
+external/public-domain/tz/dist/checktab.awk up to 1.1.1.13
+external/public-domain/tz/dist/etcetera up to 1.1.1.7
+external/public-domain/tz/dist/europe   up to 1.1.1.38
+external/public-domain/tz/dist/iso3166.tab  up to 1.1.1.9
+external/public-domain/tz/dist/leap-seconds.list up to 1.6
+external/public-domain/tz/dist/leapseconds  up to 1.6
+external/public-domain/tz/dist/leapseconds.awk  up to 1.1.1.13
+external/public-domain/tz/dist/northamerica up to 1.1.1.34
+external/public-domain/tz/dist/southamerica up to 1.1.1.24
+external/public-domain/tz/dist/theory.html  up to 1.1.1.18
+external/public-domain/tz/dist/version  up to 1.11
+external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.10
+external/public-domain/tz/dist/zone.tab up to 1.1.1.26
+external/public-domain/tz/dist/zone1970.tab up to 1.1.1.27
+distrib/sets/lists/base/mi			(apply patch)
+doc/3RDPARTY	(apply patch)
+
+	Update tzdata to 2023d.
+	[kre, ticket #1782]
+
+usr.sbin/makefs/msdos.c1.22
+
+	makefs(8): PR 57752: return a proper exit status on failure
+	on creating msdosfs.
+	[tsutsui, ticket #1783]
+



CVS commit: [netbsd-9] src/usr.sbin/makefs

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:17:07 UTC 2023

Modified Files:
src/usr.sbin/makefs [netbsd-9]: msdos.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1783):

usr.sbin/makefs/msdos.c: revision 1.22

Return a proper exit status on failure on creating msdosfs.

No particular comment in PR bin/57752.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.14.1 src/usr.sbin/makefs/msdos.c

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



CVS commit: [netbsd-9] src/usr.sbin/makefs

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:17:07 UTC 2023

Modified Files:
src/usr.sbin/makefs [netbsd-9]: msdos.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1783):

usr.sbin/makefs/msdos.c: revision 1.22

Return a proper exit status on failure on creating msdosfs.

No particular comment in PR bin/57752.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.20.14.1 src/usr.sbin/makefs/msdos.c

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

Modified files:

Index: src/usr.sbin/makefs/msdos.c
diff -u src/usr.sbin/makefs/msdos.c:1.20 src/usr.sbin/makefs/msdos.c:1.20.14.1
--- src/usr.sbin/makefs/msdos.c:1.20	Fri Apr 14 15:40:35 2017
+++ src/usr.sbin/makefs/msdos.c	Sat Dec 30 19:17:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdos.c,v 1.20 2017/04/14 15:40:35 christos Exp $	*/
+/*	$NetBSD: msdos.c,v 1.20.14.1 2023/12/30 19:17:06 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: msdos.c,v 1.20 2017/04/14 15:40:35 christos Exp $");
+__RCSID("$NetBSD: msdos.c,v 1.20.14.1 2023/12/30 19:17:06 martin Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -177,7 +177,7 @@ msdos_makefs(const char *image, const ch
 	printf("Creating `%s'\n", image);
 	TIMER_START(start);
 	if (mkfs_msdos(image, NULL, _opt->options) == -1)
-		return;
+		errx(1, "Image file `%s' not created.", image);
 	TIMER_RESULTS(start, "mkfs_msdos");
 
 	fsopts->fd = open(image, O_RDWR);
@@ -201,7 +201,7 @@ msdos_makefs(const char *image, const ch
 	printf("Populating `%s'\n", image);
 	TIMER_START(start);
 	if (msdos_populate_dir(dir, VTODE(), root, root, fsopts) == -1)
-		errx(1, "Image file `%s' not created.", image);
+		errx(1, "Image file `%s' not populated.", image);
 	TIMER_RESULTS(start, "msdos_populate_dir");
 
 	if (debug & DEBUG_FS_MAKEFS)



CVS commit: [netbsd-10] src/usr.sbin/makefs

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:15:59 UTC 2023

Modified Files:
src/usr.sbin/makefs [netbsd-10]: msdos.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #522):

usr.sbin/makefs/msdos.c: revision 1.22

Return a proper exit status on failure on creating msdosfs.

No particular comment in PR bin/57752.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.2.1 src/usr.sbin/makefs/msdos.c

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

Modified files:

Index: src/usr.sbin/makefs/msdos.c
diff -u src/usr.sbin/makefs/msdos.c:1.21 src/usr.sbin/makefs/msdos.c:1.21.2.1
--- src/usr.sbin/makefs/msdos.c:1.21	Sat Apr  9 10:05:35 2022
+++ src/usr.sbin/makefs/msdos.c	Sat Dec 30 19:15:59 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msdos.c,v 1.21 2022/04/09 10:05:35 riastradh Exp $	*/
+/*	$NetBSD: msdos.c,v 1.21.2.1 2023/12/30 19:15:59 martin Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: msdos.c,v 1.21 2022/04/09 10:05:35 riastradh Exp $");
+__RCSID("$NetBSD: msdos.c,v 1.21.2.1 2023/12/30 19:15:59 martin Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -177,7 +177,7 @@ msdos_makefs(const char *image, const ch
 	printf("Creating `%s'\n", image);
 	TIMER_START(start);
 	if (mkfs_msdos(image, NULL, _opt->options) == -1)
-		return;
+		errx(1, "Image file `%s' not created.", image);
 	TIMER_RESULTS(start, "mkfs_msdos");
 
 	fsopts->fd = open(image, O_RDWR);
@@ -201,7 +201,7 @@ msdos_makefs(const char *image, const ch
 	printf("Populating `%s'\n", image);
 	TIMER_START(start);
 	if (msdos_populate_dir(dir, VTODE(), root, root, fsopts) == -1)
-		errx(1, "Image file `%s' not created.", image);
+		errx(1, "Image file `%s' not populated.", image);
 	TIMER_RESULTS(start, "msdos_populate_dir");
 
 	if (debug & DEBUG_FS_MAKEFS)



CVS commit: [netbsd-10] src/usr.sbin/makefs

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:15:59 UTC 2023

Modified Files:
src/usr.sbin/makefs [netbsd-10]: msdos.c

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #522):

usr.sbin/makefs/msdos.c: revision 1.22

Return a proper exit status on failure on creating msdosfs.

No particular comment in PR bin/57752.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.2.1 src/usr.sbin/makefs/msdos.c

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



CVS commit: [netbsd-10] src

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:13:50 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-10]: module.md.i386
src/distrib/sets/lists/modules [netbsd-10]: md.i386
src/sys/modules [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #521):

distrib/sets/lists/debug/module.md.i386: revision 1.8
sys/modules/Makefile: revision 1.281
distrib/sets/lists/modules/md.i386: revision 1.97

Unhook radeondrm module from the build; it doesn't work, and
it's just tempting someone to try it.  Leave the files around
in case someone wants to pursue making this work.

Should address kern/57793

XXX Related modules from the same legacy era should probably be
XXX removed, too, but so far only radeondrm has been reported
XXX as an issue.  Kep an eye out for sisdrm, savagedrm, tdfxdrm,
XXX and r128drm.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.2.1 src/distrib/sets/lists/debug/module.md.i386
cvs rdiff -u -r1.96 -r1.96.2.1 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.274.2.1 -r1.274.2.2 src/sys/modules/Makefile

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

Modified files:

Index: src/distrib/sets/lists/debug/module.md.i386
diff -u src/distrib/sets/lists/debug/module.md.i386:1.7 src/distrib/sets/lists/debug/module.md.i386:1.7.2.1
--- src/distrib/sets/lists/debug/module.md.i386:1.7	Thu Jul 28 22:00:23 2022
+++ src/distrib/sets/lists/debug/module.md.i386	Sat Dec 30 19:13:50 2023
@@ -1,4 +1,4 @@
-# $NetBSD: module.md.i386,v 1.7 2022/07/28 22:00:23 riastradh Exp $
+# $NetBSD: module.md.i386,v 1.7.2.1 2023/12/30 19:13:50 martin Exp $
 ./usr/libdata/debug/@MODULEDIR@/acpiacadmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpiacad/acpiacad.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/acpibatmodules-base-kernel	kmod,debug
@@ -149,8 +149,8 @@
 ./usr/libdata/debug/@MODULEDIR@/pwdog/pwdog.kmod.debug			modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/r128drmmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/r128drm/r128drm.kmod.debug		modules-base-kernel	kmod,debug
-./usr/libdata/debug/@MODULEDIR@/radeondrmmodules-base-kernel	kmod,debug
-./usr/libdata/debug/@MODULEDIR@/radeondrm/radeondrm.kmod.debug		modules-base-kernel	kmod,debug
+./usr/libdata/debug/@MODULEDIR@/radeondrmbase-obsolete	obsolete
+./usr/libdata/debug/@MODULEDIR@/radeondrm/radeondrm.kmod.debug		base-obsolete	obsolete
 ./usr/libdata/debug/@MODULEDIR@/savagedrmmodules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/savagedrm/savagedrm.kmod.debug		modules-base-kernel	kmod,debug
 ./usr/libdata/debug/@MODULEDIR@/sisdrmmodules-base-kernel	kmod,debug

Index: src/distrib/sets/lists/modules/md.i386
diff -u src/distrib/sets/lists/modules/md.i386:1.96 src/distrib/sets/lists/modules/md.i386:1.96.2.1
--- src/distrib/sets/lists/modules/md.i386:1.96	Wed Sep  7 11:37:25 2022
+++ src/distrib/sets/lists/modules/md.i386	Sat Dec 30 19:13:50 2023
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.96 2022/09/07 11:37:25 martin Exp $
+# $NetBSD: md.i386,v 1.96.2.1 2023/12/30 19:13:50 martin Exp $
 #
 ./@MODULEDIR@/acpiacadmodules-base-kernel	kmod
 ./@MODULEDIR@/acpiacad/acpiacad.kmod		modules-base-kernel	kmod
@@ -166,8 +166,8 @@
 ./@MODULEDIR@/pwdog/pwdog.kmod			modules-base-kernel	kmod
 ./@MODULEDIR@/r128drmmodules-base-kernel	kmod
 ./@MODULEDIR@/r128drm/r128drm.kmod		modules-base-kernel	kmod
-./@MODULEDIR@/radeondrmmodules-base-kernel	kmod
-./@MODULEDIR@/radeondrm/radeondrm.kmod		modules-base-kernel	kmod
+./@MODULEDIR@/radeondrmbase-obsolete		obsolete
+./@MODULEDIR@/radeondrm/radeondrm.kmod		base-obsolete		obsolete
 ./@MODULEDIR@/savagedrmmodules-base-kernel	kmod
 ./@MODULEDIR@/savagedrm/savagedrm.kmod		modules-base-kernel	kmod
 ./@MODULEDIR@/sisdrmmodules-base-kernel	kmod

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.274.2.1 src/sys/modules/Makefile:1.274.2.2
--- src/sys/modules/Makefile:1.274.2.1	Thu Aug 17 09:57:28 2023
+++ src/sys/modules/Makefile	Sat Dec 30 19:13:50 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.274.2.1 2023/08/17 09:57:28 martin Exp $
+#	$NetBSD: Makefile,v 1.274.2.2 2023/12/30 19:13:50 martin Exp $
 
 .include 
 
@@ -341,7 +341,7 @@ SUBDIR+=	mgadrm
 SUBDIR+=	nsclpcsio
 SUBDIR+=	padlock
 SUBDIR+=	r128drm
-SUBDIR+=	radeondrm
+#SUBDIR+=	radeondrm
 SUBDIR+=	savagedrm
 SUBDIR+=	sisdrm
 SUBDIR+=	tdfxdrm



CVS commit: [netbsd-10] src

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 19:13:50 UTC 2023

Modified Files:
src/distrib/sets/lists/debug [netbsd-10]: module.md.i386
src/distrib/sets/lists/modules [netbsd-10]: md.i386
src/sys/modules [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #521):

distrib/sets/lists/debug/module.md.i386: revision 1.8
sys/modules/Makefile: revision 1.281
distrib/sets/lists/modules/md.i386: revision 1.97

Unhook radeondrm module from the build; it doesn't work, and
it's just tempting someone to try it.  Leave the files around
in case someone wants to pursue making this work.

Should address kern/57793

XXX Related modules from the same legacy era should probably be
XXX removed, too, but so far only radeondrm has been reported
XXX as an issue.  Kep an eye out for sisdrm, savagedrm, tdfxdrm,
XXX and r128drm.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.2.1 src/distrib/sets/lists/debug/module.md.i386
cvs rdiff -u -r1.96 -r1.96.2.1 src/distrib/sets/lists/modules/md.i386
cvs rdiff -u -r1.274.2.1 -r1.274.2.2 src/sys/modules/Makefile

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



CVS commit: [netbsd-9] src/external/bsd/blacklist/bin

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 18:24:50 UTC 2023

Modified Files:
src/external/bsd/blacklist/bin [netbsd-9]: blacklistd.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1781):

external/bsd/blocklist/bin/blocklistd.c: revision 1.4
(applied to external/bsd/blacklist/bin/blacklistd.c)

PR/57767: Yoshitaka Tokugawa: When restoring, do so from a readonly copy
of the database and update the read-write copy with the new firewall ids.
Before we did not update the state file so it contained the old firewall ids.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.2.1 src/external/bsd/blacklist/bin/blacklistd.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/bsd/blacklist/bin/blacklistd.c
diff -u src/external/bsd/blacklist/bin/blacklistd.c:1.38 src/external/bsd/blacklist/bin/blacklistd.c:1.38.2.1
--- src/external/bsd/blacklist/bin/blacklistd.c:1.38	Wed Feb 27 02:20:18 2019
+++ src/external/bsd/blacklist/bin/blacklistd.c	Sat Dec 30 18:24:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $	*/
+/*	$NetBSD: blacklistd.c,v 1.38.2.1 2023/12/30 18:24:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "config.h"
 #endif
 #include 
-__RCSID("$NetBSD: blacklistd.c,v 1.38 2019/02/27 02:20:18 christos Exp $");
+__RCSID("$NetBSD: blacklistd.c,v 1.38.2.1 2023/12/30 18:24:50 martin Exp $");
 
 #include 
 #include 
@@ -387,15 +387,25 @@ rules_flush(void)
 static void
 rules_restore(void)
 {
+	DB *db;
 	struct conf c;
 	struct dbinfo dbi;
 	unsigned int f;
 
-	for (f = 1; state_iterate(state, , , f) == 1; f = 0) {
+	db = state_open(dbfile, O_RDONLY, 0);
+	if (db == NULL) {
+		(*lfun)(LOG_ERR, "Can't open `%s' to restore state (%m)",
+			dbfile);
+		return;
+	}
+	for (f = 1; state_iterate(db, , , f) == 1; f = 0) {
 		if (dbi.id[0] == '\0')
 			continue;
 		(void)run_change("add", , dbi.id, sizeof(dbi.id));
+		state_put(state, , );
 	}
+	state_close(db);
+	state_sync(state);
 }
 
 int



CVS commit: [netbsd-9] src/external/bsd/blacklist/bin

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 18:24:50 UTC 2023

Modified Files:
src/external/bsd/blacklist/bin [netbsd-9]: blacklistd.c

Log Message:
Pull up following revision(s) (requested by kim in ticket #1781):

external/bsd/blocklist/bin/blocklistd.c: revision 1.4
(applied to external/bsd/blacklist/bin/blacklistd.c)

PR/57767: Yoshitaka Tokugawa: When restoring, do so from a readonly copy
of the database and update the read-write copy with the new firewall ids.
Before we did not update the state file so it contained the old firewall ids.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.38.2.1 src/external/bsd/blacklist/bin/blacklistd.c

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



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 17:09:42 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c

Log Message:
tests/lint: sync comments in test for strict bool mode with reality


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.47 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.48
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.47	Sat Dec 30 15:37:27 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Sat Dec 30 17:09:42 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.47 2023/12/30 15:37:27 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.48 2023/12/30 17:09:42 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -59,14 +59,14 @@
  *
  * strict-bool-bitwise-and:
  *	Expressions of the form "flags & FLAG" are compatible with _Bool if
- *	the left operand has enum type, the right operand is an integer
- *	constant and the resulting value is used in a context where it is
- *	implicitly and immediately compared to zero.
+ *	the resulting value is used in a context where it is implicitly and
+ *	immediately compared to zero.
  *
  *	Note: An efficient implementation technique for a collection of bool
  *	flags is an enum.  The enum declaration groups the available
  *	constants, and as of 2020, compilers such as GCC and Clang have basic
- *	support for detecting type mismatches on enums.
+ *	support for detecting type mismatches on enums.  Another implementation
+ *	technique for bit sets is a plain integer.
  *
  *	Note: Examples for such contexts are controlling expressions or the
  *	operands of the operators '!', '&&', '||'.
@@ -795,14 +795,14 @@ strict_bool_operator_result(bool b)
 /*
  * strict-bool-bitwise-and:
  *	Expressions of the form "flags & FLAG" are compatible with _Bool if
- *	the left operand has enum type, the right operand is an integer
- *	constant and the resulting value is used in a context where it is
- *	implicitly and immediately compared to zero.
+ *	the resulting value is used in a context where it is implicitly and
+ *	immediately compared to zero.
  *
  *	Note: Examples for such contexts are controlling expressions or the
  *	operands of the operators '!', '&&', '||'.
  *
- *	Note: Counterexamples for contexts are assignments to a bool variable.
+ *	Note: Counterexamples for contexts are assignments to a bool variable,
+ *	as before C99, the conversion was defined differently.
  *
  *	Note: These rules ensure that conforming code can be compiled without
  *	change in behavior using old compilers that implement bool as an



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 17:09:42 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c

Log Message:
tests/lint: sync comments in test for strict bool mode with reality


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c

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



CVS commit: src

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:37:27 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
src/usr.bin/xlint/lint1: ckbool.c

Log Message:
lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type.  This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/xlint/lint1/ckbool.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.46 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.47
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.46	Sat Dec 30 15:18:57 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Sat Dec 30 15:37:27 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.46 2023/12/30 15:18:57 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.47 2023/12/30 15:37:27 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -858,7 +858,7 @@ strict_bool_bitwise_and_enum(enum Flags 
  * what would fit into an unsigned char).  Even if an enum could be extended
  * to larger types than int, this pattern would work.
  */
-void
+bool
 query_flag_from_enum_bit_set(enum Flags flags)
 {
 	if (flags & FLAG0)
@@ -878,12 +878,20 @@ query_flag_from_enum_bit_set(enum Flags 
 
 	if (flags & FLAG28)
 		println("FLAG28 is set");
+
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b0 = flags & FLAG0;
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b1 = flags & FLAG1;
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b28 = flags & FLAG28;
+	return b0 || b1 || b28;
 }
 
-void
+bool
 query_flag_from_int(int flags)
 {
-	/* expect+1: error: controlling expression must be bool, not 'int' [333] */
+
 	if (flags & FLAG0)
 		println("FLAG0 is set");
 
@@ -893,17 +901,22 @@ query_flag_from_int(int flags)
 	if ((flags & (FLAG0 | FLAG1)) == (FLAG0 | FLAG1))
 		println("FLAG0 and FLAG1 are both set");
 
-	/* expect+2: error: left operand of '&&' must be bool, not 'int' [331] */
-	/* expect+1: error: right operand of '&&' must be bool, not 'int' [332] */
 	if (flags & FLAG0 && flags & FLAG1)
 		println("FLAG0 and FLAG1 are both set");
 
 	if ((flags & (FLAG0 | FLAG1)) != 0)
 		println("At least one of FLAG0 and FLAG1 is set");
 
-	/* expect+1: error: controlling expression must be bool, not 'int' [333] */
 	if (flags & FLAG28)
 		println("FLAG28 is set");
+
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b0 = flags & FLAG0;
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b1 = flags & FLAG1;
+	/* expect+1: error: operands of 'init' have incompatible types '_Bool' and 'int' [107] */
+	bool b28 = flags & FLAG28;
+	return b0 || b1 || b28;
 }
 
 
@@ -989,10 +1002,10 @@ typedef struct stdio_file {
 int ferror(FILE *);
 FILE stdio_files[3];
 FILE *stdio_stdout;
-# 993 "d_c99_bool_strict.c" 2
+# 1006 "d_c99_bool_strict.c" 2
 # 1 "string.h" 1 3 4
 int strcmp(const char *, const char *);
-# 996 "d_c99_bool_strict.c" 2
+# 1009 "d_c99_bool_strict.c" 2
 
 void
 controlling_expression(FILE *f, const char *a, const char *b)
@@ -1026,9 +1039,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1030 "d_c99_bool_strict.c" 3 4
+# 1043 "d_c99_bool_strict.c" 3 4
 	_files[1]
-# 1032 "d_c99_bool_strict.c"
+# 1045 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1044,9 +1057,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1048 "d_c99_bool_strict.c" 3 4
+# 1061 "d_c99_bool_strict.c" 3 4
 	stdio_stdout
-# 1050 "d_c99_bool_strict.c"
+# 1063 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1059,9 +1072,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1063 "d_c99_bool_strict.c" 3 4
+# 1076 "d_c99_bool_strict.c" 3 4
 	(stdio_stdout)
-# 1065 "d_c99_bool_strict.c"
+# 1078 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1085,9 +1098,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1089 "d_c99_bool_strict.c" 3 4
+# 1102 "d_c99_bool_strict.c" 3 4
 	stdio_stdout /* comment */
-# 1091 "d_c99_bool_strict.c"
+# 1104 "d_c99_bool_strict.c"
 	))
 		return;
 

CVS commit: src

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:37:27 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c
src/usr.bin/xlint/lint1: ckbool.c

Log Message:
lint: in strict bool mode, allow 'a & b' in controlling expressions

Previously, the expression 'a & b' was only treated as bool if 'a' had
enum type.  This didn't cover cases in which bit masks were implemented
using integer types instead of enum sets.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/xlint/lint1/ckbool.c

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



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:18:57 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c

Log Message:
tests/lint: test '&' for non-enum types in strict bool mode


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c

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

Modified files:

Index: src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c
diff -u src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.45 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.46
--- src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c:1.45	Sun Dec 10 14:59:47 2023
+++ src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c	Sat Dec 30 15:18:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: d_c99_bool_strict.c,v 1.45 2023/12/10 14:59:47 rillig Exp $	*/
+/*	$NetBSD: d_c99_bool_strict.c,v 1.46 2023/12/30 15:18:57 rillig Exp $	*/
 # 3 "d_c99_bool_strict.c"
 
 /*
@@ -880,6 +880,32 @@ query_flag_from_enum_bit_set(enum Flags 
 		println("FLAG28 is set");
 }
 
+void
+query_flag_from_int(int flags)
+{
+	/* expect+1: error: controlling expression must be bool, not 'int' [333] */
+	if (flags & FLAG0)
+		println("FLAG0 is set");
+
+	if ((flags & FLAG1) != 0)
+		println("FLAG1 is set");
+
+	if ((flags & (FLAG0 | FLAG1)) == (FLAG0 | FLAG1))
+		println("FLAG0 and FLAG1 are both set");
+
+	/* expect+2: error: left operand of '&&' must be bool, not 'int' [331] */
+	/* expect+1: error: right operand of '&&' must be bool, not 'int' [332] */
+	if (flags & FLAG0 && flags & FLAG1)
+		println("FLAG0 and FLAG1 are both set");
+
+	if ((flags & (FLAG0 | FLAG1)) != 0)
+		println("At least one of FLAG0 and FLAG1 is set");
+
+	/* expect+1: error: controlling expression must be bool, not 'int' [333] */
+	if (flags & FLAG28)
+		println("FLAG28 is set");
+}
+
 
 void
 strict_bool_operator_eq_bool_int(void)
@@ -963,10 +989,10 @@ typedef struct stdio_file {
 int ferror(FILE *);
 FILE stdio_files[3];
 FILE *stdio_stdout;
-# 967 "d_c99_bool_strict.c" 2
+# 993 "d_c99_bool_strict.c" 2
 # 1 "string.h" 1 3 4
 int strcmp(const char *, const char *);
-# 970 "d_c99_bool_strict.c" 2
+# 996 "d_c99_bool_strict.c" 2
 
 void
 controlling_expression(FILE *f, const char *a, const char *b)
@@ -1000,9 +1026,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1004 "d_c99_bool_strict.c" 3 4
+# 1030 "d_c99_bool_strict.c" 3 4
 	_files[1]
-# 1006 "d_c99_bool_strict.c"
+# 1032 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1018,9 +1044,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1022 "d_c99_bool_strict.c" 3 4
+# 1048 "d_c99_bool_strict.c" 3 4
 	stdio_stdout
-# 1024 "d_c99_bool_strict.c"
+# 1050 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1033,9 +1059,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1037 "d_c99_bool_strict.c" 3 4
+# 1063 "d_c99_bool_strict.c" 3 4
 	(stdio_stdout)
-# 1039 "d_c99_bool_strict.c"
+# 1065 "d_c99_bool_strict.c"
 	))
 		return;
 
@@ -1059,9 +1085,9 @@ controlling_expression(FILE *f, const ch
 	 */
 	/* expect+5: error: controlling expression must be bool, not 'int' [333] */
 	if (ferror(
-# 1063 "d_c99_bool_strict.c" 3 4
+# 1089 "d_c99_bool_strict.c" 3 4
 	stdio_stdout /* comment */
-# 1065 "d_c99_bool_strict.c"
+# 1091 "d_c99_bool_strict.c"
 	))
 		return;
 }



CVS commit: src/tests/usr.bin/xlint/lint1

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:18:57 UTC 2023

Modified Files:
src/tests/usr.bin/xlint/lint1: d_c99_bool_strict.c

Log Message:
tests/lint: test '&' for non-enum types in strict bool mode


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/tests/usr.bin/xlint/lint1/d_c99_bool_strict.c

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



CVS commit: src/usr.bin/make

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:00:56 UTC 2023

Modified Files:
src/usr.bin/make: suff.c

Log Message:
make: clean up freeing of suffixes

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/make/suff.c

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

Modified files:

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.375 src/usr.bin/make/suff.c:1.376
--- src/usr.bin/make/suff.c:1.375	Sat Dec 30 13:28:06 2023
+++ src/usr.bin/make/suff.c	Sat Dec 30 15:00:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.375 2023/12/30 13:28:06 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.376 2023/12/30 15:00:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.375 2023/12/30 13:28:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.376 2023/12/30 15:00:56 rillig Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -364,7 +364,6 @@ SuffixList_Unref(SuffixList *list, Suffi
 	}
 }
 
-/* Free up all memory associated with the given suffix structure. */
 static void
 Suffix_Free(Suffix *suff)
 {
@@ -390,12 +389,6 @@ Suffix_Free(Suffix *suff)
 	free(suff);
 }
 
-static void
-SuffFree(void *p)
-{
-	Suffix_Free(p);
-}
-
 /* Remove the suffix from the list, and free if it is otherwise unused. */
 static void
 SuffixList_Remove(SuffixList *list, Suffix *suff)
@@ -405,7 +398,7 @@ SuffixList_Remove(SuffixList *list, Suff
 		/* XXX: can lead to suff->refCount == -1 */
 		SuffixList_Unref(, suff);
 		DEBUG1(SUFF, "Removing suffix \"%s\"\n", suff->name);
-		SuffFree(suff);
+		Suffix_Free(suff);
 	}
 }
 
@@ -482,7 +475,7 @@ Suff_ClearSuffixes(void)
 	Lst_Init();
 	sNum = 0;
 	if (nullSuff != NULL)
-		SuffFree(nullSuff);
+		Suffix_Free(nullSuff);
 	emptySuff = nullSuff = Suffix_New("");
 
 	SearchPath_AddAll(nullSuff->searchPath, );
@@ -2054,16 +2047,21 @@ Suff_Init(void)
 	Suff_ClearSuffixes();
 }
 
-
 /* Clean up the suffixes module. */
 void
 Suff_End(void)
 {
 #ifdef CLEANUP
-	Lst_DoneCall(, SuffFree);
-	Lst_DoneCall(, SuffFree);
+	SuffixListNode *ln;
+
+	for (ln = sufflist.first; ln != NULL; ln = ln->next)
+		Suffix_Free(ln->datum);
+	Lst_Done();
+	for (ln = suffClean.first; ln != NULL; ln = ln->next)
+		Suffix_Free(ln->datum);
+	Lst_Done();
 	if (nullSuff != NULL)
-		SuffFree(nullSuff);
+		Suffix_Free(nullSuff);
 	Lst_Done();
 #endif
 }



CVS commit: src/usr.bin/make

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 15:00:56 UTC 2023

Modified Files:
src/usr.bin/make: suff.c

Log Message:
make: clean up freeing of suffixes

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.375 -r1.376 src/usr.bin/make/suff.c

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



CVS commit: src/usr.bin/make

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 13:28:06 UTC 2023

Modified Files:
src/usr.bin/make: suff.c

Log Message:
make: remove unused field from suffix

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/make/suff.c

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

Modified files:

Index: src/usr.bin/make/suff.c
diff -u src/usr.bin/make/suff.c:1.374 src/usr.bin/make/suff.c:1.375
--- src/usr.bin/make/suff.c:1.374	Fri Dec 29 18:53:24 2023
+++ src/usr.bin/make/suff.c	Sat Dec 30 13:28:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: suff.c,v 1.374 2023/12/29 18:53:24 rillig Exp $	*/
+/*	$NetBSD: suff.c,v 1.375 2023/12/30 13:28:06 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -115,7 +115,7 @@
 #include "dir.h"
 
 /*	"@(#)suff.c	8.4 (Berkeley) 3/21/94"	*/
-MAKE_RCSID("$NetBSD: suff.c,v 1.374 2023/12/29 18:53:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: suff.c,v 1.375 2023/12/30 13:28:06 rillig Exp $");
 
 typedef List SuffixList;
 typedef ListNode SuffixListNode;
@@ -142,8 +142,6 @@ static GNodeList transforms = LST_INIT;
  */
 static int sNum = 0;
 
-typedef List SuffixListList;
-
 /*
  * A suffix such as ".c" or ".o" that may be used in suffix transformation
  * rules such as ".c.o:".
@@ -185,14 +183,6 @@ typedef struct Suffix {
 	SuffixList parents;
 	/* Suffixes we have a transformation from */
 	SuffixList children;
-	/*
-	 * Lists in which this suffix is referenced.
-	 *
-	 * XXX: These lists are used nowhere, they are just appended to, for
-	 * no apparent reason.  They do have the side effect of increasing
-	 * refCount though.
-	 */
-	SuffixListList ref;
 } Suffix;
 
 /*
@@ -392,7 +382,6 @@ Suffix_Free(Suffix *suff)
 		suff->name, suff->refCount);
 #endif
 
-	Lst_Done(>ref);
 	Lst_Done(>children);
 	Lst_Done(>parents);
 	SearchPath_Free(suff->searchPath);
@@ -440,12 +429,10 @@ SuffixList_Insert(SuffixList *list, Suff
 		DEBUG2(SUFF, "inserting \"%s\" (%d) at end of list\n",
 		suff->name, suff->sNum);
 		Lst_Append(list, Suffix_Ref(suff));
-		Lst_Append(>ref, list);
 	} else if (listSuff->sNum != suff->sNum) {
 		DEBUG4(SUFF, "inserting \"%s\" (%d) before \"%s\" (%d)\n",
 		suff->name, suff->sNum, listSuff->name, listSuff->sNum);
 		Lst_InsertBefore(list, ln, Suffix_Ref(suff));
-		Lst_Append(>ref, list);
 	} else {
 		DEBUG2(SUFF, "\"%s\" (%d) is already there\n",
 		suff->name, suff->sNum);
@@ -469,7 +456,6 @@ Suffix_New(const char *name)
 	suff->searchPath = SearchPath_New();
 	Lst_Init(>children);
 	Lst_Init(>parents);
-	Lst_Init(>ref);
 	suff->sNum = sNum++;
 	suff->include = false;
 	suff->library = false;
@@ -821,19 +807,7 @@ UpdateTargets(Suffix *suff)
 	}
 }
 
-/*
- * Add the suffix to the end of the list of known suffixes.
- * Should we restructure the suffix graph? Make doesn't.
- *
- * A GNode is created for the suffix (XXX: this sounds completely wrong) and
- * a Suffix structure is created and added to the suffixes list unless the
- * suffix was already known.
- * The mainNode passed can be modified if a target mutated into a
- * transform and that target happened to be the main target.
- *
- * Input:
- *	name		the name of the suffix to add
- */
+/* Add the suffix to the end of the list of known suffixes. */
 void
 Suff_AddSuffix(const char *name)
 {



CVS commit: src/usr.bin/make

2023-12-30 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Dec 30 13:28:06 UTC 2023

Modified Files:
src/usr.bin/make: suff.c

Log Message:
make: remove unused field from suffix

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.374 -r1.375 src/usr.bin/make/suff.c

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



CVS commit: src/tests/fs/cd9660

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 13:09:24 UTC 2023

Modified Files:
src/tests/fs/cd9660: t_high_ino_big_file.sh

Log Message:
PR 57803: fix typo in test title.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/cd9660/t_high_ino_big_file.sh

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

Modified files:

Index: src/tests/fs/cd9660/t_high_ino_big_file.sh
diff -u src/tests/fs/cd9660/t_high_ino_big_file.sh:1.4 src/tests/fs/cd9660/t_high_ino_big_file.sh:1.5
--- src/tests/fs/cd9660/t_high_ino_big_file.sh:1.4	Mon Jul  7 22:06:02 2014
+++ src/tests/fs/cd9660/t_high_ino_big_file.sh	Sat Dec 30 13:09:24 2023
@@ -1,4 +1,4 @@
-# $NetBSD: t_high_ino_big_file.sh,v 1.4 2014/07/07 22:06:02 pgoyette Exp $
+# $NetBSD: t_high_ino_big_file.sh,v 1.5 2023/12/30 13:09:24 martin Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -69,7 +69,7 @@ mntpnt=""
 
 atf_test_case pr_kern_48787 cleanup
 pr_kern_48787_head() {
-	atf_set "descr" "Verifies 32bit overflow isssues from PR kern/48787 are fixed"
+	atf_set "descr" "Verifies 32bit overflow issues from PR kern/48787 are fixed"
 	atf_set "require.user" "root"
 	atf_set "require.progs" "rump_cd9660 bunzip2 stat"
 	atf_set "timeout" 6000



CVS commit: src/tests/fs/cd9660

2023-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 13:09:24 UTC 2023

Modified Files:
src/tests/fs/cd9660: t_high_ino_big_file.sh

Log Message:
PR 57803: fix typo in test title.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/fs/cd9660/t_high_ino_big_file.sh

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