CVS commit: src/sys/dev/pci

2024-04-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Apr 19 21:24:00 UTC 2024

Modified Files:
src/sys/dev/pci: pci_subr.c pcireg.h

Log Message:
s/Resorce/Resource/ in comment and log message.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/pci/pcireg.h

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

Modified files:

Index: src/sys/dev/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.243 src/sys/dev/pci/pci_subr.c:1.244
--- src/sys/dev/pci/pci_subr.c:1.243	Thu Aug 10 20:02:56 2023
+++ src/sys/dev/pci/pci_subr.c	Fri Apr 19 21:24:00 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.243 2023/08/10 20:02:56 andvar Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.244 2024/04/19 21:24:00 andvar Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.243 2023/08/10 20:02:56 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.244 2024/04/19 21:24:00 andvar Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -2559,10 +2559,10 @@ pci_conf_print_ea_cap_prop(unsigned int 
 		printf("I/O Space\n");
 		break;
 	case PCI_EA_PROP_VF_MEM_NONPREF:
-		printf("Resorce for VF use, Memory Space, Non-Prefetchable\n");
+		printf("Resource for VF use, Memory Space, Non-Prefetchable\n");
 		break;
 	case PCI_EA_PROP_VF_MEM_PREF:
-		printf("Resorce for VF use, Memory Space, Prefetch\n");
+		printf("Resource for VF use, Memory Space, Prefetch\n");
 		break;
 	case PCI_EA_PROP_BB_MEM_NONPREF:
 		printf("Behind the Bridge, Memory Space, Non-Pref\n");

Index: src/sys/dev/pci/pcireg.h
diff -u src/sys/dev/pci/pcireg.h:1.169 src/sys/dev/pci/pcireg.h:1.170
--- src/sys/dev/pci/pcireg.h:1.169	Fri Feb  2 22:19:13 2024
+++ src/sys/dev/pci/pcireg.h	Fri Apr 19 21:24:00 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcireg.h,v 1.169 2024/02/02 22:19:13 andvar Exp $	*/
+/*	$NetBSD: pcireg.h,v 1.170 2024/04/19 21:24:00 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -1963,8 +1963,8 @@ struct pci_rom {
 #define  PCI_EA_PROP_MEM_NONPREF	0x00	/* Memory Space, Non-Prefetchable */
 #define  PCI_EA_PROP_MEM_PREF		0x01	/* Memory Space, Prefetchable */
 #define  PCI_EA_PROP_IO			0x02	/* I/O Space */
-#define  PCI_EA_PROP_VF_MEM_NONPREF	0x03	/* Resorce for VF use. Mem. Non-Pref */
-#define  PCI_EA_PROP_VF_MEM_PREF	0x04	/* Resorce for VF use. Mem. Prefetch */
+#define  PCI_EA_PROP_VF_MEM_NONPREF	0x03	/* Resource for VF use. Mem. Non-Pref */
+#define  PCI_EA_PROP_VF_MEM_PREF	0x04	/* Resource for VF use. Mem. Prefetch */
 #define  PCI_EA_PROP_BB_MEM_NONPREF	0x05	/* Behind Bridge: MEM. Non-Pref */
 #define  PCI_EA_PROP_BB_MEM_PREF	0x06	/* Behind Bridge: MEM. Prefetch */
 #define  PCI_EA_PROP_BB_IO		0x07	/* Behind Bridge: I/O Space */



CVS commit: src/sys/dev/pci

2024-04-19 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Apr 19 21:24:00 UTC 2024

Modified Files:
src/sys/dev/pci: pci_subr.c pcireg.h

Log Message:
s/Resorce/Resource/ in comment and log message.


To generate a diff of this commit:
cvs rdiff -u -r1.243 -r1.244 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.169 -r1.170 src/sys/dev/pci/pcireg.h

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

2024-04-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Apr 19 20:59:18 UTC 2024

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

Log Message:
tests/lint: show how to trigger message 207


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_207.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/msg_207.c
diff -u src/tests/usr.bin/xlint/lint1/msg_207.c:1.3 src/tests/usr.bin/xlint/lint1/msg_207.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_207.c:1.3	Thu Jun 16 21:24:41 2022
+++ src/tests/usr.bin/xlint/lint1/msg_207.c	Fri Apr 19 20:59:18 2024
@@ -1,8 +1,51 @@
-/*	$NetBSD: msg_207.c,v 1.3 2022/06/16 21:24:41 rillig Exp $	*/
+/*	$NetBSD: msg_207.c,v 1.4 2024/04/19 20:59:18 rillig Exp $	*/
 # 3 "msg_207.c"
 
 // Test for message: loop not entered at top [207]
 
-/* expect+1: error: syntax error ':' [249] */
-TODO: "Add example code that triggers the above message."
-TODO: "Add example code that almost triggers the above message."
+static void
+/* expect+1: warning: static function 'for_loop' unused [236] */
+for_loop(void)
+{
+	for (int i = 0; i < 10; i++)
+		if (0 == 1)
+			for (i = 0;
+			i < 5;
+/* expect+2: warning: loop not entered at top [207] */
+/* expect+1: warning: end-of-loop code not reached [223] */
+			i += 4)
+return;
+
+	// XXX: Why is this different from the snippet above?
+	for (int i = 0; i < 10; i++)
+		if (0 == 1)
+			/* expect+1: warning: statement not reached [193] */
+			for (int j = 0;
+			j < 5;
+			/* expect+1: warning: end-of-loop code not reached [223] */
+			j += 4)
+return;
+}
+
+static void
+/* expect+1: warning: static function 'while_loop' unused [236] */
+while_loop(void)
+{
+	for (int i = 0; i < 10; i++)
+		if (0 == 1)
+			/* expect+1: warning: loop not entered at top [207] */
+			while (i < 5)
+i += 4;
+}
+
+static void
+/* expect+1: warning: static function 'do_loop' unused [236] */
+do_loop(void)
+{
+	for (int i = 0; i < 10; i++)
+		if (0 == 1)
+			/* expect+1: warning: loop not entered at top [207] */
+			do {
+i += 4;
+			} while (i < 5);
+}



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

2024-04-19 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Apr 19 20:59:18 UTC 2024

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

Log Message:
tests/lint: show how to trigger message 207


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_207.c

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



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 16:04:28 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix copy/paste-o


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/external/bsd/ntp/lib/libntp/Makefile

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



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 16:04:28 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
fix copy/paste-o


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/external/bsd/ntp/lib/libntp/Makefile

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/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.33 src/external/bsd/ntp/lib/libntp/Makefile:1.34
--- src/external/bsd/ntp/lib/libntp/Makefile:1.33	Fri Apr 19 14:58:18 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 16:04:28 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.33 2024/04/19 14:58:18 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.34 2024/04/19 16:04:28 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -93,7 +93,7 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 .endif
 MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
 MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
-.if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
+.if ${MKREPRO_DATE} == "" || ${MKREPRO_TIME} == ""
 .error empty MKREPRO_DATE or MKREPRO_TIME
 .endif
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
On Fri, Apr 19, 2024 at 10:48:10PM +0700, Robert Elz wrote:
> Date:Fri, 19 Apr 2024 14:58:18 +
> From:"Jonathan A. Kollasch" 
> Message-ID:  <20240419145818.351d2f...@cvs.netbsd.org>
> 
>   |  - bail out if resulting __DATE__/__TIME__ replacement strings are empty
> 
> If you want to do that (not that it would be useful, even if the %b
> (etc) conversions produced nothing, there would still be two spaces
> in the output.   It is almost impossible to get date to exit with an
> error code (and nothing on stdout) in cases like this.
> 
> But if this is worth keeping, then
> 
>   if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
> 
> probably is not what you wanted.

I've tested this with MKREPRO_TIMESTAMP=RandomNonNumericString, and
MKREPRO_TIME/MKREPRO_DATE came out "" when nbdate produced a non-zero
exit status and a warning message.

I wish nbmake could actually error when it gets a non-zero exit status
there, but it merely spouts a warning and continues.

I've spent enough time looking at this.


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Fri, 19 Apr 2024 14:58:18 +
From:"Jonathan A. Kollasch" 
Message-ID:  <20240419145818.351d2f...@cvs.netbsd.org>

  |  - bail out if resulting __DATE__/__TIME__ replacement strings are empty

If you want to do that (not that it would be useful, even if the %b
(etc) conversions produced nothing, there would still be two spaces
in the output.   It is almost impossible to get date to exit with an
error code (and nothing on stdout) in cases like this.

But if this is worth keeping, then

if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""

probably is not what you wanted.

kre



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 14:58:18 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Increase MKREPRO robustness
 - Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/ntp/lib/libntp/Makefile

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



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 14:58:18 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
Increase MKREPRO robustness
 - Use C locale to ensure month abbreviations are as expected
 - bail out if MKREPRO_TIMESTAMP is not defined
 - bail out if resulting __DATE__/__TIME__ replacement strings are empty


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/external/bsd/ntp/lib/libntp/Makefile

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/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.32 src/external/bsd/ntp/lib/libntp/Makefile:1.33
--- src/external/bsd/ntp/lib/libntp/Makefile:1.32	Fri Apr 19 13:34:15 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 14:58:18 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.32 2024/04/19 13:34:15 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.33 2024/04/19 14:58:18 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,8 +88,14 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
-MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_TIMESTAMP:Uundefined} == "undefined"
+.error MKREPRO_TIMESTAMP is undefined with MKREPRO active
+.endif
+MKREPRO_DATE != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
+MKREPRO_TIME != env LC_ALL=C ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
+.if ${MKREPRO_TIME} == "" || ${MKREPRO_TIME} == ""
+.error empty MKREPRO_DATE or MKREPRO_TIME
+.endif
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
 .endif



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Rhialto
On Fri 19 Apr 2024 at 14:47:23 +0200, Martin Husemann wrote:
> The problem (IIUC) is that the ntp code parses this value internally, so
> it won't talk to anyone claiming a time before the time ntpd was compiled
> (or something along that line).

Would it make sense to just supply a fixed string to effectively defang
that code? Or just rip it out completely. It sounds like a giant footgun
somehow.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert
\X/ There is no AI. There is just someone else's work.   --I. Rose


signature.asc
Description: PGP signature


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Fri, 19 Apr 2024 14:57:46 +0200
From:Martin Husemann 
Message-ID:  <20240419125746.gb26...@mail.duskware.de>

  | On Fri, Apr 19, 2024 at 02:47:23PM +0200, Martin Husemann wrote:
  | > The commit message could have explained that a bit.
  |
  | And it actually should have been "+%b %e %Y" - from the C18 standard draft:
  |
  | 6.10.8.1 Mandatory macros
  |
  | __DATE__ 
  |
  | The date of translation of the preprocessing translation unit: a
  | character string literal of the form "Mmm dd ", where the names of
  | the months are the same as those generated by the asctime function,

If that's still in the most recent C (in that form anyway) I'd be surprised,
as asctime() is more or less deprecated I think.

But if that is what is required, then the TOOL_DATE needs to be run with
LC_ALL=C (or LC_ALL=POSIX) so that you get the month name in English, rather
than whatever the local locale's short name for the month would be.

It is still a stupid format...

kre



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 13:34:15 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
The substitute __DATE__ should be %b %e %Y per a C18 draft

Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/lib/libntp/Makefile

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



CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Apr 19 13:34:15 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp: Makefile

Log Message:
The substitute __DATE__ should be %b %e %Y per a C18 draft

Subtle change that won't make a functional difference in this case;
changed only for semantic correctness.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/external/bsd/ntp/lib/libntp/Makefile

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/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.31 src/external/bsd/ntp/lib/libntp/Makefile:1.32
--- src/external/bsd/ntp/lib/libntp/Makefile:1.31	Thu Apr 18 19:23:53 2024
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 13:34:15 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2024/04/18 19:23:53 jakllsch Exp $
+#	$NetBSD: Makefile,v 1.32 2024/04/19 13:34:15 jakllsch Exp $
 
 LIBISPRIVATE=yes
 
@@ -88,7 +88,7 @@ CPPFLAGS+= -I${IDIST}/sntp/libopts
 # For MKREPRO, avoid using __DATE__ and __TIME__.
 # Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %e %Y"
 MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
On Fri, Apr 19, 2024 at 02:47:23PM +0200, Martin Husemann wrote:
> The commit message could have explained that a bit.

And it actually should have been "+%b %e %Y" - from the C18 standard draft:

6.10.8.1 Mandatory macros

__DATE__ 

The date of translation of the preprocessing translation unit: a
character string literal of the form "Mmm dd ", where the names of
the months are the same as those generated by the asctime function, and
the first character of dd is a space character if the value is less
than 10. If the date of translation is not available, an
implementation-defined valid date shall be supplied.


Martin


Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
On Fri, Apr 19, 2024 at 04:36:46PM +0700, Robert Elz wrote:
> I don't understand that change, it altered from
> 
>   MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
> to
>   MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
> 
> %F is simply a shorthand for %Y-%m-%d (which is the correct way to write
> locale independent dates), %b is a locale dependent name of the month, and
> what's more this is in US-centric mon day year format, which we should avoid
> (aside from anything else, it is a dumb format, with the smallest value unit
> sitting in the middle, rather than at one end or the other).

The problem (IIUC) is that the ntp code parses this value internally, so
it won't talk to anyone claiming a time before the time ntpd was compiled
(or something along that line).

And __DATE__ gives us a stupid format: 

 > echo __DATE__ | cc -E - | tail -1
"Apr 19 2024"

which is different from

 > date -u -r 1713530399 "+%F"
2024-04-19

but matches

> date -u -r 1713530399 "+%b %d %Y"
Apr 19 2024


The commit message could have explained that a bit.

Martin


CVS commit: src/external/mpl/bind/dist/lib/ns

2024-04-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 19 12:35:28 UTC 2024

Modified Files:
src/external/mpl/bind/dist/lib/ns: query.c

Log Message:
PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/mpl/bind/dist/lib/ns/query.c

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



CVS commit: src/external/mpl/bind/dist/lib/ns

2024-04-19 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Apr 19 12:35:28 UTC 2024

Modified Files:
src/external/mpl/bind/dist/lib/ns: query.c

Log Message:
PR/58170: Yoshitaka Tokugawa: Remove blocking statement when the requestor
asks for for an address that is in the cache and that access is prevented
by a cache acl because the querier has no way to know that this access is
denied, so it is not an abuse.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/external/mpl/bind/dist/lib/ns/query.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/mpl/bind/dist/lib/ns/query.c
diff -u src/external/mpl/bind/dist/lib/ns/query.c:1.20 src/external/mpl/bind/dist/lib/ns/query.c:1.21
--- src/external/mpl/bind/dist/lib/ns/query.c:1.20	Wed Feb 21 17:52:46 2024
+++ src/external/mpl/bind/dist/lib/ns/query.c	Fri Apr 19 08:35:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.20 2024/02/21 22:52:46 christos Exp $	*/
+/*	$NetBSD: query.c,v 1.21 2024/04/19 12:35:28 christos Exp $	*/
 
 /*
  * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
@@ -909,7 +909,6 @@ query_checkcacheaccess(ns_client_t *clie
 	  msg);
 			}
 		} else {
-			pfilter_notify(result, client, "checkcacheaccess");
 			/*
 			 * We were denied by the "allow-query-cache" ACL.
 			 * There is no need to clear NS_QUERYATTR_CACHEACLOK



Re: CVS commit: src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Robert Elz
Date:Thu, 18 Apr 2024 19:23:54 +
From:"Jonathan A. Kollasch" 
Message-ID:  <20240418192354.1bcc1f...@cvs.netbsd.org>

  | Module Name:src
  | Committed By:   jakllsch
  | Date:   Thu Apr 18 19:23:54 UTC 2024
  |
  | Modified Files:
  | src/external/bsd/ntp/lib/libntp: Makefile
  |
  | Log Message:
  | Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__

I don't understand that change, it altered from

MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%F"
to
MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"

%F is simply a shorthand for %Y-%m-%d (which is the correct way to write
locale independent dates), %b is a locale dependent name of the month, and
what's more this is in US-centric mon day year format, which we should avoid
(aside from anything else, it is a dumb format, with the smallest value unit
sitting in the middle, rather than at one end or the other).

If there is a problem where support for %F is missing somewhere, (and if
that happens in TOOL_DATE it must mean that we're using a locale strftime()
when building it, in which case we should add our version to the library)
please replace it with %Y-%m-%d (which is what it is defined to be) instead
of anything using %b (or %a or %B or %A) (or any other weird formats).

Further, if some format like that was needed for some reason, then it
probably should use %e rather than %d (to suppress the leading 0 on dates
before the 10th).   But don't just do that either.

If there isn't an actual problem using %F, please just revert this.

And lastly, and this applies to everyone - please do not request
pullups of anything (except perhaps urgent security fixes) immediately
after the change is committed - give it at least a few days, in case of
objection, breakage, ...

kre




CVS commit: [netbsd-10] src/doc

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:19:32 UTC 2024

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

Log Message:
Tickets #663, #670 and #671


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-10.1

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.1
diff -u src/doc/CHANGES-10.1:1.1.2.4 src/doc/CHANGES-10.1:1.1.2.5
--- src/doc/CHANGES-10.1:1.1.2.4	Thu Apr 18 18:26:43 2024
+++ src/doc/CHANGES-10.1	Fri Apr 19 09:19:31 2024
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-10.1,v 1.1.2.4 2024/04/18 18:26:43 martin Exp $
+# $NetBSD: CHANGES-10.1,v 1.1.2.5 2024/04/19 09:19:31 martin Exp $
 
 A complete list of changes from the NetBSD 10.0 release on 2024-03-28
 until the 10.1 release:
@@ -134,3 +134,20 @@ sys/dev/ccd.c	1.190
 	kthread if out of memory. 
 	[hannken, ticket #669]
 
+external/bsd/ntp/lib/libntp/Makefile		1.28-1.31
+
+	ntpd(8): fix timestamp in the binary for reproducable builds.
+	[jakllsch, ticket #663]
+
+sys/arch/vax/vax/unimpl_emul.S			1.5
+
+	vax: fix assembler code to use constants of the correct size
+	to fix reproducable builds (no functional change)
+	[kalvisd, ticket #670]
+
+sys/uvm/pmap/pmap.c1.78
+sys/uvm/pmap/pmap.h1.27
+
+	PR 58006: fix kernel hang in pmap_page_clear_attributes().
+	[skrll, ticket #671]
+



CVS commit: [netbsd-10] src/doc

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:19:32 UTC 2024

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

Log Message:
Tickets #663, #670 and #671


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-10.1

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/uvm/pmap

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:18:28 UTC 2024

Modified Files:
src/sys/uvm/pmap [netbsd-10]: pmap.c pmap.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #671):

sys/uvm/pmap/pmap.c: revision 1.78
sys/uvm/pmap/pmap.h: revision 1.27

Fix types in pmap_page_clear_attributes so that the top bits of
the u_long mdpg_attrs aren't dropped giving atomic_cas_ulong no
chance of completing if any of the top bits is set.

Update pmap_page_set_attributes for consistency.

An ATF test run completed for me with this fix.

port-riscv/58006: ATF tests no longer complete on riscv-riscv64


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.2.1 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.26 -r1.26.2.1 src/sys/uvm/pmap/pmap.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/uvm/pmap/pmap.c
diff -u src/sys/uvm/pmap/pmap.c:1.74 src/sys/uvm/pmap/pmap.c:1.74.2.1
--- src/sys/uvm/pmap/pmap.c:1.74	Thu Nov  3 09:04:57 2022
+++ src/sys/uvm/pmap/pmap.c	Fri Apr 19 09:18:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.74 2022/11/03 09:04:57 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.74.2.1 2024/04/19 09:18:28 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include 
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.74 2022/11/03 09:04:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.74.2.1 2024/04/19 09:18:28 martin Exp $");
 
 /*
  *	Manages physical address maps.
@@ -405,21 +405,21 @@ pmap_addr_range_check(pmap_t pmap, vaddr
  */
 
 bool
-pmap_page_clear_attributes(struct vm_page_md *mdpg, u_int clear_attributes)
+pmap_page_clear_attributes(struct vm_page_md *mdpg, u_long clear_attributes)
 {
-	volatile unsigned long * const attrp = >mdpg_attrs;
+	volatile u_long * const attrp = >mdpg_attrs;
 
 #ifdef MULTIPROCESSOR
 	for (;;) {
-		u_int old_attr = *attrp;
+		u_long old_attr = *attrp;
 		if ((old_attr & clear_attributes) == 0)
 			return false;
-		u_int new_attr = old_attr & ~clear_attributes;
+		u_long new_attr = old_attr & ~clear_attributes;
 		if (old_attr == atomic_cas_ulong(attrp, old_attr, new_attr))
 			return true;
 	}
 #else
-	unsigned long old_attr = *attrp;
+	u_long old_attr = *attrp;
 	if ((old_attr & clear_attributes) == 0)
 		return false;
 	*attrp &= ~clear_attributes;
@@ -428,7 +428,7 @@ pmap_page_clear_attributes(struct vm_pag
 }
 
 void
-pmap_page_set_attributes(struct vm_page_md *mdpg, u_int set_attributes)
+pmap_page_set_attributes(struct vm_page_md *mdpg, u_long set_attributes)
 {
 #ifdef MULTIPROCESSOR
 	atomic_or_ulong(>mdpg_attrs, set_attributes);

Index: src/sys/uvm/pmap/pmap.h
diff -u src/sys/uvm/pmap/pmap.h:1.26 src/sys/uvm/pmap/pmap.h:1.26.2.1
--- src/sys/uvm/pmap/pmap.h:1.26	Thu Nov  3 18:55:07 2022
+++ src/sys/uvm/pmap/pmap.h	Fri Apr 19 09:18:28 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.26 2022/11/03 18:55:07 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.26.2.1 2024/04/19 09:18:28 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -296,8 +296,8 @@ extern pmap_segtab_t pmap_kern_segtab;
 
 bool	pmap_remove_all(pmap_t);
 void	pmap_set_modified(paddr_t);
-bool	pmap_page_clear_attributes(struct vm_page_md *, u_int);
-void	pmap_page_set_attributes(struct vm_page_md *, u_int);
+bool	pmap_page_clear_attributes(struct vm_page_md *, u_long);
+void	pmap_page_set_attributes(struct vm_page_md *, u_long);
 void	pmap_pvlist_lock_init(size_t);
 #ifdef PMAP_VIRTUAL_CACHE_ALIASES
 void	pmap_page_cache(struct vm_page_md *, bool);



CVS commit: [netbsd-10] src/sys/uvm/pmap

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:18:28 UTC 2024

Modified Files:
src/sys/uvm/pmap [netbsd-10]: pmap.c pmap.h

Log Message:
Pull up following revision(s) (requested by skrll in ticket #671):

sys/uvm/pmap/pmap.c: revision 1.78
sys/uvm/pmap/pmap.h: revision 1.27

Fix types in pmap_page_clear_attributes so that the top bits of
the u_long mdpg_attrs aren't dropped giving atomic_cas_ulong no
chance of completing if any of the top bits is set.

Update pmap_page_set_attributes for consistency.

An ATF test run completed for me with this fix.

port-riscv/58006: ATF tests no longer complete on riscv-riscv64


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.2.1 src/sys/uvm/pmap/pmap.c
cvs rdiff -u -r1.26 -r1.26.2.1 src/sys/uvm/pmap/pmap.h

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/arch/vax/vax

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:15:55 UTC 2024

Modified Files:
src/sys/arch/vax/vax [netbsd-10]: unimpl_emul.S

Log Message:
Pull up following revision(s) (requested by kalvisd in ticket #670):

sys/arch/vax/vax/unimpl_emul.S: revision 1.5

vax/unimpl_emul.S: Initialise locations storing floating-point values with
a constant of the appropriate format


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.40.1 src/sys/arch/vax/vax/unimpl_emul.S

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/arch/vax/vax

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:15:55 UTC 2024

Modified Files:
src/sys/arch/vax/vax [netbsd-10]: unimpl_emul.S

Log Message:
Pull up following revision(s) (requested by kalvisd in ticket #670):

sys/arch/vax/vax/unimpl_emul.S: revision 1.5

vax/unimpl_emul.S: Initialise locations storing floating-point values with
a constant of the appropriate format


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.40.1 src/sys/arch/vax/vax/unimpl_emul.S

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/vax/vax/unimpl_emul.S
diff -u src/sys/arch/vax/vax/unimpl_emul.S:1.4 src/sys/arch/vax/vax/unimpl_emul.S:1.4.40.1
--- src/sys/arch/vax/vax/unimpl_emul.S:1.4	Mon May 22 16:53:05 2017
+++ src/sys/arch/vax/vax/unimpl_emul.S	Fri Apr 19 09:15:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: unimpl_emul.S,v 1.4 2017/05/22 16:53:05 ragge Exp $	*/
+/*	$NetBSD: unimpl_emul.S,v 1.4.40.1 2024/04/19 09:15:55 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Brandon Creighton.  All rights reserved.
@@ -683,7 +683,7 @@ emodd:	bsbw	touser
 	 * there aren't any bits left for the fraction.  Therefore we're
 	 * done here;  TMPFRAC1 is equal to TMPFRACTGT and TMPFRAC2 is 0.
 	 */
-	movq $0f0.0, TMPFRAC2
+	movq $0d0.0, TMPFRAC2
 	jmp 9f		/* we're done, move on */
 1:	
 	/*
@@ -727,7 +727,7 @@ emodd:	bsbw	touser
 	 * We are less than 1.0; TMPFRAC1 should be 0, and TMPFRAC2 should
 	 * be equal to TMPFRACTGT.
 	 */
-	movd $0f0.0, TMPFRAC1
+	movd $0d0.0, TMPFRAC1
 	movd TMPFRACTGT, TMPFRAC2
 9:			
 	/*
@@ -763,7 +763,7 @@ zeroexit:
 	bsbw getaddr_byte
 	movl $0x0, (%r0)
 	bsbw getaddr_byte
-	movd $0f0, (%r0)
+	movd $0d0, (%r0)
 	brw goback
 
 



CVS commit: [netbsd-10] src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:01:35 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #663):

external/bsd/ntp/lib/libntp/Makefile: revision 1.30
external/bsd/ntp/lib/libntp/Makefile: revision 1.31
external/bsd/ntp/lib/libntp/Makefile: revision 1.28
external/bsd/ntp/lib/libntp/Makefile: revision 1.29

use ${MKREPRO_TIMESTAMP} for baking in the date and time.
fix format.
remove now-unused assignment
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__


To generate a diff of this commit:
cvs rdiff -u -r1.25.6.1 -r1.25.6.2 src/external/bsd/ntp/lib/libntp/Makefile

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



CVS commit: [netbsd-10] src/external/bsd/ntp/lib/libntp

2024-04-19 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Apr 19 09:01:35 UTC 2024

Modified Files:
src/external/bsd/ntp/lib/libntp [netbsd-10]: Makefile

Log Message:
Pull up following revision(s) (requested by jakllsch in ticket #663):

external/bsd/ntp/lib/libntp/Makefile: revision 1.30
external/bsd/ntp/lib/libntp/Makefile: revision 1.31
external/bsd/ntp/lib/libntp/Makefile: revision 1.28
external/bsd/ntp/lib/libntp/Makefile: revision 1.29

use ${MKREPRO_TIMESTAMP} for baking in the date and time.
fix format.
remove now-unused assignment
Format MKREPRO_TIMESTAMP with "%b %d %Y" to correctly substitute __DATE__


To generate a diff of this commit:
cvs rdiff -u -r1.25.6.1 -r1.25.6.2 src/external/bsd/ntp/lib/libntp/Makefile

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/ntp/lib/libntp/Makefile
diff -u src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.1 src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.2
--- src/external/bsd/ntp/lib/libntp/Makefile:1.25.6.1	Fri Aug 11 13:42:57 2023
+++ src/external/bsd/ntp/lib/libntp/Makefile	Fri Apr 19 09:01:35 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.25.6.1 2023/08/11 13:42:57 martin Exp $
+#	$NetBSD: Makefile,v 1.25.6.2 2024/04/19 09:01:35 martin Exp $
 
 LIBISPRIVATE=yes
 
@@ -86,17 +86,10 @@ ymd2yd.c
 CPPFLAGS+= -I${IDIST}/sntp/libopts
 
 # For MKREPRO, avoid using __DATE__ and __TIME__.
-# Instead, use the date and time from ${IMPORTDATE_FILE}.
-#
-# The file should contain one line, like this:
-#	Fri Dec 27 19:28:17 EST 2013 (import)
-#
+# Instead, use the date and time from ${MKREPRO_TIMESTAMP}
 .if ${MKREPRO:Uno} == "yes"
-IMPORTDATE_FILE := ${.PARSEDIR}/../../importdate
-MKREPRO_DATE != ${TOOL_AWK} '{printf "%3s %2d %4d", $$2, $$3, $$6}' \
-	<${IMPORTDATE_FILE} # "Mmm DD "
-MKREPRO_TIME != ${TOOL_AWK} '{print $$4}' \
-	<${IMPORTDATE_FILE} # "HH:MM:SS"
+MKREPRO_DATE != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%b %d %Y"
+MKREPRO_TIME != ${TOOL_DATE} -u -r "${MKREPRO_TIMESTAMP}" "+%T"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_DATE=\"${MKREPRO_DATE:Q}\"
 CPPFLAGS.ntp_calendar.c += -DMKREPRO_TIME=\"${MKREPRO_TIME:Q}\"
 .endif