CVS commit: src/sys/dev/pci

2023-08-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug  9 03:15:48 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1470 -r1.1471 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1469 -r1.1470 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2023-08-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug  9 03:14:53 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add some Intel Xeon D-2100 devices. Fix description of Intel 0x37d0.


To generate a diff of this commit:
cvs rdiff -u -r1.1489 -r1.1490 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/dev/pci

2023-08-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug  9 03:14:53 UTC 2023

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add some Intel Xeon D-2100 devices. Fix description of Intel 0x37d0.


To generate a diff of this commit:
cvs rdiff -u -r1.1489 -r1.1490 src/sys/dev/pci/pcidevs

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/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1489 src/sys/dev/pci/pcidevs:1.1490
--- src/sys/dev/pci/pcidevs:1.1489	Sat Aug  5 20:23:40 2023
+++ src/sys/dev/pci/pcidevs	Wed Aug  9 03:14:53 2023
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1489 2023/08/05 20:23:40 andvar Exp $
+$NetBSD: pcidevs,v 1.1490 2023/08/09 03:14:53 msaitoh Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -5591,7 +5591,7 @@ product INTEL X722		0x37cc	X722 10GbE
 product INTEL X722_VF		0x37cd	X722 10GbE VF
 product INTEL X722_KX		0x37ce	X722 10GbE Backplane
 product INTEL X722_QSFP		0x37cf	X722 10GbE QSFP+
-product INTEL X722_SFP		0x37d0	X722 10GgE SFP+
+product INTEL X722_SFP		0x37d0	X722 10GbE SFP+ LOM
 product INTEL X722_1G_BASET	0x37d1	X722 1GbaseT
 product INTEL X722_10G_BASET	0x37d2	X722 10GbaseT
 product INTEL X722_I_SFP	0x37d3	X722 I 10GbE SFP+
@@ -7136,6 +7136,7 @@ product INTEL C620_SPI		0xa1a4	C620 SPI
 product INTEL C620_TRACE	0xa1a6	C620 Trace Hub
 product INTEL C620_XHCI		0xa1af	C620 xHCI
 product INTEL C620_THERM	0xa1b1	C620 Thermal Subsystem
+product INTEL XEOND21_TRACE	0xa1b3	Xeon D-2100 Trace Hub Phantom (ACPI)
 product INTEL C620_ME_HCI_1	0xa1ba	C620 ME HCI
 product INTEL C620_ME_HCI_2	0xa1bb	C620 ME HCI
 product INTEL C620_ME_IDER	0xa1bc	C620 ME IDER
@@ -7148,12 +7149,14 @@ product INTEL C620_LPC_4	0xa1c4	C625 LPC
 product INTEL C620_LPC_5	0xa1c5	C626 LPC or eSPI
 product INTEL C620_LPC_6	0xa1c6	C627 LPC or eSPI
 product INTEL C620_LPC_7	0xa1c7	C628 LPC or eSPI
+product INTEL XEOND21_LPC_4	0xa1c8	Xeon D-2100 LPC/eSPI
 product INTEL C620_LPC_8	0xa1ca	C629 LPC or eSPI
 product INTEL C620_LPC_9	0xa1cb	C621A LPC or eSPI
 product INTEL C620_LPC_10	0xa1cc	C627A LPC or eSPI
 product INTEL C620_LPC_11	0xa1cd	C629A LPC or eSPI
 product INTEL C620_SSATA_AHCI	0xa1d2	C620 sSATA AHCI
 product INTEL C620_SSATA_RAID	0xa1d6	C620 sSATA 3rd Party RAID
+product INTEL XEOND21_SSATA_RAID 0xa1de	C620 sSATA RAID
 product INTEL C620_PCIE_16	0xa1e7	C620 PCIe Root Port
 product INTEL C620_PCIE_17	0xa1e8	C620 PCIe Root Port
 product INTEL C620_PCIE_18	0xa1e9	C620 PCIe Root Port
@@ -7201,6 +7204,9 @@ product INTEL C620_LPC_S_2	0xa243	C627 L
 product INTEL C620_LPC_S_3	0xa244	C621 LPC or eSPI
 product INTEL C620_LPC_S_4	0xa245	C627 LPC or eSPI
 product INTEL C620_LPC_S_5	0xa246	C628 LPC or eSPI
+product INTEL XEOND21_LPC_1	0xa247	Xeon D-2100 LPC/eSPI
+product INTEL XEOND21_LPC_2	0xa248	Xeon D-2100 LPC/eSPI
+product INTEL XEOND21_LPC_3	0xa249	Xeon D-2100 LPC/eSPI
 product INTEL C620_LPC_S_6	0xa24a	C621A LPC or eSPI
 product INTEL C620_LPC_12	0xa24b	C627A LPC or eSPI
 product INTEL C620_LPC_13	0xa24c	C629A LPC or eSPI



re: CVS commit: src/share/mk

2023-08-08 Thread matthew green
please review this.  i'll try to figure out tests for everything,
though it seems annoying :)

  https://www.netbsd.org/~mrg/gcc12-use-after-free.diff

it should handle all the open use-after-free problems.


.mrg.

ps: you'll notice no new headers needed for ptrdiff_t usage  ;)


CVS commit: src

2023-08-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Aug  8 20:15:11 UTC 2023

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

Log Message:
lint: in -a mode, do not warn about integer conversions from 'int'

Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types.  This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c
cvs rdiff -u -r1.576 -r1.577 src/usr.bin/xlint/lint1/tree.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_132_ilp32.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.4 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.5
--- src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.4	Tue Aug  8 19:57:23 2023
+++ src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c	Tue Aug  8 20:15:11 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132_ilp32.c,v 1.4 2023/08/08 19:57:23 rillig Exp $	*/
+/*	$NetBSD: msg_132_ilp32.c,v 1.5 2023/08/08 20:15:11 rillig Exp $	*/
 # 3 "msg_132_ilp32.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -76,9 +76,7 @@ convert_all(void)
 	char_var = uchar_var;
 	char_var = short_var;
 	char_var = ushort_var;
-	/* expect+1: warning: conversion from 'int' to 'char' may lose accuracy [132] */
 	char_var = int_var;
-	/* expect+1: warning: conversion from 'unsigned int' to 'char' may lose accuracy [132] */
 	char_var = uint_var;
 	/* expect+1: warning: conversion from 'long' to 'char' may lose accuracy [132] */
 	char_var = long_var;
@@ -95,9 +93,7 @@ convert_all(void)
 	schar_var = uchar_var;
 	schar_var = short_var;
 	schar_var = ushort_var;
-	/* expect+1: warning: conversion from 'int' to 'signed char' may lose accuracy [132] */
 	schar_var = int_var;
-	/* expect+1: warning: conversion from 'unsigned int' to 'signed char' may lose accuracy [132] */
 	schar_var = uint_var;
 	/* expect+1: warning: conversion from 'long' to 'signed char' may lose accuracy [132] */
 	schar_var = long_var;
@@ -114,9 +110,7 @@ convert_all(void)
 	uchar_var = uchar_var;
 	uchar_var = short_var;
 	uchar_var = ushort_var;
-	/* expect+1: warning: conversion from 'int' to 'unsigned char' may lose accuracy [132] */
 	uchar_var = int_var;
-	/* expect+1: warning: conversion from 'unsigned int' to 'unsigned char' may lose accuracy [132] */
 	uchar_var = uint_var;
 	/* expect+1: warning: conversion from 'long' to 'unsigned char' may lose accuracy [132] */
 	uchar_var = long_var;
@@ -133,9 +127,7 @@ convert_all(void)
 	short_var = uchar_var;
 	short_var = short_var;
 	short_var = ushort_var;
-	/* expect+1: warning: conversion from 'int' to 'short' may lose accuracy [132] */
 	short_var = int_var;
-	/* expect+1: warning: conversion from 'unsigned int' to 'short' may lose accuracy [132] */
 	short_var = uint_var;
 	/* expect+1: warning: conversion from 'long' to 'short' may lose accuracy [132] */
 	short_var = long_var;
@@ -152,9 +144,7 @@ convert_all(void)
 	ushort_var = uchar_var;
 	ushort_var = short_var;
 	ushort_var = ushort_var;
-	/* expect+1: warning: conversion from 'int' to 'unsigned short' may lose accuracy [132] */
 	ushort_var = int_var;
-	/* expect+1: warning: conversion from 'unsigned int' to 'unsigned short' may lose accuracy [132] */
 	ushort_var = uint_var;
 	/* expect+1: warning: conversion from 'long' to 'unsigned short' may lose accuracy [132] */
 	ushort_var = long_var;

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.576 src/usr.bin/xlint/lint1/tree.c:1.577
--- src/usr.bin/xlint/lint1/tree.c:1.576	Sat Aug  5 10:13:39 2023
+++ src/usr.bin/xlint/lint1/tree.c	Tue Aug  8 20:15:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.576 2023/08/05 10:13:39 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.577 2023/08/08 20:15:10 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.576 2023/08/05 10:13:39 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.577 2023/08/08 20:15:10 rillig Exp $");
 #endif
 
 #include 
@@ -3386,6 +3386,27 @@ can_represent(const type_t *tp, const tn
 	return false;
 }
 
