CVS commit: src/sys/arch/arc/jazz
Module Name:src Committed By: andvar Date: Tue Aug 29 21:55:11 UTC 2023 Modified Files: src/sys/arch/arc/jazz: fd.c Log Message: arc/fdc(4): fix printf specifiers for FD_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arc/jazz/fd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arc/jazz
Module Name:src Committed By: andvar Date: Tue Aug 29 21:55:11 UTC 2023 Modified Files: src/sys/arch/arc/jazz: fd.c Log Message: arc/fdc(4): fix printf specifiers for FD_DEBUG build. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/arch/arc/jazz/fd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arc/jazz/fd.c diff -u src/sys/arch/arc/jazz/fd.c:1.51 src/sys/arch/arc/jazz/fd.c:1.52 --- src/sys/arch/arc/jazz/fd.c:1.51 Sat Aug 7 16:18:42 2021 +++ src/sys/arch/arc/jazz/fd.c Tue Aug 29 21:55:11 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.51 2021/08/07 16:18:42 thorpej Exp $ */ +/* $NetBSD: fd.c,v 1.52 2023/08/29 21:55:11 andvar Exp $ */ /* $OpenBSD: fd.c,v 1.6 1998/10/03 21:18:57 millert Exp $ */ /* NetBSD: fd.c,v 1.78 1995/07/04 07:23:09 mycroft Exp */ @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.51 2021/08/07 16:18:42 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.52 2023/08/29 21:55:11 andvar Exp $"); #include #include @@ -470,8 +470,8 @@ fdstrategy(struct buf *bp) bp->b_blkno / (FDC_BSIZE / DEV_BSIZE) / fd->sc_type->seccyl; #ifdef FD_DEBUG - printf("%s: b_blkno %" PRId64 " b_bcount %ld blkno %" PRId64 - " cylin %ld sz %d\n", __func__, + printf("%s: b_blkno %" PRId64 " b_bcount %d blkno %" PRId64 + " cylin %d sz %d\n", __func__, bp->b_blkno, bp->b_bcount, fd->sc_blkno, bp->b_cylinder, sz); #endif
CVS commit: src/sys/arch/arc/arc
Module Name:src Committed By: andvar Date: Tue Aug 29 21:34:51 UTC 2023 Modified Files: src/sys/arch/arc/arc: machdep.c Log Message: fix typo NKSYM -> NKSYMS in one of #if directive conditions. It may cause build failure, e.g. with DDB option disabled. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/arch/arc/arc/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arc/arc
Module Name:src Committed By: andvar Date: Tue Aug 29 21:34:51 UTC 2023 Modified Files: src/sys/arch/arc/arc: machdep.c Log Message: fix typo NKSYM -> NKSYMS in one of #if directive conditions. It may cause build failure, e.g. with DDB option disabled. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/sys/arch/arc/arc/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arc/arc/machdep.c diff -u src/sys/arch/arc/arc/machdep.c:1.130 src/sys/arch/arc/arc/machdep.c:1.131 --- src/sys/arch/arc/arc/machdep.c:1.130 Thu Dec 22 14:47:54 2016 +++ src/sys/arch/arc/arc/machdep.c Tue Aug 29 21:34:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.130 2016/12/22 14:47:54 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.131 2023/08/29 21:34:50 andvar Exp $ */ /* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */ /* @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.130 2016/12/22 14:47:54 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.131 2023/08/29 21:34:50 andvar Exp $"); #include "opt_ddb.h" #include "opt_ddbparam.h" @@ -200,7 +200,7 @@ mach_init(int argc, char *argv[], u_int bootinfo_msg = "no bootinfo found. (old bootblocks?)\n"; /* clear the BSS segment in kernel code */ -#if NKSYM > 0 || defined(DDB) || defined(MODULAR) +#if NKSYMS > 0 || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); /* check whether there is valid bootinfo symtab info */
CVS commit: src/sys/kern
Module Name:src Committed By: andvar Date: Tue Aug 29 21:23:14 UTC 2023 Modified Files: src/sys/kern: subr_prf.c Log Message: remove broken #ifdef KADB code block in subr_prf. kdbpanic() was seemingly MIPS only and removed back in 1997, since mips/locore.S rev 1.31. should fix builds with KADB option enabled (tested on arc). To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/kern/subr_prf.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/kern/subr_prf.c diff -u src/sys/kern/subr_prf.c:1.202 src/sys/kern/subr_prf.c:1.203 --- src/sys/kern/subr_prf.c:1.202 Fri Aug 4 07:38:53 2023 +++ src/sys/kern/subr_prf.c Tue Aug 29 21:23:14 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_prf.c,v 1.202 2023/08/04 07:38:53 riastradh Exp $ */ +/* $NetBSD: subr_prf.c,v 1.203 2023/08/29 21:23:14 andvar Exp $ */ /*- * Copyright (c) 1986, 1988, 1991, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.202 2023/08/04 07:38:53 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.203 2023/08/29 21:23:14 andvar Exp $"); #ifdef _KERNEL_OPT #include "opt_ddb.h" @@ -282,10 +282,6 @@ vpanic(const char *fmt, va_list ap) #ifdef KGDB kgdb_panic(); #endif -#ifdef KADB - if (boothowto & RB_KDB) - kdbpanic(); -#endif #ifdef DDB db_panic(); #endif
CVS commit: src/sys/kern
Module Name:src Committed By: andvar Date: Tue Aug 29 21:23:14 UTC 2023 Modified Files: src/sys/kern: subr_prf.c Log Message: remove broken #ifdef KADB code block in subr_prf. kdbpanic() was seemingly MIPS only and removed back in 1997, since mips/locore.S rev 1.31. should fix builds with KADB option enabled (tested on arc). To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/kern/subr_prf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Tue Aug 29 20:39:17 UTC 2023 Modified Files: src/external/gpl3/gdb/dist/gdb: solib.c Log Message: When we try to find the compat32 dynamic linker, strip out the arch-specific string (sparc:v8plus -> sparc). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/solib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gdb/dist/gdb/solib.c diff -u src/external/gpl3/gdb/dist/gdb/solib.c:1.11 src/external/gpl3/gdb/dist/gdb/solib.c:1.12 --- src/external/gpl3/gdb/dist/gdb/solib.c:1.11 Mon Jul 31 13:00:50 2023 +++ src/external/gpl3/gdb/dist/gdb/solib.c Tue Aug 29 16:39:17 2023 @@ -476,18 +476,20 @@ solib_bfd_open (const char *pathname) b = gdbarch_bfd_arch_info (target_gdbarch ()); if (!b->compatible (b, bfd_get_arch_info (abfd.get ( { - char buf[SO_NAME_MAX_PATH_SIZE]; const char *slash = strrchr(pathname, '/'); if (slash) { + char buf[SO_NAME_MAX_PATH_SIZE], arch[128], *colon; struct stat st; - snprintf(buf, sizeof(buf), "%.*s/%s/%s", - (int)(slash - pathname), pathname, b->printable_name, slash + 1); + strlcpy(arch, b->printable_name, sizeof(arch)); + if ((colon = strchr(arch, ':')) != NULL) + *colon = '\0'; + snprintf(buf, sizeof(buf), "%.*s/%s/%s", + (int)(slash - pathname), pathname, arch, slash + 1); if (stat(buf, ) == 0) return solib_bfd_open(buf); - snprintf(buf, sizeof(buf), "%s-%s", - pathname, b->printable_name); + snprintf(buf, sizeof(buf), "%s-%s", pathname, arch); if (stat(buf, ) == 0) return solib_bfd_open(buf); }
CVS commit: src/external/gpl3/gdb/dist/gdb
Module Name:src Committed By: christos Date: Tue Aug 29 20:39:17 UTC 2023 Modified Files: src/external/gpl3/gdb/dist/gdb: solib.c Log Message: When we try to find the compat32 dynamic linker, strip out the arch-specific string (sparc:v8plus -> sparc). To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/gpl3/gdb/dist/gdb/solib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: jdc Date: Tue Aug 29 20:17:02 UTC 2023 Modified Files: src/sys/arch/sparc64/sparc64: static_edid.c Log Message: Update the horizontal sync offset based on the Naturetech video timing. While here, correct the spelling of "Naturetech" in the data. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/sparc64/static_edid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/static_edid.c diff -u src/sys/arch/sparc64/sparc64/static_edid.c:1.1 src/sys/arch/sparc64/sparc64/static_edid.c:1.2 --- src/sys/arch/sparc64/sparc64/static_edid.c:1.1 Sun Oct 11 19:39:22 2020 +++ src/sys/arch/sparc64/sparc64/static_edid.c Tue Aug 29 20:17:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: static_edid.c,v 1.1 2020/10/11 19:39:22 jdc Exp $ */ +/* $NetBSD: static_edid.c,v 1.2 2023/08/29 20:17:02 jdc Exp $ */ /*- * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: static_edid.c,v 1.1 2020/10/11 19:39:22 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: static_edid.c,v 1.2 2023/08/29 20:17:02 jdc Exp $"); #include /* EDID blocks for some known hardware that doesn't provide its own */ @@ -46,13 +46,13 @@ uint8_t edid_meso999[128] = { /* 20 */ 0x16, 0x50, 0x54, 0xa5, 0x4a, 0x80, 0x81, 0x40, /* 28 */ 0x81, 0x80, 0x81, 0x8f, 0x95, 0x00, 0x01, 0x01, /* 30 */ 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xab, 0x22, -/* 38 */ 0xa0, 0xa0, 0x50, 0x84, 0x1a, 0x30, 0x38, 0x20, +/* 38 */ 0xa0, 0xa0, 0x50, 0x84, 0x1a, 0x30, 0x30, 0x20, /* 40 */ 0x36, 0x00, 0x9a, 0x01, 0x11, 0x00, 0x00, 0x1a, /* 48 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 50 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 58 */ 0x00, 0x01, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x4e, -/* 60 */ 0x41, 0x74, 0x75, 0x72, 0x65, 0x74, 0x65, 0x63, +/* 60 */ 0x61, 0x74, 0x75, 0x72, 0x65, 0x74, 0x65, 0x63, /* 68 */ 0x68, 0x0a, 0x20, 0x20, 0x00, 0x00, 0x00, 0xfe, /* 70 */ 0x00, 0x4d, 0x65, 0x73, 0x6f, 0x20, 0x39, 0x39, -/* 78 */ 0x39, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x00, 0xed +/* 78 */ 0x39, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x00, 0xd5 };
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: jdc Date: Tue Aug 29 20:17:02 UTC 2023 Modified Files: src/sys/arch/sparc64/sparc64: static_edid.c Log Message: Update the horizontal sync offset based on the Naturetech video timing. While here, correct the spelling of "Naturetech" in the data. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/sparc64/static_edid.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/netinet6
Module Name:src Committed By: christos Date: Tue Aug 29 17:01:35 UTC 2023 Modified Files: src/sys/netinet6: frag6.c Log Message: Add a check for FreeBSD-SA-23:06.ipv6, although it is not reproducible for us. factor out code copied 3 times (and now would have been a 4th) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/netinet6/frag6.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/netinet6/frag6.c diff -u src/sys/netinet6/frag6.c:1.76 src/sys/netinet6/frag6.c:1.77 --- src/sys/netinet6/frag6.c:1.76 Fri Oct 21 05:21:17 2022 +++ src/sys/netinet6/frag6.c Tue Aug 29 13:01:35 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: frag6.c,v 1.76 2022/10/21 09:21:17 ozaki-r Exp $ */ +/* $NetBSD: frag6.c,v 1.77 2023/08/29 17:01:35 christos Exp $ */ /* $KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.76 2022/10/21 09:21:17 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.77 2023/08/29 17:01:35 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -120,6 +120,15 @@ frag6_init(void) mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE); } +static void +frag6_dropfrag(struct ip6q *q6) +{ + frag6_remque(q6); + frag6_nfrags -= q6->ip6q_nfrag; + kmem_intr_free(q6, sizeof(*q6)); + frag6_nfragpackets--; +} + /* * IPv6 fragment input. * @@ -456,8 +465,13 @@ insert: /* adjust offset to point where the original next header starts */ offset = ip6af->ip6af_offset - sizeof(struct ip6_frag); kmem_intr_free(ip6af, sizeof(struct ip6asfrag)); + next += offset - sizeof(struct ip6_hdr); + if ((u_int)next > IPV6_MAXPACKET) { + frag6_dropfrag(q6); + goto dropfrag; + } ip6 = mtod(m, struct ip6_hdr *); - ip6->ip6_plen = htons(next + offset - sizeof(struct ip6_hdr)); + ip6->ip6_plen = htons(next); ip6->ip6_src = q6->ip6q_src; ip6->ip6_dst = q6->ip6q_dst; nxt = q6->ip6q_nxt; @@ -472,20 +486,14 @@ insert: } else { /* this comes with no copy if the boundary is on cluster */ if ((t = m_split(m, offset, M_DONTWAIT)) == NULL) { - frag6_remque(q6); - frag6_nfrags -= q6->ip6q_nfrag; - kmem_intr_free(q6, sizeof(struct ip6q)); - frag6_nfragpackets--; + frag6_dropfrag(q6); goto dropfrag; } m_adj(t, sizeof(struct ip6_frag)); m_cat(m, t); } - frag6_remque(q6); - frag6_nfrags -= q6->ip6q_nfrag; - kmem_intr_free(q6, sizeof(struct ip6q)); - frag6_nfragpackets--; + frag6_dropfrag(q6); { KASSERT(m->m_flags & M_PKTHDR); @@ -585,10 +593,7 @@ frag6_freef(struct ip6q *q6) kmem_intr_free(af6, sizeof(struct ip6asfrag)); } - frag6_remque(q6); - frag6_nfrags -= q6->ip6q_nfrag; - kmem_intr_free(q6, sizeof(struct ip6q)); - frag6_nfragpackets--; + frag6_dropfrag(q6); } /*
CVS commit: src/sys/netinet6
Module Name:src Committed By: christos Date: Tue Aug 29 17:01:35 UTC 2023 Modified Files: src/sys/netinet6: frag6.c Log Message: Add a check for FreeBSD-SA-23:06.ipv6, although it is not reproducible for us. factor out code copied 3 times (and now would have been a 4th) To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/netinet6/frag6.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.