CVS commit: src/usr.sbin/cpuctl
Module Name:src Committed By: gutteridge Date: Tue Mar 19 01:19:11 UTC 2024 Modified Files: src/usr.sbin/cpuctl: cpuctl.8 Log Message: cpuctl.8: fix grammar in a sentence To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/cpuctl/cpuctl.8 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/cpuctl/cpuctl.8 diff -u src/usr.sbin/cpuctl/cpuctl.8:1.22 src/usr.sbin/cpuctl/cpuctl.8:1.23 --- src/usr.sbin/cpuctl/cpuctl.8:1.22 Tue Sep 12 20:45:17 2023 +++ src/usr.sbin/cpuctl/cpuctl.8 Tue Mar 19 01:19:11 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpuctl.8,v 1.22 2023/09/12 20:45:17 wiz Exp $ +.\" $NetBSD: cpuctl.8,v 1.23 2024/03/19 01:19:11 gutteridge Exp $ .\" .\" Copyright (c) 2007, 2008, 2012, 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -83,7 +83,7 @@ already exists on the CPU in question ar If .Ar cpu is not specified or \-1, all CPUs are updated. -(AMD CPU updates need to be update all CPUs at once.) +(AMD CPU updates need to update all CPUs at once.) If .Ar cpu is \-2, the current CPUs are updated.
CVS commit: src/usr.sbin/cpuctl
Module Name:src Committed By: gutteridge Date: Tue Mar 19 01:19:11 UTC 2024 Modified Files: src/usr.sbin/cpuctl: cpuctl.8 Log Message: cpuctl.8: fix grammar in a sentence To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/cpuctl/cpuctl.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: gutteridge Date: Mon Mar 18 22:47:20 UTC 2024 Modified Files: src/share/man/man4: ipsec.4 Log Message: ipsec.4: minor grammatical improvements To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/share/man/man4/ipsec.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ipsec.4 diff -u src/share/man/man4/ipsec.4:1.45 src/share/man/man4/ipsec.4:1.46 --- src/share/man/man4/ipsec.4:1.45 Fri Jun 15 23:13:19 2018 +++ src/share/man/man4/ipsec.4 Mon Mar 18 22:47:19 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: ipsec.4,v 1.45 2018/06/15 23:13:19 wiz Exp $ +.\" $NetBSD: ipsec.4,v 1.46 2024/03/18 22:47:19 gutteridge Exp $ .\" $KAME: ipsec.4,v 1.17 2001/06/27 15:25:10 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -38,7 +38,7 @@ .Cd "options IPSEC" .Cd "options IPSEC_DEBUG" .Sh DESCRIPTION -This manual pages describes the IPsec protocol. +This manual page describes the IPsec protocol. For the network device driver please see .Xr ipsecif 4 . .Pp @@ -374,15 +374,14 @@ so for the receiving kernel there's no s The issue will be solved when we revamp our policy engine to keep all the packet decapsulation history. .Pp -Under certain condition, -truncated result may be raised from the kernel +Under certain conditions, truncated results may be raised from the kernel against .Dv SADB_DUMP and .Dv SADB_SPDDUMP -operation on +operations on .Dv PF_KEY -socket. +sockets. This occurs if there are too many database entries in the kernel and socket buffer for the .Dv PF_KEY
CVS commit: src/share/man/man4
Module Name:src Committed By: gutteridge Date: Mon Mar 18 22:47:20 UTC 2024 Modified Files: src/share/man/man4: ipsec.4 Log Message: ipsec.4: minor grammatical improvements To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/share/man/man4/ipsec.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libm
Module Name:src Committed By: martin Date: Mon Mar 18 16:33:54 UTC 2024 Modified Files: src/tests/lib/libm: t_fenv.c Log Message: The fetestexcept_trap test case only makes sense on FPUs that implement exceptions. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libm/t_fenv.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/libm/t_fenv.c diff -u src/tests/lib/libm/t_fenv.c:1.15 src/tests/lib/libm/t_fenv.c:1.16 --- src/tests/lib/libm/t_fenv.c:1.15 Tue Feb 20 03:53:48 2024 +++ src/tests/lib/libm/t_fenv.c Mon Mar 18 16:33:54 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fenv.c,v 1.15 2024/02/20 03:53:48 riastradh Exp $ */ +/* $NetBSD: t_fenv.c,v 1.16 2024/03/18 16:33:54 martin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_fenv.c,v 1.15 2024/02/20 03:53:48 riastradh Exp $"); +__RCSID("$NetBSD: t_fenv.c,v 1.16 2024/03/18 16:33:54 martin Exp $"); #include @@ -351,6 +351,8 @@ ATF_TC_BODY(fetestexcept_trap, tc) { int except; + FPU_EXC_PREREQ(); + fedisableexcept(FE_ALL_EXCEPT); ATF_CHECK_EQ_MSG((except = fegetexcept()), 0, "fegetexcept()=0x%x", except);
CVS commit: src/tests/lib/libm
Module Name:src Committed By: martin Date: Mon Mar 18 16:33:54 UTC 2024 Modified Files: src/tests/lib/libm: t_fenv.c Log Message: The fetestexcept_trap test case only makes sense on FPUs that implement exceptions. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libm/t_fenv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Mon Mar 18 16:15:24 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Declare digit d as time_t. This doesn't make a semantic difference -- d can only take on the ten values {0,1,2,3,4,5,6,7,8,9}, and the arithmetic with it later all comes out the same whether the type is unsigned or time_t, even if time_t were int32_t instead of int64_t. But it pacifies overzealous compilers used by downstream users of this code. And while it's silly to use a much wider type (64-bit signed) than is needed here to store a single digit, it doesn't really hurt either (32-bit unsigned is much larger than needed too). PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/lib/libc/time/strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Mon Mar 18 16:15:24 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Declare digit d as time_t. This doesn't make a semantic difference -- d can only take on the ten values {0,1,2,3,4,5,6,7,8,9}, and the arithmetic with it later all comes out the same whether the type is unsigned or time_t, even if time_t were int32_t instead of int64_t. But it pacifies overzealous compilers used by downstream users of this code. And while it's silly to use a much wider type (64-bit signed) than is needed here to store a single digit, it doesn't really hurt either (32-bit unsigned is much larger than needed too). PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/lib/libc/time/strptime.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/libc/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.65 src/lib/libc/time/strptime.c:1.66 --- src/lib/libc/time/strptime.c:1.65 Sat Mar 16 00:16:21 2024 +++ src/lib/libc/time/strptime.c Mon Mar 18 16:15:24 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.65 2024/03/16 00:16:21 riastradh Exp $ */ +/* $NetBSD: strptime.c,v 1.66 2024/03/18 16:15:24 riastradh Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.65 2024/03/16 00:16:21 riastradh Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.66 2024/03/18 16:15:24 riastradh Exp $"); #endif #include "namespace.h" @@ -348,8 +348,7 @@ literal: case 's': { /* seconds since the epoch */ const time_t TIME_MAX = __type_max(time_t); - time_t sse; - unsigned d; + time_t sse, d; if (*bp < '0' || *bp > '9') { bp = NULL;
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Mon Mar 18 15:15:27 UTC 2024 Modified Files: src/sys/dev/usb: ums.c Log Message: Use HUD_PEN instead of 0x0002 as appropriate To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/dev/usb/ums.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/usb
Module Name:src Committed By: jakllsch Date: Mon Mar 18 15:15:27 UTC 2024 Modified Files: src/sys/dev/usb: ums.c Log Message: Use HUD_PEN instead of 0x0002 as appropriate To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/dev/usb/ums.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/usb/ums.c diff -u src/sys/dev/usb/ums.c:1.105 src/sys/dev/usb/ums.c:1.106 --- src/sys/dev/usb/ums.c:1.105 Sat Jan 13 15:26:36 2024 +++ src/sys/dev/usb/ums.c Mon Mar 18 15:15:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ums.c,v 1.105 2024/01/13 15:26:36 hgutch Exp $ */ +/* $NetBSD: ums.c,v 1.106 2024/03/18 15:15:27 jakllsch Exp $ */ /* * Copyright (c) 1998, 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.105 2024/01/13 15:26:36 hgutch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.106 2024/03/18 15:15:27 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -170,7 +170,7 @@ ums_match(device_t parent, cfdata_t matc !hid_is_collection(desc, size, uha->reportid, HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_POINTER)) && !hid_is_collection(desc, size, uha->reportid, - HID_USAGE2(HUP_DIGITIZERS, 0x0002))) + HID_USAGE2(HUP_DIGITIZERS, HUD_PEN))) return UMATCH_NONE; return UMATCH_IFACECLASS;
CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Sun Mar 17 22:05:24 UTC 2024 Modified Files: src/share/man/man7: hier.7 Log Message: hier(7): remove reference to /var/db/pkg The pkg database lives in ${PREFIX}/pkgdb instead now. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/share/man/man7/hier.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man7
Module Name:src Committed By: wiz Date: Sun Mar 17 22:05:24 UTC 2024 Modified Files: src/share/man/man7: hier.7 Log Message: hier(7): remove reference to /var/db/pkg The pkg database lives in ${PREFIX}/pkgdb instead now. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.142 -r1.143 src/share/man/man7/hier.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/hier.7 diff -u src/share/man/man7/hier.7:1.142 src/share/man/man7/hier.7:1.143 --- src/share/man/man7/hier.7:1.142 Tue Oct 10 21:51:01 2023 +++ src/share/man/man7/hier.7 Sun Mar 17 22:05:23 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: hier.7,v 1.142 2023/10/10 21:51:01 riastradh Exp $ +.\" $NetBSD: hier.7,v 1.143 2024/03/17 22:05:23 wiz Exp $ .\" .\" Copyright (c) 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)hier.7 8.5 (Berkeley) 6/1/94 .\" -.Dd May 12, 2020 +.Dd March 17, 2024 .Dt HIER 7 .Os .Sh NAME @@ -1146,18 +1146,6 @@ and .It Pa db/ Miscellaneous automatically generated system-specific database files, and persistent files used in the maintenance of third party software. -.Pp -.Bl -tag -width "monthly.out" -compact -.It Pa pkg -Default location for metadata related to third party software -packages. -See -.Xr pkg_add 1 -for more details of the -.Nx -Packages Collection, or pkgsrc. -.El -.Pp .It Pa games/ Miscellaneous game status, log, and high score files. .It Pa heimdal/
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Mar 17 21:48:02 UTC 2024 Modified Files: src/lib/libc/gen: vis.c src/sys/arch/usermode/usermode: thunk.c src/sys/netinet: sctp.h src/usr.bin/mail: strings.c Log Message: Add missing "e" in few words, in comments and one log message. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/lib/libc/gen/vis.c cvs rdiff -u -r1.92 -r1.93 src/sys/arch/usermode/usermode/thunk.c cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/sctp.h cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mail/strings.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/libc/gen/vis.c diff -u src/lib/libc/gen/vis.c:1.87 src/lib/libc/gen/vis.c:1.88 --- src/lib/libc/gen/vis.c:1.87 Sat Jan 20 14:52:47 2024 +++ src/lib/libc/gen/vis.c Sun Mar 17 21:48:02 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: vis.c,v 1.87 2024/01/20 14:52:47 christos Exp $ */ +/* $NetBSD: vis.c,v 1.88 2024/03/17 21:48:02 andvar Exp $ */ /*- * Copyright (c) 1989, 1993 @@ -57,7 +57,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: vis.c,v 1.87 2024/01/20 14:52:47 christos Exp $"); +__RCSID("$NetBSD: vis.c,v 1.88 2024/03/17 21:48:02 andvar Exp $"); #endif /* LIBC_SCCS and not lint */ #ifdef __FBSDID __FBSDID("$FreeBSD$"); @@ -653,7 +653,7 @@ istrsenvisx(char **mbdstp, size_t *dlen, mbdst += clen; /* Advance buffer character pointer. */ dst++; - /* Incrment output character count. */ + /* Increment output character count. */ olen += clen; } Index: src/sys/arch/usermode/usermode/thunk.c diff -u src/sys/arch/usermode/usermode/thunk.c:1.92 src/sys/arch/usermode/usermode/thunk.c:1.93 --- src/sys/arch/usermode/usermode/thunk.c:1.92 Wed May 8 13:40:16 2019 +++ src/sys/arch/usermode/usermode/thunk.c Sun Mar 17 21:48:01 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: thunk.c,v 1.92 2019/05/08 13:40:16 isaki Exp $ */ +/* $NetBSD: thunk.c,v 1.93 2024/03/17 21:48:01 andvar Exp $ */ /*- * Copyright (c) 2011 Jared D. McNeill @@ -28,7 +28,7 @@ #include #ifdef __NetBSD__ -__RCSID("$NetBSD: thunk.c,v 1.92 2019/05/08 13:40:16 isaki Exp $"); +__RCSID("$NetBSD: thunk.c,v 1.93 2024/03/17 21:48:01 andvar Exp $"); #endif #define _KMEMUSER @@ -1436,7 +1436,7 @@ thunk_rfb_poll(thunk_rfb_t *rfb, thunk_r framebuffer_update_request[2], framebuffer_update_request[3], framebuffer_update_request[4], - framebuffer_update_request[0]?"Incrmental":"Complete"); + framebuffer_update_request[0]?"Incremental":"Complete"); #endif if (framebuffer_update_request[0] == 0) { Index: src/sys/netinet/sctp.h diff -u src/sys/netinet/sctp.h:1.5 src/sys/netinet/sctp.h:1.6 --- src/sys/netinet/sctp.h:1.5 Sun Oct 24 20:00:12 2021 +++ src/sys/netinet/sctp.h Sun Mar 17 21:48:01 2024 @@ -1,5 +1,5 @@ /* $KAME: sctp.h,v 1.18 2005/03/06 16:04:16 itojun Exp $ */ -/* $NetBSD: sctp.h,v 1.5 2021/10/24 20:00:12 andvar Exp $ */ +/* $NetBSD: sctp.h,v 1.6 2024/03/17 21:48:01 andvar Exp $ */ #ifndef _NETINET_SCTP_H_ #define _NETINET_SCTP_H_ @@ -146,8 +146,8 @@ struct sctp_paramhdr { #define SCTP_PEER_PUBLIC_KEY0x0100 /* get the peers public key */ #define SCTP_MY_PUBLIC_KEY 0x0101 /* get/set my endpoints public key */ #define SCTP_SET_AUTH_SECRET0x0102 /* get/set my shared secret */ -#define SCTP_SET_AUTH_CHUNKS0x0103/* specify what chunks you want - * the system may have additional requirments +#define SCTP_SET_AUTH_CHUNKS0x0103 /* specify what chunks you want + * the system may have additional requirements * as well. I.e. probably ASCONF/ASCONF-ACK no matter * if you want it or not. */ Index: src/usr.bin/mail/strings.c diff -u src/usr.bin/mail/strings.c:1.18 src/usr.bin/mail/strings.c:1.19 --- src/usr.bin/mail/strings.c:1.18 Tue Jan 12 14:45:31 2010 +++ src/usr.bin/mail/strings.c Sun Mar 17 21:48:02 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: strings.c,v 1.18 2010/01/12 14:45:31 christos Exp $ */ +/* $NetBSD: strings.c,v 1.19 2024/03/17 21:48:02 andvar Exp $ */ /* * Copyright (c) 1980, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)strings.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: strings.c,v 1.18 2010/01/12 14:45:31 christos Exp $"); +__RCSID("$NetBSD: strings.c,v 1.19 2024/03/17 21:48:02 andvar Exp $"); #endif #endif /* not lint */ @@ -107,7 +107,7 @@ salloc(size_t size) } /* - * Allocate zeroed space for 'number' elments of size 'size'. + * Allocate zeroed space for 'number' elements of size 'size'. */ PUBLIC void * csalloc(size_t number, size_t size)
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Mar 17 21:48:02 UTC 2024 Modified Files: src/lib/libc/gen: vis.c src/sys/arch/usermode/usermode: thunk.c src/sys/netinet: sctp.h src/usr.bin/mail: strings.c Log Message: Add missing "e" in few words, in comments and one log message. To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/lib/libc/gen/vis.c cvs rdiff -u -r1.92 -r1.93 src/sys/arch/usermode/usermode/thunk.c cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/sctp.h cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mail/strings.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Mar 17 21:37:53 UTC 2024 Modified Files: src/lib/libc/net: inet6_rth_space.3 src/usr.bin/touch: touch.1 Log Message: s/argumment/argument/ in documentation. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/net/inet6_rth_space.3 cvs rdiff -u -r1.29 -r1.30 src/usr.bin/touch/touch.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/net/inet6_rth_space.3 diff -u src/lib/libc/net/inet6_rth_space.3:1.3 src/lib/libc/net/inet6_rth_space.3:1.4 --- src/lib/libc/net/inet6_rth_space.3:1.3 Sun Dec 4 01:29:32 2022 +++ src/lib/libc/net/inet6_rth_space.3 Sun Mar 17 21:37:53 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: inet6_rth_space.3,v 1.3 2022/12/04 01:29:32 uwe Exp $ +.\" $NetBSD: inet6_rth_space.3,v 1.4 2024/03/17 21:37:53 andvar Exp $ .\" $KAME: inet6_rth_space.3,v 1.7 2005/01/05 03:00:44 itojun Exp $ .\" .\" Copyright (C) 2004 WIDE Project. @@ -84,7 +84,7 @@ of the type, specified in the .Fa type argument and containing the number of addresses specified in the .Fa segments -argumment. +argument. When the type is .Dv IPV6_RTHDR_TYPE_0 the number of segments must be from 0 through 127. Index: src/usr.bin/touch/touch.1 diff -u src/usr.bin/touch/touch.1:1.29 src/usr.bin/touch/touch.1:1.30 --- src/usr.bin/touch/touch.1:1.29 Sat Feb 10 00:19:30 2024 +++ src/usr.bin/touch/touch.1 Sun Mar 17 21:37:53 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: touch.1,v 1.29 2024/02/10 00:19:30 kre Exp $ +.\" $NetBSD: touch.1,v 1.30 2024/03/17 21:37:53 andvar Exp $ .\" .\" Copyright (c) 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -389,7 +389,7 @@ That is, this merely tests that the .Ar human-datetime and .Ar datetime -argumments to +arguments to .Fl d and .Fl t
CVS commit: src
Module Name:src Committed By: andvar Date: Sun Mar 17 21:37:53 UTC 2024 Modified Files: src/lib/libc/net: inet6_rth_space.3 src/usr.bin/touch: touch.1 Log Message: s/argumment/argument/ in documentation. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/lib/libc/net/inet6_rth_space.3 cvs rdiff -u -r1.29 -r1.30 src/usr.bin/touch/touch.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Sun Mar 17 20:10:52 UTC 2024 Modified Files: src/sys/dev/usb: ucycom.c Log Message: Prevent errant ucycom-presenting device from causing up to 225 bytes of kernel memory following input buffer to leak to tty application. Probably not practically expolitable, but you never know. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/usb/ucycom.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/usb/ucycom.c diff -u src/sys/dev/usb/ucycom.c:1.56 src/sys/dev/usb/ucycom.c:1.57 --- src/sys/dev/usb/ucycom.c:1.56 Wed Oct 26 23:50:28 2022 +++ src/sys/dev/usb/ucycom.c Sun Mar 17 20:10:52 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ucycom.c,v 1.56 2022/10/26 23:50:28 riastradh Exp $ */ +/* $NetBSD: ucycom.c,v 1.57 2024/03/17 20:10:52 jakllsch Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.56 2022/10/26 23:50:28 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.57 2024/03/17 20:10:52 jakllsch Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -978,6 +978,7 @@ ucycom_intr(void *cookie, void *ibuf, u_ st = cp[0]; n = cp[1]; cp += 2; + n = uimin(n, 30); break; default:
CVS commit: src/sys/dev/usb
Module Name:src Committed By: jakllsch Date: Sun Mar 17 20:10:52 UTC 2024 Modified Files: src/sys/dev/usb: ucycom.c Log Message: Prevent errant ucycom-presenting device from causing up to 225 bytes of kernel memory following input buffer to leak to tty application. Probably not practically expolitable, but you never know. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/dev/usb/ucycom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/kdump
Module Name:src Committed By: ryoon Date: Sat Mar 16 23:40:26 UTC 2024 Modified Files: src/usr.bin/kdump: kdump.c Log Message: Remove debug print To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/usr.bin/kdump/kdump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/kdump
Module Name:src Committed By: ryoon Date: Sat Mar 16 23:40:26 UTC 2024 Modified Files: src/usr.bin/kdump: kdump.c Log Message: Remove debug print To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/usr.bin/kdump/kdump.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/kdump/kdump.c diff -u src/usr.bin/kdump/kdump.c:1.144 src/usr.bin/kdump/kdump.c:1.145 --- src/usr.bin/kdump/kdump.c:1.144 Sun Mar 10 18:54:41 2024 +++ src/usr.bin/kdump/kdump.c Sat Mar 16 23:40:25 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: kdump.c,v 1.144 2024/03/10 18:54:41 rillig Exp $ */ +/* $NetBSD: kdump.c,v 1.145 2024/03/16 23:40:25 ryoon Exp $ */ /*- * Copyright (c) 1988, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: kdump.c,v 1.144 2024/03/10 18:54:41 rillig Exp $"); +__RCSID("$NetBSD: kdump.c,v 1.145 2024/03/16 23:40:25 ryoon Exp $"); #endif #endif /* not lint */ @@ -900,7 +900,6 @@ ktrsyscall(struct ktr_syscall *ktr) ap++; argcount--; register_t level = *ap; - fprintf(stderr, "level=%jx\n", (intmax_t)level); if ((cp = sockproto(level)) != NULL) { (void)printf(",%s", cp); } else {
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Sat Mar 16 21:50:47 UTC 2024 Modified Files: src/sys/arch/ia64/include: limits.h src/sys/arch/mips/include: limits.h src/sys/arch/sparc/include: limits.h Log Message: make all QUAD constants look the same. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/limits.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/include/limits.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sparc/include/limits.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/ia64/include/limits.h diff -u src/sys/arch/ia64/include/limits.h:1.9 src/sys/arch/ia64/include/limits.h:1.10 --- src/sys/arch/ia64/include/limits.h:1.9 Mon Jan 21 15:28:17 2019 +++ src/sys/arch/ia64/include/limits.h Sat Mar 16 17:50:47 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.9 2019/01/21 20:28:17 dholland Exp $ */ +/* $NetBSD: limits.h,v 1.10 2024/03/16 21:50:47 christos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -68,11 +68,9 @@ #define SSIZE_MIN LONG_MIN /* min value for a ssize_t */ #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ -/* GCC requires that quad constants be written as expressions. */ -#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */ - /* max value for a quad_t */ -#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1)) -#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */ +#define UQUAD_MAX 0xULL /* max unsigned quad */ +#define QUAD_MAX 0x7fffLL /* max signed quad */ +#define QUAD_MIN (-0x7fffLL-1) /* min signed quad */ #endif /* _NETBSD_SOURCE */ #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ Index: src/sys/arch/mips/include/limits.h diff -u src/sys/arch/mips/include/limits.h:1.28 src/sys/arch/mips/include/limits.h:1.29 --- src/sys/arch/mips/include/limits.h:1.28 Sun Jul 26 04:08:41 2020 +++ src/sys/arch/mips/include/limits.h Sat Mar 16 17:50:47 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.28 2020/07/26 08:08:41 simonb Exp $ */ +/* $NetBSD: limits.h,v 1.29 2024/03/16 21:50:47 christos Exp $ */ /* * Copyright (c) 1988, 1993 @@ -94,18 +94,9 @@ #define SIZE_T_MAX UINT_MAX /* max value for a size_t */ #endif -#ifdef _LP64 -/* Quads and longs are the same on LP64. */ -#define UQUAD_MAX (ULONG_MAX) -#define QUAD_MAX (LONG_MAX) -#define QUAD_MIN (LONG_MIN) -#else -/* GCC requires that quad constants be written as expressions. */ -#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */ - /* max value for a quad_t */ -#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1)) -#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */ -#endif +#define UQUAD_MAX 0xULL /* max unsigned quad */ +#define QUAD_MAX 0x7fffLL /* max signed quad */ +#define QUAD_MIN (-0x7fffLL-1) /* min signed quad */ #endif /* _NETBSD_SOURCE */ #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */ Index: src/sys/arch/sparc/include/limits.h diff -u src/sys/arch/sparc/include/limits.h:1.24 src/sys/arch/sparc/include/limits.h:1.25 --- src/sys/arch/sparc/include/limits.h:1.24 Thu Mar 14 11:51:10 2024 +++ src/sys/arch/sparc/include/limits.h Sat Mar 16 17:50:47 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.24 2024/03/14 15:51:10 christos Exp $ */ +/* $NetBSD: limits.h,v 1.25 2024/03/16 21:50:47 christos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -75,9 +75,9 @@ #define SSIZE_MIN LONG_MIN /* min value for a ssize_t */ #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ -#define UQUAD_MAX 0xULL /* max unsigned quad */ -#define QUAD_MAX 0x7fffLL /* max signed quad */ -#define QUAD_MIN (-0x7fffLL-1) /* min signed quad */ +#define UQUAD_MAX 0xULL /* max unsigned quad */ +#define QUAD_MAX 0x7fffLL /* max signed quad */ +#define QUAD_MIN (-0x7fffLL-1) /* min signed quad */ #endif /* _NETBSD_SOURCE */ #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
CVS commit: src/sys/arch
Module Name:src Committed By: christos Date: Sat Mar 16 21:50:47 UTC 2024 Modified Files: src/sys/arch/ia64/include: limits.h src/sys/arch/mips/include: limits.h src/sys/arch/sparc/include: limits.h Log Message: make all QUAD constants look the same. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/ia64/include/limits.h cvs rdiff -u -r1.28 -r1.29 src/sys/arch/mips/include/limits.h cvs rdiff -u -r1.24 -r1.25 src/sys/arch/sparc/include/limits.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
Module Name:src Committed By: andvar Date: Sat Mar 16 18:17:39 UTC 2024 Modified Files: src/sys/dev/ic: lan9118reg.h Log Message: s/Broardcast/Broadcast/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/lan9118reg.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
Module Name:src Committed By: andvar Date: Sat Mar 16 18:17:39 UTC 2024 Modified Files: src/sys/dev/ic: lan9118reg.h Log Message: s/Broardcast/Broadcast/ in comment. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/dev/ic/lan9118reg.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/lan9118reg.h diff -u src/sys/dev/ic/lan9118reg.h:1.3 src/sys/dev/ic/lan9118reg.h:1.4 --- src/sys/dev/ic/lan9118reg.h:1.3 Mon Sep 27 12:29:03 2010 +++ src/sys/dev/ic/lan9118reg.h Sat Mar 16 18:17:39 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118reg.h,v 1.3 2010/09/27 12:29:03 kiyohara Exp $ */ +/* $NetBSD: lan9118reg.h,v 1.4 2024/03/16 18:17:39 andvar Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -206,7 +206,7 @@ #define LAN9118_MAC_CR_HO (1 << 15) /* Hash Only Filtering mode */ #define LAN9118_MAC_CR_HPFILT (1 << 13) /* Hash/Perfect Flt Mode */ #define LAN9118_MAC_CR_LCOLL (1 << 12) /* Late Collision Control */ -#define LAN9118_MAC_CR_BCAST (1 << 11) /* Disable Broardcast Frms */ +#define LAN9118_MAC_CR_BCAST (1 << 11) /* Disable Broadcast Frms */ #define LAN9118_MAC_CR_DISRTY (1 << 10) /* Disable Retry */ #define LAN9118_MAC_CR_PADSTR (1 << 8) /* Automatic Pad String */ #define LAN9118_MAC_CR_BOLMT (1 << 7) /* BackOff Limit */
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:16:21 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Reduce unnecessary indentation. Post-fix tidying. No functional change intended. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/lib/libc/time/strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:16:21 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Reduce unnecessary indentation. Post-fix tidying. No functional change intended. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/lib/libc/time/strptime.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/libc/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.64 src/lib/libc/time/strptime.c:1.65 --- src/lib/libc/time/strptime.c:1.64 Sat Mar 16 00:06:45 2024 +++ src/lib/libc/time/strptime.c Sat Mar 16 00:16:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.64 2024/03/16 00:06:45 riastradh Exp $ */ +/* $NetBSD: strptime.c,v 1.65 2024/03/16 00:16:21 riastradh Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.64 2024/03/16 00:06:45 riastradh Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.65 2024/03/16 00:16:21 riastradh Exp $"); #endif #include "namespace.h" @@ -346,41 +346,40 @@ literal: LEGAL_ALT(ALT_O); continue; - case 's': /* seconds since the epoch */ - { -const time_t TIME_MAX = __type_max(time_t); -time_t sse; -unsigned d; + case 's': { /* seconds since the epoch */ + const time_t TIME_MAX = __type_max(time_t); + time_t sse; + unsigned d; -if (*bp < '0' || *bp > '9') { - bp = NULL; - continue; -} + if (*bp < '0' || *bp > '9') { +bp = NULL; +continue; + } -sse = *bp++ - '0'; -while (*bp >= '0' && *bp <= '9') { - d = *bp++ - '0'; - if (sse > TIME_MAX/10) { - bp = NULL; - break; - } - sse *= 10; - if (sse > TIME_MAX - d) { - bp = NULL; - break; - } - sse += d; + sse = *bp++ - '0'; + while (*bp >= '0' && *bp <= '9') { +d = *bp++ - '0'; +if (sse > TIME_MAX/10) { + bp = NULL; + break; } -if (bp == NULL) - continue; - -if (localtime_r(, tm) == NULL) +sse *= 10; +if (sse > TIME_MAX - d) { bp = NULL; -else - state |= S_YDAY | S_WDAY | - S_MON | S_MDAY | S_YEAR; + break; +} +sse += d; } + if (bp == NULL) +continue; + + if (localtime_r(, tm) == NULL) +bp = NULL; + else +state |= S_YDAY | S_WDAY | +S_MON | S_MDAY | S_YEAR; continue; + } case 'U': /* The week of year, beginning on sunday. */ case 'W': /* The week of year, beginning on monday. */
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:06:46 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Avoid arithmetic overflow. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/lib/libc/time/strptime.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/libc/time/strptime.c diff -u src/lib/libc/time/strptime.c:1.63 src/lib/libc/time/strptime.c:1.64 --- src/lib/libc/time/strptime.c:1.63 Mon Sep 21 15:31:54 2020 +++ src/lib/libc/time/strptime.c Sat Mar 16 00:06:45 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $ */ +/* $NetBSD: strptime.c,v 1.64 2024/03/16 00:06:45 riastradh Exp $ */ /*- * Copyright (c) 1997, 1998, 2005, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: strptime.c,v 1.63 2020/09/21 15:31:54 ginsbach Exp $"); +__RCSID("$NetBSD: strptime.c,v 1.64 2024/03/16 00:06:45 riastradh Exp $"); #endif #include "namespace.h" @@ -346,30 +346,33 @@ literal: LEGAL_ALT(ALT_O); continue; -#ifndef TIME_MAX -#define TIME_MAX INT64_MAX -#endif case 's': /* seconds since the epoch */ { -time_t sse = 0; -uint64_t rulim = TIME_MAX; +const time_t TIME_MAX = __type_max(time_t); +time_t sse; +unsigned d; if (*bp < '0' || *bp > '9') { bp = NULL; continue; } -do { +sse = *bp++ - '0'; +while (*bp >= '0' && *bp <= '9') { + d = *bp++ - '0'; + if (sse > TIME_MAX/10) { + bp = NULL; + break; + } sse *= 10; - sse += *bp++ - '0'; - rulim /= 10; -} while ((sse * 10 <= TIME_MAX) && - rulim && *bp >= '0' && *bp <= '9'); - -if (sse < 0 || (uint64_t)sse > TIME_MAX) { - bp = NULL; - continue; + if (sse > TIME_MAX - d) { + bp = NULL; + break; + } + sse += d; } +if (bp == NULL) + continue; if (localtime_r(, tm) == NULL) bp = NULL;
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:06:37 UTC 2024 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: strptime(3): Exercise some edge cases in the automatic tests. Unfortunately, we can't quite use strptime as a black box to detect the cases that triggered undefined behaviour, because strptime just fails in that case anyway since the number that would go in .tm_year is far out of the representable range. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/time/t_strptime.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/time/t_strptime.c diff -u src/tests/lib/libc/time/t_strptime.c:1.15 src/tests/lib/libc/time/t_strptime.c:1.16 --- src/tests/lib/libc/time/t_strptime.c:1.15 Sun Jun 3 08:48:37 2018 +++ src/tests/lib/libc/time/t_strptime.c Sat Mar 16 00:06:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $ */ +/* $NetBSD: t_strptime.c,v 1.16 2024/03/16 00:06:37 riastradh Exp $ */ /*- * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -32,11 +32,13 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_strptime.c,v 1.15 2018/06/03 08:48:37 maya Exp $"); +__RCSID("$NetBSD: t_strptime.c,v 1.16 2024/03/16 00:06:37 riastradh Exp $"); -#include -#include +#include +#include #include +#include +#include #include @@ -441,6 +443,151 @@ ATF_TC_BODY(Zone, tc) ztest("%Z"); } +ATF_TC(posixtime_overflow); + +ATF_TC_HEAD(posixtime_overflow, tc) +{ + + atf_tc_set_md_var(tc, "descr", + "Checks strptime(3) safely rejects POSIX time overfow"); +} + +ATF_TC_BODY(posixtime_overflow, tc) +{ + static const uint64_t P[] = { /* cases that should pass round-trip */ + [0] = 0, + [1] = 1, + [2] = 2, + [3] = 0x7ffe, + [4] = 0x7fff, + [5] = 0x8000, + [6] = 0x8001, + [7] = 0xfffe, + [8] = 0x, + [9] = 0x1, + [10] = 0x10001, + [11] = 67767976233532799, /* 2147483647-12-31T23:59:59 */ + /* + * Beyond this point, the year (.tm_year + 1900) + * overflows the signed 32-bit range, so we won't be + * able to test round-trips: + */ + [12] = 67767976233532800, + [13] = 67767976233532801, + [14] = 67768036191676799, + /* + * Beyond this point, .tm_year itself overflows the + * signed 32-bit range, so strptime won't work at all; + * the output can't be represented in struct tm. + */ +#if 0 + [15] = 67768036191676800, + [16] = 67768036191676801, + [17] = 0x7ffe, + [18] = 0x7fff, +#endif + }; + static const uint64_t F[] = { /* cases strptime should reject */ + [0] = 67768036191676800, + [1] = 67768036191676801, + [2] = 0x7ffe, + [3] = 0x7fff, + [4] = 0x8000, + [5] = 0x8001, + [6] = 0xfffe, + [7] = 0x, + }; + size_t i; + + /* + * Verify time_t fits in uint64_t, with space to spare since + * it's signed. + */ + __CTASSERT(__type_max(time_t) < __type_max(uint64_t)); + + /* + * Make sure we work in UTC so this test doesn't depend on + * which time zone your machine is configured for. + */ + setenv("TZ", "UTC", 1); + + /* + * Check the should-pass cases. + */ + for (i = 0; i < __arraycount(P); i++) { + char buf[sizeof("18446744073709551616")]; + int n; + struct tm tm; + time_t t; + int error; + + /* + * Format the integer in decimal. + */ + n = snprintf(buf, sizeof(buf), "%"PRIu64, P[i]); + ATF_CHECK_MSG(n >= 0 && (unsigned)n < sizeof(buf), + "P[%zu]: 64-bit requires %d digits", i, n); + + /* + * Parse the time into components. + */ + fprintf(stderr, "# P[%zu]: %"PRId64"\n", i, P[i]); + if (strptime(buf, "%s", ) == NULL) { + atf_tc_fail_nonfatal("P[%zu]: strptime failed", i); + continue; + } + fprintf(stderr, "tm_sec=%d\n", tm.tm_sec); + fprintf(stderr, "tm_min=%d\n", tm.tm_min); + fprintf(stderr, "tm_hour=%d\n", tm.tm_hour); + fprintf(stderr, "tm_mday=%d\n", tm.tm_mday); + fprintf(stderr, "tm_mon=%d\n", tm.tm_mon); + fprintf(stderr, "tm_year=%d\n", tm.tm_year); + fprintf(stderr, "tm_wday=%d\n", tm.tm_wday); + fprintf(stderr, "tm_yday=%d\n", tm.tm_yday); + fprintf(stderr, "tm_isdst=%d\n", tm.tm_isdst); + fprintf(stderr, "tm_gmtoff=%ld\n", tm.tm_gmtoff); + fprintf(stderr, "tm_zone=%s\n", tm.tm_zone); + + /* + * Convert back to POSIX seconds since epoch -- unless + * the year number overflows signed 32-bit, in which + * case stop here because we can't test further. + */ + if (tm.tm_year > 0x7fff - 1900) + continue; + t = mktime(); + error = errno; + ATF_CHECK_MSG(t != -1, "P[%zu]: mktime failed: %d, %s", + i, error, strerror(error)); + + /* + * Verify the round-trip. + */ + ATF_CHECK_EQ_MSG(P[i], (uint64_t)t, + "P[%zu]: %"PRId64" ->
CVS commit: src/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:06:46 UTC 2024 Modified Files: src/lib/libc/time: strptime.c Log Message: strptime(3): Avoid arithmetic overflow. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/lib/libc/time/strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/lib/libc/time
Module Name:src Committed By: riastradh Date: Sat Mar 16 00:06:37 UTC 2024 Modified Files: src/tests/lib/libc/time: t_strptime.c Log Message: strptime(3): Exercise some edge cases in the automatic tests. Unfortunately, we can't quite use strptime as a black box to detect the cases that triggered undefined behaviour, because strptime just fails in that case anyway since the number that would go in .tm_year is far out of the representable range. PR lib/58041 To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libc/time/t_strptime.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 22:15:21 UTC 2024 Modified Files: src/sys/uvm: uvm_swap.h Log Message: "retval = 0" should be "*retval = 0", should fix the broken build. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/uvm/uvm_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 22:15:21 UTC 2024 Modified Files: src/sys/uvm: uvm_swap.h Log Message: "retval = 0" should be "*retval = 0", should fix the broken build. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/uvm/uvm_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_swap.h diff -u src/sys/uvm/uvm_swap.h:1.28 src/sys/uvm/uvm_swap.h:1.29 --- src/sys/uvm/uvm_swap.h:1.28 Fri Mar 15 20:09:31 2024 +++ src/sys/uvm/uvm_swap.h Fri Mar 15 22:15:21 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.h,v 1.28 2024/03/15 20:09:31 andvar Exp $ */ +/* $NetBSD: uvm_swap.h,v 1.29 2024/03/15 22:15:21 andvar Exp $ */ /* * Copyright (c) 1997 Matthew R. Green @@ -65,7 +65,7 @@ uvm_swap_stats(char *c, int l, void (*f) size_t count, register_t *retval) { - retval = 0; + *retval = 0; return ENOSYS; }
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 20:09:31 UTC 2024 Modified Files: src/sys/uvm: uvm_swap.h Log Message: Rewrite !VMSWAP uvm_swap_stats() macro as a static function. NFCI. >From riastradh To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/uvm/uvm_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/uvm/uvm_swap.h diff -u src/sys/uvm/uvm_swap.h:1.27 src/sys/uvm/uvm_swap.h:1.28 --- src/sys/uvm/uvm_swap.h:1.27 Fri Mar 15 07:09:37 2024 +++ src/sys/uvm/uvm_swap.h Fri Mar 15 20:09:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.h,v 1.27 2024/03/15 07:09:37 andvar Exp $ */ +/* $NetBSD: uvm_swap.h,v 1.28 2024/03/15 20:09:31 andvar Exp $ */ /* * Copyright (c) 1997 Matthew R. Green @@ -39,10 +39,10 @@ #endif struct lwp; +struct swapent; #if defined(VMSWAP) -struct swapent; struct vm_page; int uvm_swap_get(struct vm_page *, int, int); @@ -57,8 +57,18 @@ int uvm_swap_stats(char *, int, void (*)(void *, const struct swapent *), size_t, register_t *); #else /* defined(VMSWAP) */ + #define uvm_swapisfull() true -#define uvm_swap_stats(c, l, f, count, retval) (void)(f), (*retval = 0, ENOSYS) + +static inline int +uvm_swap_stats(char *c, int l, void (*f)(void *, const struct swapent *), +size_t count, register_t *retval) +{ + + retval = 0; + return ENOSYS; +} + #endif /* defined(VMSWAP) */ void uvm_swap_shutdown(struct lwp *);
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 20:09:31 UTC 2024 Modified Files: src/sys/uvm: uvm_swap.h Log Message: Rewrite !VMSWAP uvm_swap_stats() macro as a static function. NFCI. >From riastradh To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/uvm/uvm_swap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: riastradh Date: Fri Mar 15 18:10:37 UTC 2024 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp: legacy_sha.c src/crypto/external/bsd/openssl/dist/include/crypto: sha.h src/crypto/external/bsd/openssl/dist/providers/implementations/digests: sha2_prov.c src/crypto/external/bsd/openssl/lib/libcrypto: libc-sha2xx.c src/tests/crypto/libcrypto: t_sha512trunc.c Log Message: libcrypto: Fix buffer overrun in truncated SHA-512 functions. Further fallout from the libc/openssl sha2 symbol collision. PR lib/58039 To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/include/crypto/sha.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c cvs rdiff -u -r1.1 -r1.2 src/tests/crypto/libcrypto/t_sha512trunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c diff -u src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.1.1.2 src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.2 --- src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c:1.1.1.2 Wed Oct 25 17:13:53 2023 +++ src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c Fri Mar 15 18:10:37 2024 @@ -49,9 +49,9 @@ static int nm##_init(EVP_MD_CTX *ctx) #define sha512_256_Initsha512_256_init #define sha512_224_Update SHA512_Update -#define sha512_224_Final SHA512_Final +#define sha512_224_Final sha512_224_final /* XXX NetBSD libc sha2 */ #define sha512_256_Update SHA512_Update -#define sha512_256_Final SHA512_Final +#define sha512_256_Final sha512_256_final /* XXX NetBSD libc sha2 */ IMPLEMENT_LEGACY_EVP_MD_METH(sha1, SHA1) IMPLEMENT_LEGACY_EVP_MD_METH(sha224, SHA224) Index: src/crypto/external/bsd/openssl/dist/include/crypto/sha.h diff -u src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.2 src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.2 --- src/crypto/external/bsd/openssl/dist/include/crypto/sha.h:1.1.1.2 Sun May 7 18:29:28 2023 +++ src/crypto/external/bsd/openssl/dist/include/crypto/sha.h Fri Mar 15 18:10:37 2024 @@ -16,6 +16,8 @@ int sha512_224_init(SHA512_CTX *); int sha512_256_init(SHA512_CTX *); +int sha512_224_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */ +int sha512_256_final(unsigned char *, SHA512_CTX *); /* XXX NetBSD libc sha2 */ int ossl_sha1_ctrl(SHA_CTX *ctx, int cmd, int mslen, void *ms); unsigned char *ossl_sha1(const unsigned char *d, size_t n, unsigned char *md); Index: src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c diff -u src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.1.1.1 src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.2 --- src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c:1.1.1.1 Sun May 7 18:29:30 2023 +++ src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c Fri Mar 15 18:10:37 2024 @@ -86,10 +86,12 @@ IMPLEMENT_digest_functions(sha512, SHA51 /* ossl_sha512_224_functions */ IMPLEMENT_digest_functions(sha512_224, SHA512_CTX, SHA512_CBLOCK, SHA224_DIGEST_LENGTH, SHA2_FLAGS, - sha512_224_init, SHA512_Update, SHA512_Final) + sha512_224_init, SHA512_Update, + /* XXX NetBSD libc sha2 */sha512_224_final) /* ossl_sha512_256_functions */ IMPLEMENT_digest_functions(sha512_256, SHA512_CTX, SHA512_CBLOCK, SHA256_DIGEST_LENGTH, SHA2_FLAGS, - sha512_256_init, SHA512_Update, SHA512_Final) + sha512_256_init, SHA512_Update, + /* XXX NetBSD libc sha2 */sha512_256_final) Index: src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c diff -u src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.4 --- src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c:1.3 Sat May 6 17:07:23 2023 +++ src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c Fri Mar 15 18:10:37 2024 @@ -47,6 +47,20 @@ sha512_224_init(SHA512_CTX *context) } extern int +sha512_224_final(unsigned char *md, SHA512_CTX *context); +int +sha512_224_final(unsigned char *md, SHA512_CTX *context) +{ + unsigned char tmp[64]; + + SHA512_Final(tmp, context); + memcpy(md, tmp, 28); + explicit_memset(tmp, 0, sizeof(tmp)); + return 1; + +} + +extern int
CVS commit: src
Module Name:src Committed By: riastradh Date: Fri Mar 15 18:10:37 UTC 2024 Modified Files: src/crypto/external/bsd/openssl/dist/crypto/evp: legacy_sha.c src/crypto/external/bsd/openssl/dist/include/crypto: sha.h src/crypto/external/bsd/openssl/dist/providers/implementations/digests: sha2_prov.c src/crypto/external/bsd/openssl/lib/libcrypto: libc-sha2xx.c src/tests/crypto/libcrypto: t_sha512trunc.c Log Message: libcrypto: Fix buffer overrun in truncated SHA-512 functions. Further fallout from the libc/openssl sha2 symbol collision. PR lib/58039 To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/crypto/evp/legacy_sha.c cvs rdiff -u -r1.1.1.2 -r1.2 \ src/crypto/external/bsd/openssl/dist/include/crypto/sha.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/crypto/external/bsd/openssl/dist/providers/implementations/digests/sha2_prov.c cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/openssl/lib/libcrypto/libc-sha2xx.c cvs rdiff -u -r1.1 -r1.2 src/tests/crypto/libcrypto/t_sha512trunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: nia Date: Fri Mar 15 17:47:02 UTC 2024 Modified Files: src/doc: CHANGES Log Message: doc: changes from the last 2 weeks To generate a diff of this commit: cvs rdiff -u -r1.3044 -r1.3045 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3044 src/doc/CHANGES:1.3045 --- src/doc/CHANGES:1.3044 Wed Mar 13 08:13:56 2024 +++ src/doc/CHANGES Fri Mar 15 17:47:02 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3044 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3045 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -283,6 +283,13 @@ Changes from NetBSD 10.0 to NetBSD 11.0: nsd: Import 4.8.0. [christos 20240217] unbound(8): Import 1.19.1. [christos 20240217] bind: Import 9.18.24 [christos 20240221] + re(4): Add support for Killer E2600 Ethernet. [jakllsch 20240228] sqlite3(1): Import 3.45.1. [christos 20240301] + alpha: Add initial support for the DEC KN7AA ("Ruby") systems, + DEC 7000 and DEC 1. [thorpej 20240302] elftoolchain: Import svn r4037. [christos 20240303] + certctl(8): Improve the performance of `certctl list`. + [riastradh 20240303] + audioplay(1): Add -n flag that doesn't write audio data for the + test suite. [mrg 20240304] mac68k: Add ascaudio(4) ASC audio driver. [nat 20240313]
CVS commit: src/doc
Module Name:src Committed By: nia Date: Fri Mar 15 17:47:02 UTC 2024 Modified Files: src/doc: CHANGES Log Message: doc: changes from the last 2 weeks To generate a diff of this commit: cvs rdiff -u -r1.3044 -r1.3045 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: riastradh Date: Fri Mar 15 15:49:01 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: doc/3RDPARTY: Note OpenSSL vendor/release tags. To generate a diff of this commit: cvs rdiff -u -r1.1999 -r1.2000 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1999 src/doc/3RDPARTY:1.2000 --- src/doc/3RDPARTY:1.1999 Thu Mar 14 09:13:57 2024 +++ src/doc/3RDPARTY Fri Mar 15 15:49:01 2024 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1999 2024/03/14 09:13:57 wiz Exp $ +# $NetBSD: 3RDPARTY,v 1.2000 2024/03/15 15:49:01 riastradh Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -1131,6 +1131,9 @@ Mailing List: openssl-announce@openssl.o Responsible: christos, mjf, tls, riastradh, spz License: OpenSSL and SSLeay license (both BSD-like) Location: crypto/external/bsd/openssl/dist +Vendor tag: OPENSSL +Release tag: openssl-x-y-z (openssl-x-y-zw in past with lettered releases) +Current tag: openssl-3-0-12 Notes: - Run openssl2netbsd to get rid of the RCSID identifiers - run make in /usr/src/crypto/external/bsd/openssl/lib/libcrypto/man
CVS commit: src/doc
Module Name:src Committed By: riastradh Date: Fri Mar 15 15:49:01 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: doc/3RDPARTY: Note OpenSSL vendor/release tags. To generate a diff of this commit: cvs rdiff -u -r1.1999 -r1.2000 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: riastradh Date: Fri Mar 15 15:32:07 UTC 2024 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/crypto/libcrypto: Makefile Added Files: src/tests/crypto/libcrypto: t_sha512trunc.c Log Message: libcrypto: Add some trivial tests for truncated SHA-512 variants. These should use more of the test vectors from https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing but this will do for now to detect the buffer overrun rake we left lying around for ourselves. PR lib/58039 To generate a diff of this commit: cvs rdiff -u -r1.429 -r1.430 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1310 -r1.1311 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.15 -r1.16 src/tests/crypto/libcrypto/Makefile cvs rdiff -u -r0 -r1.1 src/tests/crypto/libcrypto/t_sha512trunc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: riastradh Date: Fri Mar 15 15:32:07 UTC 2024 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/crypto/libcrypto: Makefile Added Files: src/tests/crypto/libcrypto: t_sha512trunc.c Log Message: libcrypto: Add some trivial tests for truncated SHA-512 variants. These should use more of the test vectors from https://csrc.nist.gov/Projects/Cryptographic-Algorithm-Validation-Program/Secure-Hashing#Testing but this will do for now to detect the buffer overrun rake we left lying around for ourselves. PR lib/58039 To generate a diff of this commit: cvs rdiff -u -r1.429 -r1.430 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.1310 -r1.1311 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.15 -r1.16 src/tests/crypto/libcrypto/Makefile cvs rdiff -u -r0 -r1.1 src/tests/crypto/libcrypto/t_sha512trunc.c 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.429 src/distrib/sets/lists/debug/mi:1.430 --- src/distrib/sets/lists/debug/mi:1.429 Thu Feb 22 01:13:43 2024 +++ src/distrib/sets/lists/debug/mi Fri Mar 15 15:32:07 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.429 2024/02/22 01:13:43 christos Exp $ +# $NetBSD: mi,v 1.430 2024/03/15 15:32:07 riastradh 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 @@ -1650,6 +1650,7 @@ ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_srptest.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_threadstest.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_x509v3test.debug tests-crypto-debug debug,atf,compattestfile,openssl=10 +./usr/libdata/debug/usr/tests/crypto/libcrypto/t_sha512trunc.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_aescbc.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_aesctr1.debug tests-crypto-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/crypto/opencrypto/h_aesctr2.debug tests-crypto-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1310 src/distrib/sets/lists/tests/mi:1.1311 --- src/distrib/sets/lists/tests/mi:1.1310 Thu Mar 14 21:00:33 2024 +++ src/distrib/sets/lists/tests/mi Fri Mar 15 15:32:07 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1310 2024/03/14 21:00:33 rillig Exp $ +# $NetBSD: mi,v 1.1311 2024/03/15 15:32:07 riastradh Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -1476,6 +1476,7 @@ ./usr/tests/crypto/libcrypto/t_hashes tests-crypto-tests compattestfile,atf ./usr/tests/crypto/libcrypto/t_libcrypto tests-crypto-tests compattestfile,atf ./usr/tests/crypto/libcrypto/t_pubkey tests-crypto-tests compattestfile,atf +./usr/tests/crypto/libcrypto/t_sha512trunc tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencryptotests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/Atffile tests-crypto-tests compattestfile,atf ./usr/tests/crypto/opencrypto/Kyuafile tests-crypto-tests compattestfile,atf,kyua Index: src/tests/crypto/libcrypto/Makefile diff -u src/tests/crypto/libcrypto/Makefile:1.15 src/tests/crypto/libcrypto/Makefile:1.16 --- src/tests/crypto/libcrypto/Makefile:1.15 Mon May 8 17:46:06 2023 +++ src/tests/crypto/libcrypto/Makefile Fri Mar 15 15:32:07 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.15 2023/05/08 17:46:06 christos Exp $ +# $NetBSD: Makefile,v 1.16 2024/03/15 15:32:07 riastradh Exp $ .include @@ -18,6 +18,10 @@ SUBDIR += lhash sha x509v3 TESTSDIR= ${TESTSBASE}/crypto/libcrypto +TESTS_C+= t_sha512trunc +DPADD.t_sha512trunc+= ${LIBCRYPTO} +LDADD.t_sha512trunc+= -lcrypto + .if ${HAVE_OPENSSL} == 10 TESTS_SH= t_certs .endif Added files: Index: src/tests/crypto/libcrypto/t_sha512trunc.c diff -u /dev/null src/tests/crypto/libcrypto/t_sha512trunc.c:1.1 --- /dev/null Fri Mar 15 15:32:08 2024 +++ src/tests/crypto/libcrypto/t_sha512trunc.c Fri Mar 15 15:32:07 2024 @@ -0,0 +1,174 @@ +/* $NetBSD: t_sha512trunc.c,v 1.1 2024/03/15 15:32:07 riastradh Exp $ */ + +/*- + * Copyright (c) 2024 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 07:09:37 UTC 2024 Modified Files: src/sys/uvm: uvm_fault.c uvm_pager.c uvm_swap.h uvm_swapstub.c Log Message: Fix !VMSWAP build: Added __unused for few local variables, which are used in VMSWAP block only. Adjust !VMSWAP uvm_swap_stats() definition to make it build with compat code. Copied "int (*uvm_swap_stats50)(...)" definition from uvm_swap to uvm_swapstub to avoid missing uvm_swap_stats50 reference on linking. Fixes INSTALL_CPMBR1400, INSTALL_ZYXELKX evbmips kernel configs as a result. Reviewed by simon and phone in IRC (thanks). To generate a diff of this commit: cvs rdiff -u -r1.236 -r1.237 src/sys/uvm/uvm_fault.c cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_pager.c cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/uvm_swap.h cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/uvm_swapstub.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.236 src/sys/uvm/uvm_fault.c:1.237 --- src/sys/uvm/uvm_fault.c:1.236 Tue Sep 19 22:14:25 2023 +++ src/sys/uvm/uvm_fault.c Fri Mar 15 07:09:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.236 2023/09/19 22:14:25 ad Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.237 2024/03/15 07:09:37 andvar Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.236 2023/09/19 22:14:25 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.237 2024/03/15 07:09:37 andvar Exp $"); #include "opt_uvmhist.h" @@ -273,7 +273,7 @@ uvmfault_anonget(struct uvm_faultinfo *u { struct vm_page *pg; krw_t lock_type; - int error; + int error __unused; /* used for VMSWAP */ UVMHIST_FUNC(__func__); UVMHIST_CALLED(maphist); KASSERT(rw_lock_held(anon->an_lock)); Index: src/sys/uvm/uvm_pager.c diff -u src/sys/uvm/uvm_pager.c:1.130 src/sys/uvm/uvm_pager.c:1.131 --- src/sys/uvm/uvm_pager.c:1.130 Sun Oct 18 18:22:29 2020 +++ src/sys/uvm/uvm_pager.c Fri Mar 15 07:09:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pager.c,v 1.130 2020/10/18 18:22:29 chs Exp $ */ +/* $NetBSD: uvm_pager.c,v 1.131 2024/03/15 07:09:37 andvar Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.130 2020/10/18 18:22:29 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pager.c,v 1.131 2024/03/15 07:09:37 andvar Exp $"); #include "opt_uvmhist.h" #include "opt_readahead.h" @@ -330,7 +330,7 @@ uvm_aio_aiodone_pages(struct vm_page **p struct vm_page *pg; krwlock_t *slock; int pageout_done; /* number of PG_PAGEOUT pages processed */ - int swslot; + int swslot __unused; /* used for VMSWAP */ int i; bool swap; UVMHIST_FUNC(__func__); UVMHIST_CALLED(ubchist); @@ -405,7 +405,7 @@ uvm_aio_aiodone_pages(struct vm_page **p */ if (error) { - int slot; + int slot __unused; /* used for VMSWAP */ if (!write) { pg->flags |= PG_RELEASED; continue; Index: src/sys/uvm/uvm_swap.h diff -u src/sys/uvm/uvm_swap.h:1.26 src/sys/uvm/uvm_swap.h:1.27 --- src/sys/uvm/uvm_swap.h:1.26 Sat Sep 5 16:30:13 2020 +++ src/sys/uvm/uvm_swap.h Fri Mar 15 07:09:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swap.h,v 1.26 2020/09/05 16:30:13 riastradh Exp $ */ +/* $NetBSD: uvm_swap.h,v 1.27 2024/03/15 07:09:37 andvar Exp $ */ /* * Copyright (c) 1997 Matthew R. Green @@ -58,7 +58,7 @@ int uvm_swap_stats(char *, int, #else /* defined(VMSWAP) */ #define uvm_swapisfull() true -#define uvm_swap_stats(c, l, f, count, retval) (__used f, *retval = 0, ENOSYS) +#define uvm_swap_stats(c, l, f, count, retval) (void)(f), (*retval = 0, ENOSYS) #endif /* defined(VMSWAP) */ void uvm_swap_shutdown(struct lwp *); Index: src/sys/uvm/uvm_swapstub.c diff -u src/sys/uvm/uvm_swapstub.c:1.8 src/sys/uvm/uvm_swapstub.c:1.9 --- src/sys/uvm/uvm_swapstub.c:1.8 Tue Feb 18 06:18:13 2014 +++ src/sys/uvm/uvm_swapstub.c Fri Mar 15 07:09:37 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_swapstub.c,v 1.8 2014/02/18 06:18:13 pooka Exp $ */ +/* $NetBSD: uvm_swapstub.c,v 1.9 2024/03/15 07:09:37 andvar Exp $ */ /*- * Copyright (c)2005 YAMAMOTO Takashi, @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_swapstub.c,v 1.8 2014/02/18 06:18:13 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_swapstub.c,v 1.9 2024/03/15 07:09:37 andvar Exp $"); #include #include @@ -40,6 +40,9 @@ __KERNEL_RCSID(0, "$NetBSD: uvm_swapstub #include +int (*uvm_swap_stats50)(const struct sys_swapctl_args *, register_t *) = +(void *)enosys; + void uvm_swap_init(void) {
CVS commit: src/sys/uvm
Module Name:src Committed By: andvar Date: Fri Mar 15 07:09:37 UTC 2024 Modified Files: src/sys/uvm: uvm_fault.c uvm_pager.c uvm_swap.h uvm_swapstub.c Log Message: Fix !VMSWAP build: Added __unused for few local variables, which are used in VMSWAP block only. Adjust !VMSWAP uvm_swap_stats() definition to make it build with compat code. Copied "int (*uvm_swap_stats50)(...)" definition from uvm_swap to uvm_swapstub to avoid missing uvm_swap_stats50 reference on linking. Fixes INSTALL_CPMBR1400, INSTALL_ZYXELKX evbmips kernel configs as a result. Reviewed by simon and phone in IRC (thanks). To generate a diff of this commit: cvs rdiff -u -r1.236 -r1.237 src/sys/uvm/uvm_fault.c cvs rdiff -u -r1.130 -r1.131 src/sys/uvm/uvm_pager.c cvs rdiff -u -r1.26 -r1.27 src/sys/uvm/uvm_swap.h cvs rdiff -u -r1.8 -r1.9 src/sys/uvm/uvm_swapstub.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/evbarm/instkernel/sshramdisk
Module Name:src Committed By: riastradh Date: Fri Mar 15 02:20:59 UTC 2024 Modified Files: src/distrib/evbarm/instkernel/sshramdisk: Makefile Log Message: evbarm/instkernel/sshramdisk: Put firmware in the right paths. Maybe this should also be wired up to `release' to put the ramdisk in the releasedir so we detect destdir path leakage like this had. PR port-evbarm/58035 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/evbarm/instkernel/sshramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/evbarm/instkernel/sshramdisk/Makefile diff -u src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.25 src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.26 --- src/distrib/evbarm/instkernel/sshramdisk/Makefile:1.25 Thu Mar 26 07:44:43 2020 +++ src/distrib/evbarm/instkernel/sshramdisk/Makefile Fri Mar 15 02:20:58 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.25 2020/03/26 07:44:43 skrll Exp $ +# $NetBSD: Makefile,v 1.26 2024/03/15 02:20:58 riastradh Exp $ .include .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib" @@ -29,7 +29,9 @@ IMAGEDEPENDS= ${CRUNCHBIN} \ ${NETBSDSRCDIR}/etc/group \ ${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \ ${DISTRIBDIR}/common/services -IMAGEPREBUILD= ${TOOL_PAX} ${PAX_TIMESTAMP} -rw -pp ${DESTDIR}/libdata/firmware ${WORKDIR} +IMAGEPREBUILD= \ + (cd ${DESTDIR} && ${TOOL_PAX} ${PAX_TIMESTAMP} -w libdata/firmware) \ + | (cd ${WORKDIR} && ${TOOL_PAX} -r -pp) # Use stubs to eliminate some large stuff from libc HACKSRC= ${DISTRIBDIR}/utils/libhack
CVS commit: src/distrib/evbarm/instkernel/sshramdisk
Module Name:src Committed By: riastradh Date: Fri Mar 15 02:20:59 UTC 2024 Modified Files: src/distrib/evbarm/instkernel/sshramdisk: Makefile Log Message: evbarm/instkernel/sshramdisk: Put firmware in the right paths. Maybe this should also be wired up to `release' to put the ramdisk in the releasedir so we detect destdir path leakage like this had. PR port-evbarm/58035 To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/distrib/evbarm/instkernel/sshramdisk/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/stat
Am 14.03.2024 um 21:27 schrieb Robert Elz: > Date:Thu, 14 Mar 2024 20:53:13 +0100 > From:Roland Illig > Message-ID: <9c7513f7-97b5-4d3b-9d66-dce483af7...@gmx.de> > > | I don't think the flags '+' and '0' make sense for strings, that's why I > | decided to preserve existing behavior. > > But the change only affected things when the # flag was given. I agree > that + and 0 are meaningless for strings, but - isn't, and %-S would work, > I see no reason why %#-S shouldn't work as well. > > Not exactly a serius problem, as clearly no-one ever seems to have > been bothered by it, but no-one intentionally writes the code as it > was (generating clear everything) - the ! was obviously just a thinko > for ~. I agree. Thank you for fixing the left-aligned output, I wrote a few tests for these cases. Roland
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Mar 14 21:17:54 UTC 2024 Modified Files: src/tests/usr.bin/stat: t_stat.sh src/usr.bin/stat: stat.c Log Message: stat: don't allow numeric formatting flags on strings Calling snprintf with "%+s" invokes undefined behavior. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/stat/t_stat.sh cvs rdiff -u -r1.52 -r1.53 src/usr.bin/stat/stat.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/stat/t_stat.sh diff -u src/tests/usr.bin/stat/t_stat.sh:1.1 src/tests/usr.bin/stat/t_stat.sh:1.2 --- src/tests/usr.bin/stat/t_stat.sh:1.1 Thu Mar 14 21:00:33 2024 +++ src/tests/usr.bin/stat/t_stat.sh Thu Mar 14 21:17:54 2024 @@ -1,4 +1,4 @@ -# $NetBSD: t_stat.sh,v 1.1 2024/03/14 21:00:33 rillig Exp $ +# $NetBSD: t_stat.sh,v 1.2 2024/03/14 21:17:54 rillig Exp $ # # Copyright (c) 2024 The NetBSD Foundation, Inc. # All rights reserved. @@ -44,10 +44,15 @@ string_format_body() { atf_check -o 'inline:left-aligned <Ümläute >\n' \ stat -f 'left-aligned <%-20SN>' 'Ümläute' - # FIXME: invokes undefined behavior in snprintf "%+s" - atf_check -o 'inline:string-plus <Ümläute>\n' \ + atf_check -s exit:1 -o ignore -e 'inline:stat: % SN: bad format\n' \ + stat -f 'string-space <% SN>' 'Ümläute' + + atf_check -s exit:1 -o ignore -e 'inline:stat: %+SN: bad format\n' \ stat -f 'string-plus <%+SN>' 'Ümläute' + atf_check -s exit:1 -o ignore -e 'inline:stat: %0SN: bad format\n' \ + stat -f 'string-zero <%0SN>' 'Ümläute' + atf_check -o 'inline:vis <\303\234ml\303\244ute>\n' \ stat -f 'vis <%#SN>' 'Ümläute' Index: src/usr.bin/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.52 src/usr.bin/stat/stat.c:1.53 --- src/usr.bin/stat/stat.c:1.52 Thu Mar 14 19:38:56 2024 +++ src/usr.bin/stat/stat.c Thu Mar 14 21:17:54 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.52 2024/03/14 19:38:56 kre Exp $ */ +/* $NetBSD: stat.c,v 1.53 2024/03/14 21:17:54 rillig Exp $ */ /* * Copyright (c) 2002-2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: stat.c,v 1.52 2024/03/14 19:38:56 kre Exp $"); +__RCSID("$NetBSD: stat.c,v 1.53 2024/03/14 21:17:54 rillig Exp $"); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -1065,11 +1065,11 @@ format1(const struct stat *st, errx(1, "%.*s: bad format", (int)flen, fmt); } - /* - * If a subdatum was specified but not supported, or an output - * format was selected that is not supported, that's an error. - */ - if (hilo != 0 || (ofmt & formats) == 0) + if (hilo != 0 // subdatum not supported + || !(ofmt & formats) // output format not supported + || (ofmt == FMTF_STRING && flags & FLAG_SPACE) + || (ofmt == FMTF_STRING && flags & FLAG_PLUS) + || (ofmt == FMTF_STRING && flags & FLAG_ZERO)) errx(1, "%.*s: bad format", (int)flen, fmt); /*
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Mar 14 21:17:54 UTC 2024 Modified Files: src/tests/usr.bin/stat: t_stat.sh src/usr.bin/stat: stat.c Log Message: stat: don't allow numeric formatting flags on strings Calling snprintf with "%+s" invokes undefined behavior. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/stat/t_stat.sh cvs rdiff -u -r1.52 -r1.53 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Mar 14 21:00:33 UTC 2024 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/usr.bin: Makefile Added Files: src/tests/usr.bin/stat: Makefile t_stat.sh Log Message: tests/stat: test the left-aligned and right-aligned 'S' format To generate a diff of this commit: cvs rdiff -u -r1.1309 -r1.1310 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.202 -r1.203 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/stat/Makefile \ src/tests/usr.bin/stat/t_stat.sh 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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1309 src/distrib/sets/lists/tests/mi:1.1310 --- src/distrib/sets/lists/tests/mi:1.1309 Sun Mar 3 00:50:41 2024 +++ src/distrib/sets/lists/tests/mi Thu Mar 14 21:00:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1309 2024/03/03 00:50:41 rillig Exp $ +# $NetBSD: mi,v 1.1310 2024/03/14 21:00:33 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6473,6 +6473,10 @@ ./usr/tests/usr.bin/sort/d_any_char_iflag_out.txt tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/sort/d_any_char_in.txt tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/sort/t_sorttests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/stattests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/stat/Atffile tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/stat/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua +./usr/tests/usr.bin/stat/t_stattests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/tar tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/tar/Atffile tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/tar/Kyuafiletests-usr.bin-tests compattestfile,atf,kyua Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.202 src/etc/mtree/NetBSD.dist.tests:1.203 --- src/etc/mtree/NetBSD.dist.tests:1.202 Thu Jan 25 00:30:57 2024 +++ src/etc/mtree/NetBSD.dist.tests Thu Mar 14 21:00:32 2024 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.202 2024/01/25 00:30:57 riastradh Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.203 2024/03/14 21:00:32 rillig Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -476,6 +476,7 @@ ./usr/tests/usr.bin/sed ./usr/tests/usr.bin/shmif_dumpbus ./usr/tests/usr.bin/sort +./usr/tests/usr.bin/stat ./usr/tests/usr.bin/tar ./usr/tests/usr.bin/tmux ./usr/tests/usr.bin/tr Index: src/tests/usr.bin/Makefile diff -u src/tests/usr.bin/Makefile:1.39 src/tests/usr.bin/Makefile:1.40 --- src/tests/usr.bin/Makefile:1.39 Thu Jan 25 00:30:57 2024 +++ src/tests/usr.bin/Makefile Thu Mar 14 21:00:33 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2024/01/25 00:30:57 riastradh Exp $ +# $NetBSD: Makefile,v 1.40 2024/03/14 21:00:33 rillig Exp $ # .include @@ -9,7 +9,7 @@ TESTS_SUBDIRS= awk basename bzip2 cc cmp diff dirname error find fstat gdb grep gzip id indent \ infocmp jot ld locale m4 make mixerctl mkdep mtree nbperf \ netpgpverify patch pkill pr printf pwhash realpath rump_server \ - shmif_dumpbus sdiff sed sort tar tmux tr unifdef uniq \ + shmif_dumpbus sdiff sed sort stat tar tmux tr unifdef uniq \ vmstat xlint ztest .if ${MKCXX} != "no" Added files: Index: src/tests/usr.bin/stat/Makefile diff -u /dev/null src/tests/usr.bin/stat/Makefile:1.1 --- /dev/null Thu Mar 14 21:00:33 2024 +++ src/tests/usr.bin/stat/Makefile Thu Mar 14 21:00:33 2024 @@ -0,0 +1,7 @@ +# $NetBSD: Makefile,v 1.1 2024/03/14 21:00:33 rillig Exp $ + +TESTSDIR= ${TESTSBASE}/usr.bin/stat + +TESTS_SH= t_stat + +.include Index: src/tests/usr.bin/stat/t_stat.sh diff -u /dev/null src/tests/usr.bin/stat/t_stat.sh:1.1 --- /dev/null Thu Mar 14 21:00:33 2024 +++ src/tests/usr.bin/stat/t_stat.sh Thu Mar 14 21:00:33 2024 @@ -0,0 +1,63 @@ +# $NetBSD: t_stat.sh,v 1.1 2024/03/14 21:00:33 rillig Exp $ +# +# Copyright (c) 2024 The NetBSD Foundation, Inc. +# All rights reserved. +# +# This code is derived from software contributed to The NetBSD Foundation +# by Roland Illig. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +#notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +#notice, this list of conditions and the following disclaimer in the +#documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
CVS commit: src
Module Name:src Committed By: rillig Date: Thu Mar 14 21:00:33 UTC 2024 Modified Files: src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/usr.bin: Makefile Added Files: src/tests/usr.bin/stat: Makefile t_stat.sh Log Message: tests/stat: test the left-aligned and right-aligned 'S' format To generate a diff of this commit: cvs rdiff -u -r1.1309 -r1.1310 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.202 -r1.203 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.39 -r1.40 src/tests/usr.bin/Makefile cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/stat/Makefile \ src/tests/usr.bin/stat/t_stat.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/stat
Date:Thu, 14 Mar 2024 20:53:13 +0100 From:Roland Illig Message-ID: <9c7513f7-97b5-4d3b-9d66-dce483af7...@gmx.de> | I don't think the flags '+' and '0' make sense for strings, that's why I | decided to preserve existing behavior. But the change only affected things when the # flag was given. I agree that + and 0 are meaningless for strings, but - isn't, and %-S would work, I see no reason why %#-S shouldn't work as well. Not exactly a serius problem, as clearly no-one ever seems to have been bothered by it, but no-one intentionally writes the code as it was (generating clear everything) - the ! was obviously just a thinko for ~. kre
Re: CVS commit: src/usr.bin/stat
Am 14.03.2024 um 20:38 schrieb Robert Elz: > Module Name: src > Committed By: kre > Date: Thu Mar 14 19:38:56 UTC 2024 > > Modified Files: > src/usr.bin/stat: stat.c > > Log Message: > While the change in 1.51 certainly retained binary compat with > what was in 1.50 (while silencing LINT) - it was clearly not the > correct change to make. The code used !FLAG_POUND where it > clearly meant ~FLAG_POUND ... the former is 0, so &= 0 could > be replaced by =0 changing nothing. But that's not what it > should have been doing, other flags should not have been > removed here, just FLAG_POUND. I don't think the flags '+' and '0' make sense for strings, that's why I decided to preserve existing behavior. Roland
CVS commit: src/usr.bin/stat
Module Name:src Committed By: kre Date: Thu Mar 14 19:38:56 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: While the change in 1.51 certainly retained binary compat with what was in 1.50 (while silencing LINT) - it was clearly not the correct change to make. The code used !FLAG_POUND where it clearly meant ~FLAG_POUND ... the former is 0, so &= 0 could be replaced by =0 changing nothing. But that's not what it should have been doing, other flags should not have been removed here, just FLAG_POUND. This problem seems to have existed since support for %#s was first added in 2011, which kind of suggests how rarely that format, particularly with other flags (like %#-s) has ever been used (with no other flags, the bug would not be noticed). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.51 src/usr.bin/stat/stat.c:1.52 --- src/usr.bin/stat/stat.c:1.51 Thu Mar 14 00:07:20 2024 +++ src/usr.bin/stat/stat.c Thu Mar 14 19:38:56 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.51 2024/03/14 00:07:20 rillig Exp $ */ +/* $NetBSD: stat.c,v 1.52 2024/03/14 19:38:56 kre Exp $ */ /* * Copyright (c) 2002-2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: stat.c,v 1.51 2024/03/14 00:07:20 rillig Exp $"); +__RCSID("$NetBSD: stat.c,v 1.52 2024/03/14 19:38:56 kre Exp $"); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -1077,7 +1077,7 @@ format1(const struct stat *st, * First prefixlen chars are not encoded. */ if ((flags & FLAG_POUND) != 0 && ofmt == FMTF_STRING) { - flags = 0; + flags &= ~FLAG_POUND; strncpy(visbuf, sdata, prefixlen); /* Avoid GCC warnings. */ visbuf[prefixlen] = 0;
CVS commit: src/usr.bin/stat
Module Name:src Committed By: kre Date: Thu Mar 14 19:38:56 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: While the change in 1.51 certainly retained binary compat with what was in 1.50 (while silencing LINT) - it was clearly not the correct change to make. The code used !FLAG_POUND where it clearly meant ~FLAG_POUND ... the former is 0, so &= 0 could be replaced by =0 changing nothing. But that's not what it should have been doing, other flags should not have been removed here, just FLAG_POUND. This problem seems to have existed since support for %#s was first added in 2011, which kind of suggests how rarely that format, particularly with other flags (like %#-s) has ever been used (with no other flags, the bug would not be noticed). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/usr.bin/stat/stat.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/ic
Module Name:src Committed By: jakllsch Date: Thu Mar 14 16:43:00 UTC 2024 Modified Files: src/sys/dev/ic: dwc_gmac.c Log Message: Use ether_crc32_be() instead of having a local bitrev32() function to munge ether_crc32_le() output when programming multicast filter. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/ic/dwc_gmac.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/ic
Module Name:src Committed By: jakllsch Date: Thu Mar 14 16:43:00 UTC 2024 Modified Files: src/sys/dev/ic: dwc_gmac.c Log Message: Use ether_crc32_be() instead of having a local bitrev32() function to munge ether_crc32_le() output when programming multicast filter. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/ic/dwc_gmac.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dwc_gmac.c diff -u src/sys/dev/ic/dwc_gmac.c:1.85 src/sys/dev/ic/dwc_gmac.c:1.86 --- src/sys/dev/ic/dwc_gmac.c:1.85 Sun Mar 3 10:09:42 2024 +++ src/sys/dev/ic/dwc_gmac.c Thu Mar 14 16:43:00 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: dwc_gmac.c,v 1.85 2024/03/03 10:09:42 skrll Exp $ */ +/* $NetBSD: dwc_gmac.c,v 1.86 2024/03/14 16:43:00 jakllsch Exp $ */ /*- * Copyright (c) 2013, 2014 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include -__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.85 2024/03/03 10:09:42 skrll Exp $"); +__KERNEL_RCSID(1, "$NetBSD: dwc_gmac.c,v 1.86 2024/03/14 16:43:00 jakllsch Exp $"); /* #define DWC_GMAC_DEBUG 1 */ @@ -98,7 +98,6 @@ static void dwc_gmac_tx_intr(struct dwc_ static void dwc_gmac_rx_intr(struct dwc_gmac_softc *); static void dwc_gmac_setmulti(struct dwc_gmac_softc *); static int dwc_gmac_ifflags_cb(struct ethercom *); -static uint32_t bitrev32(uint32_t); static void dwc_gmac_desc_set_owned_by_dev(struct dwc_gmac_dev_dmadesc *); static int dwc_gmac_desc_is_owned_by_dev(struct dwc_gmac_dev_dmadesc *); static void dwc_gmac_desc_std_set_len(struct dwc_gmac_dev_dmadesc *, int); @@ -1346,20 +1345,6 @@ skip: mutex_exit(>sc_rxq.r_mtx); } -/* - * Reverse order of bits - http://aggregate.org/MAGIC/#Bit%20Reversal - */ -static uint32_t -bitrev32(uint32_t x) -{ - x = (((x & 0x) >> 1) | ((x & 0x) << 1)); - x = (((x & 0x) >> 2) | ((x & 0x) << 2)); - x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4)); - x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8)); - - return (x >> 16) | (x << 16); -} - static void dwc_gmac_setmulti(struct dwc_gmac_softc *sc) { @@ -1398,9 +1383,7 @@ dwc_gmac_setmulti(struct dwc_gmac_softc goto special_filter; } - h = bitrev32( - ~ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN) - ) >> 26; + h = ~ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN) >> 26; hashes[h >> 5] |= (1 << (h & 0x1f)); mcnt++;
CVS commit: src/sys/arch/sparc/include
Module Name:src Committed By: christos Date: Thu Mar 14 15:51:10 UTC 2024 Modified Files: src/sys/arch/sparc/include: limits.h Log Message: Sync with x86_64 the quad constants. No reason to be different To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/include/limits.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sparc/include
Module Name:src Committed By: christos Date: Thu Mar 14 15:51:10 UTC 2024 Modified Files: src/sys/arch/sparc/include: limits.h Log Message: Sync with x86_64 the quad constants. No reason to be different To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sparc/include/limits.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/include/limits.h diff -u src/sys/arch/sparc/include/limits.h:1.23 src/sys/arch/sparc/include/limits.h:1.24 --- src/sys/arch/sparc/include/limits.h:1.23 Mon Jan 21 15:28:18 2019 +++ src/sys/arch/sparc/include/limits.h Thu Mar 14 11:51:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: limits.h,v 1.23 2019/01/21 20:28:18 dholland Exp $ */ +/* $NetBSD: limits.h,v 1.24 2024/03/14 15:51:10 christos Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. @@ -75,11 +75,9 @@ #define SSIZE_MIN LONG_MIN /* min value for a ssize_t */ #define SIZE_T_MAX ULONG_MAX /* max value for a size_t */ -/* GCC requires that quad constants be written as expressions. */ -#define UQUAD_MAX ((u_quad_t)0-1) /* max value for a uquad_t */ - /* max value for a quad_t */ -#define QUAD_MAX ((quad_t)(UQUAD_MAX >> 1)) -#define QUAD_MIN (-QUAD_MAX-1) /* min value for a quad_t */ +#define UQUAD_MAX 0xULL /* max unsigned quad */ +#define QUAD_MAX 0x7fffLL /* max signed quad */ +#define QUAD_MIN (-0x7fffLL-1) /* min signed quad */ #endif /* _NETBSD_SOURCE */ #endif /* _POSIX_C_SOURCE || _XOPEN_SOURCE || _NETBSD_SOURCE */
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: christos Date: Thu Mar 14 15:41:54 UTC 2024 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Log Message: Fix reproducible build (Jan-Benedict Glaw) To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/distrib/utils/embedded/conf/armv7.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/embedded/conf/armv7.conf diff -u src/distrib/utils/embedded/conf/armv7.conf:1.46 src/distrib/utils/embedded/conf/armv7.conf:1.47 --- src/distrib/utils/embedded/conf/armv7.conf:1.46 Wed Apr 19 14:39:18 2023 +++ src/distrib/utils/embedded/conf/armv7.conf Thu Mar 14 11:41:54 2024 @@ -1,4 +1,4 @@ -# $NetBSD: armv7.conf,v 1.46 2023/04/19 18:39:18 brook Exp $ +# $NetBSD: armv7.conf,v 1.47 2024/03/14 15:41:54 christos Exp $ # ARMv7 customization script used by mkimage # board=armv7 @@ -45,7 +45,11 @@ populate_common() { fi # Install boot script - "${MKUBOOTIMAGE}" -A arm -C none -O netbsd -T script -a 0 -n "NetBSD/armv7 boot" "${mnt}/boot/boot.cmd" "${mnt}/boot/boot.scr" + [ -n "${MKREPRO_TIMESTAMP}" ] && \ + MKUBOOTIMAGEARGS="-t ${MKREPRO_TIMESTAMP}" + "${MKUBOOTIMAGE}" -A arm -C none -O netbsd -T script \ + ${MKUBOOTIMAGEARGS} -a 0 -n "NetBSD/armv7 boot" \ + "${mnt}/boot/boot.cmd" "${mnt}/boot/boot.scr" } populate_rpi() {
CVS commit: src/distrib/utils/embedded/conf
Module Name:src Committed By: christos Date: Thu Mar 14 15:41:54 UTC 2024 Modified Files: src/distrib/utils/embedded/conf: armv7.conf Log Message: Fix reproducible build (Jan-Benedict Glaw) To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/distrib/utils/embedded/conf/armv7.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:39:23 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: Sync with OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/usb_hid_usages diff -u src/lib/libusbhid/usb_hid_usages:1.11 src/lib/libusbhid/usb_hid_usages:1.12 --- src/lib/libusbhid/usb_hid_usages:1.11 Thu Mar 14 15:27:22 2024 +++ src/lib/libusbhid/usb_hid_usages Thu Mar 14 15:39:23 2024 @@ -1,4 +1,5 @@ -# $NetBSD: usb_hid_usages,v 1.11 2024/03/14 15:27:22 jakllsch Exp $ +# $NetBSD: usb_hid_usages,v 1.12 2024/03/14 15:39:23 jakllsch Exp $ +# $OpenBSD: usb_hid_usages,v 1.6 2020/09/09 02:26:54 pamela Exp $ # # USB HID usage table # Syntax: @@ -19,6 +20,15 @@ 0x07 Keypad 0x08 Multi-axis Controller 0x09 Tablet PC System Controls + 0x0A Water Cooling Device + 0x0B Computer Chassis Device + 0x0C Wireless Radio Controls + 0x0D Portable Device Control + 0x0E System Multi-Axis Controller + 0x0F Spatial Controller + 0x10 Assistive Control + 0x11 Device Dock + 0x12 Dockable Device 0x30 X 0x31 Y 0x32 Z @@ -43,6 +53,10 @@ 0x46 Vno 0x47 Feature Notification 0x48 Resolution Multiplier + 0x49 Qx + 0x4A Qy + 0x4B Qz + 0x4C Qw 0x80 System Control 0x81 System Power Down 0x82 System Sleep @@ -63,6 +77,14 @@ 0x91 D-pad Down 0x92 D-pad Right 0x93 D-pad Left + 0x94 Index Trigger + 0x95 Palm Trigger + 0x96 Thumbstick + 0x97 System Function Shift + 0x98 System Function Shift Lock + 0x99 System Function Shift Lock Indicator + 0x9A System Dismiss Notification + 0x9B System Do Not Disturb 0xA0 System Dock 0xA1 System Undock 0xA2 System Setup @@ -80,6 +102,25 @@ 0xB5 System Display Toggle Int/Ext 0xB6 System Display Swap Primary/Secondary 0xB7 System Display LCD Autoscale + 0xC0 Sensor Zone + 0xC1 RPM + 0xC2 Coolant Level + 0xC3 Coolant Critical Level + 0xC4 Coolant Pump + 0xC5 Chassis Enclosure + 0xC6 Wireless Radio Button + 0xC7 Wireless Radio LED + 0xC8 Wireless Radio Slider Switch + 0xC9 System Display Rotation Lock Button + 0xCA System Display Rotation Lock Slider Switch + 0xCB Control Enable + 0xD0 Dockable Device Unique ID + 0xD1 Dockable Device Vendor ID + 0xD2 Dockable Device Primary Usage Page + 0xD3 Dockable Device Primary Usage ID + 0xD4 Dockable Device Docking State + 0xD5 Dockable Device Display Occlusion + 0xD6 Dockable Device Object Type 2 Simulation Controls 0x00 Undefined @@ -94,27 +135,26 @@ 0x09 Airplane Simulation Device 0x0A Helicopter Simulation Device 0x0B Magic Carpet Simulation Device - 0x0C Bicycle + 0x0C Bicycle Simulation Device 0x20 Flight Control Stick 0x21 Flight Stick 0x22 Cyclic Control 0x23 Cyclic Trim 0x24 Flight Yoke 0x25 Track Control - 0x26 Driving Control 0xB0 Aileron 0xB1 Aileron Trim 0xB2 Anti-Torque Control - 0xB3 Auto-pilot Enable + 0xB3 Autopilot Enable 0xB4 Chaff Release 0xB5 Collective Control 0xB6 Dive Brake - 0xB7 Electronic Counter Measures + 0xB7 Electronic Countermeasures 0xB8 Elevator 0xB9 Elevator Trim 0xBA Rudder 0xBB Throttle - 0xBC Flight Communication + 0xBC Flight Communications 0xBD Flare Release 0xBE Landing Gear 0xBF Toe Brake @@ -218,9 +258,11 @@ 0x36 Gun Safety 0x37 Gamepad Fire/Jump 0x39 Gamepad Trigger + 0x3A Form-fitting Gamepad 6 Device Controls 0x00 Undefined + 0x06 Background/Nonuser Controls 0x20 Battery Strength 0x21 Wireless Channel 0x22 Wireless ID @@ -228,6 +270,22 @@ 0x24 Security Code Character Entered 0x25 Security Code Character Erased 0x26 Security Code Cleared + 0x27 Sequence ID + 0x28 Sequence ID Reset + 0x29 RF Signal Strength + 0x2A Software Version + 0x2B Protocol Version + 0x2C Hardware Version + 0x2D Major + 0x2E Minor + 0x2F Revision + 0x30 Handedness + 0x31 Either Hand + 0x32 Left Hand + 0x33 Right Hand + 0x34 Both Hands + 0x40 Grip Pose Offset + 0x41 Pointer Pose Offset 7 Keyboard 0x00 No Event @@ -529,6 +587,24 @@ 0x4B Generic Indicator 0x4C System Suspend 0x4D External Power Connected + 0x4E Indicator Blue + 0x4F Indicator Orange + 0x50 Good Status + 0x51 Warning Status + 0x52 RGB LED + 0x53 Red LED Channel + 0x54 Blue LED Channel + 0x55 Green LED Channel + 0x56 LED Intensity + 0x60 Player Indicator + 0x61 Player 1 + 0x62 Player 2 + 0x63 Player 3 + 0x64 Player 4 + 0x65 Player 5 + 0x66 Player 6 + 0x67 Player 7 + 0x68 Player 8 9 Button 0x00 No Button Pressed @@ -605,6 +681,40 @@ 0xBD Phone Key B 0xBE Phone Key C 0xBF Phone Key D + 0xC0 Phone Call History Key + 0xC1 Phone Caller ID Key + 0xC2 Phone Settings Key + 0xF0 Host Control + 0xF1 Host Available + 0xF2 Host Call Active + 0xF3 Activate Handset Audio + 0xF4 Ring Type + 0xF5 Re-dialable Phone Number + 0xF8 Stop Ring Tone + 0xF9 PSTN Ring Tone + 0xFA Host Ring Tone + 0xFB Alert Sound Error +
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:39:23 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: Sync with OpenBSD To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:27:23 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: Remove Reserved usages and ranges thereof Helps align with future merge To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/usb_hid_usages diff -u src/lib/libusbhid/usb_hid_usages:1.10 src/lib/libusbhid/usb_hid_usages:1.11 --- src/lib/libusbhid/usb_hid_usages:1.10 Thu Mar 14 15:23:52 2024 +++ src/lib/libusbhid/usb_hid_usages Thu Mar 14 15:27:22 2024 @@ -1,4 +1,4 @@ -# $NetBSD: usb_hid_usages,v 1.10 2024/03/14 15:23:52 jakllsch Exp $ +# $NetBSD: usb_hid_usages,v 1.11 2024/03/14 15:27:22 jakllsch Exp $ # # USB HID usage table # Syntax: @@ -13,7 +13,6 @@ 0x00 Undefined 0x01 Pointer 0x02 Mouse - 0x03 Reserved 0x04 Joystick 0x05 Game Pad 0x06 Keyboard @@ -530,7 +529,6 @@ 0x4B Generic Indicator 0x4C System Suspend 0x4D External Power Connected - 0x4C- Reserved 9 Button 0x00 No Button Pressed
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:27:23 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: Remove Reserved usages and ranges thereof Helps align with future merge To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:23:52 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: fix typos To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libusbhid/usb_hid_usages diff -u src/lib/libusbhid/usb_hid_usages:1.9 src/lib/libusbhid/usb_hid_usages:1.10 --- src/lib/libusbhid/usb_hid_usages:1.9 Sat Feb 10 09:21:52 2024 +++ src/lib/libusbhid/usb_hid_usages Thu Mar 14 15:23:52 2024 @@ -1,4 +1,4 @@ -# $NetBSD: usb_hid_usages,v 1.9 2024/02/10 09:21:52 andvar Exp $ +# $NetBSD: usb_hid_usages,v 1.10 2024/03/14 15:23:52 jakllsch Exp $ # # USB HID usage table # Syntax: @@ -40,7 +40,7 @@ 0x42 Vz 0x43 Vbrx 0x44 Vbry - 0x45 Vbrx + 0x45 Vbrz 0x46 Vno 0x47 Feature Notification 0x48 Resolution Multiplier @@ -627,7 +627,7 @@ 0x35 Illumination 0x36 Function Buttons 0x40 Menu - 0x41 Menu Pick + 0x41 Menu Pick 0x42 Menu Up 0x43 Menu Down 0x44 Menu Left @@ -688,7 +688,7 @@ 0xB7 Stop 0xB8 Eject 0xB9 Random Play - 0xBA Select DisC + 0xBA Select Disc 0xBB Enter Disc 0xBC Repeat 0xBD Tracking
CVS commit: src/lib/libusbhid
Module Name:src Committed By: jakllsch Date: Thu Mar 14 15:23:52 UTC 2024 Modified Files: src/lib/libusbhid: usb_hid_usages Log Message: fix typos To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libusbhid/usb_hid_usages Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Thu Mar 14 15:19:03 UTC 2024 Modified Files: src/share/man/man4: ihidev.4 Log Message: Be a bit more clear about which devices are being handled. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/ihidev.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ihidev.4 diff -u src/share/man/man4/ihidev.4:1.3 src/share/man/man4/ihidev.4:1.4 --- src/share/man/man4/ihidev.4:1.3 Sat Oct 5 06:28:50 2019 +++ src/share/man/man4/ihidev.4 Thu Mar 14 15:19:03 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: ihidev.4,v 1.3 2019/10/05 06:28:50 ryoon Exp $ +.\" $NetBSD: ihidev.4,v 1.4 2024/03/14 15:19:03 pgoyette Exp $ .\" .\" Copyright (c) 2001,2017 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -39,7 +39,7 @@ .Sh DESCRIPTION The .Nm -driver handles all Human Interface Devices. +driver handles all Human Interface Devices attached via I2C bus. Each HID device can have several components, e.g., a keyboard and a mouse. These components use different report identifiers (a byte)
CVS commit: src/share/man/man4
Module Name:src Committed By: pgoyette Date: Thu Mar 14 15:19:03 UTC 2024 Modified Files: src/share/man/man4: ihidev.4 Log Message: Be a bit more clear about which devices are being handled. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/ihidev.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: macallan Date: Thu Mar 14 13:18:36 UTC 2024 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: add gftfb To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hppa/conf/GENERIC 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/hppa/conf/GENERIC diff -u src/sys/arch/hppa/conf/GENERIC:1.43 src/sys/arch/hppa/conf/GENERIC:1.44 --- src/sys/arch/hppa/conf/GENERIC:1.43 Mon Jan 29 18:27:12 2024 +++ src/sys/arch/hppa/conf/GENERIC Thu Mar 14 13:18:35 2024 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.43 2024/01/29 18:27:12 christos Exp $ +# $NetBSD: GENERIC,v 1.44 2024/03/14 13:18:35 macallan Exp $ # # GENERIC machine description file # @@ -23,7 +23,7 @@ include "arch/hppa/conf/std.hppa" options INCLUDE_CONFIG_FILE # embed config file in kernel binary options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -#ident "GENERIC-$Revision: 1.43 $" +#ident "GENERIC-$Revision: 1.44 $" maxusers 32 # estimated number of users @@ -283,6 +283,7 @@ sti* at mainbus0 # [H]CRX-{8,24,48}[Z] sti* at phantomas? # [H]CRX-{8,24,48}[Z] and Visualize graphics sti* at uturn? sti* at pci? # EG-PCI, FX* +gftfb* at pci? # PCI Visualize EG # Human Interface Loop hil* at gsc? irq 1 # Human Interface Loop, kbd and mouse @@ -298,7 +299,9 @@ wskbd* at pckbd? console ? wsmouse* at pms? mux 0 wskbd* at hilkbd? console ? wsmouse* at hilms? mux 0 -wsdisplay* at sti? +# make sure the console display is always wsdisplay0 +wsdisplay0 at wsemuldisplaydev? console 1 +wsdisplay* at wsemuldisplaydev? # Serial Devices
CVS commit: src/sys/arch/hppa/conf
Module Name:src Committed By: macallan Date: Thu Mar 14 13:18:36 UTC 2024 Modified Files: src/sys/arch/hppa/conf: GENERIC Log Message: add gftfb To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/hppa/conf/GENERIC Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Mar 14 09:13:58 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: expat-2.6.2 is out To generate a diff of this commit: cvs rdiff -u -r1.1998 -r1.1999 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1998 src/doc/3RDPARTY:1.1999 --- src/doc/3RDPARTY:1.1998 Thu Mar 7 00:35:10 2024 +++ src/doc/3RDPARTY Thu Mar 14 09:13:57 2024 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1998 2024/03/07 00:35:10 gutteridge Exp $ +# $NetBSD: 3RDPARTY,v 1.1999 2024/03/14 09:13:57 wiz Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -409,11 +409,11 @@ Notes: Package: expat Version: 2.4.6 -Current Vers: 2.6.0 +Current Vers: 2.6.2 Maintainer: Expat Project Archive Site: https://github.com/libexpat/libexpat/releases Home Page: http://www.libexpat.org/ -Date: 2024-02-07 +Date: 2024-03-14 Mailing List: expat-disc...@libexpat.org Responsible: mrg License: MIT
CVS commit: src/doc
Module Name:src Committed By: wiz Date: Thu Mar 14 09:13:58 UTC 2024 Modified Files: src/doc: 3RDPARTY Log Message: expat-2.6.2 is out To generate a diff of this commit: cvs rdiff -u -r1.1998 -r1.1999 src/doc/3RDPARTY Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/stat
Module Name:src Committed By: rillig Date: Thu Mar 14 00:07:20 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix lint warning about constant argument to '!' No binary change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/stat/stat.c diff -u src/usr.bin/stat/stat.c:1.50 src/usr.bin/stat/stat.c:1.51 --- src/usr.bin/stat/stat.c:1.50 Mon Jan 29 22:01:58 2024 +++ src/usr.bin/stat/stat.c Thu Mar 14 00:07:20 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: stat.c,v 1.50 2024/01/29 22:01:58 christos Exp $ */ +/* $NetBSD: stat.c,v 1.51 2024/03/14 00:07:20 rillig Exp $ */ /* * Copyright (c) 2002-2011 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ #include #if !defined(lint) -__RCSID("$NetBSD: stat.c,v 1.50 2024/01/29 22:01:58 christos Exp $"); +__RCSID("$NetBSD: stat.c,v 1.51 2024/03/14 00:07:20 rillig Exp $"); #endif #if ! HAVE_NBTOOL_CONFIG_H @@ -1077,7 +1077,7 @@ format1(const struct stat *st, * First prefixlen chars are not encoded. */ if ((flags & FLAG_POUND) != 0 && ofmt == FMTF_STRING) { - flags &= !FLAG_POUND; + flags = 0; strncpy(visbuf, sdata, prefixlen); /* Avoid GCC warnings. */ visbuf[prefixlen] = 0;
CVS commit: src/usr.bin/stat
Module Name:src Committed By: rillig Date: Thu Mar 14 00:07:20 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix lint warning about constant argument to '!' No binary change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bin/stat/stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/audio/common
Module Name:src Committed By: mrg Date: Thu Mar 14 00:00:31 UTC 2024 Modified Files: src/usr.bin/audio/common: wav.c Log Message: fix some sizeof() confusion. using "const char search[4]" as a function parameter means that "search" is actually a pointer type so "sizeof search" returns 8 on 64-bit platforms. i mis-read this and used "sizeof *search" which is always 1, noted by rillig. instead of trying to avoid writing "4" twice, put it in a define and use that in various places instead. annoying. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/audio/common/wav.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/common/wav.c diff -u src/usr.bin/audio/common/wav.c:1.22 src/usr.bin/audio/common/wav.c:1.23 --- src/usr.bin/audio/common/wav.c:1.22 Tue Mar 12 00:34:38 2024 +++ src/usr.bin/audio/common/wav.c Thu Mar 14 00:00:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: wav.c,v 1.22 2024/03/12 00:34:38 mrg Exp $ */ +/* $NetBSD: wav.c,v 1.23 2024/03/14 00:00:31 mrg Exp $ */ /* * Copyright (c) 2002, 2009, 2013, 2015, 2019, 2024 Matthew R. Green @@ -33,7 +33,7 @@ #include #ifndef lint -__RCSID("$NetBSD: wav.c,v 1.22 2024/03/12 00:34:38 mrg Exp $"); +__RCSID("$NetBSD: wav.c,v 1.23 2024/03/14 00:00:31 mrg Exp $"); #endif @@ -91,8 +91,10 @@ wav_enc_from_val(int encoding) * WAV format helpers */ +#define RIFFNAMELEN 4 + static bool -find_riff_chunk(const char search[4], size_t *remainp, char **wherep, uint32_t *partlen) +find_riff_chunk(const char *search, size_t *remainp, char **wherep, uint32_t *partlen) { wav_audioheaderpart part; @@ -116,7 +118,7 @@ find_riff_chunk(const char search[4], si emsg = " (odd length, adjusted)"; len += 1; } - if (strncmp(part.name, search, sizeof *search) == 0) { + if (strncmp(part.name, search, RIFFNAMELEN) == 0) { *partlen = len; if (verbose > 1) fprintf(stderr, "Found part %.04s length %d%s\n", @@ -148,10 +150,10 @@ audio_wav_parse_hdr(void *hdr, size_t sz uint32_t len = 0; u_int16_t fmttag; static const char - strfmt[4] = "fmt ", - strRIFF[4] = "RIFF", - strWAVE[4] = "WAVE", - strdata[4] = "data"; + strfmt[RIFFNAMELEN] = "fmt ", + strRIFF[RIFFNAMELEN] = "RIFF", + strWAVE[RIFFNAMELEN] = "WAVE", + strdata[RIFFNAMELEN] = "data"; bool found; if (sz < 32)
CVS commit: src/usr.bin/audio/common
Module Name:src Committed By: mrg Date: Thu Mar 14 00:00:31 UTC 2024 Modified Files: src/usr.bin/audio/common: wav.c Log Message: fix some sizeof() confusion. using "const char search[4]" as a function parameter means that "search" is actually a pointer type so "sizeof search" returns 8 on 64-bit platforms. i mis-read this and used "sizeof *search" which is always 1, noted by rillig. instead of trying to avoid writing "4" twice, put it in a define and use that in various places instead. annoying. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/audio/common/wav.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/mpl/bind
Module Name:src Committed By: christos Date: Wed Mar 13 12:56:31 UTC 2024 Modified Files: src/external/mpl/bind: Makefile.inc src/external/mpl/bind/include: config.h Log Message: centrally control if we are building kerberos To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/mpl/bind/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/external/mpl/bind/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mpl/bind/Makefile.inc diff -u src/external/mpl/bind/Makefile.inc:1.14 src/external/mpl/bind/Makefile.inc:1.15 --- src/external/mpl/bind/Makefile.inc:1.14 Sun Feb 25 13:50:43 2024 +++ src/external/mpl/bind/Makefile.inc Wed Mar 13 08:56:31 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.14 2024/02/25 18:50:43 christos Exp $ +# $NetBSD: Makefile.inc,v 1.15 2024/03/13 12:56:31 christos Exp $ .if !defined(BIND9_MAKEFILE_INC) BIND9_MAKEFILE_INC=yes @@ -79,6 +79,7 @@ LIBDPLIBS+= pthread ${NETBSDSRCDIR .endif .if ${MKKERBEROS} != "no" +CPPFLAGS+=-DWITH_KERBEROS .if !defined (LIB) || empty(LIB) LDADD+= -lgssapi -lheimntlm ${LIBKRB5_LDADD} DPADD+= ${LIBGSSAPI} ${LIBHEIMNTLM} ${LIBKRB5_DPADD} Index: src/external/mpl/bind/include/config.h diff -u src/external/mpl/bind/include/config.h:1.16 src/external/mpl/bind/include/config.h:1.17 --- src/external/mpl/bind/include/config.h:1.16 Wed Feb 21 17:52:52 2024 +++ src/external/mpl/bind/include/config.h Wed Mar 13 08:56:31 2024 @@ -178,6 +178,7 @@ /* Define to 1 if you have the header file. */ #define HAVE_GLOB_H 1 +#ifdef WITH_KERBEROS /* Define to 1 if you have the Kerberos Framework available */ #define HAVE_GSSAPI 1 @@ -195,6 +196,7 @@ /* Define to 1 if you have the `gss_acquire_cred' function. */ #define HAVE_GSS_ACQUIRE_CRED 1 +#endif /* Define to 1 if you have the header file. */ /* #undef HAVE_IDN2_H */ @@ -214,6 +216,7 @@ /* Use json-c library */ /* #undef HAVE_JSON_C */ +#ifdef WITH_KERBEROS /* Define to 1 if you have the header file. */ /* #undef HAVE_KRB5_H */ @@ -222,6 +225,7 @@ /* Define to 1 if you have the header file. */ #define HAVE_KRB5_KRB5_H 1 +#endif /* Define if libidn2 was found */ /* #undef HAVE_LIBIDN2 */
CVS commit: src/external/mpl/bind
Module Name:src Committed By: christos Date: Wed Mar 13 12:56:31 UTC 2024 Modified Files: src/external/mpl/bind: Makefile.inc src/external/mpl/bind/include: config.h Log Message: centrally control if we are building kerberos To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/mpl/bind/Makefile.inc cvs rdiff -u -r1.16 -r1.17 src/external/mpl/bind/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: riastradh Date: Wed Mar 13 12:44:30 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: evbmips/interrupt.c: No need for __diagused with KASSERT. KASSERT already references all the variables even in !DIAGNOSTIC builds (but evaluates nothing at run-time in that case). That said: Is the curlwp->l_blcnt assertion correct? Can't curlwp be changed in this interrupt handler by preemption? To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips/interrupt.c diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.27 src/sys/arch/evbmips/evbmips/interrupt.c:1.28 --- src/sys/arch/evbmips/evbmips/interrupt.c:1.27 Wed Mar 13 06:59:01 2024 +++ src/sys/arch/evbmips/evbmips/interrupt.c Wed Mar 13 12:44:30 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $ */ +/* $NetBSD: interrupt.c,v 1.28 2024/03/13 12:44:30 riastradh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.28 2024/03/13 12:44:30 riastradh Exp $"); #include #include @@ -53,9 +53,9 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s struct cpu_info * const ci = curcpu(); uint32_t pending; int ipl; - const int mtx_count __diagused = ci->ci_mtx_count; - const u_int biglock_count __diagused = ci->ci_biglock_count; - const u_int blcnt __diagused = curlwp->l_blcnt; + const int mtx_count = ci->ci_mtx_count; + const u_int biglock_count = ci->ci_biglock_count; + const u_int blcnt = curlwp->l_blcnt; KASSERT(ci->ci_cpl == IPL_HIGH); KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: riastradh Date: Wed Mar 13 12:44:30 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: evbmips/interrupt.c: No need for __diagused with KASSERT. KASSERT already references all the variables even in !DIAGNOSTIC builds (but evaluates nothing at run-time in that case). That said: Is the curlwp->l_blcnt assertion correct? Can't curlwp be changed in this interrupt handler by preemption? To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/evbmips/evbmips/interrupt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: nat Date: Wed Mar 13 08:13:56 UTC 2024 Modified Files: src/doc: CHANGES Log Message: Mention ascaudio(4). To generate a diff of this commit: cvs rdiff -u -r1.3043 -r1.3044 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: nat Date: Wed Mar 13 08:13:56 UTC 2024 Modified Files: src/doc: CHANGES Log Message: Mention ascaudio(4). To generate a diff of this commit: cvs rdiff -u -r1.3043 -r1.3044 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.3043 src/doc/CHANGES:1.3044 --- src/doc/CHANGES:1.3043 Sun Mar 3 17:43:32 2024 +++ src/doc/CHANGES Wed Mar 13 08:13:56 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3043 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3044 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -285,3 +285,4 @@ Changes from NetBSD 10.0 to NetBSD 11.0: bind: Import 9.18.24 [christos 20240221] sqlite3(1): Import 3.45.1. [christos 20240301] elftoolchain: Import svn r4037. [christos 20240303] + mac68k: Add ascaudio(4) ASC audio driver. [nat 20240313]
CVS commit: src/sys/arch/mac68k
Module Name:src Committed By: nat Date: Wed Mar 13 07:55:29 UTC 2024 Modified Files: src/sys/arch/mac68k/conf: files.mac68k majors.mac68k Added Files: src/sys/arch/mac68k/conf: AUDIO AUDIOSBC src/sys/arch/mac68k/obio: ascaudio.c ascaudiovar.h ascreg.h Log Message: Apple Sound Chip audio support for 68k Macintoshoes. This provies a sound device and support for wsbell(4). Manual page to be added in a followup commit. As posted to port-mac68k. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mac68k/conf/AUDIO \ src/sys/arch/mac68k/conf/AUDIOSBC cvs rdiff -u -r1.132 -r1.133 src/sys/arch/mac68k/conf/files.mac68k cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mac68k/conf/majors.mac68k cvs rdiff -u -r0 -r1.1 src/sys/arch/mac68k/obio/ascaudio.c \ src/sys/arch/mac68k/obio/ascaudiovar.h src/sys/arch/mac68k/obio/ascreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mac68k/conf/files.mac68k diff -u src/sys/arch/mac68k/conf/files.mac68k:1.132 src/sys/arch/mac68k/conf/files.mac68k:1.133 --- src/sys/arch/mac68k/conf/files.mac68k:1.132 Tue Jan 9 04:16:25 2024 +++ src/sys/arch/mac68k/conf/files.mac68k Wed Mar 13 07:55:28 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.mac68k,v 1.132 2024/01/09 04:16:25 thorpej Exp $ +# $NetBSD: files.mac68k,v 1.133 2024/03/13 07:55:28 nat Exp $ # mac68k-specific configuration info @@ -43,10 +43,16 @@ device ams: wsmousedev attach ams at adb file arch/mac68k/dev/ams.c ams needs-flag +# ASC (beeper) device asc attach asc at obio file arch/mac68k/obio/asc.c asc needs-flag +#ASC audio +device ascaudio: audiobus, auconv, mulaw, aurateconv, auvolconv +attach ascaudio at obio +file arch/mac68k/obio/ascaudio.c ascaudio needs-flag + device nubus { } attach nubus at mainbus file arch/mac68k/nubus/nubus.c nubus Index: src/sys/arch/mac68k/conf/majors.mac68k diff -u src/sys/arch/mac68k/conf/majors.mac68k:1.27 src/sys/arch/mac68k/conf/majors.mac68k:1.28 --- src/sys/arch/mac68k/conf/majors.mac68k:1.27 Sat Apr 4 16:06:14 2020 +++ src/sys/arch/mac68k/conf/majors.mac68k Wed Mar 13 07:55:28 2024 @@ -1,4 +1,4 @@ -# $NetBSD: majors.mac68k,v 1.27 2020/04/04 16:06:14 jdolecek Exp $ +# $NetBSD: majors.mac68k,v 1.28 2024/03/13 07:55:28 nat Exp $ # # Device majors for mac68k # @@ -52,6 +52,7 @@ device-major ksyms char 52 ksyms device-major wsfont char 53 wsfont device-major cpi char 54 cpi device-major sysmon char 55 sysmon +device-major audio char 56 audio #device-major obsolete char 98 obsolete (nsmb) Added files: Index: src/sys/arch/mac68k/conf/AUDIO diff -u /dev/null src/sys/arch/mac68k/conf/AUDIO:1.1 --- /dev/null Wed Mar 13 07:55:29 2024 +++ src/sys/arch/mac68k/conf/AUDIO Wed Mar 13 07:55:28 2024 @@ -0,0 +1,17 @@ +# $NetBSD: AUDIO,v 1.1 2024/03/13 07:55:28 nat Exp $ +# +# WSFB with audio enabled. + +include "arch/mac68k/conf/WSFB" + +no asc0 at obio? + +# DEFQUALTY 0x0 22257 Monaural playback. +# LOWQUALITY 0x1 Half playback rate. +# HIGHQUALITY 0x2 Best Quality supported by ASC. + +ascaudio* at obio? flags 0x0 # ASC/EASC audio +audio* at audiobus? +spkr* at audio? # PC speaker (synthesized) +wsbell* at spkr? # Console beep + Index: src/sys/arch/mac68k/conf/AUDIOSBC diff -u /dev/null src/sys/arch/mac68k/conf/AUDIOSBC:1.1 --- /dev/null Wed Mar 13 07:55:29 2024 +++ src/sys/arch/mac68k/conf/AUDIOSBC Wed Mar 13 07:55:28 2024 @@ -0,0 +1,17 @@ +# $NetBSD: AUDIOSBC,v 1.1 2024/03/13 07:55:28 nat Exp $ +# +# WSFB with audio enabled. + +include "arch/mac68k/conf/WSFBSBC" + +no asc0 at obio? + +# DEFQUALTY 0x0 22257 Monaural playback. +# LOWQUALITY 0x1 Half playback rate. +# HIGHQUALITY 0x2 Best Quality supported by ASC. + +ascaudio* at obio? flags 0x0 # ASC/EASC audio +audio* at audiobus? +spkr* at audio? # PC speaker (synthesized) +wsbell* at spkr? # Console beep + Index: src/sys/arch/mac68k/obio/ascaudio.c diff -u /dev/null src/sys/arch/mac68k/obio/ascaudio.c:1.1 --- /dev/null Wed Mar 13 07:55:29 2024 +++ src/sys/arch/mac68k/obio/ascaudio.c Wed Mar 13 07:55:28 2024 @@ -0,0 +1,970 @@ +/* $NetBSD: ascaudio.c,v 1.1 2024/03/13 07:55:28 nat Exp $ */ + +/*- + * Copyright (c) 2017, 2023 Nathanial Sloss + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
CVS commit: src/sys/arch/mac68k
Module Name:src Committed By: nat Date: Wed Mar 13 07:55:29 UTC 2024 Modified Files: src/sys/arch/mac68k/conf: files.mac68k majors.mac68k Added Files: src/sys/arch/mac68k/conf: AUDIO AUDIOSBC src/sys/arch/mac68k/obio: ascaudio.c ascaudiovar.h ascreg.h Log Message: Apple Sound Chip audio support for 68k Macintoshoes. This provies a sound device and support for wsbell(4). Manual page to be added in a followup commit. As posted to port-mac68k. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mac68k/conf/AUDIO \ src/sys/arch/mac68k/conf/AUDIOSBC cvs rdiff -u -r1.132 -r1.133 src/sys/arch/mac68k/conf/files.mac68k cvs rdiff -u -r1.27 -r1.28 src/sys/arch/mac68k/conf/majors.mac68k cvs rdiff -u -r0 -r1.1 src/sys/arch/mac68k/obio/ascaudio.c \ src/sys/arch/mac68k/obio/ascaudiovar.h src/sys/arch/mac68k/obio/ascreg.h 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/evbmips/evbmips
Thanks, should take remember this for the future reference. On Wed, Mar 13, 2024 at 8:59 AM Nick Hudson wrote: > > Module Name:src > Committed By: skrll > Date: Wed Mar 13 06:59:01 UTC 2024 > > Modified Files: > src/sys/arch/evbmips/evbmips: interrupt.c > > Log Message: > Remove #ifdef DIAGNOSTIC by using __diagused. NFCI. > > > To generate a diff of this commit: > cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/evbmips/interrupt.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files. >
CVS commit: src/sys/netbt
Module Name:src Committed By: nat Date: Wed Mar 13 07:22:16 UTC 2024 Added Files: src/sys/netbt: hci_le.h Log Message: Bluetooth low energy - A beginning at least. This was the start of support for low energy bluetooth support that I have not as yet completed. I'm committing this as it gives the hci defines for an impementation in NetBSD. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/netbt/hci_le.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/netbt/hci_le.h diff -u /dev/null src/sys/netbt/hci_le.h:1.1 --- /dev/null Wed Mar 13 07:22:16 2024 +++ src/sys/netbt/hci_le.h Wed Mar 13 07:22:16 2024 @@ -0,0 +1,368 @@ +/* $NetBSD: hci_le.h,v 1.1 2024/03/13 07:22:16 nat Exp $ */ + +/*- + * Copyright (c) 2020 Nathanial Sloss + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#define HCI_ADVERT_DATA_SIZE 31 /* advertising data size */ +#define HCI_SCAN_DATA_SIZE 31 /* scan resp. data size */ + +/* LE Event masks */ +#define HCI_LE_EVMSK_ALL 0x001f +#define HCI_LE_EVMSK_NONE 0x +#define HCI_LE_EVMSK_CON_COMPL 0x0001 +#define HCI_LE_EVMSK_ADV_REPORT 0x0002 +#define HCI_LE_EVMSK_CON_UPDATE_COMPL 0x0004 +#define HCI_LE_EVMSK_READ_REMOTE_FEATURES_COMPL 0x0008 +#define HCI_LE_EVMSK_LONG_TERM_KEY_REQ 0x0010 +/* 0x0020 - 0x8000 - reserved for future use */ + +/** + ** + ** OGF 0x08 Bluetooth Low Energy (LE) Link commands + ** + **/ + +#define HCI_OGF_LE0x08 + +#define HCI_OCF_LE_SET_EVENT_MASK 0x0001 +#define HCI_CMD_LE_SET_EVENT_MASK 0x2001 +typedef struct { + uint8_t event_mask[HCI_EVENT_MASK_SIZE]; /* event_mask */ +} __packed hci_le_set_event_mask_cp; + +typedef hci_status_rp hci_le_set_event_mask_rp; + +#define HCI_OCF_LE_READ_BUFFER_SIZE 0x0002 +#define HCI_CMD_LE_READ_BUFFER_SIZE 0x2002 +/* No command parameter(s) */ + +typedef struct { + uint8_t status; /* status 0x00 = success */ + uint16_t le_data_pktlen; /* buffer len*/ + uint8_t le_num_pkts; /* no. acl data packets */ +} __packed hci_le_read_buffer_size_rp; + +#define HCI_OCF_LE_READ_LOCAL_FEATURES 0x0003 +#define HCI_CMD_LE_READ_LOCAL_FEATURES 0x2003 +/* No command parameter(s) */ + +typedef struct { + uint8_t status; /* status 0x00 = success */ + uint8_t features[HCI_FEATURES_SIZE]; /* le features */ +} __packed hci_le_read_local_features_rp; + +#define HCI_OCF_LE_SET_RND_ADDR0x0005 +#define HCI_CMD_LE_SET_RND_ADDR0x2005 +typedef struct { + bdaddr_t bdaddr; /* random local address */ +} __packed hci_le_set_rnd_addr_cp; + +typedef hci_status_rp hci_le_set_rnd_addr_rp; +/* XXX NS Finish defines. */ +#define HCI_OCF_LE_SET_ADVERT_PARAM 0x0006 +#define HCI_CMD_LE_SET_ADVERT_PARAM 0x2006 +typedef struct { + uint16_t min_interval; /* min interval * 0.625ms */ + uint16_t max_interval; /* max_interval * 0.625ms */ + uint8_t advert_type; + uint8_t own_address_type; + uint8_t direct_address_type; + bdaddr_t direct_address; /* remote address */ + uint8_t advert_channel_map; + uint8_t advert_filter_policy; +} __packed hci_le_set_advert_param_cp; + +typedef hci_status_rp hci_le_set_advert_param_rp; + +#define HCF_OCF_LE_READ_ADVERT_CHAN_TX_PWR 0x0007 +#define HCF_CMD_LE_READ_ADVERT_CHAN_TX_PWR
CVS commit: src/sys/netbt
Module Name:src Committed By: nat Date: Wed Mar 13 07:22:16 UTC 2024 Added Files: src/sys/netbt: hci_le.h Log Message: Bluetooth low energy - A beginning at least. This was the start of support for low energy bluetooth support that I have not as yet completed. I'm committing this as it gives the hci defines for an impementation in NetBSD. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/netbt/hci_le.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: skrll Date: Wed Mar 13 06:59:01 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: Remove #ifdef DIAGNOSTIC by using __diagused. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips/interrupt.c diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.26 src/sys/arch/evbmips/evbmips/interrupt.c:1.27 --- src/sys/arch/evbmips/evbmips/interrupt.c:1.26 Tue Mar 12 21:27:14 2024 +++ src/sys/arch/evbmips/evbmips/interrupt.c Wed Mar 13 06:59:01 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $ */ +/* $NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $"); #include #include @@ -53,11 +53,10 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s struct cpu_info * const ci = curcpu(); uint32_t pending; int ipl; -#ifdef DIAGNOSTIC - const int mtx_count = ci->ci_mtx_count; - const u_int biglock_count = ci->ci_biglock_count; - const u_int blcnt = curlwp->l_blcnt; -#endif + const int mtx_count __diagused = ci->ci_mtx_count; + const u_int biglock_count __diagused = ci->ci_biglock_count; + const u_int blcnt __diagused = curlwp->l_blcnt; + KASSERT(ci->ci_cpl == IPL_HIGH); KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE); @@ -94,11 +93,9 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s /* Process I/O and error interrupts. */ evbmips_iointr(ipl, pending, ); } -#ifdef DIAGNOSTIC KASSERT(biglock_count == ci->ci_biglock_count); KASSERT(blcnt == curlwp->l_blcnt); KASSERT(mtx_count == ci->ci_mtx_count); -#endif /* * If even our spl is higher now (due to interrupting while
CVS commit: src/sys/arch/evbmips/evbmips
Module Name:src Committed By: skrll Date: Wed Mar 13 06:59:01 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: Remove #ifdef DIAGNOSTIC by using __diagused. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/evbmips/evbmips/interrupt.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
Module Name:src Committed By: rillig Date: Wed Mar 13 06:56:24 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: expr_sizeof.c Log Message: tests/lint: ensure that lint correctly decays array parameter types To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/expr_sizeof.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/expr_sizeof.c diff -u src/tests/usr.bin/xlint/lint1/expr_sizeof.c:1.14 src/tests/usr.bin/xlint/lint1/expr_sizeof.c:1.15 --- src/tests/usr.bin/xlint/lint1/expr_sizeof.c:1.14 Sat Aug 5 10:13:39 2023 +++ src/tests/usr.bin/xlint/lint1/expr_sizeof.c Wed Mar 13 06:56:24 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: expr_sizeof.c,v 1.14 2023/08/05 10:13:39 rillig Exp $ */ +/* $NetBSD: expr_sizeof.c,v 1.15 2024/03/13 06:56:24 rillig Exp $ */ # 3 "expr_sizeof.c" /* @@ -199,3 +199,17 @@ struct s24 { }; /* expect+1: error: negative array dimension (-24) [20] */ typedef int sizeof_s24[-(int)sizeof(struct s24)]; + +void +sizeof_array_parameter(short arr[12345]) +{ + // The size of an array parameter is the size of the decayed pointer. + // Subtracting 'sizeof(void *)' makes the test platform-independent. + typedef int sizeof_arr[-(int)(sizeof arr - sizeof(void *))]; + + // The 2 comes from 'sizeof(short)', as the type 'array[size] of elem' + // decays into the type 'pointer to elem', not 'pointer to array[size] + // of elem'. + /* expect+1: error: negative array dimension (-2) [20] */ + typedef int sizeof_arr_elem[-(int)(sizeof *arr)]; +}
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Wed Mar 13 06:56:24 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: expr_sizeof.c Log Message: tests/lint: ensure that lint correctly decays array parameter types To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/expr_sizeof.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Wed Mar 13 06:48:49 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: cksnprintb.c Log Message: lint: trim down the check for snprintb formats To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint1/cksnprintb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/xlint/lint1/cksnprintb.c diff -u src/usr.bin/xlint/lint1/cksnprintb.c:1.10 src/usr.bin/xlint/lint1/cksnprintb.c:1.11 --- src/usr.bin/xlint/lint1/cksnprintb.c:1.10 Sun Mar 10 16:27:16 2024 +++ src/usr.bin/xlint/lint1/cksnprintb.c Wed Mar 13 06:48:49 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cksnprintb.c,v 1.10 2024/03/10 16:27:16 rillig Exp $ */ +/* $NetBSD: cksnprintb.c,v 1.11 2024/03/13 06:48:49 rillig Exp $ */ /*- * Copyright (c) 2024 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: cksnprintb.c,v 1.10 2024/03/10 16:27:16 rillig Exp $"); +__RCSID("$NetBSD: cksnprintb.c,v 1.11 2024/03/13 06:48:49 rillig Exp $"); #endif #include @@ -51,35 +51,10 @@ typedef struct { quoted_iterator it; uint64_t field_width; uint64_t covered; - unsigned covered_start[64]; - unsigned covered_end[64]; + const char *covered_start[64]; + int covered_len[64]; } checker; -static bool -match_string_literal(const tnode_t *tn, const buffer **str) -{ - while (tn->tn_op == CVT) - tn = tn->u.ops.left; - return tn->tn_op == ADDR - && tn->u.ops.left->tn_op == STRING - && (*str = tn->u.ops.left->u.str_literals, (*str)->data != NULL); -} - -static bool -match_snprintb_call(const function_call *call, -const buffer **fmt, const tnode_t **val) -{ - const char *func; - - return call->func->tn_op == ADDR - && call->func->u.ops.left->tn_op == NAME - && (func = call->func->u.ops.left->u.sym->s_name, true) - && ((strcmp(func, "snprintb") == 0 && call->args_len == 4) - || (strcmp(func, "snprintb_m") == 0 && call->args_len == 5)) - && match_string_literal(call->args[2], fmt) - && (*val = call->args[3], true); -} - static int len(quoted_iterator it) { @@ -126,52 +101,36 @@ check_hex_escape(const buffer *buf, quot } static void -check_overlap(checker *ck, uint64_t dir_lsb, uint64_t width, - size_t start, size_t end) +check_bit(checker *ck, uint64_t dir_lsb, uint64_t width, + const char *start, int len) { unsigned lsb = (unsigned)(ck->new_style ? dir_lsb : dir_lsb - 1); if (lsb >= 64 || width == 0 || width > 64) return; uint64_t field_mask = value_bits((unsigned)width) << lsb; - uint64_t overlap = ck->covered & field_mask; - if (overlap == 0) - goto update_covered; - for (unsigned i = lsb; i < 64; i++) { - if (!(overlap & bit(i))) - continue; - /* '%.*s' overlaps earlier '%.*s' on bit %u */ - warning(376, - (int)(end - start), ck->fmt->data + start, - (int)(ck->covered_end[i] - ck->covered_start[i]), - ck->fmt->data + ck->covered_start[i], - ck->new_style ? i : i + 1); - break; + if (ck->covered & field_mask & bit(i)) { + /* '%.*s' overlaps earlier '%.*s' on bit %u */ + warning(376, + len, start, ck->covered_len[i], + ck->covered_start[i], + ck->new_style ? i : i + 1); + break; + } } -update_covered: ck->covered |= field_mask; for (unsigned i = lsb; i < 64; i++) { if (field_mask & bit(i)) { - ck->covered_start[i] = (unsigned)start; - ck->covered_end[i] = (unsigned)end; + ck->covered_start[i] = start; + ck->covered_len[i] = len; } } -} - -static void -check_reachable(checker *ck, uint64_t dir_lsb, uint64_t width, - size_t start, size_t end) -{ - unsigned lsb = (unsigned)(ck->new_style ? dir_lsb : dir_lsb - 1); - if (lsb >= 64 || width == 0 || width > 64) - return; - uint64_t field_mask = value_bits((unsigned)width) << lsb; if (!(possible_bits(ck->value) & field_mask)) /* directive '%.*s' is unreachable by input value */ - warning(378, (int)(end - start), ck->fmt->data + start); + warning(378, len, start); } static bool @@ -266,45 +225,37 @@ check_directive(checker *ck) check_hex_escape(fmt, bit); if (has_width) check_hex_escape(fmt, width); - if (has_bit && bit.octal_digits == 0 && bit.hex_digits == 0) { + if (has_bit && bit.octal_digits == 0 && bit.hex_digits == 0) /* bit position '%.*s' in '%.*s' should be escaped as ... */ warning(369, len(bit), start(bit, fmt), range(dir, *it), start(dir, fmt)); - } - if (has_width && width.octal_digits == 0 && width.hex_digits == 0) { + if (has_width && width.octal_digits == 0 && width.hex_digits == 0) /* field width '%.*s' in '%.*s' should be escaped as ... */ warning(370, len(width), start(width, fmt), range(dir, *it), start(dir, fmt)); - } - if (has_bit && (new_style ? bit.value > 63 : bit.value - 1 > 31)) { + if (has_bit && (new_style ? bit.value > 63 : bit.value - 1 > 31)) /* bit position '%.*s' (%ju) in
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Wed Mar 13 06:48:49 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: cksnprintb.c Log Message: lint: trim down the check for snprintb formats To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.bin/xlint/lint1/cksnprintb.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/evbmips/evbmips
Module Name:src Committed By: andvar Date: Tue Mar 12 21:27:14 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: Fix non-DIAGNOSTIC build for evbmips. mtx_count, biglock_count and blcnt are defined inside DIAGNOSTIC block, thus KASSERTs using them should be guarded as well. Seemingly introduced with matt-nb5-mips64 merge in 2011. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips
Module Name:src Committed By: andvar Date: Tue Mar 12 21:27:14 UTC 2024 Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: Fix non-DIAGNOSTIC build for evbmips. mtx_count, biglock_count and blcnt are defined inside DIAGNOSTIC block, thus KASSERTs using them should be guarded as well. Seemingly introduced with matt-nb5-mips64 merge in 2011. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips/interrupt.c diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.25 src/sys/arch/evbmips/evbmips/interrupt.c:1.26 --- src/sys/arch/evbmips/evbmips/interrupt.c:1.25 Sat Jun 10 07:30:57 2023 +++ src/sys/arch/evbmips/evbmips/interrupt.c Tue Mar 12 21:27:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.25 2023/06/10 07:30:57 skrll Exp $ */ +/* $NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.25 2023/06/10 07:30:57 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $"); #include #include @@ -94,9 +94,11 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s /* Process I/O and error interrupts. */ evbmips_iointr(ipl, pending, ); } +#ifdef DIAGNOSTIC KASSERT(biglock_count == ci->ci_biglock_count); KASSERT(blcnt == curlwp->l_blcnt); KASSERT(mtx_count == ci->ci_mtx_count); +#endif /* * If even our spl is higher now (due to interrupting while
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Tue Mar 12 20:35:29 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c Log Message: tests/lint: extend test for previously wrong warning about bit-fields To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/xlint/lint1/msg_132.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
Module Name:src Committed By: rillig Date: Tue Mar 12 20:35:29 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c Log Message: tests/lint: extend test for previously wrong warning about bit-fields To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/tests/usr.bin/xlint/lint1/msg_132.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.c diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.35 src/tests/usr.bin/xlint/lint1/msg_132.c:1.36 --- src/tests/usr.bin/xlint/lint1/msg_132.c:1.35 Tue Mar 12 07:56:08 2024 +++ src/tests/usr.bin/xlint/lint1/msg_132.c Tue Mar 12 20:35:29 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_132.c,v 1.35 2024/03/12 07:56:08 rillig Exp $ */ +/* $NetBSD: msg_132.c,v 1.36 2024/03/12 20:35:29 rillig Exp $ */ # 3 "msg_132.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] @@ -404,16 +404,26 @@ test_ic_conditional(char c1, char c2) } void -fp_classify(void) +compare_bit_field_to_integer_constant(void) { - static struct ieee_ext { - unsigned long long ext_exp:15; - } x; + static _Bool b; + static struct { + short s16:15; + unsigned short u16:15; + int s32:15; + unsigned u32:15; + long long s64:15; + unsigned long long u64:15; + } s; // Since decl.c 1.180 from 2021-05-02 and before tree.c 1.624 from // 2024-03-12, lint warned about a possible loss of accuracy [132] - // when promoting a small unsigned bit-field to 'int'. - if (x.ext_exp == 0) { - } else if (x.ext_exp == 0x7fff) { - } + // when promoting an 'unsigned long long' bit-field to 'int'. + b = s.s16 == 0; + b = s.u16 == 0; + b = s.s32 == 0; + b = s.u32 == 0; + b = s.s64 == 0; + b = s.u64 == 0; + b = !b; }
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 12 07:56:08 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c msg_267.c src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix warning about loss of conversion for unsigned bit-fields Since decl.c 1.180 from 2021-05-02. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_267.c cvs rdiff -u -r1.623 -r1.624 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.c diff -u src/tests/usr.bin/xlint/lint1/msg_132.c:1.34 src/tests/usr.bin/xlint/lint1/msg_132.c:1.35 --- src/tests/usr.bin/xlint/lint1/msg_132.c:1.34 Tue Mar 12 07:29:39 2024 +++ src/tests/usr.bin/xlint/lint1/msg_132.c Tue Mar 12 07:56:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_132.c,v 1.34 2024/03/12 07:29:39 rillig Exp $ */ +/* $NetBSD: msg_132.c,v 1.35 2024/03/12 07:56:08 rillig Exp $ */ # 3 "msg_132.c" // Test for message: conversion from '%s' to '%s' may lose accuracy [132] @@ -410,11 +410,10 @@ fp_classify(void) unsigned long long ext_exp:15; } x; - /* FIXME: There is no loss of accuracy here. */ - /* expect+1: warning: conversion from 'unsigned long long:15' to 'int:15' may lose accuracy [132] */ + // Since decl.c 1.180 from 2021-05-02 and before tree.c 1.624 from + // 2024-03-12, lint warned about a possible loss of accuracy [132] + // when promoting a small unsigned bit-field to 'int'. if (x.ext_exp == 0) { - /* FIXME: There is no loss of accuracy here. */ - /* expect+1: warning: conversion from 'unsigned long long:15' to 'int:15' may lose accuracy [132] */ } else if (x.ext_exp == 0x7fff) { } } Index: src/tests/usr.bin/xlint/lint1/msg_267.c diff -u src/tests/usr.bin/xlint/lint1/msg_267.c:1.7 src/tests/usr.bin/xlint/lint1/msg_267.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_267.c:1.7 Fri Jul 7 19:45:22 2023 +++ src/tests/usr.bin/xlint/lint1/msg_267.c Tue Mar 12 07:56:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_267.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ +/* $NetBSD: msg_267.c,v 1.8 2024/03/12 07:56:08 rillig Exp $ */ # 3 "msg_267.c" // Test for message: shift amount %u equals bit-size of '%s' [267] @@ -57,20 +57,28 @@ shift_bit_field(void) (s.bit_field >> 18) & (s.bit_field >> 19) & (s.bit_field >> 31) & - /* XXX: Why 'int:18', not 'unsigned int:18'? */ - /* expect+1: warning: shift amount 32 equals bit-size of 'int:18' [267] */ + // When promoting 'unsigned int:18', the target type is 'int', as + // it can represent all possible values; this is a bit misleading + // as its sign bit is always 0. + /* expect+1: warning: shift amount 32 equals bit-size of 'int:19' [267] */ (s.bit_field >> 32) & - /* XXX: Why 'int', not 'unsigned int:18'? */ + // When promoting 'unsigned int:18', the target type is 'int', as + // it can represent all possible values; this is a bit misleading + // as its sign bit is always 0. /* expect+1: warning: shift amount 33 is greater than bit-size 32 of 'int' [122] */ (s.bit_field >> 33) & (s.bit_field << 17) & (s.bit_field << 18) & (s.bit_field << 19) & (s.bit_field << 31) & - /* XXX: Why 'int:18', not 'unsigned int:18'? */ - /* expect+1: warning: shift amount 32 equals bit-size of 'int:18' [267] */ + // When promoting 'unsigned int:18', the target type is 'int', as + // it can represent all possible values; this is a bit misleading + // as its sign bit is always 0. + /* expect+1: warning: shift amount 32 equals bit-size of 'int:19' [267] */ (s.bit_field << 32) & - /* XXX: Why 'int', not 'unsigned int:18'? */ + // When promoting 'unsigned int:18', the target type is 'int', as + // it can represent all possible values; this is a bit misleading + // as its sign bit is always 0. /* expect+1: warning: shift amount 33 is greater than bit-size 32 of 'int' [122] */ (s.bit_field << 33) & 15; Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.623 src/usr.bin/xlint/lint1/tree.c:1.624 --- src/usr.bin/xlint/lint1/tree.c:1.623 Sun Mar 10 19:45:14 2024 +++ src/usr.bin/xlint/lint1/tree.c Tue Mar 12 07:56:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.623 2024/03/10 19:45:14 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.624 2024/03/12 07:56:08 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: tree.c,v 1.623 2024/03/10 19:45:14 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.624 2024/03/12 07:56:08 rillig Exp $"); #endif #include @@ -3256,7 +3256,8 @@ tnode_t * promote(op_t op, bool farg, tnode_t *tn) { - tspec_t ot = tn->tn_type->t_tspec; + const type_t *otp = tn->tn_type; + tspec_t ot
CVS commit: src
Module Name:src Committed By: rillig Date: Tue Mar 12 07:56:08 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_132.c msg_267.c src/usr.bin/xlint/lint1: tree.c Log Message: lint: fix warning about loss of conversion for unsigned bit-fields Since decl.c 1.180 from 2021-05-02. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/tests/usr.bin/xlint/lint1/msg_132.c cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_267.c cvs rdiff -u -r1.623 -r1.624 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.