+static bool
+should_warn_about_integer_conversion(const type_t *ntp, tspec_t nt,
+ const tnode_t *otn, tspec_t ot)
+{
+
+	// XXX: The portable_rank_cmp aims at portable mode, independent of the
+	// current platform, while can_represent acts on the actual type sizes
+	// from the current platform.  This mix is inconsistent, but anything
+	// else would make the exact conditions too 

CVS commit: src

2023-08-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Aug  8 20:15:11 UTC 2023

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

Log Message:
lint: in -a mode, do not warn about integer conversions from 'int'

Since tree.c 1.552 from 2023-07-08, lint warned about integer
conversions from 'int' or 'unsigned int' to smaller integer types.  This
only affected 32-bit platforms where size_t is 'unsigned int' rather
than 'unsigned long', as on these platforms, the integer ranks of 'int'
and 'long' are the same, see INT_RANK in inittyp.c.

Discovered by lib/libkvm, which fails on i386 when lint generates any
warnings.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c
cvs rdiff -u -r1.576 -r1.577 src/usr.bin/xlint/lint1/tree.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-08-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Aug  8 19:57:23 UTC 2023

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

Log Message:
tests/lint: test integer conversions on ilp32 int platforms


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.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-08-08 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Tue Aug  8 19:57:23 UTC 2023

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

Log Message:
tests/lint: test integer conversions on ilp32 int platforms


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.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_132_ilp32.c
diff -u src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.3 src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.4
--- src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c:1.3	Tue Mar 28 14:44:34 2023
+++ src/tests/usr.bin/xlint/lint1/msg_132_ilp32.c	Tue Aug  8 19:57:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_132_ilp32.c,v 1.3 2023/03/28 14:44:34 rillig Exp $	*/
+/*	$NetBSD: msg_132_ilp32.c,v 1.4 2023/08/08 19:57:23 rillig Exp $	*/
 # 3 "msg_132_ilp32.c"
 
 // Test for message: conversion from '%s' to '%s' may lose accuracy [132]
@@ -40,3 +40,214 @@ convert_pointer_to_smaller_integer(void 
 {
 	return (unsigned long)(ptr) >> 12;
 }
+
+_Bool bool_var;
+char char_var;
+signed char schar_var;
+unsigned char uchar_var;
+short short_var;
+unsigned short ushort_var;
+int int_var;
+unsigned int uint_var;
+long long_var;
+unsigned long ulong_var;
+long long llong_var;
+unsigned long long ullong_var;
+
+void
+convert_all(void)
+{
+	bool_var = bool_var;
+	bool_var = char_var;
+	bool_var = schar_var;
+	bool_var = uchar_var;
+	bool_var = short_var;
+	bool_var = ushort_var;
+	bool_var = int_var;
+	bool_var = uint_var;
+	bool_var = long_var;
+	bool_var = ulong_var;
+	bool_var = llong_var;
+	bool_var = ullong_var;
+
+	char_var = bool_var;
+	char_var = char_var;
+	char_var = schar_var;
+	char_var = uchar_var;
+	char_var = short_var;
+	char_var = ushort_var;
+	/* expect+1: warning: conversion from 'int' to 'char' may lose accuracy [132] */
+	char_var = int_var;
+	/* expect+1: warning: conversion from 'unsigned int' to 'char' may lose accuracy [132] */
+	char_var = uint_var;
+	/* expect+1: warning: conversion from 'long' to 'char' may lose accuracy [132] */
+	char_var = long_var;
+	/* expect+1: warning: conversion from 'unsigned long' to 'char' may lose accuracy [132] */
+	char_var = ulong_var;
+	/* expect+1: warning: conversion from 'long long' to 'char' may lose accuracy [132] */
+	char_var = llong_var;
+	/* expect+1: warning: conversion from 'unsigned long long' to 'char' may lose accuracy [132] */
+	char_var = ullong_var;
+
+	schar_var = bool_var;
+	schar_var = char_var;
+	schar_var = schar_var;
+	schar_var = uchar_var;
+	schar_var = short_var;
+	schar_var = ushort_var;
+	/* expect+1: warning: conversion from 'int' to 'signed char' may lose accuracy [132] */
+	schar_var = int_var;
+	/* expect+1: warning: conversion from 'unsigned int' to 'signed char' may lose accuracy [132] */
+	schar_var = uint_var;
+	/* expect+1: warning: conversion from 'long' to 'signed char' may lose accuracy [132] */
+	schar_var = long_var;
+	/* expect+1: warning: conversion from 'unsigned long' to 'signed char' may lose accuracy [132] */
+	schar_var = ulong_var;
+	/* expect+1: warning: conversion from 'long long' to 'signed char' may lose accuracy [132] */
+	schar_var = llong_var;
+	/* expect+1: warning: conversion from 'unsigned long long' to 'signed char' may lose accuracy [132] */
+	schar_var = ullong_var;
+
+	uchar_var = bool_var;
+	uchar_var = char_var;
+	uchar_var = schar_var;
+	uchar_var = uchar_var;
+	uchar_var = short_var;
+	uchar_var = ushort_var;
+	/* expect+1: warning: conversion from 'int' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = int_var;
+	/* expect+1: warning: conversion from 'unsigned int' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = uint_var;
+	/* expect+1: warning: conversion from 'long' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = long_var;
+	/* expect+1: warning: conversion from 'unsigned long' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = ulong_var;
+	/* expect+1: warning: conversion from 'long long' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = llong_var;
+	/* expect+1: warning: conversion from 'unsigned long long' to 'unsigned char' may lose accuracy [132] */
+	uchar_var = ullong_var;
+
+	short_var = bool_var;
+	short_var = char_var;
+	short_var = schar_var;
+	short_var = uchar_var;
+	short_var = short_var;
+	short_var = ushort_var;
+	/* expect+1: warning: conversion from 'int' to 'short' may lose accuracy [132] */
+	short_var = int_var;
+	/* expect+1: warning: conversion from 'unsigned int' to 'short' may lose accuracy [132] */
+	short_var = uint_var;
+	/* expect+1: warning: conversion from 'long' to 'short' may lose accuracy [132] */
+	short_var = long_var;
+	/* expect+1: warning: conversion from 'unsigned long' to 'short' may lose accuracy [132] */
+	short_var = ulong_var;
+	/* expect+1: warning: conversion from 'long long' to 'short' may lose 

re: CVS commit: src/share/mk

2023-08-08 Thread matthew green
matthew green writes:
> > > - used = dst - conv->wbuff;
> > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
> >
> > Any particular reason why there is a cast to uintptr_t here? I don't
> > think there is a guarantee that you can calculate an offset by
> > subtracting uintptr_ts calculated from pointers. The description in the
> > C Standard only guarantees that you can convert them back to a pointer
> > which compares the same to the original, but that's it. I don't find any
> > other promises about uintptr_t.
>
> in this case, they're not necessary it seems.  probably left
> over from my initial attempts at this workaround.

uh, apparently i forgot to save the file before compiling,
because simply removing them returns the sign-compare warning,
but that's fixable by using ptrdiff_t.


.mrg.


re: CVS commit: src/share/mk

2023-08-08 Thread matthew green
> > -   used = dst - conv->wbuff;
> > +   size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
>
> Any particular reason why there is a cast to uintptr_t here? I don't
> think there is a guarantee that you can calculate an offset by
> subtracting uintptr_ts calculated from pointers. The description in the
> C Standard only guarantees that you can convert them back to a pointer
> which compares the same to the original, but that's it. I don't find any
> other promises about uintptr_t.

in this case, they're not necessary it seems.  probably left
over from my initial attempts at this workaround.


.mrg.


CVS commit: src/sys/dev/ic

2023-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 17:31:13 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Avoid adding another member to the softc and use sc_flags instead.

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/hd44780var.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/ic/hd44780_subr.c
diff -u src/sys/dev/ic/hd44780_subr.c:1.23 src/sys/dev/ic/hd44780_subr.c:1.24
--- src/sys/dev/ic/hd44780_subr.c:1.23	Tue Aug  8 16:32:39 2023
+++ src/sys/dev/ic/hd44780_subr.c	Tue Aug  8 17:31:13 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780_subr.c,v 1.23 2023/08/08 16:32:39 nat Exp $ */
+/* $NetBSD: hd44780_subr.c,v 1.24 2023/08/08 17:31:13 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.23 2023/08/08 16:32:39 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.24 2023/08/08 17:31:13 nat Exp $");
 
 #include 
 #include 
@@ -458,7 +458,8 @@ hd44780_chipinit(struct hd44780_chip *sc
 	hd44780_ir_write(sc, en, cmd_ddramset(0x5));
 	hd44780_ir_write(sc, en, cmd_shift(0, 1));
 	hd44780_busy_wait(sc, en);
-	if (!sc->sc_writeonly && (dat = hd44780_ir_read(sc, en) & 0x7f) != 0x6) {
+	if (!(sc->sc_flags & HD_WRITEONLY) &&
+	(dat = hd44780_ir_read(sc, en) & 0x7f) != 0x6) {
 		sc->sc_dev_ok = 0;
 		sc->sc_flags &= ~HD_UP;
 		return EIO;

Index: src/sys/dev/ic/hd44780var.h
diff -u src/sys/dev/ic/hd44780var.h:1.10 src/sys/dev/ic/hd44780var.h:1.11
--- src/sys/dev/ic/hd44780var.h:1.10	Tue Aug  8 16:32:39 2023
+++ src/sys/dev/ic/hd44780var.h	Tue Aug  8 17:31:13 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780var.h,v 1.10 2023/08/08 16:32:39 nat Exp $ */
+/* $NetBSD: hd44780var.h,v 1.11 2023/08/08 17:31:13 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -97,6 +97,7 @@ struct hd44780_chip {
 #define HD_UP			0x10	/* if set, lcd has been initialized */
 #define HD_TIMEDOUT		0x20	/* lcd has recently stopped talking */
 #define HD_MULTICHIP		0x40	/* two HD44780 controllers (4-line) */
+#define HD_WRITEONLY		0x80	/* write only if set */
 	uint8_t sc_flags;
 
 	uint8_t sc_cols;		/* visible columns */
@@ -118,7 +119,6 @@ struct hd44780_chip {
 	void (* sc_writereg)(struct hd44780_chip *, uint32_t, uint32_t,
 	  uint8_t);
 	uint8_t (* sc_readreg)(struct hd44780_chip *, uint32_t, uint32_t);
-	bool sc_writeonly;		/* Output only device */
 };
 
 #define hd44780_ir_write(sc, en, dat) \



CVS commit: src/sys/dev/ic

2023-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 17:31:13 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Avoid adding another member to the softc and use sc_flags instead.

NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/hd44780var.h

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-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 16:32:39 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Add a flag for output only devices and attachments.

It is necessary to skip the test for the device as output only attached
devices lack the ability for the device to be probed - such as the 1602 lcd
module.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/hd44780var.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/ic/hd44780_subr.c
diff -u src/sys/dev/ic/hd44780_subr.c:1.22 src/sys/dev/ic/hd44780_subr.c:1.23
--- src/sys/dev/ic/hd44780_subr.c:1.22	Tue Aug  8 16:29:00 2023
+++ src/sys/dev/ic/hd44780_subr.c	Tue Aug  8 16:32:39 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780_subr.c,v 1.22 2023/08/08 16:29:00 nat Exp $ */
+/* $NetBSD: hd44780_subr.c,v 1.23 2023/08/08 16:32:39 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.22 2023/08/08 16:29:00 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.23 2023/08/08 16:32:39 nat Exp $");
 
 #include 
 #include 
@@ -458,7 +458,7 @@ hd44780_chipinit(struct hd44780_chip *sc
 	hd44780_ir_write(sc, en, cmd_ddramset(0x5));
 	hd44780_ir_write(sc, en, cmd_shift(0, 1));
 	hd44780_busy_wait(sc, en);
-	if ((dat = hd44780_ir_read(sc, en) & 0x7f) != 0x6) {
+	if (!sc->sc_writeonly && (dat = hd44780_ir_read(sc, en) & 0x7f) != 0x6) {
 		sc->sc_dev_ok = 0;
 		sc->sc_flags &= ~HD_UP;
 		return EIO;

Index: src/sys/dev/ic/hd44780var.h
diff -u src/sys/dev/ic/hd44780var.h:1.9 src/sys/dev/ic/hd44780var.h:1.10
--- src/sys/dev/ic/hd44780var.h:1.9	Tue Aug  8 16:29:00 2023
+++ src/sys/dev/ic/hd44780var.h	Tue Aug  8 16:32:39 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780var.h,v 1.9 2023/08/08 16:29:00 nat Exp $ */
+/* $NetBSD: hd44780var.h,v 1.10 2023/08/08 16:32:39 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -118,6 +118,7 @@ struct hd44780_chip {
 	void (* sc_writereg)(struct hd44780_chip *, uint32_t, uint32_t,
 	  uint8_t);
 	uint8_t (* sc_readreg)(struct hd44780_chip *, uint32_t, uint32_t);
+	bool sc_writeonly;		/* Output only device */
 };
 
 #define hd44780_ir_write(sc, en, dat) \



CVS commit: src/sys/dev/ic

2023-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 16:32:39 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Add a flag for output only devices and attachments.

It is necessary to skip the test for the device as output only attached
devices lack the ability for the device to be probed - such as the 1602 lcd
module.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/hd44780var.h

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-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 16:29:00 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Add a detach function.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/hd44780var.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/ic/hd44780_subr.c
diff -u src/sys/dev/ic/hd44780_subr.c:1.21 src/sys/dev/ic/hd44780_subr.c:1.22
--- src/sys/dev/ic/hd44780_subr.c:1.21	Sat Nov 13 13:52:01 2010
+++ src/sys/dev/ic/hd44780_subr.c	Tue Aug  8 16:29:00 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780_subr.c,v 1.21 2010/11/13 13:52:01 uebayasi Exp $ */
+/* $NetBSD: hd44780_subr.c,v 1.22 2023/08/08 16:29:00 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.21 2010/11/13 13:52:01 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd44780_subr.c,v 1.22 2023/08/08 16:29:00 nat Exp $");
 
 #include 
 #include 
@@ -393,6 +393,15 @@ hd44780_attach_subr(struct hd44780_chip 
 	callout_setfunc(>redraw, hlcd_redraw, sc);
 }
 
+void hd44780_detach(struct hd44780_chip *sc)
+{
+	callout_stop(>redraw);
+	callout_destroy(>redraw);
+
+	if (sc->sc_screen.image)
+		free(sc->sc_screen.image, M_DEVBUF);
+}
+
 int hd44780_init(struct hd44780_chip *sc)
 {
 	int ret;

Index: src/sys/dev/ic/hd44780var.h
diff -u src/sys/dev/ic/hd44780var.h:1.8 src/sys/dev/ic/hd44780var.h:1.9
--- src/sys/dev/ic/hd44780var.h:1.8	Sun Sep  6 06:01:00 2015
+++ src/sys/dev/ic/hd44780var.h	Tue Aug  8 16:29:00 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: hd44780var.h,v 1.8 2015/09/06 06:01:00 dholland Exp $ */
+/* $NetBSD: hd44780var.h,v 1.9 2023/08/08 16:29:00 nat Exp $ */
 
 /*
  * Copyright (c) 2002 Dennis I. Chernoivanov
@@ -136,6 +136,7 @@ struct hd44780_chip {
 	(sc)->sc_readreg((sc), (en), 1)
 
 void hd44780_attach_subr(struct hd44780_chip *);
+void hd44780_detach(struct hd44780_chip *);
 void hd44780_busy_wait(struct hd44780_chip *, uint32_t);
 int  hd44780_init(struct hd44780_chip *);
 int  hd44780_chipinit(struct hd44780_chip *, uint32_t);



CVS commit: src/sys/dev/ic

2023-08-08 Thread Nathanial Sloss
Module Name:src
Committed By:   nat
Date:   Tue Aug  8 16:29:00 UTC 2023

Modified Files:
src/sys/dev/ic: hd44780_subr.c hd44780var.h

Log Message:
Add a detach function.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/hd44780_subr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/hd44780var.h

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



CVS commit: src/sys/net/npf

2023-08-08 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Aug  8 16:10:42 UTC 2023

Modified Files:
src/sys/net/npf: npf_ruleset.c

Log Message:
The analysis documented in PR misc/56990 is correct.
Fix by not returning when encountering a ruleset rule.

The code up to now would stop at any group rule.

ruleset rules are marked as group rule and a dynamic rule.

processing is only finished when a result is present AND
we are looking at a plain group rule.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/net/npf/npf_ruleset.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/net/npf/npf_ruleset.c
diff -u src/sys/net/npf/npf_ruleset.c:1.51 src/sys/net/npf/npf_ruleset.c:1.52
--- src/sys/net/npf/npf_ruleset.c:1.51	Sat May 30 14:16:56 2020
+++ src/sys/net/npf/npf_ruleset.c	Tue Aug  8 16:10:41 2023
@@ -34,7 +34,7 @@
 
 #ifdef _KERNEL
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.51 2020/05/30 14:16:56 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_ruleset.c,v 1.52 2023/08/08 16:10:41 kardel Exp $");
 
 #include 
 #include 
@@ -891,7 +891,7 @@ npf_ruleset_inspect(npf_cache_t *npc, co
 		KASSERT(n < skip_to);
 
 		/* Group is a barrier: return a matching if found any. */
-		if ((attr & NPF_RULE_GROUP) != 0 && final_rl) {
+		if ((attr & NPF_DYNAMIC_GROUP) == NPF_RULE_GROUP && final_rl) {
 			break;
 		}
 



CVS commit: src/sys/net/npf

2023-08-08 Thread Frank Kardel
Module Name:src
Committed By:   kardel
Date:   Tue Aug  8 16:10:42 UTC 2023

Modified Files:
src/sys/net/npf: npf_ruleset.c

Log Message:
The analysis documented in PR misc/56990 is correct.
Fix by not returning when encountering a ruleset rule.

The code up to now would stop at any group rule.

ruleset rules are marked as group rule and a dynamic rule.

processing is only finished when a result is present AND
we are looking at a plain group rule.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/net/npf/npf_ruleset.c

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



CVS commit: src/external/mit/xorg/etc

2023-08-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Aug  8 14:38:44 UTC 2023

Modified Files:
src/external/mit/xorg/etc/etc.dreamcast: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0

Log Message:
Remove trailing tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0

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



CVS commit: src/external/mit/xorg/etc

2023-08-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Aug  8 14:38:44 UTC 2023

Modified Files:
src/external/mit/xorg/etc/etc.dreamcast: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0

Log Message:
Remove trailing tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.4 -r1.5 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.3 -r1.4 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0

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

Modified files:

Index: src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd
diff -u src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.4 src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.5
--- src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.4	Tue Aug  8 14:34:21 2023
+++ src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd	Tue Aug  8 14:38:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.jpkbd,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
+# $NetBSD: xorg.conf.jpkbd,v 1.5 2023/08/08 14:38:44 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -6,7 +6,7 @@ Section "ServerLayout"
 	InputDevice	"Mouse0" "CorePointer"
 	InputDevice	"Keyboard0" "CoreKeyboard"
 EndSection
-	
+
 Section "Files"
 	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
Index: src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
diff -u src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.4 src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.5
--- src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.4	Tue Aug  8 14:34:21 2023
+++ src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd	Tue Aug  8 14:38:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.uskbd,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
+# $NetBSD: xorg.conf.uskbd,v 1.5 2023/08/08 14:38:44 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -6,7 +6,7 @@ Section "ServerLayout"
 	InputDevice	"Mouse0" "CorePointer"
 	InputDevice	"Keyboard0" "CoreKeyboard"
 EndSection
-	
+
 Section "Files"
 	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection

Index: src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp
diff -u src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.4 src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.5
--- src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.4	Tue Aug  8 14:34:21 2023
+++ src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp	Tue Aug  8 14:38:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.640x240-jp,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
+# $NetBSD: xorg.conf.640x240-jp,v 1.5 2023/08/08 14:38:44 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -7,7 +7,7 @@ Section "ServerLayout"
 	InputDevice	"Mouse0"
 	InputDevice	"Keyboard0" "CoreKeyboard"
 EndSection
-	
+
 Section "Files"
 #	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
Index: src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us
diff -u src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.4 src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.5
--- src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.4	Tue Aug  8 14:34:21 2023
+++ src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us	Tue Aug  8 14:38:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.640x240-us,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
+# $NetBSD: xorg.conf.640x240-us,v 1.5 2023/08/08 14:38:44 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -7,7 +7,7 @@ Section "ServerLayout"
 	InputDevice	"Mouse0"
 	InputDevice	"Keyboard0" "CoreKeyboard"
 EndSection
-	
+
 Section "Files"
 #	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
Index: src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp
diff -u src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp:1.4 src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp:1.5

CVS commit: src/external/mit/xorg/etc

2023-08-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Aug  8 14:34:21 UTC 2023

Modified Files:
src/external/mit/xorg/etc/etc.dreamcast: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0

Log Message:
Specify options "AutoAddDevices" to prefer xorg.conf keyboard options.

Fixes PR/57346.
Should be pulled up to netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0

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

Modified files:

Index: src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd
diff -u src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.3 src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.4
--- src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd:1.3	Fri Jun 20 08:08:58 2014
+++ src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd	Tue Aug  8 14:34:21 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.jpkbd,v 1.3 2014/06/20 08:08:58 wiz Exp $
+# $NetBSD: xorg.conf.jpkbd,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -11,6 +11,11 @@ Section "Files"
 	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
 
+Section "ServerFlags"
+	# Explicitly prefer keyboard options defined in xorg.conf
+	Option		"AutoAddDevices" "false"
+EndSection
+
 Section "InputDevice"
 	Identifier	"Keyboard0"
 	Driver		"kbd"
Index: src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
diff -u src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.3 src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.4
--- src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd:1.3	Fri Jun 20 08:08:58 2014
+++ src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd	Tue Aug  8 14:34:21 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.uskbd,v 1.3 2014/06/20 08:08:58 wiz Exp $
+# $NetBSD: xorg.conf.uskbd,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -11,6 +11,11 @@ Section "Files"
 	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
 
+Section "ServerFlags"
+	# Explicitly prefer keyboard options defined in xorg.conf
+	Option		"AutoAddDevices" "false"
+EndSection
+
 Section "InputDevice"
 	Identifier	"Keyboard0"
 	Driver		"kbd"

Index: src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp
diff -u src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.3 src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.4
--- src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp:1.3	Fri Jun 20 08:08:58 2014
+++ src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp	Tue Aug  8 14:34:21 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.640x240-jp,v 1.3 2014/06/20 08:08:58 wiz Exp $
+# $NetBSD: xorg.conf.640x240-jp,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -12,6 +12,11 @@ Section "Files"
 #	FontPath	"/usr/pkg/share/fonts/X11/TTF/"
 EndSection
 
+Section "ServerFlags"
+	# Explicitly prefer keyboard options defined in xorg.conf
+	Option		"AutoAddDevices" "false"
+EndSection
+
 Section "InputDevice"
 	Identifier	"Keyboard0"
 	Driver		"kbd"
Index: src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us
diff -u src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.3 src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.4
--- src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us:1.3	Fri Jun 20 08:08:58 2014
+++ src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us	Tue Aug  8 14:34:21 2023
@@ -1,4 +1,4 @@
-# $NetBSD: xorg.conf.640x240-us,v 1.3 2014/06/20 08:08:58 wiz Exp $
+# $NetBSD: xorg.conf.640x240-us,v 1.4 2023/08/08 14:34:21 tsutsui Exp $
 
 Section "ServerLayout"
 	Identifier	"wsfb"
@@ -12,6 +12,11 @@ Section "Files"
 #	

CVS commit: src/external/mit/xorg/etc

2023-08-08 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Aug  8 14:34:21 UTC 2023

Modified Files:
src/external/mit/xorg/etc/etc.dreamcast: xorg.conf.jpkbd
xorg.conf.uskbd
src/external/mit/xorg/etc/etc.hpc: xorg.conf.640x240-jp
xorg.conf.640x240-us xorg.conf.640x480-jp xorg.conf.640x480-us
xorg.conf.800x600-jp xorg.conf.800x600-us
src/external/mit/xorg/etc/etc.hpcarm: xorg.conf.ws003sh
xorg.conf.ws007sh xorg.conf.ws011sh xorg.conf.ws020sh
src/external/mit/xorg/etc/etc.zaurus: xorg.conf.C3x00 xorg.conf.C7x0

Log Message:
Specify options "AutoAddDevices" to prefer xorg.conf keyboard options.

Fixes PR/57346.
Should be pulled up to netbsd-10.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.jpkbd \
src/external/mit/xorg/etc/etc.dreamcast/xorg.conf.uskbd
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x240-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.640x480-us \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-jp \
src/external/mit/xorg/etc/etc.hpc/xorg.conf.800x600-us
cvs rdiff -u -r1.3 -r1.4 \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws003sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws007sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws011sh \
src/external/mit/xorg/etc/etc.hpcarm/xorg.conf.ws020sh
cvs rdiff -u -r1.2 -r1.3 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C3x00 \
src/external/mit/xorg/etc/etc.zaurus/xorg.conf.C7x0

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



Re: CVS commit: src/share/mk

2023-08-08 Thread Rhialto
On Tue 08 Aug 2023 at 14:10:41 +0200, Joerg Sonnenberger wrote:
> On Tue, Aug 08, 2023 at 01:42:39PM +0200, Rhialto wrote:
> > On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote:
> > > Index: lib/libedit/chartype.c
> > > ===
> > > RCS file: /cvsroot/src/lib/libedit/chartype.c,v
> > > retrieving revision 1.36
> > > diff -p -u -r1.36 chartype.c
> > > --- lib/libedit/chartype.c30 Oct 2022 19:11:31 -  1.36
> > > +++ lib/libedit/chartype.c7 Aug 2023 23:41:44 -
> > > @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu
> > >   }
> > >  
> > >   /* failed to encode, need more buffer space */
> > > - used = dst - conv->wbuff;
> > > + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
> > 
> > Any particular reason why there is a cast to uintptr_t here? I don't
> > think there is a guarantee that you can calculate an offset by
> > subtracting uintptr_ts calculated from pointers. The description in the
> > C Standard only guarantees that you can convert them back to a pointer
> > which compares the same to the original, but that's it. I don't find any
> > other promises about uintptr_t.
> 
> Given that we used to make this assumption for offsetof like most
> systems, this seems to be portable naval gazing to me.

It is one thing to hide such an assumption away in a macro (and with all
compilers currently in use, offsetof() is mapped to __builtin_offsetof()
(see ), which quite likely exists because of the
unstandardness of the other version), but quite another to open-code it
again and again in general code. Think of the
PDP-10 port!

I was expecting some sort of answer related to unsigned vs signed sizes
and differences, or something like that, for which there is likely a
cleaner solution.

> Joerg
-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/share/mk

2023-08-08 Thread Joerg Sonnenberger
On Tue, Aug 08, 2023 at 01:42:39PM +0200, Rhialto wrote:
> On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote:
> > Index: lib/libedit/chartype.c
> > ===
> > RCS file: /cvsroot/src/lib/libedit/chartype.c,v
> > retrieving revision 1.36
> > diff -p -u -r1.36 chartype.c
> > --- lib/libedit/chartype.c  30 Oct 2022 19:11:31 -  1.36
> > +++ lib/libedit/chartype.c  7 Aug 2023 23:41:44 -
> > @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu
> > }
> >  
> > /* failed to encode, need more buffer space */
> > -   used = dst - conv->wbuff;
> > +   size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;
> 
> Any particular reason why there is a cast to uintptr_t here? I don't
> think there is a guarantee that you can calculate an offset by
> subtracting uintptr_ts calculated from pointers. The description in the
> C Standard only guarantees that you can convert them back to a pointer
> which compares the same to the original, but that's it. I don't find any
> other promises about uintptr_t.

Given that we used to make this assumption for offsetof like most
systems, this seems to be portable naval gazing to me.

Joerg


CVS commit: src/usr.sbin/traceroute

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 11:53:47 UTC 2023

Modified Files:
src/usr.sbin/traceroute: Makefile

Log Message:
traceroute/Makefile: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/traceroute/Makefile

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/traceroute/Makefile
diff -u src/usr.sbin/traceroute/Makefile:1.23 src/usr.sbin/traceroute/Makefile:1.24
--- src/usr.sbin/traceroute/Makefile:1.23	Tue Aug  8 06:27:33 2023
+++ src/usr.sbin/traceroute/Makefile	Tue Aug  8 11:53:47 2023
@@ -1,12 +1,12 @@
-#	$NetBSD: Makefile,v 1.23 2023/08/08 06:27:33 mrg Exp $	
+#	$NetBSD: Makefile,v 1.24 2023/08/08 11:53:47 riastradh Exp $
 
 USE_FORT?= yes	# network client
 
 RUMPPRG=traceroute
-MAN=	traceroute.8 
+MAN=	traceroute.8
 
 CPPFLAGS+=-DHAVE_MALLOC_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1
-CPPFLAGS+=-DHAVE_STRERROR=1 -DHAVE_SETLINEBUF=1 -DHAVE_SOCKADDR_SA_LEN=1 
+CPPFLAGS+=-DHAVE_STRERROR=1 -DHAVE_SETLINEBUF=1 -DHAVE_SOCKADDR_SA_LEN=1
 CPPFLAGS+=-DHAVE_RAW_OPTIONS=1
 CPPFLAGS+=-DHAVE_ICMP_NEXTMTU=1
 
@@ -17,7 +17,7 @@ DPADD+=	${LIBIPSEC}
 BINOWN= root
 BINMODE=4555
 
-SRCS=	traceroute.c ifaddrlist.c 
+SRCS=	traceroute.c ifaddrlist.c
 SRCS+= version.c as.c
 
 .PATH: ${.CURDIR}/../../lib/libc/net
@@ -28,7 +28,7 @@ SANITIZER_RENAME_CLASSES+=	rump
 SANITIZER_RENAME_FILES.rump+=	${PROG}_rumpops.c ${RUMPSRCS}
 SANITIZER_RENAME_SYMBOL.rump+=	getifaddrs
 
-AWKS=	median.awk mean.awk 
+AWKS=	median.awk mean.awk
 
 COPTS.traceroute.c+=	${CC_WNO_ARRAY_BOUNDS}
 



CVS commit: src/usr.sbin/traceroute

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 11:53:47 UTC 2023

Modified Files:
src/usr.sbin/traceroute: Makefile

Log Message:
traceroute/Makefile: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/usr.sbin/traceroute/Makefile

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



CVS commit: src/external/gpl3/gcc

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 11:50:22 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.warnings

Log Message:
gcc/README.warnings: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.warnings

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

Modified files:

Index: src/external/gpl3/gcc/README.warnings
diff -u src/external/gpl3/gcc/README.warnings:1.4 src/external/gpl3/gcc/README.warnings:1.5
--- src/external/gpl3/gcc/README.warnings:1.4	Tue Aug  8 06:27:33 2023
+++ src/external/gpl3/gcc/README.warnings	Tue Aug  8 11:50:22 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.warnings,v 1.4 2023/08/08 06:27:33 mrg Exp $
+$NetBSD: README.warnings,v 1.5 2023/08/08 11:50:22 riastradh Exp $
 
 What to do about GCC warnings and NetBSD.
 
@@ -36,21 +36,21 @@ new GCC 12 warnings:
   party code.
 
   bsd.own.mk variable: ${CC_WNO_MISSING_TEMPLATE_KEYWORD}
- 
+
   -Wno-stringop-overread
 
   This warning triggers when array bounds appear to be exceeded.  There
   maybe some bugs related to this warning in GCC 12.
 
   bsd.own.mk variable: ${CC_WNO_STRINGOP_OVERREAD}
- 
+
   -Wno-register
 
   This warning triggers in C++17 mode where 'register' has been removed,
   and should only be applied to 3rd party code.
 
   bsd.own.mk variable: ${CC_WNO_REGISTER}
- 
+
   -Wno-array-bounds
 
   This warning triggers with a number of code issues that tend to be real
@@ -61,7 +61,7 @@ new GCC 12 warnings:
 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110878
 
   bsd.own.mk variable: ${CC_WNO_ARRAY_BOUNDS}
- 
+
 
 new GCC 10 warnings:
 



CVS commit: src/external/gpl3/gcc

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 11:50:22 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.warnings

Log Message:
gcc/README.warnings: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.warnings

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



Re: CVS commit: src/share/mk

2023-08-08 Thread Rhialto
On Tue 08 Aug 2023 at 09:44:41 +1000, matthew green wrote:
> Index: lib/libedit/chartype.c
> ===
> RCS file: /cvsroot/src/lib/libedit/chartype.c,v
> retrieving revision 1.36
> diff -p -u -r1.36 chartype.c
> --- lib/libedit/chartype.c30 Oct 2022 19:11:31 -  1.36
> +++ lib/libedit/chartype.c7 Aug 2023 23:41:44 -
> @@ -235,17 +235,17 @@ ct_visual_string(const wchar_t *s, ct_bu
>   }
>  
>   /* failed to encode, need more buffer space */
> - used = dst - conv->wbuff;
> + size_t sused = (uintptr_t)dst - (uintptr_t)conv->wbuff;

Any particular reason why there is a cast to uintptr_t here? I don't
think there is a guarantee that you can calculate an offset by
subtracting uintptr_ts calculated from pointers. The description in the
C Standard only guarantees that you can convert them back to a pointer
which compares the same to the original, but that's it. I don't find any
other promises about uintptr_t.

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

2023-08-08 Thread Joerg Sonnenberger
On Tue, Aug 08, 2023 at 04:01:19PM +1000, matthew green wrote:
> Joerg Sonnenberger writes:
> > On Thu, Aug 03, 2023 at 08:16:31AM +, matthew green wrote:
> > > Module Name:  src
> > > Committed By: mrg
> > > Date: Thu Aug  3 08:16:31 UTC 2023
> > > 
> > > Modified Files:
> > >   src/sys/arch/evbarm/gumstix: gumstix_machdep.c
> > >   src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c
> > >   src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c
> > >   src/sys/arch/hppa/stand: Makefile.buildboot
> > >   src/sys/arch/m68k/m68k: regdump.c
> > >   src/sys/arch/macppc/macppc: cpu.c
> > > 
> > > Log Message:
> > > ignore "-Warray-bounds" for various low level platform code that knows
> > > how something is setup but technically is undefined behaviour.  the
> > > most common here is "extern int end;" and then using offsets of ""
> > > that are outside the bounds of this 4-byte integer.
> > > 
> > > these uses are almost certainly all OK in reality.
> >
> > Are you sure that GCC's optimizer is not going to break any of those
> > assumptions? We had to go through quite some trouble in crtbegin.c for
> > similar patterns?
> 
> nope, infact i'm not.  i'll revert these.
> 
> do you have good ways to fix these from that crt issue?

Not really, I just remember that we needed a few iterations. The last
round was especially mysterious as weak references suddenly couldn't
alias extern symbol.

Joerg


CVS commit: src/lib/libnpf

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:36:04 UTC 2023

Modified Files:
src/lib/libnpf: npf.c

Log Message:
libnpf(3): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/libnpf/npf.c

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



CVS commit: src/usr.sbin/npf/npftest

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:48 UTC 2023

Modified Files:
src/usr.sbin/npf/npftest: npftest.c

Log Message:
npftest(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/npf/npftest/npftest.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/npf/npftest/npftest.c
diff -u src/usr.sbin/npf/npftest/npftest.c:1.26 src/usr.sbin/npf/npftest/npftest.c:1.27
--- src/usr.sbin/npf/npftest/npftest.c:1.26	Tue Aug  1 07:57:17 2023
+++ src/usr.sbin/npf/npftest/npftest.c	Tue Aug  8 10:35:48 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: npftest.c,v 1.26 2023/08/01 07:57:17 mrg Exp $	*/
+/*	$NetBSD: npftest.c,v 1.27 2023/08/08 10:35:48 riastradh Exp $	*/
 
 /*
  * NPF testing framework.
@@ -147,7 +147,7 @@ generate_test_cdb(size_t *size)
 	if (cdbw_put(cdbw, , alen, , alen) == -1)
 		err(EXIT_FAILURE, "cdbw_put");
 
-	if (cdbw_output(cdbw, fd, "npf-table-cdb\0\0", NULL) == -1) {
+	if (cdbw_output(cdbw, fd, "npf-table-cdb", NULL) == -1) {
 		err(EXIT_FAILURE, "cdbw_output");
 	}
 	cdbw_close(cdbw);



CVS commit: src/usr.sbin/services_mkdb

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:21 UTC 2023

Modified Files:
src/usr.sbin/services_mkdb: output_cdb.c

Log Message:
services_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/services_mkdb/output_cdb.c

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



CVS commit: src/usr.sbin/npf/npftest

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:48 UTC 2023

Modified Files:
src/usr.sbin/npf/npftest: npftest.c

Log Message:
npftest(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/usr.sbin/npf/npftest/npftest.c

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



CVS commit: src/usr.sbin/services_mkdb

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:21 UTC 2023

Modified Files:
src/usr.sbin/services_mkdb: output_cdb.c

Log Message:
services_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/services_mkdb/output_cdb.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/services_mkdb/output_cdb.c
diff -u src/usr.sbin/services_mkdb/output_cdb.c:1.2 src/usr.sbin/services_mkdb/output_cdb.c:1.3
--- src/usr.sbin/services_mkdb/output_cdb.c:1.2	Mon Aug  7 20:21:08 2023
+++ src/usr.sbin/services_mkdb/output_cdb.c	Tue Aug  8 10:35:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: output_cdb.c,v 1.2 2023/08/07 20:21:08 tnn Exp $	*/
+/*	$NetBSD: output_cdb.c,v 1.3 2023/08/08 10:35:21 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -143,7 +143,7 @@ cdb_close(void)
 	rv = 0;
 	serrno = errno;
 
-	if (cdbw_output(cdbw, cdbw_fd, "services(5)\0\0\0\0", NULL)) {
+	if (cdbw_output(cdbw, cdbw_fd, "services(5)", NULL)) {
 		rv = -1;
 		serrno = errno;
 	}



CVS commit: src/tests/lib/libc

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:36:17 UTC 2023

Modified Files:
src/tests/lib/libc: t_cdb.c

Log Message:
t_cdb: No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/t_cdb.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/lib/libc/t_cdb.c
diff -u src/tests/lib/libc/t_cdb.c:1.3 src/tests/lib/libc/t_cdb.c:1.4
--- src/tests/lib/libc/t_cdb.c:1.3	Tue Aug  1 07:57:17 2023
+++ src/tests/lib/libc/t_cdb.c	Tue Aug  8 10:36:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_cdb.c,v 1.3 2023/08/01 07:57:17 mrg Exp $	*/
+/*	$NetBSD: t_cdb.c,v 1.4 2023/08/08 10:36:17 riastradh Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: t_cdb.c,v 1.3 2023/08/01 07:57:17 mrg Exp $");
+__RCSID("$NetBSD: t_cdb.c,v 1.4 2023/08/08 10:36:17 riastradh Exp $");
 
 #include 
 
@@ -100,7 +100,7 @@ write_database(size_t len)
 		ATF_REQUIRE(cdbw_put(db, [i], sizeof(keys[i]),
 		buf, sizeof(buf)) == 0);
 	}
-	ATF_REQUIRE(cdbw_output(db, fd, "test database\0\0", arc4random) == 0);
+	ATF_REQUIRE(cdbw_output(db, fd, "test database", arc4random) == 0);
 	cdbw_close(db);
 	ATF_REQUIRE(close(fd) == 0);
 }



CVS commit: src/tests/lib/libc

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:36:17 UTC 2023

Modified Files:
src/tests/lib/libc: t_cdb.c

Log Message:
t_cdb: No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/t_cdb.c

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



CVS commit: src/lib/libnpf

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:36:04 UTC 2023

Modified Files:
src/lib/libnpf: npf.c

Log Message:
libnpf(3): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/lib/libnpf/npf.c

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

Modified files:

Index: src/lib/libnpf/npf.c
diff -u src/lib/libnpf/npf.c:1.51 src/lib/libnpf/npf.c:1.52
--- src/lib/libnpf/npf.c:1.51	Tue Aug  1 07:57:17 2023
+++ src/lib/libnpf/npf.c	Tue Aug  8 10:36:04 2023
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.51 2023/08/01 07:57:17 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf.c,v 1.52 2023/08/08 10:36:04 riastradh Exp $");
 
 #include 
 #include 
@@ -1203,7 +1203,7 @@ _npf_table_build_const(nl_table_t *tl)
 	}
 	unlink(sfn);
 
-	if (cdbw_output(cdbw, fd, "npf-table-cdb\0\0", NULL) == -1) {
+	if (cdbw_output(cdbw, fd, "npf-table-cdb", NULL) == -1) {
 		error = errno;
 		goto out;
 	}



CVS commit: src/usr.sbin/dev_mkdb

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:38 UTC 2023

Modified Files:
src/usr.sbin/dev_mkdb: dev_mkdb.c

Log Message:
dev_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/dev_mkdb/dev_mkdb.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/dev_mkdb/dev_mkdb.c
diff -u src/usr.sbin/dev_mkdb/dev_mkdb.c:1.30 src/usr.sbin/dev_mkdb/dev_mkdb.c:1.31
--- src/usr.sbin/dev_mkdb/dev_mkdb.c:1.30	Tue Aug  1 07:57:17 2023
+++ src/usr.sbin/dev_mkdb/dev_mkdb.c	Tue Aug  8 10:35:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: dev_mkdb.c,v 1.30 2023/08/01 07:57:17 mrg Exp $	*/
+/*	$NetBSD: dev_mkdb.c,v 1.31 2023/08/08 10:35:37 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: dev_mkdb.c,v 1.30 2023/08/01 07:57:17 mrg Exp $");
+__RCSID("$NetBSD: dev_mkdb.c,v 1.31 2023/08/08 10:35:37 riastradh Exp $");
 
 #include 
 #include 
@@ -76,7 +76,7 @@ cdb_close(void)
 	fd = open(db_name_tmp, O_CREAT|O_EXCL|O_WRONLY, FILE_PERMISSION);
 	if (fd == -1)
 		err(1, "opening %s failed", db_name_tmp);
-	if (cdbw_output(db, fd, "NetBSD6 devdb\0\0", NULL))
+	if (cdbw_output(db, fd, "NetBSD6 devdb", NULL))
 		err(1, "failed to write temporary database %s", db_name_tmp);
 	cdbw_close(db);
 	db = NULL;



CVS commit: src/usr.sbin/dev_mkdb

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:35:38 UTC 2023

Modified Files:
src/usr.sbin/dev_mkdb: dev_mkdb.c

Log Message:
dev_mkdb(8): No need for weird padding any more.

cdbw_output never needed it at runtime, and the declaration no longer
makes gcc angry about not having it.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/usr.sbin/dev_mkdb/dev_mkdb.c

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



CVS commit: src

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:34:08 UTC 2023

Modified Files:
src/include: cdbw.h
src/lib/libc/cdb: cdbw.3 cdbw.c

Log Message:
cdbw(3): Make cdbw_output descr parameter type less confusing.

This is a string of _up to_ 16 bytes, used with strncpy(..., 16).
Specifying `const char descr[16]', while formally equivalent to
`const char *descr' in standard C, now provokes the ire of gcc when
the caller does not provide a buffer of at least 16 bytes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/include/cdbw.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/cdb/cdbw.3 src/lib/libc/cdb/cdbw.c

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

Modified files:

Index: src/include/cdbw.h
diff -u src/include/cdbw.h:1.2 src/include/cdbw.h:1.3
--- src/include/cdbw.h:1.2	Sun Jun  3 21:21:45 2012
+++ src/include/cdbw.h	Tue Aug  8 10:34:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdbw.h,v 1.2 2012/06/03 21:21:45 joerg Exp $	*/
+/*	$NetBSD: cdbw.h,v 1.3 2023/08/08 10:34:08 riastradh Exp $	*/
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -50,7 +50,7 @@ int		 cdbw_put_data(struct cdbw *, const
 int		 cdbw_put_key(struct cdbw *, const void *, size_t,
 uint32_t);
 uint32_t	 cdbw_stable_seeder(void);
-int		 cdbw_output(struct cdbw *, int, const char[16],
+int		 cdbw_output(struct cdbw *, int, const char *,
 uint32_t (*)(void));
 void		 cdbw_close(struct cdbw *);
 

Index: src/lib/libc/cdb/cdbw.3
diff -u src/lib/libc/cdb/cdbw.3:1.8 src/lib/libc/cdb/cdbw.3:1.9
--- src/lib/libc/cdb/cdbw.3:1.8	Thu Feb  6 15:50:40 2014
+++ src/lib/libc/cdb/cdbw.3	Tue Aug  8 10:34:08 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: cdbw.3,v 1.8 2014/02/06 15:50:40 rmind Exp $
+.\"	$NetBSD: cdbw.3,v 1.9 2023/08/08 10:34:08 riastradh Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -74,7 +74,7 @@
 .Fo cdbw_output
 .Fa "struct cdbw *cdbw"
 .Fa "int output"
-.Fa "const char descr[16]"
+.Fa "const char *descr"
 .Fa "uint32_t (*seedgen)(void)"
 .Fc
 .Ft void
@@ -113,7 +113,8 @@ computes the database file and writes it
 The function returns an error if the file cannot be written correctly.
 The
 .Fa descr
-parameter provides a human readable description of the database content.
+parameter, a string of up to 16 bytes, provides a human readable
+description of the database content.
 The
 .Fa seedgen
 parameter can be used to override the default PRNG.
Index: src/lib/libc/cdb/cdbw.c
diff -u src/lib/libc/cdb/cdbw.c:1.8 src/lib/libc/cdb/cdbw.c:1.9
--- src/lib/libc/cdb/cdbw.c:1.8	Tue Apr 19 20:32:14 2022
+++ src/lib/libc/cdb/cdbw.c	Tue Aug  8 10:34:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdbw.c,v 1.8 2022/04/19 20:32:14 rillig Exp $	*/
+/*	$NetBSD: cdbw.c,v 1.9 2023/08/08 10:34:08 riastradh Exp $	*/
 /*-
  * Copyright (c) 2009, 2010, 2015 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -36,7 +36,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: cdbw.c,v 1.8 2022/04/19 20:32:14 rillig Exp $");
+__RCSID("$NetBSD: cdbw.c,v 1.9 2023/08/08 10:34:08 riastradh Exp $");
 
 #include "namespace.h"
 
@@ -602,7 +602,7 @@ print_hash(struct cdbw *cdbw, struct sta
 }
 
 int
-cdbw_output(struct cdbw *cdbw, int fd, const char descr[16],
+cdbw_output(struct cdbw *cdbw, int fd, const char *descr,
 uint32_t (*seedgen)(void))
 {
 	struct state state;



CVS commit: src

2023-08-08 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Aug  8 10:34:08 UTC 2023

Modified Files:
src/include: cdbw.h
src/lib/libc/cdb: cdbw.3 cdbw.c

Log Message:
cdbw(3): Make cdbw_output descr parameter type less confusing.

This is a string of _up to_ 16 bytes, used with strncpy(..., 16).
Specifying `const char descr[16]', while formally equivalent to
`const char *descr' in standard C, now provokes the ire of gcc when
the caller does not provide a buffer of at least 16 bytes.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/include/cdbw.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libc/cdb/cdbw.3 src/lib/libc/cdb/cdbw.c

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



Re: CVS commit: src/share/mk

2023-08-08 Thread Taylor R Campbell
> Date: Mon, 7 Aug 2023 23:58:50 +0200
> From: Tobias Nygren 
> 
> Is this sort of fix acceptable for the above cases?
> 
> + ptrdiff_t offset = pos - buf;
>   new_buf = realloc(buf, buf_size);
>   if (!new_buf)
>   err(2, "realloc of linebuf to %zu bytes failed",
>   buf_size);
> - 
> +
>   end = new_buf + buf_size;
> - pos = new_buf + (pos - buf);
> + pos = new_buf + offset;
>   buf = new_buf;

Yes, this is a good approach.

Even if it's suboptimal in some cases, it is very easy to audit
mechanical changes, which is important if there are a lot of them.

Any further case-specific simplifications (like changing ptrdiff_t to
size_t, since it will always be nonnegative here; just using `size_t
offset = buf_size' before `buf_size *= 2', since since pos == end and
end == buf + buf_size) can be done afterward in a separate commit.


CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:59:41 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.h

Log Message:
nix the NetBSD specific GEM_BUG_ON().

avoids GCC 12 warnings, and matches upstream closer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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/external/bsd/drm2/dist/drm/i915/i915_gem.h
diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.7 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.8
--- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h:1.7	Mon Dec 20 19:54:07 2021
+++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h	Tue Aug  8 06:59:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: i915_gem.h,v 1.7 2021/12/20 19:54:07 riastradh Exp $	*/
+/*	$NetBSD: i915_gem.h,v 1.8 2023/08/08 06:59:40 mrg Exp $	*/
 
 /*
  * Copyright © 2016 Intel Corporation
@@ -41,13 +41,6 @@ struct drm_i915_private;
 
 #define GEM_SHOW_DEBUG() drm_debug_enabled(DRM_UT_DRIVER)
 
-#ifdef __NetBSD__
-#ifdef DIAGNOSTIC
-#define	GEM_BUG_ON(condition)	KASSERT(!(condition))
-#else
-#define	GEM_BUG_ON(condition)	BUILD_BUG_ON_INVALID(condition)
-#endif
-#else
 #define GEM_BUG_ON(condition) do { if (unlikely((condition))) {	\
 		GEM_TRACE_ERR("%s:%d GEM_BUG_ON(%s)\n", \
 			  __func__, __LINE__, __stringify(condition)); \
@@ -55,7 +48,6 @@ struct drm_i915_private;
 		BUG(); \
 		} \
 	} while(0)
-#endif
 #define GEM_WARN_ON(expr) WARN_ON(expr)
 
 #define GEM_DEBUG_DECL(var) var



CVS commit: src/sys/external/bsd/drm2/dist/drm/i915

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:59:41 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.h

Log Message:
nix the NetBSD specific GEM_BUG_ON().

avoids GCC 12 warnings, and matches upstream closer.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.h

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



CVS commit: src/sys/external/bsd/drm2/dist/drm

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:58:20 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm: drm_dp_helper.c

Log Message:
comment a function that has a clear overbounds read but it isn't used.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.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/external/bsd/drm2/dist/drm/drm_dp_helper.c
diff -u src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.16 src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.17
--- src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c:1.16	Sun Dec 19 12:41:54 2021
+++ src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c	Tue Aug  8 06:58:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_dp_helper.c,v 1.16 2021/12/19 12:41:54 riastradh Exp $	*/
+/*	$NetBSD: drm_dp_helper.c,v 1.17 2023/08/08 06:58:20 mrg Exp $	*/
 
 /*
  * Copyright © 2009 Keith Packard
@@ -23,7 +23,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: drm_dp_helper.c,v 1.16 2021/12/19 12:41:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_dp_helper.c,v 1.17 2023/08/08 06:58:20 mrg Exp $");
 
 #include 
 #include 
@@ -128,6 +128,13 @@ u8 drm_dp_get_adjust_request_pre_emphasi
 }
 EXPORT_SYMBOL(drm_dp_get_adjust_request_pre_emphasis);
 
+#ifndef __NetBSD__
+/*
+ * XXXGCC12
+ * this unused function is bad.  DP_LINK_STATUS_SIZE is 6, and
+ * DP_ADJUST_REQUEST_POST_CURSOR2 triggers an offset of 10 into link_status[].
+ * fortunately, it is not used.
+ */
 u8 drm_dp_get_adjust_request_post_cursor(const u8 link_status[DP_LINK_STATUS_SIZE],
 	 unsigned int lane)
 {
@@ -137,6 +144,7 @@ u8 drm_dp_get_adjust_request_post_cursor
 	return (value >> (lane << 1)) & 0x3;
 }
 EXPORT_SYMBOL(drm_dp_get_adjust_request_post_cursor);
+#endif
 
 void drm_dp_link_train_clock_recovery_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
 {



CVS commit: src/sys/external/bsd/drm2/dist/drm

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:58:20 UTC 2023

Modified Files:
src/sys/external/bsd/drm2/dist/drm: drm_dp_helper.c

Log Message:
comment a function that has a clear overbounds read but it isn't used.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/dist/drm/drm_dp_helper.c

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



CVS commit: src/sys/dev/pci

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:57:20 UTC 2023

Modified Files:
src/sys/dev/pci: sisfb.c

Log Message:
ensure all data passed to copyout() has been initialised.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/sisfb.c

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



CVS commit: src/sys/dev/pci

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:57:20 UTC 2023

Modified Files:
src/sys/dev/pci: sisfb.c

Log Message:
ensure all data passed to copyout() has been initialised.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/sisfb.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/pci/sisfb.c
diff -u src/sys/dev/pci/sisfb.c:1.8 src/sys/dev/pci/sisfb.c:1.9
--- src/sys/dev/pci/sisfb.c:1.8	Tue Sep 21 14:47:28 2021
+++ src/sys/dev/pci/sisfb.c	Tue Aug  8 06:57:20 2023
@@ -24,7 +24,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sisfb.c,v 1.8 2021/09/21 14:47:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sisfb.c,v 1.9 2023/08/08 06:57:20 mrg Exp $");
 
 #include 
 #include 
@@ -694,6 +694,8 @@ sisfb_getcmap(uint8_t *cmap, struct wsdi
 	dst = ramp;
 	for (i = 0; i < count; i++)
 		*dst++ = *src, src += 3;
+	for (; i < sizeof(ramp); i++)
+		*dst++ = 0;
 	rc = copyout(ramp, cm->red, count);
 	if (rc != 0)
 		return rc;



CVS commit: src/external/gpl3/gcc

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:42:16 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
update sparc asan issue with details.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/README.gcc12

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc12
diff -u src/external/gpl3/gcc/README.gcc12:1.9 src/external/gpl3/gcc/README.gcc12:1.10
--- src/external/gpl3/gcc/README.gcc12:1.9	Mon Aug  7 00:35:49 2023
+++ src/external/gpl3/gcc/README.gcc12	Tue Aug  8 06:42:16 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc12,v 1.9 2023/08/07 00:35:49 rin Exp $
+$NetBSD: README.gcc12,v 1.10 2023/08/08 06:42:16 mrg Exp $
 
 
 new stuff:
@@ -61,7 +61,7 @@ powerpc		y	y	y	y	?	n[4]		?	?	?
 powerpc64	y	?	?	y	?	?		?	?	?
 sh3eb		y	?	y	y	?	?		?	?	?
 sh3el		y	n[20]	y	y	?	n[8]		?	?	?
-sparc		y	y	y	y	n[atf]	y		y	y	?
+sparc		y	y	y	y	n[21]	y		y	y	?
 sparc64		y	b	y	y	n[16]	y		y	?	?
 vax		y	?	y	y	?	n		?	?	?
 x86_64		y	y	y	y	y[13]	y		y	y	?
@@ -126,7 +126,15 @@ architecture	tools	kernels	libgcc	native
 [20]: Kernel needs -O1 for ffs32() and ffs_nodealloccg() for multi-user boot. Even if the whole kernel is built with -O1, it panics during ATF:
   kernel/t_sysv (92/935): 3 test cases
   msg: [ 3981.4751382] panic: kernel diagnostic assertion "msghdr->msg_spot >= 0" failed: file "../../../../kern/sysv_msg.c", line 426
-[atf]: new failures in ATF, probably crashes
+[21]: asan has v7/v8/atomic issues:
+  ld: /usr/lib/libasan.so: undefined reference to `__sync_val_compare_and_swap_8'
+  nm shows some more:
+	U __sync_add_and_fetch_4
+	U __sync_fetch_and_add_4
+	U __sync_lock_test_and_set_4
+	U __sync_val_compare_and_swap_1
+	U __sync_val_compare_and_swap_4
+  liblsan and libubsan are mssing the _4 and _8 versions, too.
 
 
 CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.



CVS commit: src/external/gpl3/gcc

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:42:16 UTC 2023

Modified Files:
src/external/gpl3/gcc: README.gcc12

Log Message:
update sparc asan issue with details.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/gcc/README.gcc12

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



CVS commit: src/usr.sbin/timed/timed

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:31:58 UTC 2023

Modified Files:
src/usr.sbin/timed/timed: timed.c

Log Message:
use standard strncpy() idiom to completely zero a buffer, including
explicitly nul the final char.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/timed/timed/timed.c

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



CVS commit: src/usr.sbin/timed/timed

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:31:58 UTC 2023

Modified Files:
src/usr.sbin/timed/timed: timed.c

Log Message:
use standard strncpy() idiom to completely zero a buffer, including
explicitly nul the final char.

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.sbin/timed/timed/timed.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/timed/timed/timed.c
diff -u src/usr.sbin/timed/timed/timed.c:1.29 src/usr.sbin/timed/timed/timed.c:1.30
--- src/usr.sbin/timed/timed/timed.c:1.29	Sun Oct 16 16:44:15 2022
+++ src/usr.sbin/timed/timed/timed.c	Tue Aug  8 06:31:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: timed.c,v 1.29 2022/10/16 16:44:15 rillig Exp $	*/
+/*	$NetBSD: timed.c,v 1.30 2023/08/08 06:31:58 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1985, 1993 The Regents of the University of California.
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19
 #if 0
 static char sccsid[] = "@(#)timed.c	8.2 (Berkeley) 3/26/95";
 #else
-__RCSID("$NetBSD: timed.c,v 1.29 2022/10/16 16:44:15 rillig Exp $");
+__RCSID("$NetBSD: timed.c,v 1.30 2023/08/08 06:31:58 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -688,7 +688,8 @@ add_good_host(const char* name,
 		exit(EXIT_FAILURE);
 	}
 
-	(void)strncpy(>name[0], name, sizeof(ghp->name));
+	(void)strncpy(>name[0], name, sizeof(ghp->name) - 1);
+	ghp->name[sizeof(ghp->name) - 1] = 0;
 	ghp->next = goodhosts;
 	ghp->perm = perm;
 	goodhosts = ghp;



CVS commit: src/lib/libm/src

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:31:18 UTC 2023

Modified Files:
src/lib/libm/src: k_rem_pio2.c k_rem_pio2f.c

Log Message:
avoid uninitialised variable accesses.

if __kernel_rem_pio2() or __kernel_rem_pio2f() are called with "nx" less
than 2, the local variable fq[0] may be accessed uninitialised.

__kernel_rem_pio2() has direct calls with nx = 1, and __kernel_rem_pio2f()
is called with a value starting at 3, but may be decreased to less than 2,
implied by this code , if not actually avoided by the tx[] setup above:
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
n  =  __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/k_rem_pio2.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/k_rem_pio2f.c

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

Modified files:

Index: src/lib/libm/src/k_rem_pio2.c
diff -u src/lib/libm/src/k_rem_pio2.c:1.14 src/lib/libm/src/k_rem_pio2.c:1.15
--- src/lib/libm/src/k_rem_pio2.c:1.14	Wed Aug 24 13:51:19 2022
+++ src/lib/libm/src/k_rem_pio2.c	Tue Aug  8 06:31:17 2023
@@ -16,7 +16,7 @@
 __FBSDID("$FreeBSD: head/lib/msun/src/k_rem_pio2.c 342651 2018-12-31 15:43:06Z pfg $");
 #endif
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2.c,v 1.14 2022/08/24 13:51:19 christos Exp $");
+__RCSID("$NetBSD: k_rem_pio2.c,v 1.15 2023/08/08 06:31:17 mrg Exp $");
 #endif
 
 /*
@@ -302,6 +302,11 @@ __kernel_rem_pio2(double *x, double *y, 
 	int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
 	double z,fw,f[20],fq[20],q[20];
 
+/* if nx < 2, fq[0] may be accessed uninitialised */
+	if (nx < 2) {
+	fq[0] = 0;
+	}
+
 /* initialize jk*/
 	jk = init_jk[prec];
 	jp = jk;

Index: src/lib/libm/src/k_rem_pio2f.c
diff -u src/lib/libm/src/k_rem_pio2f.c:1.9 src/lib/libm/src/k_rem_pio2f.c:1.10
--- src/lib/libm/src/k_rem_pio2f.c:1.9	Thu Jun 22 12:43:43 2017
+++ src/lib/libm/src/k_rem_pio2f.c	Tue Aug  8 06:31:17 2023
@@ -15,7 +15,7 @@
 
 #include 
 #if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: k_rem_pio2f.c,v 1.9 2017/06/22 12:43:43 maya Exp $");
+__RCSID("$NetBSD: k_rem_pio2f.c,v 1.10 2023/08/08 06:31:17 mrg Exp $");
 #endif
 
 #include "namespace.h"
@@ -53,6 +53,11 @@ __kernel_rem_pio2f(float *x, float *y, i
 	int32_t jz,jx,jv,jp,jk,carry,n,iq[20],i,j,k,m,q0,ih;
 	float z,fw,f[20],fq[20],q[20];
 
+/* if nx < 2, fq[0] may be accessed uninitialised */
+	if (nx < 2) {
+	fq[0] = 0;
+	}
+
 /* initialize jk*/
 	jk = init_jk[prec];
 	jp = jk;



CVS commit: src/lib/libm/src

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:31:18 UTC 2023

Modified Files:
src/lib/libm/src: k_rem_pio2.c k_rem_pio2f.c

Log Message:
avoid uninitialised variable accesses.

if __kernel_rem_pio2() or __kernel_rem_pio2f() are called with "nx" less
than 2, the local variable fq[0] may be accessed uninitialised.

__kernel_rem_pio2() has direct calls with nx = 1, and __kernel_rem_pio2f()
is called with a value starting at 3, but may be decreased to less than 2,
implied by this code , if not actually avoided by the tx[] setup above:
nx = 3;
while(tx[nx-1]==zero) nx--; /* skip zero term */
n  =  __kernel_rem_pio2f(tx,y,e0,nx,2,two_over_pi);

found by GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/lib/libm/src/k_rem_pio2.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libm/src/k_rem_pio2f.c

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



CVS commit: src

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:27:33 UTC 2023

Modified Files:
src/external/apache2/llvm/librt: Makefile.inc
src/external/bsd/file/lib: Makefile
src/external/gpl3/gcc: README.warnings
src/external/mit/xorg/lib/dri.old: Makefile
src/external/mit/xorg/lib/gallium.old: Makefile
src/external/mit/xorg/lib/libGLU: Makefile
src/external/public-domain/sqlite/lib: Makefile
src/share/mk: bsd.own.mk
src/sys/arch/hppa/conf: Makefile.hppa
src/sys/conf: copts.mk
src/tests/lib/libc/string: Makefile
src/tests/lib/libc/sys: Makefile
src/tests/sys/crypto/aes: Makefile
src/usr.bin/pkill: Makefile
src/usr.sbin/mrouted: Makefile
src/usr.sbin/traceroute: Makefile

Log Message:
introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/apache2/llvm/librt/Makefile.inc
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/file/lib/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.warnings
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/lib/dri.old/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/gallium.old/Makefile
cvs rdiff -u -r1.22 -r1.23 src/external/mit/xorg/lib/libGLU/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/public-domain/sqlite/lib/Makefile
cvs rdiff -u -r1.1351 -r1.1352 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/conf/Makefile.hppa
cvs rdiff -u -r1.10 -r1.11 src/sys/conf/copts.mk
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/string/Makefile
cvs rdiff -u -r1.73 -r1.74 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.6 -r1.7 src/tests/sys/crypto/aes/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/pkill/Makefile
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/mrouted/Makefile
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/traceroute/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/apache2/llvm/librt/Makefile.inc
diff -u src/external/apache2/llvm/librt/Makefile.inc:1.4 src/external/apache2/llvm/librt/Makefile.inc:1.5
--- src/external/apache2/llvm/librt/Makefile.inc:1.4	Sun May 30 01:56:58 2021
+++ src/external/apache2/llvm/librt/Makefile.inc	Tue Aug  8 06:27:31 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.4 2021/05/30 01:56:58 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.5 2023/08/08 06:27:31 mrg Exp $
 
 LLVM_TOPLEVEL:=	${.PARSEDIR}/..
 NOSTATICLIB=	yes
@@ -10,3 +10,5 @@ CWARNFLAGS.gcc+=	${${HAVE_GCC:U0} >= 9:?
 
 LLVM_INCLUDE_OBJDIR!=	cd ${LLVM_TOPLEVEL}/include && ${PRINTOBJDIR}
 LLVM_MODULE_CACHE=	${LLVM_INCLUDE_OBJDIR}/module.cache-rt
+
+CXXFLAGS+=		${CC_WNO_MISSING_TEMPLATE_KEYWORD}

Index: src/external/bsd/file/lib/Makefile
diff -u src/external/bsd/file/lib/Makefile:1.16 src/external/bsd/file/lib/Makefile:1.17
--- src/external/bsd/file/lib/Makefile:1.16	Sat Jun  3 21:31:45 2023
+++ src/external/bsd/file/lib/Makefile	Tue Aug  8 06:27:31 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2023/06/03 21:31:45 lukem Exp $
+#	$NetBSD: Makefile,v 1.17 2023/08/08 06:27:31 mrg Exp $
 #
 
 USE_FORT?= yes	# data driven bugs?
@@ -35,7 +35,8 @@ MLINKS+=	libmagic.3 magic_open.3 \
 INCS=		magic.h
 INCSDIR=	/usr/include
 
-COPTS.softmagic.c = -Wno-format-nonliteral
+COPTS.softmagic.c+=	-Wno-format-nonliteral
+COPTS.readelf.c+=	${CC_WNO_MAYBE_UNINITIALIZED}
 
 magic.c:	magic.h
 magic.h:magic.h.in

Index: src/external/gpl3/gcc/README.warnings
diff -u src/external/gpl3/gcc/README.warnings:1.3 src/external/gpl3/gcc/README.warnings:1.4
--- src/external/gpl3/gcc/README.warnings:1.3	Sat Jun  3 09:09:07 2023
+++ src/external/gpl3/gcc/README.warnings	Tue Aug  8 06:27:33 2023
@@ -1,4 +1,4 @@
-$NetBSD: README.warnings,v 1.3 2023/06/03 09:09:07 lukem Exp $
+$NetBSD: README.warnings,v 1.4 2023/08/08 06:27:33 mrg Exp $
 
 What to do about GCC warnings and NetBSD.
 
@@ -22,8 +22,47 @@ modified for updates to warnings and new
COPTS.foo.c += ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
COPTS.foo.c += ${CC_WNO_MAYBE_UNINITIALIZED}
COPTS.foo.c += ${CC_WNO_RETURN_LOCAL_ADDR}
+   COPTS.foo.c += ${CC_WNO_MISSING_TEMPLATE_KEYWORD}
+   COPTS.foo.c += ${CC_WNO_STRINGOP_OVERREAD}
+   COPTS.foo.c += ${CC_WNO_REGISTER}
+   COPTS.foo.c += ${CC_WNO_ARRAY_BOUNDS}
 
 
+new GCC 12 warnings:
+
+  -Wno-missing-template-keyword
+
+  This warning trips on older C++ code, and should only be applyed to 3rd
+  party code.
+
+  

CVS commit: src

2023-08-08 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Tue Aug  8 06:27:33 UTC 2023

Modified Files:
src/external/apache2/llvm/librt: Makefile.inc
src/external/bsd/file/lib: Makefile
src/external/gpl3/gcc: README.warnings
src/external/mit/xorg/lib/dri.old: Makefile
src/external/mit/xorg/lib/gallium.old: Makefile
src/external/mit/xorg/lib/libGLU: Makefile
src/external/public-domain/sqlite/lib: Makefile
src/share/mk: bsd.own.mk
src/sys/arch/hppa/conf: Makefile.hppa
src/sys/conf: copts.mk
src/tests/lib/libc/string: Makefile
src/tests/lib/libc/sys: Makefile
src/tests/sys/crypto/aes: Makefile
src/usr.bin/pkill: Makefile
src/usr.sbin/mrouted: Makefile
src/usr.sbin/traceroute: Makefile

Log Message:
introduce new GCC 12 warning disables and use them in a few places

this introduces 4 new warning disable flags:

   CC_WNO_MISSING_TEMPLATE_KEYWORD
   CC_WNO_REGISTER
   CC_WNO_STRINGOP_OVERREAD
   CC_WNO_ARRAY_BOUNDS

and documents them in README.warnings.  of these, the string op
and array bounds are both problematic (real bugs) and also spurious
(not real bugs), and the other 2 are mostly temporary for older
3rd party code.

add some new uses of CC_WNO_STRINGOP_OVERFLOW.

fix m68k build for gallium and GCC 12.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/apache2/llvm/librt/Makefile.inc
cvs rdiff -u -r1.16 -r1.17 src/external/bsd/file/lib/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/gpl3/gcc/README.warnings
cvs rdiff -u -r1.7 -r1.8 src/external/mit/xorg/lib/dri.old/Makefile
cvs rdiff -u -r1.6 -r1.7 src/external/mit/xorg/lib/gallium.old/Makefile
cvs rdiff -u -r1.22 -r1.23 src/external/mit/xorg/lib/libGLU/Makefile
cvs rdiff -u -r1.15 -r1.16 src/external/public-domain/sqlite/lib/Makefile
cvs rdiff -u -r1.1351 -r1.1352 src/share/mk/bsd.own.mk
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/hppa/conf/Makefile.hppa
cvs rdiff -u -r1.10 -r1.11 src/sys/conf/copts.mk
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libc/string/Makefile
cvs rdiff -u -r1.73 -r1.74 src/tests/lib/libc/sys/Makefile
cvs rdiff -u -r1.6 -r1.7 src/tests/sys/crypto/aes/Makefile
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/pkill/Makefile
cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/mrouted/Makefile
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/traceroute/Makefile

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



CVS commit: src/distrib/sets/lists/debug

2023-08-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Aug  8 06:22:31 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
lists: Fix build with MKGCCCMDS=no && MKDEBUGLIB=yes


To generate a diff of this commit:
cvs rdiff -u -r1.415 -r1.416 src/distrib/sets/lists/debug/mi

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/mi
diff -u src/distrib/sets/lists/debug/mi:1.415 src/distrib/sets/lists/debug/mi:1.416
--- src/distrib/sets/lists/debug/mi:1.415	Fri Aug  4 20:56:08 2023
+++ src/distrib/sets/lists/debug/mi	Tue Aug  8 06:22:31 2023
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.415 2023/08/04 20:56:08 riastradh Exp $
+# $NetBSD: mi,v 1.416 2023/08/08 06:22:31 rin Exp $
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib	comp-sys-usr		compatdir
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib,compatfile
@@ -68,9 +68,9 @@
 ./usr/lib/libfido2_g.acomp-c-debuglib		debuglib,compatfile
 ./usr/lib/libfl_g.acomp-c-debuglib		debuglib,compatfile
 ./usr/lib/libform_g.acomp-c-debuglib		debuglib,compatfile
-./usr/lib/libgcc_eh_g.acomp-c-debuglib		debuglib,compatfile,gcccmds
+./usr/lib/libgcc_eh_g.acomp-c-debuglib		debuglib,compatfile,gcc
 ./usr/lib/libgcc_g.acomp-c-debuglib		debuglib,compatfile,gcc
-./usr/lib/libgcc_s_g.acomp-c-debuglib		debuglib,compatfile,gcccmds
+./usr/lib/libgcc_s_g.acomp-c-debuglib		debuglib,compatfile,gcc
 ./usr/lib/libgcov_g.acomp-c-debuglib		debuglib,compatfile,gcc
 ./usr/lib/libgnuctf_g.acomp-c-debuglib		debuglib,compatfile,binutils
 ./usr/lib/libgnumalloc_g.a			comp-c-debuglib		debuglib,compatfile



CVS commit: src/distrib/sets/lists/debug

2023-08-08 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Aug  8 06:22:31 UTC 2023

Modified Files:
src/distrib/sets/lists/debug: mi

Log Message:
lists: Fix build with MKGCCCMDS=no && MKDEBUGLIB=yes


To generate a diff of this commit:
cvs rdiff -u -r1.415 -r1.416 src/distrib/sets/lists/debug/mi

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



re: CVS commit: src/sys/arch

2023-08-08 Thread matthew green
Joerg Sonnenberger writes:
> On Thu, Aug 03, 2023 at 08:16:31AM +, matthew green wrote:
> > Module Name:src
> > Committed By:   mrg
> > Date:   Thu Aug  3 08:16:31 UTC 2023
> > 
> > Modified Files:
> > src/sys/arch/evbarm/gumstix: gumstix_machdep.c
> > src/sys/arch/evbarm/ixm1200: ixm1200_machdep.c
> > src/sys/arch/hpcarm/hpcarm: pxa2x0_hpc_machdep.c sa11x0_hpc_machdep.c
> > src/sys/arch/hppa/stand: Makefile.buildboot
> > src/sys/arch/m68k/m68k: regdump.c
> > src/sys/arch/macppc/macppc: cpu.c
> > 
> > Log Message:
> > ignore "-Warray-bounds" for various low level platform code that knows
> > how something is setup but technically is undefined behaviour.  the
> > most common here is "extern int end;" and then using offsets of ""
> > that are outside the bounds of this 4-byte integer.
> > 
> > these uses are almost certainly all OK in reality.
>
> Are you sure that GCC's optimizer is not going to break any of those
> assumptions? We had to go through quite some trouble in crtbegin.c for
> similar patterns?

nope, infact i'm not.  i'll revert these.

do you have good ways to fix these from that crt issue?

thanks.


.mrg.