CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Sun Feb 4 05:54:21 UTC 2024 Modified Files: src/libexec/httpd: bozohttpd.8 Log Message: note this documents bozohttpd 20240126. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/libexec/httpd/bozohttpd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Sun Feb 4 05:54:21 UTC 2024 Modified Files: src/libexec/httpd: bozohttpd.8 Log Message: note this documents bozohttpd 20240126. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/libexec/httpd/bozohttpd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.8 diff -u src/libexec/httpd/bozohttpd.8:1.95 src/libexec/httpd/bozohttpd.8:1.96 --- src/libexec/httpd/bozohttpd.8:1.95 Fri Feb 2 20:50:28 2024 +++ src/libexec/httpd/bozohttpd.8 Sun Feb 4 05:54:20 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: bozohttpd.8,v 1.95 2024/02/02 20:50:28 andvar Exp $ +.\" $NetBSD: bozohttpd.8,v 1.96 2024/02/04 05:54:20 mrg Exp $ .\" .\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $ .\" @@ -664,7 +664,7 @@ The focus has always been simplicity and and regular code audits. This manual documents .Nm -version 20230602. +version 20240126. .Sh AUTHORS .An -nosplit .Nm
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 05:43:07 UTC 2024 Modified Files: src/compat: README src/external/bsd/top/dist/machine: m_netbsd.c src/lib/libc/sys: swapctl.2 src/libexec/httpd/libbozohttpd: libbozohttpd.3 src/sbin/rcorder: rcorder.8 src/sbin/swapctl: swapctl.8 src/share/man/man4: mos.4 usbnet.4 src/share/man/man4/man4.evbarm: rktsadc.4 src/share/man/man8: creds_msdos.8 src/share/man/man9: usbnet.9 uvm.9 src/sys/dev/usb: ehci.c motg.c ohci.c uaudio.c uhci.c uhid.c uhidev.c umidi.c usb.c usbdi.c usbdi_util.c usbdivar.h usbroothub.c src/usr.bin/audio/play: audioplay.1 src/usr.bin/audio/record: audiorecord.1 src/usr.bin/gzip: gzip.1 src/usr.bin/midirecord: midirecord.1 Log Message: update my email address. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/compat/README cvs rdiff -u -r1.29 -r1.30 src/external/bsd/top/dist/machine/m_netbsd.c cvs rdiff -u -r1.39 -r1.40 src/lib/libc/sys/swapctl.2 cvs rdiff -u -r1.6 -r1.7 src/libexec/httpd/libbozohttpd/libbozohttpd.3 cvs rdiff -u -r1.10 -r1.11 src/sbin/rcorder/rcorder.8 cvs rdiff -u -r1.44 -r1.45 src/sbin/swapctl/swapctl.8 cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/mos.4 cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/usbnet.4 cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/man4.evbarm/rktsadc.4 cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/creds_msdos.8 cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/usbnet.9 cvs rdiff -u -r1.114 -r1.115 src/share/man/man9/uvm.9 cvs rdiff -u -r1.319 -r1.320 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/motg.c cvs rdiff -u -r1.323 -r1.324 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.182 -r1.183 src/sys/dev/usb/uaudio.c cvs rdiff -u -r1.316 -r1.317 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.128 -r1.129 src/sys/dev/usb/uhid.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/uhidev.c cvs rdiff -u -r1.89 -r1.90 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.202 -r1.203 src/sys/dev/usb/usb.c cvs rdiff -u -r1.250 -r1.251 src/sys/dev/usb/usbdi.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/usbdi_util.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/usbdivar.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/usbroothub.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/audio/play/audioplay.1 cvs rdiff -u -r1.44 -r1.45 src/usr.bin/audio/record/audiorecord.1 cvs rdiff -u -r1.31 -r1.32 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.8 -r1.9 src/usr.bin/midirecord/midirecord.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/compat/README diff -u src/compat/README:1.8 src/compat/README:1.9 --- src/compat/README:1.8 Thu Mar 29 18:35:11 2012 +++ src/compat/README Sun Feb 4 05:43:05 2024 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.8 2012/03/29 18:35:11 wiz Exp $ +$NetBSD: README,v 1.9 2024/02/04 05:43:05 mrg Exp $ Building multi-ABI libraries for NetBSD platforms. @@ -68,5 +68,5 @@ be fixed in a better way. -m...@eterna.com.au +m...@eterna23.net december 2009 Index: src/external/bsd/top/dist/machine/m_netbsd.c diff -u src/external/bsd/top/dist/machine/m_netbsd.c:1.29 src/external/bsd/top/dist/machine/m_netbsd.c:1.30 --- src/external/bsd/top/dist/machine/m_netbsd.c:1.29 Thu Dec 14 07:18:44 2023 +++ src/external/bsd/top/dist/machine/m_netbsd.c Sun Feb 4 05:43:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $ */ +/* $NetBSD: m_netbsd.c,v 1.30 2024/02/04 05:43:05 mrg Exp $ */ /* * top - a top users display for Unix @@ -39,18 +39,18 @@ * Wolfram Schneider * Arne Helme * Luke Mewburn - * matthew green + * matthew green * Simon Burge * Tomas Svensson * Andrew Doran * * - * $Id: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $ + * $Id: m_netbsd.c,v 1.30 2024/02/04 05:43:05 mrg Exp $ */ #include #ifndef lint -__RCSID("$NetBSD: m_netbsd.c,v 1.29 2023/12/14 07:18:44 mrg Exp $"); +__RCSID("$NetBSD: m_netbsd.c,v 1.30 2024/02/04 05:43:05 mrg Exp $"); #endif #include Index: src/lib/libc/sys/swapctl.2 diff -u src/lib/libc/sys/swapctl.2:1.39 src/lib/libc/sys/swapctl.2:1.40 --- src/lib/libc/sys/swapctl.2:1.39 Sun Nov 2 11:28:03 2014 +++ src/lib/libc/sys/swapctl.2 Sun Feb 4 05:43:05 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: swapctl.2,v 1.39 2014/11/02 11:28:03 njoly Exp $ +.\" $NetBSD: swapctl.2,v 1.40 2024/02/04 05:43:05 mrg Exp $ .\" .\" Copyright (c) 1997 Matthew R. Green .\" All rights reserved. @@ -275,7 +275,7 @@ to its current location in .Sh AUTHORS .An -nosplit The current swap system was designed and implemented by -.An Matthew Green Aq Mt m...@eterna.com.au , +.An Matthew Green Aq Mt m...@eterna23.net , with help from .An Paul Kranenburg Aq Mt p...@netbsd.org and Index: src/libexec/httpd/libbozohttpd/libbozohttpd.3 diff -u src/libexec/httpd/libbozohttpd/libbozohttpd.3:1.6 src/libexec/httpd/libbozohttpd/libbozohttpd.3:1.7
CVS commit: src
Module Name:src Committed By: mrg Date: Sun Feb 4 05:43:07 UTC 2024 Modified Files: src/compat: README src/external/bsd/top/dist/machine: m_netbsd.c src/lib/libc/sys: swapctl.2 src/libexec/httpd/libbozohttpd: libbozohttpd.3 src/sbin/rcorder: rcorder.8 src/sbin/swapctl: swapctl.8 src/share/man/man4: mos.4 usbnet.4 src/share/man/man4/man4.evbarm: rktsadc.4 src/share/man/man8: creds_msdos.8 src/share/man/man9: usbnet.9 uvm.9 src/sys/dev/usb: ehci.c motg.c ohci.c uaudio.c uhci.c uhid.c uhidev.c umidi.c usb.c usbdi.c usbdi_util.c usbdivar.h usbroothub.c src/usr.bin/audio/play: audioplay.1 src/usr.bin/audio/record: audiorecord.1 src/usr.bin/gzip: gzip.1 src/usr.bin/midirecord: midirecord.1 Log Message: update my email address. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/compat/README cvs rdiff -u -r1.29 -r1.30 src/external/bsd/top/dist/machine/m_netbsd.c cvs rdiff -u -r1.39 -r1.40 src/lib/libc/sys/swapctl.2 cvs rdiff -u -r1.6 -r1.7 src/libexec/httpd/libbozohttpd/libbozohttpd.3 cvs rdiff -u -r1.10 -r1.11 src/sbin/rcorder/rcorder.8 cvs rdiff -u -r1.44 -r1.45 src/sbin/swapctl/swapctl.8 cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/mos.4 cvs rdiff -u -r1.6 -r1.7 src/share/man/man4/usbnet.4 cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/man4.evbarm/rktsadc.4 cvs rdiff -u -r1.4 -r1.5 src/share/man/man8/creds_msdos.8 cvs rdiff -u -r1.21 -r1.22 src/share/man/man9/usbnet.9 cvs rdiff -u -r1.114 -r1.115 src/share/man/man9/uvm.9 cvs rdiff -u -r1.319 -r1.320 src/sys/dev/usb/ehci.c cvs rdiff -u -r1.41 -r1.42 src/sys/dev/usb/motg.c cvs rdiff -u -r1.323 -r1.324 src/sys/dev/usb/ohci.c cvs rdiff -u -r1.182 -r1.183 src/sys/dev/usb/uaudio.c cvs rdiff -u -r1.316 -r1.317 src/sys/dev/usb/uhci.c cvs rdiff -u -r1.128 -r1.129 src/sys/dev/usb/uhid.c cvs rdiff -u -r1.94 -r1.95 src/sys/dev/usb/uhidev.c cvs rdiff -u -r1.89 -r1.90 src/sys/dev/usb/umidi.c cvs rdiff -u -r1.202 -r1.203 src/sys/dev/usb/usb.c cvs rdiff -u -r1.250 -r1.251 src/sys/dev/usb/usbdi.c cvs rdiff -u -r1.87 -r1.88 src/sys/dev/usb/usbdi_util.c cvs rdiff -u -r1.137 -r1.138 src/sys/dev/usb/usbdivar.h cvs rdiff -u -r1.15 -r1.16 src/sys/dev/usb/usbroothub.c cvs rdiff -u -r1.32 -r1.33 src/usr.bin/audio/play/audioplay.1 cvs rdiff -u -r1.44 -r1.45 src/usr.bin/audio/record/audiorecord.1 cvs rdiff -u -r1.31 -r1.32 src/usr.bin/gzip/gzip.1 cvs rdiff -u -r1.8 -r1.9 src/usr.bin/midirecord/midirecord.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/ntfs
Module Name:src Committed By: christos Date: Sun Feb 4 00:16:59 UTC 2024 Modified Files: src/sys/fs/ntfs: ntfs_vfsops.c Log Message: PR/57904: Ricardo Branco: Mask file permissions we get from mount_ntfs -m option To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/fs/ntfs/ntfs_vfsops.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/fs/ntfs/ntfs_vfsops.c diff -u src/sys/fs/ntfs/ntfs_vfsops.c:1.110 src/sys/fs/ntfs/ntfs_vfsops.c:1.111 --- src/sys/fs/ntfs/ntfs_vfsops.c:1.110 Mon Apr 13 15:23:18 2020 +++ src/sys/fs/ntfs/ntfs_vfsops.c Sat Feb 3 19:16:59 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ntfs_vfsops.c,v 1.110 2020/04/13 19:23:18 ad Exp $ */ +/* $NetBSD: ntfs_vfsops.c,v 1.111 2024/02/04 00:16:59 christos Exp $ */ /*- * Copyright (c) 1998, 1999 Semen Ustimenko @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.110 2020/04/13 19:23:18 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ntfs_vfsops.c,v 1.111 2024/02/04 00:16:59 christos Exp $"); #include #include @@ -112,7 +112,7 @@ ntfs_mountroot(void) args.flag = 0; args.uid = 0; args.gid = 0; - args.mode = 0777; + args.mode = S_IRWXU|S_IRWXG|S_IRWXO; if ((error = ntfs_mountfs(rootvp, mp, , l)) != 0) { vfs_unbusy(mp); @@ -366,7 +366,7 @@ ntfs_mountfs(struct vnode *devvp, struct ntmp->ntm_devvp = devvp; ntmp->ntm_uid = argsp->uid; ntmp->ntm_gid = argsp->gid; - ntmp->ntm_mode = argsp->mode; + ntmp->ntm_mode = argsp->mode & (S_IRWXU|S_IRWXG|S_IRWXO); ntmp->ntm_flag = argsp->flag; mp->mnt_data = ntmp;
CVS commit: src/sys/fs/ntfs
Module Name:src Committed By: christos Date: Sun Feb 4 00:16:59 UTC 2024 Modified Files: src/sys/fs/ntfs: ntfs_vfsops.c Log Message: PR/57904: Ricardo Branco: Mask file permissions we get from mount_ntfs -m option To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/fs/ntfs/ntfs_vfsops.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/gzip
Module Name:src Committed By: mrg Date: Sat Feb 3 22:40:29 UTC 2024 Modified Files: src/usr.bin/gzip: gzip.c Log Message: bump copyright and version. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/usr.bin/gzip/gzip.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/gzip/gzip.c diff -u src/usr.bin/gzip/gzip.c:1.121 src/usr.bin/gzip/gzip.c:1.122 --- src/usr.bin/gzip/gzip.c:1.121 Mon Jan 15 17:35:48 2024 +++ src/usr.bin/gzip/gzip.c Sat Feb 3 22:40:29 2024 @@ -1,8 +1,7 @@ -/* $NetBSD: gzip.c,v 1.121 2024/01/15 17:35:48 christos Exp $ */ +/* $NetBSD: gzip.c,v 1.122 2024/02/03 22:40:29 mrg Exp $ */ /* - * Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008, 2009, 2010, 2011, 2015, 2017 - *Matthew R. Green + * Copyright (c) 1997-2024 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,9 +28,9 @@ #include #ifndef lint -__COPYRIGHT("@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006, 2008,\ - 2009, 2010, 2011, 2015, 2017 Matthew R. Green. All rights reserved."); -__RCSID("$NetBSD: gzip.c,v 1.121 2024/01/15 17:35:48 christos Exp $"); +__COPYRIGHT("@(#) Copyright (c) 1997-2024 Matthew R. Green. " + "All rights reserved."); +__RCSID("$NetBSD: gzip.c,v 1.122 2024/02/03 22:40:29 mrg Exp $"); #endif /* not lint */ /* @@ -173,7 +172,7 @@ static suffixes_t suffixes[] = { #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0]) #define SUFFIX_MAXLEN 30 -static const char gzip_version[] = "NetBSD gzip 20170803"; +static const char gzip_version[] = "NetBSD gzip 20240203"; static int cflag; /* stdout mode */ static int dflag; /* decompress mode */
CVS commit: src/usr.bin/gzip
Module Name:src Committed By: mrg Date: Sat Feb 3 22:40:29 UTC 2024 Modified Files: src/usr.bin/gzip: gzip.c Log Message: bump copyright and version. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/usr.bin/gzip/gzip.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
I made it return EPERM if they are different. christos > On Feb 3, 2024, at 3:58 PM, J. Hannken-Illjes wrote: > >> On 3. Feb 2024, at 19:45, Christos Zoulas wrote: >> >> Oh, I fixed GETARGS, but not UPDATE... How about now? > > What is the expected result if we update a cd9660 mount with different > uid/gid or masks? > > If it is forbidden the "mp->mnt_flag & MNT_UPDATE" case, lines 306 .. 312 > of cd9660_vfsops.c should test them and fail on different values. > > If it is allowed to change them it has to be done here. > >>> On Feb 3, 2024, at 12:48 PM, J. Hannken-Illjes wrote: >>> On 3. Feb 2024, at 18:38, Christos Zoulas wrote: Fixed, thanks. >>> >>> Not really, with "struct iso_args *args = data" you cannot set fields >>> beyond "datalen" here and the MNT_UPDATE case is still missing. > > -- > J. Hannken-Illjes - hann...@mailbox.org
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 22:39:27 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: add checks for id and mask in the update case (thanks hannken) To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/fs/cd9660/cd9660_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 22:39:27 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: add checks for id and mask in the update case (thanks hannken) To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/fs/cd9660/cd9660_vfsops.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/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.102 src/sys/fs/cd9660/cd9660_vfsops.c:1.103 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.102 Sat Feb 3 13:45:50 2024 +++ src/sys/fs/cd9660/cd9660_vfsops.c Sat Feb 3 17:39:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.102 2024/02/03 18:45:50 christos Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.103 2024/02/03 22:39:27 christos Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.102 2024/02/03 18:45:50 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.103 2024/02/03 22:39:27 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -174,6 +174,44 @@ cd9660_modcmd(modcmd_t cmd, void *arg) return (error); } +/* Compat with pre uid/gid/fsize/dsize mount call */ +#define OSIZE sizeof(struct { \ + const char *fspec; \ + struct export_args30 _pad1; \ + int flags; \ +}) + +static int +iso_checkupdate(const struct vnode *devvp, const struct iso_mnt *imp, +const struct iso_args *args) +{ + + if (devvp != imp->im_devvp && devvp->v_rdev != imp->im_devvp->v_rdev) + return EINVAL; + + if (((imp->im_flags & ISOFSMNT_UID) && args->uid != imp->im_uid) || + ((imp->im_flags & ISOFSMNT_GID) && args->gid != imp->im_gid) || + args->fmask != imp->im_fmask || args->dmask != imp->im_dmask) + return EPERM; + + return 0; +} + +static void +iso_copyidmask(struct iso_args *args, const struct iso_mnt *imp) +{ + + if (imp == NULL) { + args->uid = args->gid = 0; + args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; + return; + } + args->uid = imp->im_uid; + args->gid = imp->im_gid; + args->fmask = imp->im_fmask; + args->dmask = imp->im_dmask; +} + int cd9660_mountroot(void) { @@ -192,7 +230,7 @@ cd9660_mountroot(void) } args.flags = ISOFSMNT_ROOT; - args.fmask = args.dmask = S_IRWXU|S_IRWXG|S_IRWXO; + iso_copyidmask(, NULL); if ((error = iso_mountfs(rootvp, mp, l, )) != 0) { vfs_unbusy(mp); vfs_rele(mp); @@ -204,13 +242,7 @@ cd9660_mountroot(void) return (0); } -/* Compat with pre uid/gid/fsize/dsize mount call */ -#define OSIZE sizeof(struct { \ - const char *fspec; \ - struct export_args30 _pad1; \ - int flags; \ -}) - + /* * VFS Operations. * @@ -241,10 +273,7 @@ cd9660_mount(struct mount *mp, const cha if (*data_len == OSIZE) return 0; - args->uid = imp->im_uid; - args->gid = imp->im_gid; - args->fmask = imp->im_fmask; - args->dmask = imp->im_dmask; + iso_copyidmask(args, imp); *data_len = sizeof(*args); return 0; } @@ -252,8 +281,7 @@ cd9660_mount(struct mount *mp, const cha if (*data_len == OSIZE) { memcpy(, args, OSIZE); args = - args->uid = args->gid = 0; - args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; + iso_copyidmask(args, (mp->mnt_flag & MNT_UPDATE) ? imp : NULL); } if ((mp->mnt_flag & MNT_RDONLY) == 0) @@ -303,11 +331,8 @@ cd9660_mount(struct mount *mp, const cha VOP_UNLOCK(devvp); /* reference to devvp is donated through iso_mountfs */ } else { - if (devvp != imp->im_devvp && - devvp->v_rdev != imp->im_devvp->v_rdev) { - error = EINVAL; /* needs translation */ + if ((error = iso_checkupdate(devvp, imp, args)) != 0) goto fail; - } VOP_UNLOCK(devvp); vrele(devvp); }
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sat Feb 3 21:25:03 UTC 2024 Modified Files: src/doc: CHANGES.prev Log Message: Add entries added to CHANGES in netbsd-10 but missed here. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/doc/CHANGES.prev 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.prev diff -u src/doc/CHANGES.prev:1.180 src/doc/CHANGES.prev:1.181 --- src/doc/CHANGES.prev:1.180 Sat Feb 3 21:00:45 2024 +++ src/doc/CHANGES.prev Sat Feb 3 21:25:02 2024 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.180 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.181 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -13444,6 +13444,8 @@ Changes from NetBSD 9.0 to NetBSD 10.0: mips: Bump the maximum text size for binaries from 64MB to 128MB. [he 20230514] OpenSSL: Imported 3.0.9. [christos 20230531] + lua: Import version 5.4.6. + Bumped shlib minor because of API/ABI changes. [nikita 20230608] pam(8): Disable pam_krb5, pam_ksu by default. [riastradh 20230620] gcc(1): Import GCC 10.5. [mrg 20230710] amdgpu(4): Enable display core logic. [riastradh 20230714] @@ -13463,6 +13465,7 @@ Changes from NetBSD 9.0 to NetBSD 10.0: [rin 20231007] eqos(4): Add support for Intel Elkhart Lake internal Ethernet devices. [msaitoh 20231019] + build: Force MKSTRIPSYM=no if MKDEBUG=yes. [lukem 20231020] top(1): Add network in & out bytes to the top display. [mrg 20231021] OpenSSL: Imported 3.0.12. [christos 20231025] OpenSSH: Import 9.5. [christos 20231025]
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sat Feb 3 21:25:03 UTC 2024 Modified Files: src/doc: CHANGES.prev Log Message: Add entries added to CHANGES in netbsd-10 but missed here. To generate a diff of this commit: cvs rdiff -u -r1.180 -r1.181 src/doc/CHANGES.prev 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: tsutsui Date: Sat Feb 3 21:00:45 UTC 2024 Modified Files: src/doc: CHANGES.prev Log Message: Note several visible changes pulled up to netbsd-10 branch. - X.org server on newsmips - gas(1) fix for MIPS1 - X.org server on vax smg(4) To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/doc/CHANGES.prev 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: tsutsui Date: Sat Feb 3 21:00:45 UTC 2024 Modified Files: src/doc: CHANGES.prev Log Message: Note several visible changes pulled up to netbsd-10 branch. - X.org server on newsmips - gas(1) fix for MIPS1 - X.org server on vax smg(4) To generate a diff of this commit: cvs rdiff -u -r1.179 -r1.180 src/doc/CHANGES.prev 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.prev diff -u src/doc/CHANGES.prev:1.179 src/doc/CHANGES.prev:1.180 --- src/doc/CHANGES.prev:1.179 Sat Feb 3 20:38:49 2024 +++ src/doc/CHANGES.prev Sat Feb 3 21:00:45 2024 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.179 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.180 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -13468,8 +13468,13 @@ Changes from NetBSD 9.0 to NetBSD 10.0: OpenSSH: Import 9.5. [christos 20231025] newsmips: Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines. [tsutsui 20231104] + newsmips: X.org server works with proper keymap with an updated + xf86-input-keyboard driver that supports getting keymap + via WSKBDIO_GETMAP ioctl(2). [tsutsui 20231107] ena(4): MP-enable always, add RSS support, and reliability fixes. [jdolecek 20231105] + gas(1): fix gas that doesn't handle MIPS1 FPR load hazard correctly. + [tsutsui 20231117] iscsid(8): Handle IPv6 addresses. [mlelstv 20231125] kernel: Import various bits of nouveau firmware for newer nvidia graphics hardware. [bouyer 20231128] @@ -13481,3 +13486,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0: wm(4): Add some Meteor Lake devices (I219 V20-V21 and LM 20-21). [msaitoh 20240118] evbppc: Add support for the Nintendo Wii. [jmcneill 20240120] + vax: X.org server with xf86-video-wsfb works on smg(4) monochrome + framebuffer on VAXstation 3100. [tsutsui 20240126]
Re: CVS commit: src
> On 3. Feb 2024, at 19:45, Christos Zoulas wrote: > > Oh, I fixed GETARGS, but not UPDATE... How about now? What is the expected result if we update a cd9660 mount with different uid/gid or masks? If it is forbidden the "mp->mnt_flag & MNT_UPDATE" case, lines 306 .. 312 of cd9660_vfsops.c should test them and fail on different values. If it is allowed to change them it has to be done here. >> On Feb 3, 2024, at 12:48 PM, J. Hannken-Illjes wrote: >> >>> On 3. Feb 2024, at 18:38, Christos Zoulas wrote: >>> >>> Fixed, thanks. >> >> Not really, with "struct iso_args *args = data" you cannot set fields >> beyond "datalen" here and the MNT_UPDATE case is still missing. -- J. Hannken-Illjes - hann...@mailbox.org
CVS commit: src/doc
Module Name:src Committed By: tsutsui Date: Sat Feb 3 20:38:50 UTC 2024 Modified Files: src/doc: CHANGES CHANGES.prev Log Message: Move entries pulled up to netbsd-10 from CHANGES to CHANGES.prev. To generate a diff of this commit: cvs rdiff -u -r1.3032 -r1.3033 src/doc/CHANGES cvs rdiff -u -r1.178 -r1.179 src/doc/CHANGES.prev 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: tsutsui Date: Sat Feb 3 20:38:50 UTC 2024 Modified Files: src/doc: CHANGES CHANGES.prev Log Message: Move entries pulled up to netbsd-10 from CHANGES to CHANGES.prev. To generate a diff of this commit: cvs rdiff -u -r1.3032 -r1.3033 src/doc/CHANGES cvs rdiff -u -r1.178 -r1.179 src/doc/CHANGES.prev 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.3032 src/doc/CHANGES:1.3033 --- src/doc/CHANGES:1.3032 Sat Jan 27 15:55:25 2024 +++ src/doc/CHANGES Sat Feb 3 20:38:49 2024 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3032 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.3033 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -218,9 +218,6 @@ Changes from NetBSD 10.0 to NetBSD 11.0: lagg(4): Copy the MTU of lagg to interfaces added to lagg [yamaguchi 20231018] dhcpcd: Import version 10.0.4. [roy 20231019] - top(1): Add network in & out bytes to the top display. [mrg 20231021] - ena(4): MP-enable always, add RSS support, and reliability fixes. - [jdolecek 20231105] gpioirq(4): allow multiple pins per gpioirq instance, add the ability to use a /dev/gpioirqN device to get pin interrupts into userland. [brad 20231105] @@ -228,11 +225,8 @@ Changes from NetBSD 10.0 to NetBSD 11.0: sparc64: Support for virtio(4). [thorpej 20231119] alpha: Support for virtio(4). [thorpej 20231119] alpha: Support for crash(8). [thorpej 20231122] - iscsid(8): Handle IPv6 addresses. [mlelstv 20231125] kernel: Replace the vdrain kernel thread with two threadpool jobs. [hannken 20231127] - kernel: Import various bits of nouveau firmware for newer - nvidia graphics hardware. [bouyer 20231128] kernel: Replace various usage of extent(9) with vmem(9). [thorpej 20231201] indent(1): Use line number of the token start in diagnostics @@ -242,12 +236,7 @@ Changes from NetBSD 10.0 to NetBSD 11.0: kernel: Modularize compat90. [pgoyette 20231209] libsa: Add NFSv3 support. [mlelstv 20231212] dhcpcd: Import version 10.0.6. [roy 20231218] - OpenSSH: Import 9.6. [christos 20231220] - tzdata: Updated to 2023d (via 2023dgtz) [kre 20231223] - postfix(1): Import version 3.8.4. [christos 20231223] tzcode: Updated to 2023d. [christos 20231223] - postfix(1): Install postfix-tls-script (for "postfix tls") - [kim 20240101] gfpic(4): New driver for the Goldfish virtual programmable interrupt controller. [thorpej 20240102] gftty(4): New driver for the Goldfish virtual tty. [thorpej 20240102] @@ -260,13 +249,10 @@ Changes from NetBSD 10.0 to NetBSD 11.0: [christos 20240115] riscv: Add a StarTech JH7100 SoC clock driver, seen in the Beagle-V board. [skrll 20240116] - wm(4): Add some Meteor Lake devices (I219 V20-V21 and LM 20-21). - [msaitoh 20240118] cpuctl(8): Recognize Intel Meteor Lake and Emerald Rapids. [msaitoh 20240118] m68k: Made many ports share common code for interrupt dispatch and vector tables. [thorpej 20240118] - evbppc: Add support for the Nintendo Wii. [jmcneill 20240120] libm: Import more long double functions from FreeBSD. [christos 20240121] terminfo: Import 20231209 [christos 20240127] Index: src/doc/CHANGES.prev diff -u src/doc/CHANGES.prev:1.178 src/doc/CHANGES.prev:1.179 --- src/doc/CHANGES.prev:1.178 Thu Jan 18 04:02:16 2024 +++ src/doc/CHANGES.prev Sat Feb 3 20:38:49 2024 @@ -1,4 +1,4 @@ -LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.178 $> +LIST OF CHANGES FROM PREVIOUS RELEASES: <$Revision: 1.179 $> Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8: @@ -13463,7 +13463,21 @@ Changes from NetBSD 9.0 to NetBSD 10.0: [rin 20231007] eqos(4): Add support for Intel Elkhart Lake internal Ethernet devices. [msaitoh 20231019] + top(1): Add network in & out bytes to the top display. [mrg 20231021] OpenSSL: Imported 3.0.12. [christos 20231025] OpenSSH: Import 9.5. [christos 20231025] newsmips: Add support for LCD-MONO framebuffer on NWS-32x0 laptop machines. [tsutsui 20231104] + ena(4): MP-enable always, add RSS support, and reliability fixes. + [jdolecek 20231105] + iscsid(8): Handle IPv6 addresses. [mlelstv 20231125] + kernel: Import various bits of nouveau firmware for newer + nvidia graphics hardware. [bouyer 20231128] + OpenSSH: Import 9.6. [christos 20231220] + tzdata: Updated to 2023d (via 2023dgtz) [kre 20231223] + postfix(1): Import version 3.8.4. [christos 20231223] + postfix(1): Install postfix-tls-script (for "postfix tls") + [kim 20240101] + wm(4): Add some Meteor Lake devices (I219 V20-V21 and LM 20-21). + [msaitoh 20240118] + evbppc: Add support for the Nintendo Wii. [jmcneill 20240120]
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Feb 3 20:10:11 UTC 2024 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: msg_077.c t_usage.sh src/usr.bin/xlint/lint1: err.c lex.c Added Files: src/tests/usr.bin/xlint/lint1: msg_356.c Log Message: lint: warn about short octal escape followed by '8' or '9' These mistakes is typically found in snprintb format directives but is probably a typo everywhere else as well. To generate a diff of this commit: cvs rdiff -u -r1.1304 -r1.1305 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_077.c cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_356.c cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/t_usage.sh cvs rdiff -u -r1.223 -r1.224 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.212 -r1.213 src/usr.bin/xlint/lint1/lex.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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1304 src/distrib/sets/lists/tests/mi:1.1305 --- src/distrib/sets/lists/tests/mi:1.1304 Fri Feb 2 23:30:38 2024 +++ src/distrib/sets/lists/tests/mi Sat Feb 3 20:10:10 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1304 2024/02/02 23:30:38 rillig Exp $ +# $NetBSD: mi,v 1.1305 2024/02/03 20:10:10 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -7469,6 +7469,7 @@ ./usr/tests/usr.bin/xlint/lint1/msg_353.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/msg_354.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/msg_355.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/msg_356.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/op_colon.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/op_colon.exp tests-obsolete obsolete,atf ./usr/tests/usr.bin/xlint/lint1/op_shl_lp64.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/msg_077.c diff -u src/tests/usr.bin/xlint/lint1/msg_077.c:1.8 src/tests/usr.bin/xlint/lint1/msg_077.c:1.9 --- src/tests/usr.bin/xlint/lint1/msg_077.c:1.8 Sun Jul 9 11:01:27 2023 +++ src/tests/usr.bin/xlint/lint1/msg_077.c Sat Feb 3 20:10:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_077.c,v 1.8 2023/07/09 11:01:27 rillig Exp $ */ +/* $NetBSD: msg_077.c,v 1.9 2024/02/03 20:10:10 rillig Exp $ */ # 3 "msg_077.c" /* Test for message: bad octal digit '%c' [77] */ @@ -23,5 +23,6 @@ char single_digit = '\8'; * anyway. * https://mail-index.netbsd.org/tech-toolchain/2021/03/16/msg003933.html */ +/* expect+2: warning: short octal escape '\0' followed by digit '8' [356] */ /* expect+1: warning: multi-character character constant [294] */ char several_digits = '\08'; Index: src/tests/usr.bin/xlint/lint1/t_usage.sh diff -u src/tests/usr.bin/xlint/lint1/t_usage.sh:1.14 src/tests/usr.bin/xlint/lint1/t_usage.sh:1.15 --- src/tests/usr.bin/xlint/lint1/t_usage.sh:1.14 Sat Jan 20 10:02:31 2024 +++ src/tests/usr.bin/xlint/lint1/t_usage.sh Sat Feb 3 20:10:11 2024 @@ -1,4 +1,4 @@ -# $NetBSD: t_usage.sh,v 1.14 2024/01/20 10:02:31 rillig Exp $ +# $NetBSD: t_usage.sh,v 1.15 2024/02/03 20:10:11 rillig Exp $ # # Copyright (c) 2023 The NetBSD Foundation, Inc. # All rights reserved. @@ -44,8 +44,8 @@ suppress_messages_body() # Larger than the largest known message. atf_check \ -s 'exit:1' \ - -e "inline:lint1: invalid message ID '356'\n" \ - "$lint1" -X 356 code.c /dev/null + -e "inline:lint1: invalid message ID '357'\n" \ + "$lint1" -X 357 code.c /dev/null # Whitespace is not allowed before a message ID. atf_check \ Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.223 src/usr.bin/xlint/lint1/err.c:1.224 --- src/usr.bin/xlint/lint1/err.c:1.223 Sat Jan 20 10:02:31 2024 +++ src/usr.bin/xlint/lint1/err.c Sat Feb 3 20:10:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.223 2024/01/20 10:02:31 rillig Exp $ */ +/* $NetBSD: err.c,v 1.224 2024/02/03 20:10:10 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: err.c,v 1.223 2024/01/20 10:02:31 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.224 2024/02/03 20:10:10 rillig Exp $"); #endif #include @@ -411,6 +411,7 @@ static const char *const msgs[] = { "empty initializer braces require C23 or later", /* 353 */ "'_Static_assert' requires C11 or later", /* 354 */ "'_Static_assert' without message requires C23 or later", /* 355 */ + "short octal escape '%.*s' followed by digit '%c'", /* 356 */ }; static bool is_suppressed[sizeof(msgs) / sizeof(msgs[0])]; Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.212 src/usr.bin/xlint/lint1/lex.c:1.213 ---
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Feb 3 20:10:11 UTC 2024 Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: msg_077.c t_usage.sh src/usr.bin/xlint/lint1: err.c lex.c Added Files: src/tests/usr.bin/xlint/lint1: msg_356.c Log Message: lint: warn about short octal escape followed by '8' or '9' These mistakes is typically found in snprintb format directives but is probably a typo everywhere else as well. To generate a diff of this commit: cvs rdiff -u -r1.1304 -r1.1305 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_077.c cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/msg_356.c cvs rdiff -u -r1.14 -r1.15 src/tests/usr.bin/xlint/lint1/t_usage.sh cvs rdiff -u -r1.223 -r1.224 src/usr.bin/xlint/lint1/err.c cvs rdiff -u -r1.212 -r1.213 src/usr.bin/xlint/lint1/lex.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: Sat Feb 3 19:37:02 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: lint1.h main1.c Log Message: lint: remove excessive empty lines To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.81 -r1.82 src/usr.bin/xlint/lint1/main1.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/lint1.h diff -u src/usr.bin/xlint/lint1/lint1.h:1.212 src/usr.bin/xlint/lint1/lint1.h:1.213 --- src/usr.bin/xlint/lint1/lint1.h:1.212 Sat Feb 3 19:25:16 2024 +++ src/usr.bin/xlint/lint1/lint1.h Sat Feb 3 19:37:02 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lint1.h,v 1.212 2024/02/03 19:25:16 rillig Exp $ */ +/* $NetBSD: lint1.h,v 1.213 2024/02/03 19:37:02 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -180,8 +180,6 @@ struct lint1_type { #define t_params t_u._t_params - - typedef enum { SK_VCFT, /* variable, constant, function, type */ SK_MEMBER, /* member of a struct or union */ Index: src/usr.bin/xlint/lint1/main1.c diff -u src/usr.bin/xlint/lint1/main1.c:1.81 src/usr.bin/xlint/lint1/main1.c:1.82 --- src/usr.bin/xlint/lint1/main1.c:1.81 Sat Feb 3 12:57:12 2024 +++ src/usr.bin/xlint/lint1/main1.c Sat Feb 3 19:37:02 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: main1.c,v 1.81 2024/02/03 12:57:12 rillig Exp $ */ +/* $NetBSD: main1.c,v 1.82 2024/02/03 19:37:02 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: main1.c,v 1.81 2024/02/03 12:57:12 rillig Exp $"); +__RCSID("$NetBSD: main1.c,v 1.82 2024/02/03 19:37:02 rillig Exp $"); #endif #include @@ -213,7 +213,6 @@ main(int argc, char *argv[]) if (argc != 2) usage(); - /* initialize output */ outopen(argv[1]);
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 19:37:02 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: lint1.h main1.c Log Message: lint: remove excessive empty lines To generate a diff of this commit: cvs rdiff -u -r1.212 -r1.213 src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.81 -r1.82 src/usr.bin/xlint/lint1/main1.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: Sat Feb 3 19:25:16 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: ckgetopt.c debug.c emit1.c externs1.h init.c lex.c lint1.h tree.c Log Message: lint: keep strings in their source representation This allows further analysis depending on whether individual characters are escaped as octal, hexadecimal or not at all. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/xlint/lint1/ckgetopt.c cvs rdiff -u -r1.69 -r1.70 src/usr.bin/xlint/lint1/debug.c cvs rdiff -u -r1.84 -r1.85 src/usr.bin/xlint/lint1/emit1.c cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.257 -r1.258 src/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.211 -r1.212 src/usr.bin/xlint/lint1/lex.c \ src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.601 -r1.602 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/usr.bin/xlint/lint1/ckgetopt.c diff -u src/usr.bin/xlint/lint1/ckgetopt.c:1.21 src/usr.bin/xlint/lint1/ckgetopt.c:1.22 --- src/usr.bin/xlint/lint1/ckgetopt.c:1.21 Sat Feb 3 12:57:12 2024 +++ src/usr.bin/xlint/lint1/ckgetopt.c Sat Feb 3 19:25:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ckgetopt.c,v 1.21 2024/02/03 12:57:12 rillig Exp $ */ +/* $NetBSD: ckgetopt.c,v 1.22 2024/02/03 19:25:16 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: ckgetopt.c,v 1.21 2024/02/03 12:57:12 rillig Exp $"); +__RCSID("$NetBSD: ckgetopt.c,v 1.22 2024/02/03 19:25:16 rillig Exp $"); #endif #include @@ -100,7 +100,12 @@ is_getopt_condition(const tnode_t *tn, c && last_arg->tn_left->tn_op == ADDR && last_arg->tn_left->tn_left->tn_op == STRING && (str = last_arg->tn_left->tn_left->tn_string)->data != NULL) { - *out_options = xstrdup(str->data); + buffer buf; + buf_init(); + quoted_iterator it = { .start = 0 }; + while (quoted_next(str, )) + buf_add_char(, (char)it.value); + *out_options = buf.data; return true; } return false; Index: src/usr.bin/xlint/lint1/debug.c diff -u src/usr.bin/xlint/lint1/debug.c:1.69 src/usr.bin/xlint/lint1/debug.c:1.70 --- src/usr.bin/xlint/lint1/debug.c:1.69 Fri Feb 2 16:25:58 2024 +++ src/usr.bin/xlint/lint1/debug.c Sat Feb 3 19:25:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: debug.c,v 1.69 2024/02/02 16:25:58 rillig Exp $ */ +/* $NetBSD: debug.c,v 1.70 2024/02/03 19:25:16 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: debug.c,v 1.69 2024/02/02 16:25:58 rillig Exp $"); +__RCSID("$NetBSD: debug.c,v 1.70 2024/02/03 19:25:16 rillig Exp $"); #endif #include @@ -235,11 +235,10 @@ debug_node(const tnode_t *tn) // NOLINT( debug_printf("\n"); break; case STRING: - debug_printf(", length %zu", tn->tn_string->len); if (tn->tn_string->data != NULL) - // TODO: May contain \0 or control characters. - debug_printf(", \"%s\"", tn->tn_string->data); - debug_printf("\n"); + debug_printf(", %s\n", tn->tn_string->data); + else + debug_printf(", length %zu\n", tn->tn_string->len); break; default: debug_printf("\n"); Index: src/usr.bin/xlint/lint1/emit1.c diff -u src/usr.bin/xlint/lint1/emit1.c:1.84 src/usr.bin/xlint/lint1/emit1.c:1.85 --- src/usr.bin/xlint/lint1/emit1.c:1.84 Sat Feb 3 12:57:12 2024 +++ src/usr.bin/xlint/lint1/emit1.c Sat Feb 3 19:25:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: emit1.c,v 1.84 2024/02/03 12:57:12 rillig Exp $ */ +/* $NetBSD: emit1.c,v 1.85 2024/02/03 19:25:16 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,9 +38,11 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: emit1.c,v 1.84 2024/02/03 12:57:12 rillig Exp $"); +__RCSID("$NetBSD: emit1.c,v 1.85 2024/02/03 19:25:16 rillig Exp $"); #endif +#include + #include "lint1.h" static void outtt(sym_t *, sym_t *); @@ -367,10 +369,17 @@ outcall(const tnode_t *tn, bool retval_u } else if (arg->tn_op == ADDR && arg->tn_left->tn_op == STRING && arg->tn_left->tn_string->data != NULL) { - /* constant string, write all format specifiers */ + buffer buf; + buf_init(); + quoted_iterator it = { .start = 0 }; + while (quoted_next(arg->tn_left->tn_string, )) +buf_add_char(, (char)it.value); + + /* string literal, write all format specifiers */ outchar('s'); outint(n); - outfstrg(arg->tn_left->tn_string->data); + outfstrg(buf.data); + free(buf.data); } } outchar((char)(retval_discarded ? 'd' : retval_used ? 'u' : 'i')); Index: src/usr.bin/xlint/lint1/externs1.h diff -u src/usr.bin/xlint/lint1/externs1.h:1.214 src/usr.bin/xlint/lint1/externs1.h:1.215 --- src/usr.bin/xlint/lint1/externs1.h:1.214 Sat Feb 3 12:57:12 2024 +++ src/usr.bin/xlint/lint1/externs1.h Sat Feb 3
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 19:25:16 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: ckgetopt.c debug.c emit1.c externs1.h init.c lex.c lint1.h tree.c Log Message: lint: keep strings in their source representation This allows further analysis depending on whether individual characters are escaped as octal, hexadecimal or not at all. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/xlint/lint1/ckgetopt.c cvs rdiff -u -r1.69 -r1.70 src/usr.bin/xlint/lint1/debug.c cvs rdiff -u -r1.84 -r1.85 src/usr.bin/xlint/lint1/emit1.c cvs rdiff -u -r1.214 -r1.215 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.257 -r1.258 src/usr.bin/xlint/lint1/init.c cvs rdiff -u -r1.211 -r1.212 src/usr.bin/xlint/lint1/lex.c \ src/usr.bin/xlint/lint1/lint1.h cvs rdiff -u -r1.601 -r1.602 src/usr.bin/xlint/lint1/tree.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 19:18:36 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_074.c msg_075.c Log Message: tests/lint: extend tests for hexadecimal character escapes To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_074.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/msg_075.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_074.c diff -u src/tests/usr.bin/xlint/lint1/msg_074.c:1.7 src/tests/usr.bin/xlint/lint1/msg_074.c:1.8 --- src/tests/usr.bin/xlint/lint1/msg_074.c:1.7 Fri Feb 2 19:07:58 2024 +++ src/tests/usr.bin/xlint/lint1/msg_074.c Sat Feb 3 19:18:36 2024 @@ -1,7 +1,10 @@ -/* $NetBSD: msg_074.c,v 1.7 2024/02/02 19:07:58 rillig Exp $ */ +/* $NetBSD: msg_074.c,v 1.8 2024/02/03 19:18:36 rillig Exp $ */ # 3 "msg_074.c" // Test for message: no hex digits follow \x [74] +// +// See also: +// msg_075.c overflow in hex escape /* lint1-extra-flags: -X 351 */ @@ -10,27 +13,19 @@ char char_invalid_hex = '\x'; /* expect+2: error: no hex digits follow \x [74] */ /* expect+1: warning: multi-character character constant [294] */ char char_invalid_hex_letter = '\xg'; -char char_hex1 = '\xf'; -char char_hex2 = '\xff'; /* expect+1: error: no hex digits follow \x [74] */ int wide_invalid_hex = L'\x'; /* expect+2: error: no hex digits follow \x [74] */ /* expect+1: error: too many characters in character constant [71] */ int wide_invalid_hex_letter = L'\xg'; -int wide_hex1 = L'\xf'; -int wide_hex2 = L'\xff'; /* expect+1: error: no hex digits follow \x [74] */ char char_string_invalid_hex[] = "\x"; /* expect+1: error: no hex digits follow \x [74] */ char char_string_invalid_hex_letter[] = "\xg"; -char char_string_hex1[] = "\xf"; -char char_string_hex2[] = "\xff"; /* expect+1: error: no hex digits follow \x [74] */ int wide_string_invalid_hex[] = L"\x"; /* expect+1: error: no hex digits follow \x [74] */ int wide_string_invalid_hex_letter[] = L"\xg"; -int wide_string_hex1[] = L"\xf"; -int wide_string_hex2[] = L"\xff"; Index: src/tests/usr.bin/xlint/lint1/msg_075.c diff -u src/tests/usr.bin/xlint/lint1/msg_075.c:1.9 src/tests/usr.bin/xlint/lint1/msg_075.c:1.10 --- src/tests/usr.bin/xlint/lint1/msg_075.c:1.9 Sat Feb 3 18:58:05 2024 +++ src/tests/usr.bin/xlint/lint1/msg_075.c Sat Feb 3 19:18:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_075.c,v 1.9 2024/02/03 18:58:05 rillig Exp $ */ +/* $NetBSD: msg_075.c,v 1.10 2024/02/03 19:18:36 rillig Exp $ */ # 3 "msg_075.c" // Test for message: overflow in hex escape [75] @@ -20,40 +20,64 @@ char str[] = "\x123456781234567812345678 /* C11 6.4.4.4p7 */ char leading_zeroes = '\x020'; -char char_hex1 = '\xf'; -char char_hex2 = '\xff'; +char char_hex4bit = '\xf'; +char char_hex7bit = '\x7f'; +char char_hex8bit = '\xff'; /* expect+1: warning: overflow in hex escape [75] */ -char char_hex3 = '\x100'; +char char_hex9bit = '\x100'; /* expect+1: warning: overflow in hex escape [75] */ -char char_hex4 = '\x'; +char char_hex16bit = '\x'; /* expect+1: warning: overflow in hex escape [75] */ -char char_hex5 = '\xf'; +char char_hex20bit = '\xf'; /* expect+1: warning: overflow in hex escape [75] */ -char char_hex9 = '\xf'; +char char_hex31bit = '\x7fff'; +/* expect+1: warning: overflow in hex escape [75] */ +char char_hex32bit = '\x'; +/* expect+1: warning: overflow in hex escape [75] */ +char char_hex33bit = '\x100ff'; +/* expect+1: warning: overflow in hex escape [75] */ +char char_hex36bit = '\xf'; -int wide_hex1 = L'\xf'; -int wide_hex2 = L'\xff'; -int wide_hex3 = L'\x100'; -int wide_hex4 = L'\x'; -int wide_hex5 = L'\xf'; +int wide_hex4bit = L'\xf'; +int wide_hex7bit = L'\x7f'; +int wide_hex8bit = L'\xff'; +int wide_hex9bit = L'\x100'; +int wide_hex16bit = L'\x'; +int wide_hex20bit = L'\xf'; +int wide_hex31bit = L'\x7fff'; +int wide_hex32bit = L'\x'; +/* expect+1: warning: overflow in hex escape [75] */ +int wide_hex33bit = L'\x100ff'; /* expect+1: warning: overflow in hex escape [75] */ -int wide_hex9 = L'\xf'; +int wide_hex36bit = L'\xf'; -char char_string_hex1[] = "\xf"; -char char_string_hex2[] = "\xff"; +char char_string_hex4bit[] = "\xf"; +char char_string_hex7bit[] = "\x7f"; +char char_string_hex8bit[] = "\xff"; /* expect+1: warning: overflow in hex escape [75] */ -char char_string_hex3[] = "\x100"; +char char_string_hex9bit[] = "\x100"; /* expect+1: warning: overflow in hex escape [75] */ -char char_string_hex4[] = "\x"; +char char_string_hex16bit[] = "\x"; /* expect+1: warning: overflow in hex escape [75] */ -char char_string_hex5[] = "\xf"; +char char_string_hex20bit[] = "\xf"; /* expect+1: warning: overflow in hex escape [75] */ -char
CVS commit: src/tests/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 19:18:36 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_074.c msg_075.c Log Message: tests/lint: extend tests for hexadecimal character escapes To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/usr.bin/xlint/lint1/msg_074.c cvs rdiff -u -r1.9 -r1.10 src/tests/usr.bin/xlint/lint1/msg_075.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys
Module Name:src Committed By: jdolecek Date: Sat Feb 3 19:05:15 UTC 2024 Modified Files: src/sys/kern: uipc_socket.c uipc_syscalls.c src/sys/net: if_gre.c src/sys/sys: socketvar.h Log Message: fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags' passed when called via pipe2(2), fixing repeatable process hang during compilation with 'gcc -pipe' refactor fsocreate() to return the new socket and file pointers, expect the caller to call fd_affix() once initialization is fully complete use the new fsocreate() to replace the duplicate open-coded 'flags' handling in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1() this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed on PIPE_SOCKETPAIR kernel fixes PR kern/55690 To generate a diff of this commit: cvs rdiff -u -r1.307 -r1.308 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.210 -r1.211 src/sys/kern/uipc_syscalls.c cvs rdiff -u -r1.184 -r1.185 src/sys/net/if_gre.c cvs rdiff -u -r1.167 -r1.168 src/sys/sys/socketvar.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/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.307 src/sys/kern/uipc_socket.c:1.308 --- src/sys/kern/uipc_socket.c:1.307 Thu Nov 2 10:31:55 2023 +++ src/sys/kern/uipc_socket.c Sat Feb 3 19:05:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.307 2023/11/02 10:31:55 martin Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $ */ /* * Copyright (c) 2002, 2007, 2008, 2009, 2023 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.307 2023/11/02 10:31:55 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.308 2024/02/03 19:05:14 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -568,44 +568,51 @@ socreate(int dom, struct socket **aso, i /* * fsocreate: create a socket and a file descriptor associated with it. + * Returns the allocated file structure in *fpp, but the descriptor + * is not visible yet for the process. + * Caller is responsible for calling fd_affix() for the returned *fpp once + * it's socket initialization is finished successfully, or fd_abort() if it's + * initialization fails. + * * - * => On success, write file descriptor to fdout and return zero. - * => On failure, return non-zero; *fdout will be undefined. + * => On success, write file descriptor to *fdout and *fpp and return zero. + * => On failure, return non-zero; *fdout and *fpp will be undefined. */ int -fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout) +fsocreate(int domain, struct socket **sop, int type, int proto, int *fdout, +file_t **fpp, struct socket *lockso) { lwp_t *l = curlwp; int error, fd, flags; struct socket *so; - struct file *fp; + file_t *fp; + + flags = type & SOCK_FLAGS_MASK; + type &= ~SOCK_FLAGS_MASK; + error = socreate(domain, , type, proto, l, lockso); + if (error) { + return error; + } if ((error = fd_allocfile(, )) != 0) { + soclose(so); return error; } - flags = type & SOCK_FLAGS_MASK; fd_set_exclose(l, fd, (flags & SOCK_CLOEXEC) != 0); fp->f_flag = FREAD|FWRITE|((flags & SOCK_NONBLOCK) ? FNONBLOCK : 0)| ((flags & SOCK_NOSIGPIPE) ? FNOSIGPIPE : 0); fp->f_type = DTYPE_SOCKET; fp->f_ops = - - type &= ~SOCK_FLAGS_MASK; - error = socreate(domain, , type, proto, l, NULL); - if (error) { - fd_abort(curproc, fp, fd); - return error; - } if (flags & SOCK_NONBLOCK) { so->so_state |= SS_NBIO; } fp->f_socket = so; - fd_affix(curproc, fp, fd); if (sop != NULL) { *sop = so; } *fdout = fd; + *fpp = fp; return error; } Index: src/sys/kern/uipc_syscalls.c diff -u src/sys/kern/uipc_syscalls.c:1.210 src/sys/kern/uipc_syscalls.c:1.211 --- src/sys/kern/uipc_syscalls.c:1.210 Thu Nov 2 10:31:55 2023 +++ src/sys/kern/uipc_syscalls.c Sat Feb 3 19:05:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_syscalls.c,v 1.210 2023/11/02 10:31:55 martin Exp $ */ +/* $NetBSD: uipc_syscalls.c,v 1.211 2024/02/03 19:05:14 jdolecek Exp $ */ /*- * Copyright (c) 2008, 2009, 2023 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.210 2023/11/02 10:31:55 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.211 2024/02/03 19:05:14 jdolecek Exp $"); #ifdef _KERNEL_OPT #include "opt_pipe.h" @@ -111,10 +111,12 @@ sys___socket30(struct lwp *l, const stru syscallarg(int) protocol; } */ int fd, error; + file_t *fp; error = fsocreate(SCARG(uap, domain), NULL, SCARG(uap, type), - SCARG(uap, protocol), ); + SCARG(uap, protocol), , , NULL); if (error == 0) { + fd_affix(l->l_proc, fp, fd); *retval = fd; } return error; @@ -402,34 +404,6 @@ do_sys_connect(struct lwp *l, int fd, st return error; } -static int -makesocket(struct
CVS commit: src/sys
Module Name:src Committed By: jdolecek Date: Sat Feb 3 19:05:15 UTC 2024 Modified Files: src/sys/kern: uipc_socket.c uipc_syscalls.c src/sys/net: if_gre.c src/sys/sys: socketvar.h Log Message: fix PIPE_SOCKETPAIR variant of pipe1() to apply correctly the 'flags' passed when called via pipe2(2), fixing repeatable process hang during compilation with 'gcc -pipe' refactor fsocreate() to return the new socket and file pointers, expect the caller to call fd_affix() once initialization is fully complete use the new fsocreate() to replace the duplicate open-coded 'flags' handling in makesocket() used for socketpair(2), and in the PIPE_SOCKETPAIR pipe1() this also fixes lib/libc/sys/t_pipe2 pipe2_cloexec test to succeed on PIPE_SOCKETPAIR kernel fixes PR kern/55690 To generate a diff of this commit: cvs rdiff -u -r1.307 -r1.308 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.210 -r1.211 src/sys/kern/uipc_syscalls.c cvs rdiff -u -r1.184 -r1.185 src/sys/net/if_gre.c cvs rdiff -u -r1.167 -r1.168 src/sys/sys/socketvar.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: rillig Date: Sat Feb 3 18:58:05 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_075.c src/usr.bin/xlint/lint1: lex.c Log Message: lint: allow hexadecimal character escapes up to UINT_MAX Previously, any value larger than INT_MAX was regarded as negative and thus terminated the loop around get_escaped_char. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_075.c cvs rdiff -u -r1.210 -r1.211 src/usr.bin/xlint/lint1/lex.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_075.c diff -u src/tests/usr.bin/xlint/lint1/msg_075.c:1.8 src/tests/usr.bin/xlint/lint1/msg_075.c:1.9 --- src/tests/usr.bin/xlint/lint1/msg_075.c:1.8 Sat Feb 3 10:01:59 2024 +++ src/tests/usr.bin/xlint/lint1/msg_075.c Sat Feb 3 18:58:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: msg_075.c,v 1.8 2024/02/03 10:01:59 rillig Exp $ */ +/* $NetBSD: msg_075.c,v 1.9 2024/02/03 18:58:05 rillig Exp $ */ # 3 "msg_075.c" // Test for message: overflow in hex escape [75] @@ -36,8 +36,7 @@ int wide_hex2 = L'\xff'; int wide_hex3 = L'\x100'; int wide_hex4 = L'\x'; int wide_hex5 = L'\xf'; -/* expect+2: warning: overflow in hex escape [75] */ -/* expect+1: error: empty character constant [73] */ +/* expect+1: warning: overflow in hex escape [75] */ int wide_hex9 = L'\xf'; char char_string_hex1[] = "\xf"; Index: src/usr.bin/xlint/lint1/lex.c diff -u src/usr.bin/xlint/lint1/lex.c:1.210 src/usr.bin/xlint/lint1/lex.c:1.211 --- src/usr.bin/xlint/lint1/lex.c:1.210 Sat Feb 3 12:57:12 2024 +++ src/usr.bin/xlint/lint1/lex.c Sat Feb 3 18:58:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: lex.c,v 1.210 2024/02/03 12:57:12 rillig Exp $ */ +/* $NetBSD: lex.c,v 1.211 2024/02/03 18:58:05 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: lex.c,v 1.210 2024/02/03 12:57:12 rillig Exp $"); +__RCSID("$NetBSD: lex.c,v 1.211 2024/02/03 18:58:05 rillig Exp $"); #endif #include @@ -773,7 +773,7 @@ read_escaped_oct(int c, bool wide) return value; } -static unsigned int +static int64_t read_escaped_hex(int c, bool wide) { if (!allow_c90) @@ -802,10 +802,10 @@ read_escaped_hex(int c, bool wide) } if (state == 2) value &= mask; - return (unsigned int)value; + return (int64_t)value; } -static int +static int64_t read_escaped_backslash(int delim, bool wide) { int c; @@ -859,7 +859,7 @@ read_escaped_backslash(int delim, bool w case '4': case '5': case '6': case '7': return read_escaped_oct(c, wide); case 'x': - return (int)read_escaped_hex(c, wide); + return read_escaped_hex(c, wide); case '\n': return -3; case EOF: @@ -885,11 +885,11 @@ read_escaped_backslash(int delim, bool w * Returns -1 if the end of the character constant or string is reached, * -2 if the EOF is reached, and the character otherwise. */ -static int +static int64_t get_escaped_char(int delim, bool wide) { - int c = prev_byte; + int64_t c = prev_byte; if (c != -1) prev_byte = -1; else @@ -927,13 +927,11 @@ get_escaped_char(int delim, bool wide) int lex_character_constant(void) { - size_t n; - int val, c; - n = 0; - val = 0; + size_t n = 0; + int64_t val = 0, c; while ((c = get_escaped_char('\'', false)) >= 0) { - val = (int)((unsigned int)val << CHAR_SIZE) + c; + val = (int64_t)((uint64_t)val << CHAR_SIZE) + c; n++; } if (c == -2) { @@ -954,7 +952,7 @@ lex_character_constant(void) error(73); } if (n == 1) - val = (int)convert_integer(val, CHAR, CHAR_SIZE); + val = convert_integer(val, CHAR, CHAR_SIZE); yylval.y_val = xcalloc(1, sizeof(*yylval.y_val)); yylval.y_val->v_tspec = INT; @@ -970,22 +968,18 @@ lex_character_constant(void) int lex_wide_character_constant(void) { - static char buf[MB_LEN_MAX + 1]; - size_t n, nmax; - int c; - wchar_t wc; + char buf[MB_LEN_MAX + 1]; + size_t nmax = MB_CUR_MAX; - nmax = MB_CUR_MAX; - - n = 0; + int64_t c; + size_t n = 0; while ((c = get_escaped_char('\'', true)) >= 0) { if (n < nmax) buf[n] = (char)c; n++; } - wc = 0; - + wchar_t wc = 0; if (c == -2) { /* unterminated character constant */ error(253); @@ -1255,7 +1249,7 @@ lex_string(void) buffer *buf = xcalloc(1, sizeof(*buf)); buf_init(buf); - int c; + int64_t c; while ((c = get_escaped_char('"', false)) >= 0) buf_add_char(buf, (char)c); if (c == -2) @@ -1289,7 +1283,7 @@ wide_length(const buffer *buf) int lex_wide_string(void) { - int c; + int64_t c; buffer buf; buf_init();
CVS commit: src
Module Name:src Committed By: rillig Date: Sat Feb 3 18:58:05 UTC 2024 Modified Files: src/tests/usr.bin/xlint/lint1: msg_075.c src/usr.bin/xlint/lint1: lex.c Log Message: lint: allow hexadecimal character escapes up to UINT_MAX Previously, any value larger than INT_MAX was regarded as negative and thus terminated the loop around get_escaped_char. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/xlint/lint1/msg_075.c cvs rdiff -u -r1.210 -r1.211 src/usr.bin/xlint/lint1/lex.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 18:45:50 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: need the new args pointer... To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/fs/cd9660/cd9660_vfsops.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/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.101 src/sys/fs/cd9660/cd9660_vfsops.c:1.102 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.101 Sat Feb 3 13:44:43 2024 +++ src/sys/fs/cd9660/cd9660_vfsops.c Sat Feb 3 13:45:50 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.101 2024/02/03 18:44:43 christos Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.102 2024/02/03 18:45:50 christos Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.101 2024/02/03 18:44:43 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.102 2024/02/03 18:45:50 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -251,9 +251,9 @@ cd9660_mount(struct mount *mp, const cha if (*data_len == OSIZE) { memcpy(, args, OSIZE); + args = args->uid = args->gid = 0; args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; - args = } if ((mp->mnt_flag & MNT_RDONLY) == 0)
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 18:45:50 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: need the new args pointer... To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/fs/cd9660/cd9660_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
Oh, I fixed GETARGS, but not UPDATE... How about now? christos > On Feb 3, 2024, at 12:48 PM, J. Hannken-Illjes wrote: > >> On 3. Feb 2024, at 18:38, Christos Zoulas wrote: >> >> Fixed, thanks. > > Not really, with "struct iso_args *args = data" you cannot set fields > beyond "datalen" here and the MNT_UPDATE case is still missing. > > -- > J. Hannken-Illjes - hann...@mailbox.org
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 18:44:43 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: fix MNT_UPDATE (thanks hannken) To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/fs/cd9660/cd9660_vfsops.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/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.100 src/sys/fs/cd9660/cd9660_vfsops.c:1.101 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.100 Sat Feb 3 12:38:22 2024 +++ src/sys/fs/cd9660/cd9660_vfsops.c Sat Feb 3 13:44:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.100 2024/02/03 17:38:22 christos Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.101 2024/02/03 18:44:43 christos Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.100 2024/02/03 17:38:22 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.101 2024/02/03 18:44:43 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -222,18 +222,14 @@ cd9660_mount(struct mount *mp, const cha { struct lwp *l = curlwp; struct vnode *devvp; - struct iso_args *args = data; + struct iso_args aa, *args = data; int error; struct iso_mnt *imp = VFSTOISOFS(mp); if (args == NULL) return EINVAL; - if (*data_len == OSIZE) { - args->uid = 0; - args->gid = 0; - args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; - } else if (*data_len < sizeof(*args)) + if (*data_len != OSIZE && *data_len < sizeof(*args)) return EINVAL; if (mp->mnt_flag & MNT_GETARGS) { @@ -253,8 +249,15 @@ cd9660_mount(struct mount *mp, const cha return 0; } + if (*data_len == OSIZE) { + memcpy(, args, OSIZE); + args->uid = args->gid = 0; + args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; + args = + } + if ((mp->mnt_flag & MNT_RDONLY) == 0) - return (EROFS); + return EROFS; if ((mp->mnt_flag & MNT_UPDATE) && args->fspec == NULL) return EINVAL; @@ -264,9 +267,9 @@ cd9660_mount(struct mount *mp, const cha * and verify that it refers to a sensible block device. */ error = namei_simple_user(args->fspec, -NSM_FOLLOW_NOEMULROOT, ); + NSM_FOLLOW_NOEMULROOT, ); if (error != 0) - return (error); + return error; if (devvp->v_type != VBLK) { vrele(devvp); @@ -314,7 +317,7 @@ cd9660_mount(struct mount *mp, const cha fail: VOP_UNLOCK(devvp); vrele(devvp); - return (error); + return error; } /*
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 18:44:43 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: fix MNT_UPDATE (thanks hannken) To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/fs/cd9660/cd9660_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
> On 3. Feb 2024, at 18:38, Christos Zoulas wrote: > > Fixed, thanks. Not really, with "struct iso_args *args = data" you cannot set fields beyond "datalen" here and the MNT_UPDATE case is still missing. -- J. Hannken-Illjes - hann...@mailbox.org
Re: CVS commit: src
Fixed, thanks. christos
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 17:38:22 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: Provide backwards compatibility (pointed out by hannken) To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/fs/cd9660/cd9660_vfsops.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/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.99 src/sys/fs/cd9660/cd9660_vfsops.c:1.100 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.99 Sat Feb 3 10:26:35 2024 +++ src/sys/fs/cd9660/cd9660_vfsops.c Sat Feb 3 12:38:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.99 2024/02/03 15:26:35 hannken Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.100 2024/02/03 17:38:22 christos Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.99 2024/02/03 15:26:35 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.100 2024/02/03 17:38:22 christos Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -192,8 +192,7 @@ cd9660_mountroot(void) } args.flags = ISOFSMNT_ROOT; - args.fmask = S_IRWXU|S_IRWXG|S_IRWXO; - args.dmask = S_IRWXU|S_IRWXG|S_IRWXO; + args.fmask = args.dmask = S_IRWXU|S_IRWXG|S_IRWXO; if ((error = iso_mountfs(rootvp, mp, l, )) != 0) { vfs_unbusy(mp); vfs_rele(mp); @@ -205,11 +204,19 @@ cd9660_mountroot(void) return (0); } +/* Compat with pre uid/gid/fsize/dsize mount call */ +#define OSIZE sizeof(struct { \ + const char *fspec; \ + struct export_args30 _pad1; \ + int flags; \ +}) + /* * VFS Operations. * * mount system call */ + int cd9660_mount(struct mount *mp, const char *path, void *data, size_t *data_len) { @@ -221,15 +228,28 @@ cd9660_mount(struct mount *mp, const cha if (args == NULL) return EINVAL; - if (*data_len < sizeof *args) + + if (*data_len == OSIZE) { + args->uid = 0; + args->gid = 0; + args->fmask = args->dmask = S_IRWXU|S_IRWXG|S_IRWXO; + } else if (*data_len < sizeof(*args)) return EINVAL; if (mp->mnt_flag & MNT_GETARGS) { if (imp == NULL) return EIO; + args->fspec = NULL; args->flags = imp->im_flags; - *data_len = sizeof (*args); + if (*data_len == OSIZE) + return 0; + + args->uid = imp->im_uid; + args->gid = imp->im_gid; + args->fmask = imp->im_fmask; + args->dmask = imp->im_dmask; + *data_len = sizeof(*args); return 0; }
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: christos Date: Sat Feb 3 17:38:22 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: Provide backwards compatibility (pointed out by hannken) To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/fs/cd9660/cd9660_vfsops.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/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:35:10 UTC 2024 Modified Files: src/sys/arch/vax/vsa: smg.c Log Message: Misc cleanup. - move function declarations after struct declarations and before global variables - sort function declarations per actual implementation - some KNF No functional change. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/vax/vsa/smg.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/vax/vsa/smg.c diff -u src/sys/arch/vax/vsa/smg.c:1.66 src/sys/arch/vax/vsa/smg.c:1.67 --- src/sys/arch/vax/vsa/smg.c:1.66 Thu Jan 25 19:12:49 2024 +++ src/sys/arch/vax/vsa/smg.c Sat Feb 3 16:35:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: smg.c,v 1.66 2024/01/25 19:12:49 tsutsui Exp $ */ +/* $NetBSD: smg.c,v 1.67 2024/02/03 16:35:10 tsutsui Exp $ */ /* $OpenBSD: smg.c,v 1.28 2014/12/23 21:39:12 miod Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.66 2024/01/25 19:12:49 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.67 2024/02/03 16:35:10 tsutsui Exp $"); #include "dzkbd.h" #include "wsdisplay.h" @@ -153,9 +153,6 @@ __KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.66 #define CUR_XBIAS 216 /* Add to cursor position */ #define CUR_YBIAS 33 -static int smg_match(device_t, cfdata_t, void *); -static void smg_attach(device_t, device_t, void *); - struct smg_screen { struct rasops_info ss_ri; uint8_t *ss_addr; /* frame buffer address */ @@ -166,15 +163,39 @@ struct smg_screen { uint16_t ss_curmask[PCC_CURSOR_SIZE]; }; -/* for console */ -static struct smg_screen smg_consscr; - struct smg_softc { device_t sc_dev; struct smg_screen *sc_scr; int sc_nscreens; }; +static int smg_match(device_t, cfdata_t, void *); +static void smg_attach(device_t, device_t, void *); + +static int smg_setup_screen(struct smg_screen *); + +static int smg_ioctl(void *, void *, u_long, void *, int, struct lwp *); +static paddr_t smg_mmap(void *, void *, off_t, int); +static int smg_alloc_screen(void *, const struct wsscreen_descr *, +void **, int *, int *, long *); +static void smg_free_screen(void *, void *); +static int smg_show_screen(void *, void *, int, void (*) (void *, int, int), +void *); + +static int smg_getcursor(struct smg_screen *, struct wsdisplay_cursor *); +static int smg_setcursor(struct smg_screen *, struct wsdisplay_cursor *); +static void smg_updatecursor(struct smg_screen *, u_int); + +static void smg_putchar(void *, int, int, u_int, long); +static void smg_cursor(void *, int, int, int); +static void smg_blockmove(struct rasops_info *, u_int, u_int, u_int, u_int, +u_int, int); +static void smg_copycols(void *, int, int, int, int); +static void smg_erasecols(void *, int, int, int, long); + +/* for console */ +static struct smg_screen smg_consscr; + CFATTACH_DECL_NEW(smg, sizeof(struct smg_softc), smg_match, smg_attach, NULL, NULL); @@ -191,14 +212,6 @@ static const struct wsscreen_list smg_sc .screens = _smg_scrlist, }; -static int smg_ioctl(void *, void *, u_long, void *, int, struct lwp *); -static paddr_t smg_mmap(void *, void *, off_t, int); -static int smg_alloc_screen(void *, const struct wsscreen_descr *, -void **, int *, int *, long *); -static void smg_free_screen(void *, void *); -static int smg_show_screen(void *, void *, int, void (*) (void *, int, int), -void *); - static const struct wsdisplay_accessops smg_accessops = { .ioctl = smg_ioctl, .mmap = smg_mmap, @@ -208,18 +221,6 @@ static const struct wsdisplay_accessops .load_font = NULL }; -static void smg_putchar(void *, int, int, u_int, long); -static void smg_cursor(void *, int, int, int); -static void smg_blockmove(struct rasops_info *, u_int, u_int, u_int, u_int, -u_int, int); -static void smg_copycols(void *, int, int, int, int); -static void smg_erasecols(void *, int, int, int, long); - -static int smg_getcursor(struct smg_screen *, struct wsdisplay_cursor *); -static int smg_setup_screen(struct smg_screen *); -static int smg_setcursor(struct smg_screen *, struct wsdisplay_cursor *); -static void smg_updatecursor(struct smg_screen *, u_int); - static int smg_match(device_t parent, cfdata_t cf, void *aux) { @@ -843,7 +844,8 @@ smg_blockmove(struct rasops_info *ri, u_ if (startmask) { getandputrop(psrc, (sx & ALIGNMASK), - (dx & ALIGNMASK), nstart, pdst, rop); + (dx & ALIGNMASK), nstart, pdst, + rop); pdst++; if (srcStartOver) psrc++;
CVS commit: src/sys/arch/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:35:10 UTC 2024 Modified Files: src/sys/arch/vax/vsa: smg.c Log Message: Misc cleanup. - move function declarations after struct declarations and before global variables - sort function declarations per actual implementation - some KNF No functional change. To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/vax/vsa/smg.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/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:21:25 UTC 2024 Modified Files: src/sys/arch/vax/vsa: gpx.c Log Message: Make local variables static. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/vax/vsa/gpx.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/vax/vsa/gpx.c diff -u src/sys/arch/vax/vsa/gpx.c:1.2 src/sys/arch/vax/vsa/gpx.c:1.3 --- src/sys/arch/vax/vsa/gpx.c:1.2 Sat Feb 3 16:18:10 2024 +++ src/sys/arch/vax/vsa/gpx.c Sat Feb 3 16:21:25 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gpx.c,v 1.2 2024/02/03 16:18:10 tsutsui Exp $ */ +/* $NetBSD: gpx.c,v 1.3 2024/02/03 16:21:25 tsutsui Exp $ */ /* $OpenBSD: gpx.c,v 1.25 2014/12/23 21:39:12 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. @@ -230,25 +230,25 @@ static void gpx_loadcmap(struct gpx_scre static void gpx_resetcmap(struct gpx_screen *); /* for console */ -struct gpx_screen gpx_consscr; +static struct gpx_screen gpx_consscr; CFATTACH_DECL_NEW(gpx, sizeof(struct gpx_softc), gpx_match, gpx_attach, NULL, NULL); -struct wsscreen_descr gpx_stdscreen = { +static struct wsscreen_descr gpx_stdscreen = { "std", }; -const struct wsscreen_descr *_gpx_scrlist[] = { +static const struct wsscreen_descr *_gpx_scrlist[] = { _stdscreen, }; -const struct wsscreen_list gpx_screenlist = { +static const struct wsscreen_list gpx_screenlist = { sizeof(_gpx_scrlist) / sizeof(struct wsscreen_descr *), _gpx_scrlist, }; -const struct wsdisplay_accessops gpx_accessops = { +static const struct wsdisplay_accessops gpx_accessops = { .ioctl = gpx_ioctl, .mmap = gpx_mmap, .alloc_screen = gpx_alloc_screen,
CVS commit: src/sys/arch/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:21:25 UTC 2024 Modified Files: src/sys/arch/vax/vsa: gpx.c Log Message: Make local variables static. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/vax/vsa/gpx.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/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:18:10 UTC 2024 Modified Files: src/sys/arch/vax/vsa: gpx.c Log Message: Misc cleanup. - move function declarations after struct declarations and before global variables - sort function declarations per actual implementation - explicitly denote 'static' for static functions - some KNF No functional change (though gcc generates different binary). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/vax/vsa/gpx.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/vax/vsa/gpx.c diff -u src/sys/arch/vax/vsa/gpx.c:1.1 src/sys/arch/vax/vsa/gpx.c:1.2 --- src/sys/arch/vax/vsa/gpx.c:1.1 Mon Feb 6 13:13:05 2023 +++ src/sys/arch/vax/vsa/gpx.c Sat Feb 3 16:18:10 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gpx.c,v 1.1 2023/02/06 13:13:05 tsutsui Exp $ */ +/* $NetBSD: gpx.c,v 1.2 2024/02/03 16:18:10 tsutsui Exp $ */ /* $OpenBSD: gpx.c,v 1.25 2014/12/23 21:39:12 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. @@ -178,9 +178,6 @@ struct ramdac8 { uint16_t omapdata; }; -static int gpx_match(device_t, cfdata_t, void *); -static void gpx_attach(device_t, device_t, void *); - struct gpx_screen { struct rasops_info ss_ri; int ss_console; @@ -195,15 +192,46 @@ struct gpx_screen { #endif }; -/* for console */ -struct gpx_screen gpx_consscr; - struct gpx_softc { device_t sc_dev; struct gpx_screen *sc_scr; int sc_nscreens; }; +static int gpx_match(device_t, cfdata_t, void *); +static void gpx_attach(device_t, device_t, void *); + +static int gpx_ioctl(void *, void *, u_long, void *, int, struct lwp *); +static paddr_t gpx_mmap(void *, void *, off_t, int); +static int gpx_alloc_screen(void *, const struct wsscreen_descr *, +void **, int *, int *, long *); +static void gpx_free_screen(void *, void *); +static int gpx_show_screen(void *, void *, int, +void (*) (void *, int, int), void *); + +static void gpx_putchar(void *, int, int, u_int, long); +static void gpx_copycols(void *, int, int, int, int); +static void gpx_erasecols(void *, int, int, int, long); +static void gpx_copyrows(void *, int, int, int); +static void gpx_eraserows(void *, int, int, long); +static void gpx_do_cursor(struct rasops_info *); + +static int gpx_wait(struct gpx_screen *, int); +static int gpx_viper_write(struct gpx_screen *, u_int, uint16_t); +static void gpx_reset_viper(struct gpx_screen *); +static void gpx_clear_screen(struct gpx_screen *); +static int gpx_setup_screen(struct gpx_screen *); +static void gpx_upload_font(struct gpx_screen *); +static void gpx_copyrect(struct gpx_screen *, int, int, int, int, int, int); +static void gpx_fillrect(struct gpx_screen *, int, int, int, int, long, u_int); +static int gpx_getcmap(struct gpx_screen *, struct wsdisplay_cmap *); +static int gpx_putcmap(struct gpx_screen *, struct wsdisplay_cmap *); +static void gpx_loadcmap(struct gpx_screen *, int, int); +static void gpx_resetcmap(struct gpx_screen *); + +/* for console */ +struct gpx_screen gpx_consscr; + CFATTACH_DECL_NEW(gpx, sizeof(struct gpx_softc), gpx_match, gpx_attach, NULL, NULL); @@ -220,14 +248,6 @@ const struct wsscreen_list gpx_screenlis _gpx_scrlist, }; -static int gpx_ioctl(void *, void *, u_long, void *, int, struct lwp *); -static paddr_t gpx_mmap(void *, void *, off_t, int); -static int gpx_alloc_screen(void *, const struct wsscreen_descr *, -void **, int *, int *, long *); -static void gpx_free_screen(void *, void *); -static int gpx_show_screen(void *, void *, int, -void (*) (void *, int, int), void *); - const struct wsdisplay_accessops gpx_accessops = { .ioctl = gpx_ioctl, .mmap = gpx_mmap, @@ -237,31 +257,11 @@ const struct wsdisplay_accessops gpx_acc .load_font = NULL }; -static void gpx_clear_screen(struct gpx_screen *); -static void gpx_copyrect(struct gpx_screen *, int, int, int, int, int, int); -static void gpx_fillrect(struct gpx_screen *, int, int, int, int, long, u_int); -static int gpx_getcmap(struct gpx_screen *, struct wsdisplay_cmap *); -static void gpx_loadcmap(struct gpx_screen *, int, int); -static int gpx_putcmap(struct gpx_screen *, struct wsdisplay_cmap *); -static void gpx_resetcmap(struct gpx_screen *); -static void gpx_reset_viper(struct gpx_screen *); -static int gpx_setup_screen(struct gpx_screen *); -static void gpx_upload_font(struct gpx_screen *); -static int gpx_viper_write(struct gpx_screen *, u_int, uint16_t); -static int gpx_wait(struct gpx_screen *, int); - -static void gpx_copycols(void *, int, int, int, int); -static void gpx_copyrows(void *, int, int, int); -static void gpx_do_cursor(struct rasops_info *); -static void gpx_erasecols(void *, int, int, int, long); -static void gpx_eraserows(void *, int, int, long); -static void gpx_putchar(void *, int, int, u_int, long); - /* * Autoconf glue */ -int +static int gpx_match(device_t
CVS commit: src/sys/arch/vax/vsa
Module Name:src Committed By: tsutsui Date: Sat Feb 3 16:18:10 UTC 2024 Modified Files: src/sys/arch/vax/vsa: gpx.c Log Message: Misc cleanup. - move function declarations after struct declarations and before global variables - sort function declarations per actual implementation - explicitly denote 'static' for static functions - some KNF No functional change (though gcc generates different binary). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/vax/vsa/gpx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sbin/mount_cd9660
Module Name:src Committed By: wiz Date: Sat Feb 3 15:47:44 UTC 2024 Modified Files: src/sbin/mount_cd9660: mount_cd9660.c Log Message: sync usage with man page To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sbin/mount_cd9660/mount_cd9660.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount_cd9660/mount_cd9660.c diff -u src/sbin/mount_cd9660/mount_cd9660.c:1.34 src/sbin/mount_cd9660/mount_cd9660.c:1.35 --- src/sbin/mount_cd9660/mount_cd9660.c:1.34 Fri Feb 2 20:27:26 2024 +++ src/sbin/mount_cd9660/mount_cd9660.c Sat Feb 3 15:47:44 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: mount_cd9660.c,v 1.34 2024/02/02 20:27:26 christos Exp $ */ +/* $NetBSD: mount_cd9660.c,v 1.35 2024/02/03 15:47:44 wiz Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95"; #else -__RCSID("$NetBSD: mount_cd9660.c,v 1.34 2024/02/02 20:27:26 christos Exp $"); +__RCSID("$NetBSD: mount_cd9660.c,v 1.35 2024/02/03 15:47:44 wiz Exp $"); #endif #endif /* not lint */ @@ -228,6 +228,6 @@ static void usage(void) { (void)fprintf(stderr, - "usage: %s [-o options] special node\n", getprogname()); + "usage: %s [-G gid] [-M mask] [-m mask] [-o options] [-U uid] special node\n", getprogname()); exit(1); }
CVS commit: src/sbin/mount_cd9660
Module Name:src Committed By: wiz Date: Sat Feb 3 15:47:44 UTC 2024 Modified Files: src/sbin/mount_cd9660: mount_cd9660.c Log Message: sync usage with man page To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sbin/mount_cd9660/mount_cd9660.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src
> On 2. Feb 2024, at 21:27, Christos Zoulas wrote: > > Module Name: src > Committed By: christos > Date: Fri Feb 2 20:27:26 UTC 2024 > > Modified Files: > src/sbin/mount_cd9660: Makefile mount_cd9660.8 mount_cd9660.c > src/sys/fs/cd9660: cd9660_extern.h cd9660_mount.h cd9660_vfsops.c >cd9660_vnops.c > > Log Message: > PR/57897: Ricardo Branco: Add support for mount options mask,dirmask,uid,gid > > > To generate a diff of this commit: > cvs rdiff -u -r1.12 -r1.13 src/sbin/mount_cd9660/Makefile > cvs rdiff -u -r1.31 -r1.32 src/sbin/mount_cd9660/mount_cd9660.8 > cvs rdiff -u -r1.33 -r1.34 src/sbin/mount_cd9660/mount_cd9660.c > cvs rdiff -u -r1.27 -r1.28 src/sys/fs/cd9660/cd9660_extern.h > cvs rdiff -u -r1.6 -r1.7 src/sys/fs/cd9660/cd9660_mount.h > cvs rdiff -u -r1.97 -r1.98 src/sys/fs/cd9660/cd9660_vfsops.c > cvs rdiff -u -r1.62 -r1.63 src/sys/fs/cd9660/cd9660_vnops.c First, this is not backwards compatible. An old mount_cd9660 and a new kernel will always return EINVAL as the argument length check on top of cd9660_mount() fires. Second, with these new mount arguments an update mount has to update the masks and ids, currently they are silently ignored. -- J. Hannken-Illjes - hann...@mailbox.org
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 15:28:01 UTC 2024 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Tickets #557 - #569, #571 - #574, #576 - #579 To generate a diff of this commit: cvs rdiff -u -r1.1.2.190 -r1.1.2.191 src/doc/CHANGES-10.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-10.0 diff -u src/doc/CHANGES-10.0:1.1.2.190 src/doc/CHANGES-10.0:1.1.2.191 --- src/doc/CHANGES-10.0:1.1.2.190 Tue Jan 16 08:28:51 2024 +++ src/doc/CHANGES-10.0 Sat Feb 3 15:28:00 2024 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-10.0,v 1.1.2.190 2024/01/16 08:28:51 martin Exp $ +# $NetBSD: CHANGES-10.0,v 1.1.2.191 2024/02/03 15:28:00 martin Exp $ A complete list of changes from the initial NetBSD 10.0 branch on 2022-12-16 until the 10.0 release: @@ -15240,3 +15240,206 @@ external/gpl2/groff/tmac/mdoc.local (ma sys/sys/param.h (manually edited) Welcome to 10.0_RC3 + +sys/arch/vax/conf/files.vax 1.127 + + vax: fix silent boot failure on VS3100 with smg(4) framebuffer + console. + [tsutsui, ticket #557] + +sys/arch/macppc/conf/GENERIC 1.378 + + macppc: enable FFS_EI in GENERIC. + [uwe, ticket #558] + +sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_mman.c 1.22 +sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_pages.c 1.7 +sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_phys.c 1.9 +sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_region.c 1.5,1.6 +sys/external/bsd/drm2/dist/drm/i915/gem/i915_gem_stolen.c 1.6,1.7 + + i915: Fix various bugs in setup of the page arrays of several kinds + of i915 GEM objects, used for userland mapping of the objects. + [riastradh, ticket #559] + +sys/dev/pci/pcidevs1.1499-1.1502 +sys/dev/pci/pcidevs.h(regen) +sys/dev/pci/pcidevs_data.h (regen) + + - Add some newer Areca boards. + - Update Intel Raptor Lake devices. + - Add Intel C26[26] eSPI. + - Add Intel I219-LM20, LM21, V20 and V21. + [msaitoh, ticket #560] + +distrib/utils/embedded/conf/evbppc.conf 1.1 +distrib/utils/embedded/conf/wii.conf 1.1-1.3 +distrib/utils/embedded/files/evbppc_wii_icon.png 1.1 +distrib/utils/embedded/files/evbppc_wii_meta.xml 1.1,1.2 +distrib/utils/embedded/mkimage 1.79 +etc/etc.evbppc/Makefile.inc 1.15 +etc/etc.evbppc/ttys1.8 +sys/arch/evbppc/conf/INSTALL_WII 1.1 +sys/arch/evbppc/conf/Makefile.wii.inc 1.1,1.2 +sys/arch/evbppc/conf/WII 1.1-1.4 +sys/arch/evbppc/conf/files.wii 1.1-1.4 +sys/arch/evbppc/conf/std.wii 1.1-1.3 +sys/arch/evbppc/include/wii.h 1.1-1.7 +sys/arch/evbppc/wii/autoconf.c 1.1,1.2 +sys/arch/evbppc/wii/dev/avenc.c 1.1 +sys/arch/evbppc/wii/dev/avenc.h 1.1 +sys/arch/evbppc/wii/dev/bwai.c 1.1,1.3 +sys/arch/evbppc/wii/dev/bwai.h 1.1 +sys/arch/evbppc/wii/dev/bwdsp.c 1.1,1.2 +sys/arch/evbppc/wii/dev/ehci_hollywood.c 1.1,1.2 +sys/arch/evbppc/wii/dev/exi.c 1.1 +sys/arch/evbppc/wii/dev/exi.h 1.1 +sys/arch/evbppc/wii/dev/hollywood.c 1.1,1.2 +sys/arch/evbppc/wii/dev/hollywood.h 1.1,1.2 +sys/arch/evbppc/wii/dev/hwgpio.c 1.1 +sys/arch/evbppc/wii/dev/mainbus.h 1.1 +sys/arch/evbppc/wii/dev/ohci_hollywood.c 1.1,1.2 +sys/arch/evbppc/wii/dev/resetbtn.c 1.1,1.2 +sys/arch/evbppc/wii/dev/rtcsram.c 1.1 +sys/arch/evbppc/wii/dev/sdhc_hollywood.c 1.1,1.2 +sys/arch/evbppc/wii/dev/viio.h 1.1 +sys/arch/evbppc/wii/dev/vireg.h 1.1,1.2 +sys/arch/evbppc/wii/dev/wiifb.c 1.1-1.5 +sys/arch/evbppc/wii/machdep.c 1.1-1.4 +sys/arch/evbppc/wii/mainbus.c 1.1-1.3 +sys/arch/evbppc/wii/pic_pi.c 1.1 +sys/arch/evbppc/wii/wii_locore.S 1.1,1.2 +sys/arch/evbppc/wii/wii_mmuinit.S 1.1 +sys/arch/powerpc/include/oea/hid.h 1.14 +sys/arch/powerpc/oea/cpu_subr.c 1.109 +sys/arch/powerpc/oea/oea_machdep.c 1.85 +sys/arch/powerpc/powerpc/clock.c 1.18 +sys/dev/sdmmc/sdhc.c1.118 +sys/dev/sdmmc/sdhcvar.h1.34 +sys/dev/usb/ehcivar.h1.52 +sys/dev/usb/usb.h1.124 +sys/dev/wscons/wsconsio.h 1.127 +sys/dev/wsfb/genfb.c1.91 +usr.sbin/sysinst/arch/evbppc/md.c 1.11 +usr.sbin/sysinst/arch/evbppc/md.h 1.4 + + evbppc: add support for Nintendo Wii. + [jmcneill, ticket #561] + +xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb.h 1.11 +xserc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c 1.48 + + xf86-video-wsfb: Add support for Nintendo Wii + [jmcneill, ticket #562] + +sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 +sys/dev/pci/ixgbe/ixgbe.c 1.345,1.346,1.348 +sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 +sys/dev/pci/ixgbe/ixgbe_type.h 1.62 +sys/dev/pci/ixgbe/ixv.c 1.193,1.195,1.196 + + - Clear the WTHRESH bit field before writing it. + - Optimize ixgbe_txeof(). + - Use kmem_zalloc() instead of malloc(,M_ZERO). + - No functional change: + - Move assignment of TXD. + - ixv(4): Remove unused IFF_OACTIVE. + - Don't include the Flow Director related members to reduce the + size of struct tx_ring. On amd64 and aarch64, the real size is + not changed because of the alignment. + - The descriptor
CVS commit: [netbsd-10] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 15:28:01 UTC 2024 Modified Files: src/doc [netbsd-10]: CHANGES-10.0 Log Message: Tickets #557 - #569, #571 - #574, #576 - #579 To generate a diff of this commit: cvs rdiff -u -r1.1.2.190 -r1.1.2.191 src/doc/CHANGES-10.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: hannken Date: Sat Feb 3 15:26:35 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: cd9660_mountroot: must initialize new args "fmask" and "dmask". To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/fs/cd9660/cd9660_vfsops.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/fs/cd9660/cd9660_vfsops.c diff -u src/sys/fs/cd9660/cd9660_vfsops.c:1.98 src/sys/fs/cd9660/cd9660_vfsops.c:1.99 --- src/sys/fs/cd9660/cd9660_vfsops.c:1.98 Fri Feb 2 20:27:26 2024 +++ src/sys/fs/cd9660/cd9660_vfsops.c Sat Feb 3 15:26:35 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vfsops.c,v 1.98 2024/02/02 20:27:26 christos Exp $ */ +/* $NetBSD: cd9660_vfsops.c,v 1.99 2024/02/03 15:26:35 hannken Exp $ */ /*- * Copyright (c) 1994 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.98 2024/02/02 20:27:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.99 2024/02/03 15:26:35 hannken Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -192,6 +192,8 @@ cd9660_mountroot(void) } args.flags = ISOFSMNT_ROOT; + args.fmask = S_IRWXU|S_IRWXG|S_IRWXO; + args.dmask = S_IRWXU|S_IRWXG|S_IRWXO; if ((error = iso_mountfs(rootvp, mp, l, )) != 0) { vfs_unbusy(mp); vfs_rele(mp);
CVS commit: src/sys/fs/cd9660
Module Name:src Committed By: hannken Date: Sat Feb 3 15:26:35 UTC 2024 Modified Files: src/sys/fs/cd9660: cd9660_vfsops.c Log Message: cd9660_mountroot: must initialize new args "fmask" and "dmask". To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/fs/cd9660/cd9660_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/etc/etc.vax
Module Name:src Committed By: martin Date: Sat Feb 3 14:34:45 UTC 2024 Modified Files: src/etc/etc.vax [netbsd-10]: ttys Log Message: Pull up following revision(s) (requested by tsutsui in ticket #579): etc/etc.vax/ttys: revision 1.11 Use "wsvt25" rather than "sun" for (commented out) wscons tty lines. Note historically vax port seems to use "ttyw?" rather than common "ttyE?" for wscons (wsdisplay) tty devices in ttys(5). No particular comment on port-vax@: https://mail-index.netbsd.org/port-vax/2024/01/thread1.html#004828 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.8.1 src/etc/etc.vax/ttys Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.vax/ttys diff -u src/etc/etc.vax/ttys:1.10 src/etc/etc.vax/ttys:1.10.8.1 --- src/etc/etc.vax/ttys:1.10 Wed Sep 25 23:09:24 2019 +++ src/etc/etc.vax/ttys Sat Feb 3 14:34:44 2024 @@ -1,4 +1,4 @@ -# $NetBSD: ttys,v 1.10 2019/09/25 23:09:24 abs Exp $ +# $NetBSD: ttys,v 1.10.8.1 2024/02/03 14:34:44 martin Exp $ # # @(#)ttys 5.2 (Berkeley) 6/10/93 # @@ -10,14 +10,14 @@ console "/usr/libexec/getty std.9600" un constty "/usr/libexec/getty std.9600" unknown on secure # Virtual terminals on VS3100 with "glass tty" -#ttyw0 "/usr/libexec/getty std.9600" sun on secure -#ttyw1 "/usr/libexec/getty std.9600" sun on secure -#ttyw2 "/usr/libexec/getty std.9600" sun on secure -#ttyw3 "/usr/libexec/getty std.9600" sun on secure -#ttyw4 "/usr/libexec/getty std.9600" sun on secure -#ttyw5 "/usr/libexec/getty std.9600" sun on secure -#ttyw6 "/usr/libexec/getty std.9600" sun on secure -#ttyw7 "/usr/libexec/getty std.9600" sun on secure +#ttyw0 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw1 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw2 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw3 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw4 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw5 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw6 "/usr/libexec/getty std.9600" wsvt25 on secure +#ttyw7 "/usr/libexec/getty std.9600" wsvt25 on secure # DZ-11 lines, not frobbed by getty (keyboard/mouse may be sad) #tty00 "/usr/libexec/getty std.9600" unknown off secure
CVS commit: [netbsd-10] src/etc/etc.vax
Module Name:src Committed By: martin Date: Sat Feb 3 14:34:45 UTC 2024 Modified Files: src/etc/etc.vax [netbsd-10]: ttys Log Message: Pull up following revision(s) (requested by tsutsui in ticket #579): etc/etc.vax/ttys: revision 1.11 Use "wsvt25" rather than "sun" for (commented out) wscons tty lines. Note historically vax port seems to use "ttyw?" rather than common "ttyE?" for wscons (wsdisplay) tty devices in ttys(5). No particular comment on port-vax@: https://mail-index.netbsd.org/port-vax/2024/01/thread1.html#004828 To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.8.1 src/etc/etc.vax/ttys Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/etc/etc.vax
Module Name:src Committed By: martin Date: Sat Feb 3 14:33:15 UTC 2024 Modified Files: src/etc/etc.vax [netbsd-10]: MAKEDEV.conf Log Message: Pull up following revision(s) (requested by tsutsui in ticket #578): etc/etc.vax/MAKEDEV.conf: revision 1.20 Make sure to create wscons devices on the default "MAKEDEV all" target. Necessary to make the X.org server work on the default installation. Proposed on port-vax@, and ok'ed by mrg@: https://mail-index.netbsd.org/port-vax/2024/01/thread1.html#004828 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.16.1 src/etc/etc.vax/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.vax/MAKEDEV.conf diff -u src/etc/etc.vax/MAKEDEV.conf:1.19 src/etc/etc.vax/MAKEDEV.conf:1.19.16.1 --- src/etc/etc.vax/MAKEDEV.conf:1.19 Thu Jun 22 17:51:22 2017 +++ src/etc/etc.vax/MAKEDEV.conf Sat Feb 3 14:33:15 2024 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.19 2017/06/22 17:51:22 flxd Exp $ +# $NetBSD: MAKEDEV.conf,v 1.19.16.1 2024/02/03 14:33:15 martin Exp $ all_md) makedev mt0 mt1 ts0 ts1 st0 st1 uk0 ss0 cd0 vt0 @@ -9,6 +9,7 @@ all_md) makedev audio speaker makedev usbs makedev std_vax + makedev wscons ;; ramdisk)
CVS commit: [netbsd-10] src/etc/etc.vax
Module Name:src Committed By: martin Date: Sat Feb 3 14:33:15 UTC 2024 Modified Files: src/etc/etc.vax [netbsd-10]: MAKEDEV.conf Log Message: Pull up following revision(s) (requested by tsutsui in ticket #578): etc/etc.vax/MAKEDEV.conf: revision 1.20 Make sure to create wscons devices on the default "MAKEDEV all" target. Necessary to make the X.org server work on the default installation. Proposed on port-vax@, and ok'ed by mrg@: https://mail-index.netbsd.org/port-vax/2024/01/thread1.html#004828 To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.19.16.1 src/etc/etc.vax/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/bin/sh
Module Name:src Committed By: martin Date: Sat Feb 3 14:31:38 UTC 2024 Modified Files: src/bin/sh [netbsd-10]: jobs.c Log Message: Pull up following revision(s) (requested by kre in ticket #577): bin/sh/jobs.c: revision 1.119 PR bin/57894 For jobs -p for a non-job-control job, avoid just printing 0 (as there is no process group pid) and instead output what we used to, the pid of one of the processes in the job (usually the right one!) To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.117.2.1 src/bin/sh/jobs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/bin/sh/jobs.c diff -u src/bin/sh/jobs.c:1.117 src/bin/sh/jobs.c:1.117.2.1 --- src/bin/sh/jobs.c:1.117 Sun Oct 30 01:46:16 2022 +++ src/bin/sh/jobs.c Sat Feb 3 14:31:38 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.117 2022/10/30 01:46:16 kre Exp $ */ +/* $NetBSD: jobs.c,v 1.117.2.1 2024/02/03 14:31:38 martin Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)jobs.c 8.5 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: jobs.c,v 1.117 2022/10/30 01:46:16 kre Exp $"); +__RCSID("$NetBSD: jobs.c,v 1.117.2.1 2024/02/03 14:31:38 martin Exp $"); #endif #endif /* not lint */ @@ -439,7 +439,8 @@ showjob(struct output *out, struct job * #if JOBS if (mode & SHOW_PGID) { /* output only the process group ID (lead process ID) */ - outfmt(out, "%ld\n", (long)jp->pgrp); + outfmt(out, "%ld\n", + jp->pgrp != 0 ? (long)jp->pgrp : (long)jp->ps->pid); return; } #endif
CVS commit: [netbsd-10] src/bin/sh
Module Name:src Committed By: martin Date: Sat Feb 3 14:31:38 UTC 2024 Modified Files: src/bin/sh [netbsd-10]: jobs.c Log Message: Pull up following revision(s) (requested by kre in ticket #577): bin/sh/jobs.c: revision 1.119 PR bin/57894 For jobs -p for a non-job-control job, avoid just printing 0 (as there is no process group pid) and instead output what we used to, the pid of one of the processes in the job (usually the right one!) To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.117.2.1 src/bin/sh/jobs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 14:28:16 UTC 2024 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Tickets #1931 - #1934 To generate a diff of this commit: cvs rdiff -u -r1.1.2.217 -r1.1.2.218 src/doc/CHANGES-8.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 14:28:16 UTC 2024 Modified Files: src/doc [netbsd-8]: CHANGES-8.3 Log Message: Tickets #1931 - #1934 To generate a diff of this commit: cvs rdiff -u -r1.1.2.217 -r1.1.2.218 src/doc/CHANGES-8.3 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-8.3 diff -u src/doc/CHANGES-8.3:1.1.2.217 src/doc/CHANGES-8.3:1.1.2.218 --- src/doc/CHANGES-8.3:1.1.2.217 Sun Jan 14 15:36:10 2024 +++ src/doc/CHANGES-8.3 Sat Feb 3 14:28:16 2024 @@ -1,4 +1,4 @@ -$NetBSD: CHANGES-8.3,v 1.1.2.217 2024/01/14 15:36:10 martin Exp $ +$NetBSD: CHANGES-8.3,v 1.1.2.218 2024/02/03 14:28:16 martin Exp $ A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3 release: @@ -4192,3 +4192,57 @@ external/bsd/iscsi/dist/src/lib/protocol logout decap. [riastradh, ticket #1930] +sys/dev/pci/pcidevs1.1477,1.1494,1.1498-1.1502 +sys/dev/pci/pcidevs.h(regen) +sys/dev/pci/pcidevs_data.h (regen) + + - Add EXAR XR17V354 PCIe UART. + - Add Mellanox ConnectX-6 Lx. + - Add some newer Areca boards. + - Update Intel Raptor Lake devices. + - Add Intel C26[26] eSPI. + - Add Intel I219-LM20, LM21, V20 and V21. + - Add Intel I225/I226 series devices. + [msaitoh, ticket #1931] + +sys/dev/pci/if_wm.c1.793 + + wm(4): add Intel I219-{LM,V}(20,21) support. + [msaitoh, ticket #1932] + +sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch +sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch +sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 +sys/dev/pci/ixgbe/ixgbe_type.h 1.62 +sys/dev/pci/ixgbe/ixv.c1.193,1.195-1.196 + + - Clear the WTHRESH bit field before writing it. + - Optimize ixgbe_txeof(). + - Use kmem_zalloc() instead of malloc(,M_ZERO). + - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. + - No functional change + - Move assignment of TXD. + - ixv(4): Remove unused IFF_OACTIVE. + - Don't include the Flow Director related members to reduce the + size of struct tx_ring. On amd64 and aarch64, the real size is + not changed because of the alignment. + - The descriptor ring size and the alignment are tested in the + attach function, so it's not required to use + roundup2(size, DBA_ALIGN). + - Use #ifdef LRO more to reduce the size of struct rx_ring. + - Change "me" from 32bit to 8bit because the max is 128. + This commit doesn't change the real size of ix_queue, tx_ring + and rx_ring because of the alignment. + - Th RSC (hardware receive side coalescing) feature has been + disabled all along, so enclose the code with #ifdef RSC. + - Remove unused. + - Modify for the readability. + - Modify comment. + - Fix comment. Whitespace. + [msaitoh, ticket #1933] + +sys/dev/hdaudio/hdafg.c1.29 + + hdaudio(4): PR 57890: fix crash on shutdown with record-only devices. + [riastradh, ticket #1934] +
CVS commit: [netbsd-8] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:27:05 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-8]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1934): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/dev/hdaudio/hdafg.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/hdaudio/hdafg.c diff -u src/sys/dev/hdaudio/hdafg.c:1.12.2.2 src/sys/dev/hdaudio/hdafg.c:1.12.2.3 --- src/sys/dev/hdaudio/hdafg.c:1.12.2.2 Tue Oct 9 10:09:51 2018 +++ src/sys/dev/hdaudio/hdafg.c Sat Feb 3 14:27:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.12.2.2 2018/10/09 10:09:51 martin Exp $ */ +/* $NetBSD: hdafg.c,v 1.12.2.3 2024/02/03 14:27:05 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.12.2.2 2018/10/09 10:09:51 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.12.2.3 2024/02/03 14:27:05 martin Exp $"); #include #include @@ -4224,9 +4224,12 @@ hdafg_freem(void *opaque, void *addr, si struct hdaudio_audiodev *ad = opaque; struct hdaudio_stream *st; - if (addr == DMA_KERNADDR(>ad_playback->st_data)) + if (ad == NULL) + return; + + if (ad->ad_playback != NULL && addr == DMA_KERNADDR(>ad_playback->st_data)) st = ad->ad_playback; - else if (addr == DMA_KERNADDR(>ad_capture->st_data)) + else if (ad->ad_capture != NULL && addr == DMA_KERNADDR(>ad_capture->st_data)) st = ad->ad_capture; else return;
CVS commit: [netbsd-8] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:27:05 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-8]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1934): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/dev/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 14:26:27 UTC 2024 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Tickets #1790-#1793, #1795 To generate a diff of this commit: cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/doc
Module Name:src Committed By: martin Date: Sat Feb 3 14:26:27 UTC 2024 Modified Files: src/doc [netbsd-9]: CHANGES-9.4 Log Message: Tickets #1790-#1793, #1795 To generate a diff of this commit: cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-9.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-9.4 diff -u src/doc/CHANGES-9.4:1.1.2.126 src/doc/CHANGES-9.4:1.1.2.127 --- src/doc/CHANGES-9.4:1.1.2.126 Sun Jan 14 15:34:17 2024 +++ src/doc/CHANGES-9.4 Sat Feb 3 14:26:27 2024 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-9.4,v 1.1.2.126 2024/01/14 15:34:17 martin Exp $ +# $NetBSD: CHANGES-9.4,v 1.1.2.127 2024/02/03 14:26:27 martin Exp $ A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4 release: @@ -4069,3 +4069,61 @@ external/bsd/iscsi/dist/src/lib/protocol logout decap. [riastradh, ticket #1789] +sys/dev/pci/pcidevs1.1494,1.1498-1.1502 +sys/dev/pci/pcidevs.h(regen) +sys/dev/pci/pcidevs_data.h (regen) + + - Add Mellanox ConnectX-6 Lx. + - Add some newer Areca boards. + - Update Intel Raptor Lake devices. + - Add Intel C26[26] eSPI. + - Add Intel I219-LM20, LM21, V20 and V21. + - Add Intel I225/I226 series devices. + [msaitoh, ticket #1790] + +sys/dev/pci/if_wm.c1.793 + + wm(4): add Intel I219-{LM,V}(20,21) support. + [msaitoh, ticket #1791] + +sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch +sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch +sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 +sys/dev/pci/ixgbe/ixgbe_type.h 1.62 +sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 + + - Clear the WTHRESH bit field before writing it. + - Optimize ixgbe_txeof(). + - Use kmem_zalloc() instead of malloc(,M_ZERO). + - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. + - No functional change + - Move assignment of TXD. + - ixv(4): Remove unused IFF_OACTIVE. + - Don't include the Flow Director related members to reduce the + size of struct tx_ring. On amd64 and aarch64, the real size is + not changed because of the alignment. + - The descriptor ring size and the alignment are tested in the + attach function, so it's not required to use + roundup2(size, DBA_ALIGN). + - Use #ifdef LRO more to reduce the size of struct rx_ring. + - Change "me" from 32bit to 8bit because the max is 128. + This commit doesn't change the real size of ix_queue, tx_ring + and rx_ring because of the alignment. + - Th RSC (hardware receive side coalescing) feature has been + disabled all along, so enclose the code with #ifdef RSC. + - Remove unused. + - Modify for the readability. + - Modify comment. + - Fix comment. Whitespace. + [msaitoh, ticket #1792] + +sys/dev/sdmmc/ld_sdmmc.c 1.43 + + ld@sdmmc(4): PR 57870: avoid deadlock on detach. + [riastradh, ticket #1793] + +sys/dev/hdaudio/hdafg.c1.29 + + hdaudio(4): PR 57890: fix crash on shutdown with record-only devices. + [riastradh, ticket #1795] +
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:24:38 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1795): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/hdaudio/hdafg.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/hdaudio/hdafg.c diff -u src/sys/dev/hdaudio/hdafg.c:1.18.2.1 src/sys/dev/hdaudio/hdafg.c:1.18.2.2 --- src/sys/dev/hdaudio/hdafg.c:1.18.2.1 Sat Apr 25 10:40:45 2020 +++ src/sys/dev/hdaudio/hdafg.c Sat Feb 3 14:24:38 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.18.2.1 2020/04/25 10:40:45 martin Exp $ */ +/* $NetBSD: hdafg.c,v 1.18.2.2 2024/02/03 14:24:38 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.18.2.1 2020/04/25 10:40:45 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.18.2.2 2024/02/03 14:24:38 martin Exp $"); #include #include @@ -4223,9 +4223,12 @@ hdafg_freem(void *opaque, void *addr, si struct hdaudio_audiodev *ad = opaque; struct hdaudio_stream *st; - if (addr == DMA_KERNADDR(>ad_playback->st_data)) + if (ad == NULL) + return; + + if (ad->ad_playback != NULL && addr == DMA_KERNADDR(>ad_playback->st_data)) st = ad->ad_playback; - else if (addr == DMA_KERNADDR(>ad_capture->st_data)) + else if (ad->ad_capture != NULL && addr == DMA_KERNADDR(>ad_capture->st_data)) st = ad->ad_capture; else return;
CVS commit: [netbsd-9] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:24:38 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-9]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1795): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.18.2.1 -r1.18.2.2 src/sys/dev/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:23:33 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-10]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #576): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/dev/hdaudio/hdafg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/dev/hdaudio
Module Name:src Committed By: martin Date: Sat Feb 3 14:23:33 UTC 2024 Modified Files: src/sys/dev/hdaudio [netbsd-10]: hdafg.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #576): sys/dev/hdaudio/hdafg.c: revision 1.29 ignore NULL for hdaudio_audiodev in hdafg_freem also guard against NULL in ad_{capture,playback} observed during shutdown on Lenovo W510 To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.28.4.1 src/sys/dev/hdaudio/hdafg.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/hdaudio/hdafg.c diff -u src/sys/dev/hdaudio/hdafg.c:1.28 src/sys/dev/hdaudio/hdafg.c:1.28.4.1 --- src/sys/dev/hdaudio/hdafg.c:1.28 Tue May 24 06:28:00 2022 +++ src/sys/dev/hdaudio/hdafg.c Sat Feb 3 14:23:33 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: hdafg.c,v 1.28 2022/05/24 06:28:00 andvar Exp $ */ +/* $NetBSD: hdafg.c,v 1.28.4.1 2024/02/03 14:23:33 martin Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd @@ -60,7 +60,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.28 2022/05/24 06:28:00 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.28.4.1 2024/02/03 14:23:33 martin Exp $"); #include #include @@ -4226,9 +4226,12 @@ hdafg_freem(void *opaque, void *addr, si struct hdaudio_audiodev *ad = opaque; struct hdaudio_stream *st; - if (addr == DMA_KERNADDR(>ad_playback->st_data)) + if (ad == NULL) + return; + + if (ad->ad_playback != NULL && addr == DMA_KERNADDR(>ad_playback->st_data)) st = ad->ad_playback; - else if (addr == DMA_KERNADDR(>ad_capture->st_data)) + else if (ad->ad_capture != NULL && addr == DMA_KERNADDR(>ad_capture->st_data)) st = ad->ad_capture; else return;
CVS commit: [netbsd-10] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 14:17:03 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-10]: agp_i810.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #574): sys/dev/pci/agp_i810.c: revision 1.126 agp_i810(4): Use ipi(9) for chipset flush on all CPUs, not xcall(9). i915 now calls into this with a spin lock held, so we have to use ipi(9), which spin-waits for the other CPUs to complete, rather than xcall(9), which may sleep-wait. Fortunately, this is just to execute WBINVD on x86 (and if this code ever runs on other architectures, which it probably doesn't, it'll be a similar barrier instruction), so spinning to wait for that on all CPUs isn't too costly. PR kern/57878 To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.125.4.1 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/agp_i810.c diff -u src/sys/dev/pci/agp_i810.c:1.125 src/sys/dev/pci/agp_i810.c:1.125.4.1 --- src/sys/dev/pci/agp_i810.c:1.125 Sun Jul 17 10:10:45 2022 +++ src/sys/dev/pci/agp_i810.c Sat Feb 3 14:17:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: agp_i810.c,v 1.125 2022/07/17 10:10:45 riastradh Exp $ */ +/* $NetBSD: agp_i810.c,v 1.125.4.1 2024/02/03 14:17:03 martin Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.125 2022/07/17 10:10:45 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: agp_i810.c,v 1.125.4.1 2024/02/03 14:17:03 martin Exp $"); #include #include @@ -180,7 +180,7 @@ agp_i810_post_gtt_entry(struct agp_i810_ } static void -agp_flush_cache_xc(void *a __unused, void *b __unused) +agp_flush_cache_ipi(void *cookie __unused) { agp_flush_cache(); @@ -204,11 +204,19 @@ agp_i810_chipset_flush(struct agp_i810_s * XXX Come to think of it, do these chipsets appear in * any multi-CPU systems? */ - if (cold) + if (cold) { agp_flush_cache(); - else - xc_wait(xc_broadcast(0, _flush_cache_xc, -NULL, NULL)); + } else { + /* + * Caller may hold a spin lock, so use ipi(9) + * rather than xcall(9) here. + */ + ipi_msg_t msg = { .func = agp_flush_cache_ipi }; + kpreempt_disable(); + ipi_broadcast(, /*skip_self*/false); + ipi_wait(); + kpreempt_enable(); + } WRITE4(AGP_I830_HIC, READ4(AGP_I830_HIC) | __BIT(31)); while (ISSET(READ4(AGP_I830_HIC), __BIT(31))) { if (timo-- == 0)
CVS commit: [netbsd-10] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 14:17:03 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-10]: agp_i810.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #574): sys/dev/pci/agp_i810.c: revision 1.126 agp_i810(4): Use ipi(9) for chipset flush on all CPUs, not xcall(9). i915 now calls into this with a spin lock held, so we have to use ipi(9), which spin-waits for the other CPUs to complete, rather than xcall(9), which may sleep-wait. Fortunately, this is just to execute WBINVD on x86 (and if this code ever runs on other architectures, which it probably doesn't, it'll be a similar barrier instruction), so spinning to wait for that on all CPUs isn't too costly. PR kern/57878 To generate a diff of this commit: cvs rdiff -u -r1.125 -r1.125.4.1 src/sys/dev/pci/agp_i810.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8/man8.macppc
Module Name:src Committed By: uwe Date: Sat Feb 3 14:15:51 UTC 2024 Modified Files: src/share/man/man8/man8.macppc: ofwboot.8 Log Message: ofwboot(8): improve formatting To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man8/man8.macppc/ofwboot.8 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/man8/man8.macppc/ofwboot.8 diff -u src/share/man/man8/man8.macppc/ofwboot.8:1.14 src/share/man/man8/man8.macppc/ofwboot.8:1.15 --- src/share/man/man8/man8.macppc/ofwboot.8:1.14 Mon Jul 3 21:31:00 2017 +++ src/share/man/man8/man8.macppc/ofwboot.8 Sat Feb 3 14:15:51 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: ofwboot.8,v 1.14 2017/07/03 21:31:00 wiz Exp $ +.\" $NetBSD: ofwboot.8,v 1.15 2024/02/03 14:15:51 uwe Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -61,11 +61,13 @@ because it is used to pass arguments to The Open Firmware .Ic boot command takes up to three arguments: +.Bd -literal -offset indent +.Ic boot Oo Ar boot-device Oo Ar boot-file Oc Oc Op Ar options +.Ed .Pp -.Ic boot -.Op Ar boot-device Op Ar boot-file -.Op Ar options -.Bl -tag -width boot-device -compact +where +.Pp +.Bl -tag -width ".Ar boot-device" -offset indent -compact .It Ar boot-device primary bootloader location .It Ar boot-file @@ -78,46 +80,67 @@ The first argument, .Ar boot-device , actually designates the primary bootloader location and its name in the form: -.Dl boot-device:[partition-num],[bootloader-filename] +.Bd -literal -offset indent +.Sm off +.Ar device Ic \&: Op Ar partition-num +.Ic \&, Op Ar bootloader-filename +.Sm on +.Ed +.Pp A typical example, from a PowerBook (FireWire), is +.Pp .Dl /pci@f200/mac-io@17/ata-4@1f000/@0:9,ofwboot.xcf -.\" XXX: can't use Dq or Pq with : or , -Note that colon (`:') delimits the device to the left, and comma (`,') -separates the boot loader filename from the first part. +.Pp +Note that colon +.Pq Ql \&: +delimits the device to the left, and comma +.Pq Ql \&, +separates the bootloader filename from the first part. For Open Firmware versions before 3, the primary bootloader is installed in partition .Dq zero , -and it is not necessary to specify the bootloader-filename. -For Open Firmware version 3, you must specify the bootloader-filename. -.Pp -Open Firmware stores aliases to common devices in NVRAM. -In the example above, +and it is not necessary to specify the +.Ar bootloader-filename . +For Open Firmware version 3, you must specify the bootloader filename. +.Pp +Open Firmware stores aliases to common devices in +.Tn NVRAM . +In the example the above, .Pa /pci@f200/mac-io@17/ata-4@1f000/@0 is the path on a PowerBook -(FireWire) to the built-in ATA/100 hard drive. +(FireWire) to the built-in +.Tn ATA Ns /100 +hard drive. Use the .Ic devalias command in Open Firmware to print out a list of common device names on a particular model. -The command above could then be simplified to: +The +.Ar boot-device +above could then be simplified to: +.Pp .Dl hd:9,ofwboot.xcf .Pp -.Ar boot-loader-file-name +.Ar bootloader-filename is usually .Nm ofwboot.xcf . -(See also the +See also the .Sx FILES -section for further discussion.) +section for further discussion. .Pp -If omitted, the Open Firmware variable -.Va boot-device +If +.Ar boot-device +is omitted from the +.Ic boot +command, the Open Firmware variable +.Ev boot-device is used. .Ss boot-file It may be necessary to specify the .Ar boot-file if Open Firmware does not know where to find the kernel. The default is to load the file named -.Nm netbsd +.Pa netbsd on partition .Dq Pa a from the device used to load the primary bootloader. @@ -134,28 +157,42 @@ Systems with Open Firmware version 3 may The syntax is similar to the .Ar boot-device argument: -.Dl [boot-file-device:partition-num/][kernel-name] -This is a little different, since a kernel-name may be specified without -listing a boot-file-device and partition-num. -Additionally, a boot-file-device and partition-num may need to be -specified, while using the default kernel-name. +.Bd -literal -offset indent +.Sm off +.Op Ar boot-file-device Ic \&: Ar partition-num\^ Ic \&/ +.Op Ar kernel-name +.Sm on +.Ed .Pp -If no kernel-name is specified, the primary bootloader will try to find -kernels named either -.Ar netbsd +This is a little different, since a kernel-name may be specified without +listing a +.Ar boot-file-device +and +.Ar partition-num . +Additionally, a +.Ar boot-file-device +and +.Ar partition-num +may need to be specified, while using the default +.Ar kernel-name . +.Pp +If no +.Ar kernel-name +is specified, the primary bootloader will try to find kernels named either +.Pa netbsd or -.Ar netbsd.gz +.Pa netbsd.gz on the boot-device or (if specified) boot-file-device. .Ss options Possible options are: -.Bl -tag -width x -compact +.Bl -tag -width
CVS commit: src/share/man/man8/man8.macppc
Module Name:src Committed By: uwe Date: Sat Feb 3 14:15:51 UTC 2024 Modified Files: src/share/man/man8/man8.macppc: ofwboot.8 Log Message: ofwboot(8): improve formatting To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/share/man/man8/man8.macppc/ofwboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/usr.sbin/postinstall
Module Name:src Committed By: martin Date: Sat Feb 3 14:15:01 UTC 2024 Modified Files: src/usr.sbin/postinstall [netbsd-10]: postinstall.in Log Message: Pull up following revision(s) (requested by riastradh in ticket #573): usr.sbin/postinstall/postinstall.in: revision 1.58 postinstall(8): Don't say /etc/openssl/certs.conf already exists. It's confusing when all the other `postinstall fix' actions are silent in the event they don't have anything to do. PR install/57885 To generate a diff of this commit: cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/usr.sbin/postinstall/postinstall.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/usr.sbin/postinstall
Module Name:src Committed By: martin Date: Sat Feb 3 14:15:01 UTC 2024 Modified Files: src/usr.sbin/postinstall [netbsd-10]: postinstall.in Log Message: Pull up following revision(s) (requested by riastradh in ticket #573): usr.sbin/postinstall/postinstall.in: revision 1.58 postinstall(8): Don't say /etc/openssl/certs.conf already exists. It's confusing when all the other `postinstall fix' actions are silent in the event they don't have anything to do. PR install/57885 To generate a diff of this commit: cvs rdiff -u -r1.51.2.1 -r1.51.2.2 src/usr.sbin/postinstall/postinstall.in 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/postinstall/postinstall.in diff -u src/usr.sbin/postinstall/postinstall.in:1.51.2.1 src/usr.sbin/postinstall/postinstall.in:1.51.2.2 --- src/usr.sbin/postinstall/postinstall.in:1.51.2.1 Mon Sep 4 17:33:28 2023 +++ src/usr.sbin/postinstall/postinstall.in Sat Feb 3 14:15:00 2024 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: postinstall.in,v 1.51.2.1 2023/09/04 17:33:28 martin Exp $ +# $NetBSD: postinstall.in,v 1.51.2.2 2024/02/03 14:15:00 martin Exp $ # # Copyright (c) 2002-2022 The NetBSD Foundation, Inc. # All rights reserved. @@ -1685,7 +1685,6 @@ do_opensslcertsconf() fix) # If /etc/openssl/certs.conf is already there, nothing # to do. if [ -r "$certsconf" ]; then - msg "/etc/openssl/certs.conf already exists" return 0 fi
CVS commit: [netbsd-10] xsrc/external/mit/xf86-video-wsfb/dist/src
Module Name:xsrc Committed By: martin Date: Sat Feb 3 14:12:49 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-wsfb/dist/src [netbsd-10]: wsfb_driver.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #572): external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c: revision 1.49 Handle "LSBit is left" bitorder VRAM of smg(4) and qv(4) on VAXen. Confirmed on smg(4) on my VAXstation 3100/30. To generate a diff of this commit: cvs rdiff -u -r1.47.2.1 -r1.47.2.2 \ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c diff -u xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.47.2.1 xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.47.2.2 --- xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c:1.47.2.1 Sat Feb 3 11:49:31 2024 +++ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Sat Feb 3 14:12:49 2024 @@ -590,6 +590,12 @@ WsfbPreInit(ScrnInfoPtr pScrn, int flags if (pScrn->depth == 24 && pix24bpp == 0) pix24bpp = xf86GetBppFromDepth(pScrn, 24); +#ifdef WSDISPLAY_TYPE_VAX_MONO + if (wstype == WSDISPLAY_TYPE_VAX_MONO) { + pScrn->bitmapBitOrder = LSBFirst; + } +#endif + /* Handle options. */ xf86CollectOptions(pScrn, NULL); fPtr->Options = (OptionInfoRec *)malloc(sizeof(WsfbOptions));
CVS commit: [netbsd-10] xsrc/external/mit/xf86-video-wsfb/dist/src
Module Name:xsrc Committed By: martin Date: Sat Feb 3 14:12:49 UTC 2024 Modified Files: xsrc/external/mit/xf86-video-wsfb/dist/src [netbsd-10]: wsfb_driver.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #572): external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c: revision 1.49 Handle "LSBit is left" bitorder VRAM of smg(4) and qv(4) on VAXen. Confirmed on smg(4) on my VAXstation 3100/30. To generate a diff of this commit: cvs rdiff -u -r1.47.2.1 -r1.47.2.2 \ xsrc/external/mit/xf86-video-wsfb/dist/src/wsfb_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/distrib/sets/lists
Module Name:src Committed By: martin Date: Sat Feb 3 14:05:47 UTC 2024 Modified Files: src/distrib/sets/lists/xcomp [netbsd-10]: mi src/distrib/sets/lists/xdebug [netbsd-10]: md.alpha md.netwinder md.sgimips md.vax src/distrib/sets/lists/xserver [netbsd-10]: md.alpha md.netwinder md.sgimips md.vax Log Message: Pull up following revision(s) (requested by tsutsui in ticket #571): distrib/sets/lists/xserver/md.alpha: revision 1.62 distrib/sets/lists/xdebug/md.sgimips: revision 1.18 distrib/sets/lists/xdebug/md.netwinder: revision 1.14 distrib/sets/lists/xdebug/md.alpha: revision 1.22 distrib/sets/lists/xdebug/md.vax: revision 1.16 distrib/sets/lists/xserver/md.vax: revision 1.28 distrib/sets/lists/xserver/md.sgimips: revision 1.70 distrib/sets/lists/xserver/md.netwinder: revision 1.48 distrib/sets/lists/xcomp/mi: revision 1.241 Put back xorg_server_ver=110 specific files lost in 21.1.3 updates. Also fix syspkg names and reorder entries for readabilities. Fixes "fail to load libfb.so" errors on X.org 1.10 server ports. Ok'ed by mrg@ on tech-x11@: https://mail-index.netbsd.org/tech-x11/2024/01/24/msg002434.html To generate a diff of this commit: cvs rdiff -u -r1.239 -r1.239.2.1 src/distrib/sets/lists/xcomp/mi cvs rdiff -u -r1.20 -r1.20.2.1 src/distrib/sets/lists/xdebug/md.alpha cvs rdiff -u -r1.13 -r1.13.2.1 src/distrib/sets/lists/xdebug/md.netwinder cvs rdiff -u -r1.17 -r1.17.2.1 src/distrib/sets/lists/xdebug/md.sgimips cvs rdiff -u -r1.15 -r1.15.2.1 src/distrib/sets/lists/xdebug/md.vax cvs rdiff -u -r1.60 -r1.60.2.1 src/distrib/sets/lists/xserver/md.alpha cvs rdiff -u -r1.47 -r1.47.2.1 src/distrib/sets/lists/xserver/md.netwinder cvs rdiff -u -r1.69 -r1.69.2.1 src/distrib/sets/lists/xserver/md.sgimips cvs rdiff -u -r1.27 -r1.27.2.1 src/distrib/sets/lists/xserver/md.vax Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/distrib/sets/lists
Module Name:src Committed By: martin Date: Sat Feb 3 14:05:47 UTC 2024 Modified Files: src/distrib/sets/lists/xcomp [netbsd-10]: mi src/distrib/sets/lists/xdebug [netbsd-10]: md.alpha md.netwinder md.sgimips md.vax src/distrib/sets/lists/xserver [netbsd-10]: md.alpha md.netwinder md.sgimips md.vax Log Message: Pull up following revision(s) (requested by tsutsui in ticket #571): distrib/sets/lists/xserver/md.alpha: revision 1.62 distrib/sets/lists/xdebug/md.sgimips: revision 1.18 distrib/sets/lists/xdebug/md.netwinder: revision 1.14 distrib/sets/lists/xdebug/md.alpha: revision 1.22 distrib/sets/lists/xdebug/md.vax: revision 1.16 distrib/sets/lists/xserver/md.vax: revision 1.28 distrib/sets/lists/xserver/md.sgimips: revision 1.70 distrib/sets/lists/xserver/md.netwinder: revision 1.48 distrib/sets/lists/xcomp/mi: revision 1.241 Put back xorg_server_ver=110 specific files lost in 21.1.3 updates. Also fix syspkg names and reorder entries for readabilities. Fixes "fail to load libfb.so" errors on X.org 1.10 server ports. Ok'ed by mrg@ on tech-x11@: https://mail-index.netbsd.org/tech-x11/2024/01/24/msg002434.html To generate a diff of this commit: cvs rdiff -u -r1.239 -r1.239.2.1 src/distrib/sets/lists/xcomp/mi cvs rdiff -u -r1.20 -r1.20.2.1 src/distrib/sets/lists/xdebug/md.alpha cvs rdiff -u -r1.13 -r1.13.2.1 src/distrib/sets/lists/xdebug/md.netwinder cvs rdiff -u -r1.17 -r1.17.2.1 src/distrib/sets/lists/xdebug/md.sgimips cvs rdiff -u -r1.15 -r1.15.2.1 src/distrib/sets/lists/xdebug/md.vax cvs rdiff -u -r1.60 -r1.60.2.1 src/distrib/sets/lists/xserver/md.alpha cvs rdiff -u -r1.47 -r1.47.2.1 src/distrib/sets/lists/xserver/md.netwinder cvs rdiff -u -r1.69 -r1.69.2.1 src/distrib/sets/lists/xserver/md.sgimips cvs rdiff -u -r1.27 -r1.27.2.1 src/distrib/sets/lists/xserver/md.vax 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/xcomp/mi diff -u src/distrib/sets/lists/xcomp/mi:1.239 src/distrib/sets/lists/xcomp/mi:1.239.2.1 --- src/distrib/sets/lists/xcomp/mi:1.239 Sat Oct 29 21:06:48 2022 +++ src/distrib/sets/lists/xcomp/mi Sat Feb 3 14:05:47 2024 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.239 2022/10/29 21:06:48 mrg Exp $ +# $NetBSD: mi,v 1.239.2.1 2024/02/03 14:05:47 martin Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -780,9 +780,12 @@ ./usr/X11R7/include/xcb/xvmc.hxcomp-libxcb-include xorg ./usr/X11R7/include/xf86drm.hxcomp-libdrm-include xorg ./usr/X11R7/include/xf86drmMode.h xcomp-libdrm-include xorg -./usr/X11R7/include/xorg/BT.hxcomp-obsolete obsolete -./usr/X11R7/include/xorg/IBM.hxcomp-obsolete obsolete -./usr/X11R7/include/xorg/TI.hxcomp-obsolete obsolete +./usr/X11R7/include/xorg/BT.hxcomp-xorg-server-include xorg,xorg_server_ver=110 +./usr/X11R7/include/xorg/BT.hxcomp-obsolete xorg,obsolete,xorg_server_ver=120 +./usr/X11R7/include/xorg/IBM.hxcomp-xorg-server-include xorg,xorg_server_ver=110 +./usr/X11R7/include/xorg/IBM.hxcomp-obsolete xorg,obsolete,xorg_server_ver=120 +./usr/X11R7/include/xorg/TI.hxcomp-xorg-server-include xorg,xorg_server_ver=110 +./usr/X11R7/include/xorg/TI.hxcomp-obsolete xorg,obsolete,xorg_server_ver=120 ./usr/X11R7/include/xorg/XIstubs.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/Xprintf.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/afb.hxcomp-obsolete obsolete @@ -790,8 +793,8 @@ ./usr/X11R7/include/xorg/atKeynames.h xcomp-obsolete obsolete ./usr/X11R7/include/xorg/bstore.h xcomp-obsolete obsolete ./usr/X11R7/include/xorg/bstorestr.h xcomp-obsolete obsolete -./usr/X11R7/include/xorg/bt829.h xcomp-obsolete xorg,obsolete,xorg_server_ver=120 ./usr/X11R7/include/xorg/bt829.h xcomp-xorg-server-include xorg,xorg_server_ver=110 +./usr/X11R7/include/xorg/bt829.h xcomp-obsolete xorg,obsolete,xorg_server_ver=120 ./usr/X11R7/include/xorg/callback.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/cfb.hxcomp-obsolete obsolete ./usr/X11R7/include/xorg/cfb16.h xcomp-obsolete obsolete @@ -815,7 +818,7 @@ ./usr/X11R7/include/xorg/dbestruct.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/dgaproc.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/displaymode.h xcomp-xorg-server-include xorg,xorg_server_ver=120 -./usr/X11R7/include/xorg/dix-config.h xcomp-xorg-server-include xorg,obsolete +./usr/X11R7/include/xorg/dix-config.h xcomp-obsolete xorg,obsolete ./usr/X11R7/include/xorg/dix.hxcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/dixaccess.h xcomp-xorg-server-include xorg ./usr/X11R7/include/xorg/dixevents.h xcomp-xorg-server-include xorg @@ -843,7 +846,7 @@ ./usr/X11R7/include/xorg/fbpseudocolor.h xcomp-obsolete obsolete
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 12:57:12 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: ckbool.c ckgetopt.c decl.c emit1.c externs1.h func.c lex.c main1.c Log Message: lint: clean up comments, reduce scope of variables To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/xlint/lint1/ckgetopt.c cvs rdiff -u -r1.390 -r1.391 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.83 -r1.84 src/usr.bin/xlint/lint1/emit1.c cvs rdiff -u -r1.213 -r1.214 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.179 -r1.180 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.209 -r1.210 src/usr.bin/xlint/lint1/lex.c cvs rdiff -u -r1.80 -r1.81 src/usr.bin/xlint/lint1/main1.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/ckbool.c diff -u src/usr.bin/xlint/lint1/ckbool.c:1.28 src/usr.bin/xlint/lint1/ckbool.c:1.29 --- src/usr.bin/xlint/lint1/ckbool.c:1.28 Sat Dec 30 15:37:27 2023 +++ src/usr.bin/xlint/lint1/ckbool.c Sat Feb 3 12:57:12 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ckbool.c,v 1.28 2023/12/30 15:37:27 rillig Exp $ */ +/* $NetBSD: ckbool.c,v 1.29 2024/02/03 12:57:12 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: ckbool.c,v 1.28 2023/12/30 15:37:27 rillig Exp $"); +__RCSID("$NetBSD: ckbool.c,v 1.29 2024/02/03 12:57:12 rillig Exp $"); #endif #include @@ -46,7 +46,7 @@ __RCSID("$NetBSD: ckbool.c,v 1.28 2023/1 /* * The option -T treats _Bool as incompatible with all other scalar types. - * See d_c99_bool_strict.c for the exact rules and for examples. + * See d_c99_bool_strict.c for the detailed rules and for examples. */ @@ -113,16 +113,15 @@ typeok_strict_bool_binary_compatible(op_ if (is_typeok_strict_bool_binary(op, ln, lt, rn, rt)) return true; - if (op == FARG) { + if (op == FARG) /* parameter %d expects '%s', gets passed '%s' */ error(334, arg, tspec_name(lt), tspec_name(rt)); - } else if (op == RETURN) { + else if (op == RETURN) /* function has return type '%s' but returns '%s' */ error(211, tspec_name(lt), tspec_name(rt)); - } else { + else /* operands of '%s' have incompatible types '%s' and '%s' */ error(107, op_name(op), tspec_name(lt), tspec_name(rt)); - } return false; } @@ -136,16 +135,12 @@ typeok_scalar_strict_bool(op_t op, const const tnode_t *ln, const tnode_t *rn) { - tspec_t lt, rt; - ln = before_conversion(ln); - lt = ln->tn_type->t_tspec; - + tspec_t lt = ln->tn_type->t_tspec; + tspec_t rt = NO_TSPEC; if (rn != NULL) { rn = before_conversion(rn); rt = rn->tn_type->t_tspec; - } else { - rt = NO_TSPEC; } if (rn != NULL && @@ -202,26 +197,16 @@ typeok_scalar_strict_bool(op_t op, const return true; } -/* - * See if the node is valid as operand of an operator that compares its - * operand with 0. - */ bool is_typeok_bool_compares_with_zero(const tnode_t *tn) { - tspec_t t; - while (tn->tn_op == COMMA) tn = tn->tn_right; tn = before_conversion(tn); - t = tn->tn_type->t_tspec; - - if (t == BOOL) - return true; - if (tn->tn_sys && is_scalar(t)) - return true; - return tn->tn_op == BITAND; + return tn->tn_type->t_tspec == BOOL + || tn->tn_op == BITAND + || (tn->tn_sys && is_scalar(tn->tn_type->t_tspec)); } bool Index: src/usr.bin/xlint/lint1/ckgetopt.c diff -u src/usr.bin/xlint/lint1/ckgetopt.c:1.20 src/usr.bin/xlint/lint1/ckgetopt.c:1.21 --- src/usr.bin/xlint/lint1/ckgetopt.c:1.20 Thu Feb 1 18:37:06 2024 +++ src/usr.bin/xlint/lint1/ckgetopt.c Sat Feb 3 12:57:12 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ckgetopt.c,v 1.20 2024/02/01 18:37:06 rillig Exp $ */ +/* $NetBSD: ckgetopt.c,v 1.21 2024/02/03 12:57:12 rillig Exp $ */ /*- * Copyright (c) 2021 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) -__RCSID("$NetBSD: ckgetopt.c,v 1.20 2024/02/01 18:37:06 rillig Exp $"); +__RCSID("$NetBSD: ckgetopt.c,v 1.21 2024/02/03 12:57:12 rillig Exp $"); #endif #include @@ -109,31 +109,22 @@ is_getopt_condition(const tnode_t *tn, c static void check_unlisted_option(char opt) { - char *optptr; - - lint_assert(ck.options != NULL); - if (opt == ':' && ck.options[0] != ':') goto warn; - optptr = strchr(ck.options, opt); + char *optptr = strchr(ck.options, opt); if (optptr != NULL) *optptr = ' '; - else if (opt != '?') { + else if (opt != '?') warn: /* option '%c' should be listed in the options string */ warning(339, opt); - } } static void check_unhandled_option(void) { - const char *opt; - - lint_assert(ck.options != NULL); - - for (opt = ck.options; *opt != '\0'; opt++) { + for (const char *opt = ck.options; *opt != '\0'; opt++) { if (*opt == ' ' || *opt == ':') continue; Index: src/usr.bin/xlint/lint1/decl.c
CVS commit: src/usr.bin/xlint/lint1
Module Name:src Committed By: rillig Date: Sat Feb 3 12:57:12 UTC 2024 Modified Files: src/usr.bin/xlint/lint1: ckbool.c ckgetopt.c decl.c emit1.c externs1.h func.c lex.c main1.c Log Message: lint: clean up comments, reduce scope of variables To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/usr.bin/xlint/lint1/ckbool.c cvs rdiff -u -r1.20 -r1.21 src/usr.bin/xlint/lint1/ckgetopt.c cvs rdiff -u -r1.390 -r1.391 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.83 -r1.84 src/usr.bin/xlint/lint1/emit1.c cvs rdiff -u -r1.213 -r1.214 src/usr.bin/xlint/lint1/externs1.h cvs rdiff -u -r1.179 -r1.180 src/usr.bin/xlint/lint1/func.c cvs rdiff -u -r1.209 -r1.210 src/usr.bin/xlint/lint1/lex.c cvs rdiff -u -r1.80 -r1.81 src/usr.bin/xlint/lint1/main1.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/arch/vax/vsa
Module Name:src Committed By: martin Date: Sat Feb 3 12:56:02 UTC 2024 Modified Files: src/sys/arch/vax/vsa [netbsd-10]: smg.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #569): sys/arch/vax/vsa/smg.c: revision 1.66 Fix mmap(2) address for smg(4) as other framebuffers. Now X.org server can render onto framebuffer (but inverted bitorder). To generate a diff of this commit: cvs rdiff -u -r1.61.6.3 -r1.61.6.4 src/sys/arch/vax/vsa/smg.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/vax/vsa/smg.c diff -u src/sys/arch/vax/vsa/smg.c:1.61.6.3 src/sys/arch/vax/vsa/smg.c:1.61.6.4 --- src/sys/arch/vax/vsa/smg.c:1.61.6.3 Wed Feb 15 19:14:50 2023 +++ src/sys/arch/vax/vsa/smg.c Sat Feb 3 12:56:02 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: smg.c,v 1.61.6.3 2023/02/15 19:14:50 martin Exp $ */ +/* $NetBSD: smg.c,v 1.61.6.4 2024/02/03 12:56:02 martin Exp $ */ /* $OpenBSD: smg.c,v 1.28 2014/12/23 21:39:12 miod Exp $ */ /* * Copyright (c) 2006, Miodrag Vallat @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.61.6.3 2023/02/15 19:14:50 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smg.c,v 1.61.6.4 2024/02/03 12:56:02 martin Exp $"); #include "dzkbd.h" #include "wsdisplay.h" @@ -475,7 +475,7 @@ smg_mmap(void *v, void *vs, off_t offset if (offset >= SMSIZE || offset < 0) return -1; - return SMADDR + offset; + return (SMADDR + offset) >> PGSHIFT; } static int
CVS commit: [netbsd-10] src/sys/arch/vax/vsa
Module Name:src Committed By: martin Date: Sat Feb 3 12:56:02 UTC 2024 Modified Files: src/sys/arch/vax/vsa [netbsd-10]: smg.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #569): sys/arch/vax/vsa/smg.c: revision 1.66 Fix mmap(2) address for smg(4) as other framebuffers. Now X.org server can render onto framebuffer (but inverted bitorder). To generate a diff of this commit: cvs rdiff -u -r1.61.6.3 -r1.61.6.4 src/sys/arch/vax/vsa/smg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/arch/hppa/hppa
Module Name:src Committed By: martin Date: Sat Feb 3 12:48:39 UTC 2024 Modified Files: src/sys/arch/hppa/hppa [netbsd-10]: machdep.c Log Message: Pull up following revision(s) (requested by skrll in ticket #568): sys/arch/hppa/hppa/machdep.c: revision 1.19 Don't duplicate PIM_CPU_BITS in one printf. PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hppa/hppa/machdep.c diff -u src/sys/arch/hppa/hppa/machdep.c:1.18 src/sys/arch/hppa/hppa/machdep.c:1.18.4.1 --- src/sys/arch/hppa/hppa/machdep.c:1.18 Thu Sep 29 06:39:59 2022 +++ src/sys/arch/hppa/hppa/machdep.c Sat Feb 3 12:48:39 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.18 2022/09/29 06:39:59 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.18.4.1 2024/02/03 12:48:39 martin Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2022/09/29 06:39:59 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18.4.1 2024/02/03 12:48:39 martin Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -1563,7 +1563,7 @@ hppa_pim_dump(int check_type, void *data PIM_WORD("\n\n\tCheck Type", checks->pim_check_type, PIM_CHECK_BITS); PIM_WORD("\n\tCPU State", checks->pim_check_cpu_state, - PIM_CPU_BITS PIM_CPU_HPMC_BITS); + PIM_CPU_HPMC_BITS); PIM_WORD("\n\tCache Check", checks->pim_check_cache, PIM_CACHE_BITS); PIM_WORD("\n\tTLB Check", checks->pim_check_tlb,
CVS commit: [netbsd-10] src/sys/arch/hppa/hppa
Module Name:src Committed By: martin Date: Sat Feb 3 12:48:39 UTC 2024 Modified Files: src/sys/arch/hppa/hppa [netbsd-10]: machdep.c Log Message: Pull up following revision(s) (requested by skrll in ticket #568): sys/arch/hppa/hppa/machdep.c: revision 1.19 Don't duplicate PIM_CPU_BITS in one printf. PIM_CPU_HPMC_BITS already includes PIM_CPU_HPMC_BITS To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.4.1 src/sys/arch/hppa/hppa/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sys/arch/hppa/hppa
Module Name:src Committed By: martin Date: Sat Feb 3 12:46:19 UTC 2024 Modified Files: src/sys/arch/hppa/hppa [netbsd-10]: pim.h Log Message: Pull up following revision(s) (requested by skrll in ticket #567): sys/arch/hppa/hppa/pim.h: revision 1.3 Fix one by one bugs I committed back in 2009. Spotted by rillig@. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.30.1 src/sys/arch/hppa/hppa/pim.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/hppa/hppa/pim.h diff -u src/sys/arch/hppa/hppa/pim.h:1.2 src/sys/arch/hppa/hppa/pim.h:1.2.30.1 --- src/sys/arch/hppa/hppa/pim.h:1.2 Mon Apr 15 20:45:08 2019 +++ src/sys/arch/hppa/hppa/pim.h Sat Feb 3 12:46:19 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: pim.h,v 1.2 2019/04/15 20:45:08 skrll Exp $ */ +/* $NetBSD: pim.h,v 1.2.30.1 2024/02/03 12:46:19 martin Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -138,10 +138,10 @@ struct hppa_pim_checks { #define PIM_CHECK_ASSISTS (1 << 28) #define PIM_CHECK_BITS \ "\177\020" /* New bitmask format */ \ - "b\040cache\0" /* bit 31 */ \ - "b\037tlb\0" /* bit 30 */ \ - "b\036bus\0" /* bit 29 */ \ - "b\035assists\0" /* bit 28 */ + "b\037cache\0" /* bit 31 */ \ + "b\036tlb\0" /* bit 30 */ \ + "b\035bus\0" /* bit 29 */ \ + "b\034assists\0" /* bit 28 */ /* * The CPU State. In addition to the common PIM_CPU_ @@ -157,13 +157,13 @@ struct hppa_pim_checks { #define PIM_CPU_TRV (1 << 25) #define PIM_CPU_BITS \ "\177\020" /* New bitmask format */ \ - "b\040iqv\0" /* bit 31 */ \ - "b\037iqf\0" /* bit 30 */ \ - "b\036ipv\0" /* bit 29 */ \ - "b\035grv\0" /* bit 28 */ \ - "b\034crv\0" /* bit 27 */ \ - "b\033srv\0" /* bit 26 */ \ - "b\032trv\0" /* bit 25 */ + "b\037iqv\0" /* bit 31 */ \ + "b\036iqf\0" /* bit 30 */ \ + "b\035ipv\0" /* bit 29 */ \ + "b\034grv\0" /* bit 28 */ \ + "b\033crv\0" /* bit 27 */ \ + "b\032srv\0" /* bit 26 */ \ + "b\031trv\0" /* bit 25 */ #define PIM_CPU_HPMC_TL(cs) (((cs) >> 4) & 0x3) #define PIM_CPU_HPMC_HD (1 << 3) #define PIM_CPU_HPMC_SIS (1 << 2) @@ -189,14 +189,14 @@ struct hppa_pim_checks { #define PIM_CACHE_PADD(cc) ((cc) & 0x000f) #define PIM_CACHE_BITS \ "\177\020" /* New bitmask format */ \ - "b\040icc\0" /* bit 31 */ \ - "b\039dcc\0" /* bit 30 */ \ - "b\038tc\0" /* bit 29 */ \ - "b\037dc\0" /* bit 28 */ \ - "b\036crg\0" /* bit 27 */ \ - "b\035lc\0" /* bit 26 */ \ - "b\034rcc\0" /* bit 25 */ \ - "f\000\032paddr\0" /* bit 0 .. 23 */ + "b\037icc\0" /* bit 31 */ \ + "b\036dcc\0" /* bit 30 */ \ + "b\035tc\0" /* bit 29 */ \ + "b\034dc\0" /* bit 28 */ \ + "b\033crg\0" /* bit 27 */ \ + "b\032lc\0" /* bit 26 */ \ + "b\031rcc\0" /* bit 25 */ \ + "f\000\030paddr\0" /* bit 0 .. 23 */ /* The TLB Check word. */ uint32_t pim_check_tlb; @@ -207,11 +207,11 @@ struct hppa_pim_checks { #define PIM_TLB_TNF (1 << 27) #define PIM_TLB_BITS \ "\177\020" /* New bitmask format */ \ - "b\040itc\0" /* bit 31 */ \ - "b\039dtc\0" /* bit 30 */ \ - "b\038trg\0" /* bit 29 */ \ - "b\037tuc\0" /* bit 28 */ \ - "b\036tnf\0" /* bit 27 */ \ + "b\037itc\0" /* bit 31 */ \ + "b\036dtc\0" /* bit 30 */ \ + "b\035trg\0" /* bit 29 */ \ + "b\034tuc\0" /* bit 28 */ \ + "b\033tnf\0" /* bit 27 */ \ /* The Bus Check word. */ uint32_t pim_check_bus; @@ -238,7 +238,7 @@ struct hppa_pim_checks { uint32_t pim_check_assist; #define PIM_ASSIST_COC (1 << 31) #define PIM_ASSIST_SC (1 << 30) -#define PIM_ASSIST_BITS "\020\040COC\037SC" +#define PIM_ASSIST_BITS "\020\037COC\036SC" uint32_t pim_check_reserved_1;
CVS commit: [netbsd-10] src/sys/arch/hppa/hppa
Module Name:src Committed By: martin Date: Sat Feb 3 12:46:19 UTC 2024 Modified Files: src/sys/arch/hppa/hppa [netbsd-10]: pim.h Log Message: Pull up following revision(s) (requested by skrll in ticket #567): sys/arch/hppa/hppa/pim.h: revision 1.3 Fix one by one bugs I committed back in 2009. Spotted by rillig@. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.30.1 src/sys/arch/hppa/hppa/pim.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:41:30 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-9]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1793): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:41:30 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-9]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1793): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.36.4.1 -r1.36.4.2 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.1 src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.2 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.36.4.1 Sun Aug 9 14:03:07 2020 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sat Feb 3 12:41:29 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.36.4.1 2020/08/09 14:03:07 martin Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.36.4.2 2024/02/03 12:41:29 martin Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.36.4.1 2020/08/09 14:03:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.36.4.2 2024/02/03 12:41:29 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -589,9 +589,24 @@ static int ld_sdmmc_cachesync(struct ld_softc *ld, bool poll) { struct ld_sdmmc_softc *sc = device_private(ld->sc_dv); + struct sdmmc_softc *sdmmc = device_private(device_parent(ld->sc_dv)); struct ld_sdmmc_task *task; int error = -1; + /* + * If we come here through the sdmmc discovery task, we can't + * wait for a new task because the new task can't even begin + * until the sdmmc discovery task has completed. + * + * XXX This is wrong, because there may already be queued I/O + * tasks ahead of us. Fixing this properly requires doing + * discovery in a separate thread. But this should avoid the + * deadlock of PR kern/57870 (https://gnats.NetBSD.org/57870) + * until we do split that up. + */ + if (curlwp == sdmmc->sc_tskq_lwp) + return sdmmc_mem_flush_cache(sc->sc_sf, poll); + mutex_enter(>sc_lock); /* Acquire a free task, or fail with EBUSY. */
CVS commit: [netbsd-10] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:39:17 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-10]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #566): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.4.1 src/sys/dev/sdmmc/ld_sdmmc.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.42 src/sys/dev/sdmmc/ld_sdmmc.c:1.42.4.1 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.42 Mon May 16 10:03:23 2022 +++ src/sys/dev/sdmmc/ld_sdmmc.c Sat Feb 3 12:39:17 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.42 2022/05/16 10:03:23 jmcneill Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.42.4.1 2024/02/03 12:39:17 martin Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.42 2022/05/16 10:03:23 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.42.4.1 2024/02/03 12:39:17 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -599,9 +599,24 @@ static int ld_sdmmc_cachesync(struct ld_softc *ld, bool poll) { struct ld_sdmmc_softc *sc = device_private(ld->sc_dv); + struct sdmmc_softc *sdmmc = device_private(device_parent(ld->sc_dv)); struct ld_sdmmc_task *task; int error = -1; + /* + * If we come here through the sdmmc discovery task, we can't + * wait for a new task because the new task can't even begin + * until the sdmmc discovery task has completed. + * + * XXX This is wrong, because there may already be queued I/O + * tasks ahead of us. Fixing this properly requires doing + * discovery in a separate thread. But this should avoid the + * deadlock of PR kern/57870 (https://gnats.NetBSD.org/57870) + * until we do split that up. + */ + if (curlwp == sdmmc->sc_tskq_lwp) + return sdmmc_mem_flush_cache(sc->sc_sf, poll); + mutex_enter(>sc_lock); /* Acquire a free task, or fail with EBUSY. */
CVS commit: [netbsd-10] src/sys/dev/sdmmc
Module Name:src Committed By: martin Date: Sat Feb 3 12:39:17 UTC 2024 Modified Files: src/sys/dev/sdmmc [netbsd-10]: ld_sdmmc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #566): sys/dev/sdmmc/ld_sdmmc.c: revision 1.43 ld@sdmmc(4): Hack around deadlock in cache sync on detach. Yanking a card triggers the sdmmc discovery task, which runs in the sdmmc task thread, to detach any attached child devices. Detaching ld@sdmmc triggers a cache flush (via ldbegindetach -> disk_begindetach -> ld_lastclose -> ld_flush -> ioctl DIOCCACHESYNC), which is implemented by scheduling a task to do sdmmc_mem_flush_cache and then waiting for it to complete. The sdmmc_mem_cache_flush is done by an sdmmc task so it happens after all previously scheduled I/O operations -- that way the cache flush doesn't complete until the previously scheduled I/O operations are complete. However, when the cache flush task is issued from the discovery task, this doesn't work, because the cache flush task can't start until the discovery task has returned -- but the discovery task won't return until the cache flush task has completed. To work around this deadlock, which usually happens only when the device has been yanked anyway so further I/O would be lost anyway, just do the cache flush synchronously in DIOCCACHESYNC if we're running in the task thread. This isn't quite right -- implementation details of the task thread shouldn't bleed into ld@sdmmc, and running the cache sync _before_ any subsequently scheduled I/O tasks is asking for trouble -- but it should serve to avoid the deadlock in PR kern/57870 until we can fix a host of concurrency bugs in sdmmc by fixing the locking scheme and running discovery in a separate thread from tasks. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.4.1 src/sys/dev/sdmmc/ld_sdmmc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:17:03 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1933: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.24.2.30 -r1.24.2.31 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.88.2.58 -r1.88.2.59 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.29 -r1.24.6.30 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.22.2.21 -r1.22.2.22 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.56.2.43 -r1.56.2.44 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.30 src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.31 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.24.2.30 Wed Oct 18 14:23:15 2023 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Sat Feb 3 12:17:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.24.2.30 2023/10/18 14:23:15 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.24.2.31 2024/02/03 12:17:03 martin Exp $ */ /** @@ -64,13 +64,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.30 2023/10/18 14:23:15 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.24.2.31 2024/02/03 12:17:03 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" #include "ixgbe.h" +#ifdef RSC /* * HW RSC control: * this feature only works with @@ -84,7 +85,9 @@ __KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v * to enable. */ static bool ixgbe_rsc_enable = FALSE; +#endif +#ifdef IXGBE_FDIR /* * For Flow Director: this is the * number of TX packets we sample @@ -95,6 +98,7 @@ static bool ixgbe_rsc_enable = FALSE; * setting this to 0. */ static int atr_sample_rate = 20; +#endif #define IXGBE_M_ADJ(sc, rxr, mp) \ if (sc->max_frame_size <= (rxr->mbuf_sz - ETHER_ALIGN)) \ @@ -122,8 +126,9 @@ static __inline void ixgbe_rx_input(stru static int ixgbe_dma_malloc(struct ixgbe_softc *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct ixgbe_softc *, struct ixgbe_dma_alloc *); - -static void ixgbe_setup_hw_rsc(struct rx_ring *); +#ifdef RSC +static void ixgbe_setup_hw_rsc(struct rx_ring *); +#endif / * ixgbe_legacy_start_locked - Transmit entry point @@ -406,7 +411,7 @@ ixgbe_drain_all(struct ixgbe_softc *sc) static int ixgbe_xmit(struct tx_ring *txr, struct mbuf *m_head) { - struct ixgbe_softc *sc = txr->sc; + struct ixgbe_softc *sc = txr->sc; struct ixgbe_tx_buf *txbuf; union ixgbe_adv_tx_desc *txd = NULL; struct ifnet *ifp = sc->ifp; @@ -487,8 +492,8 @@ retry: } /* - * Set up the appropriate offload context - * this will consume the first descriptor + * Set up the appropriate offload context if requested, + * this may consume one TX descriptor. */ error = ixgbe_tx_ctx_setup(txr, m_head, _type_len, _status); if (__predict_false(error)) { @@ -625,14 +630,8 @@ ixgbe_allocate_transmit_buffers(struct t goto fail; } - txr->tx_buffers = - (struct ixgbe_tx_buf *) malloc(sizeof(struct ixgbe_tx_buf) * - sc->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO); - if (txr->tx_buffers == NULL) { - aprint_error_dev(dev, "Unable
CVS commit: [netbsd-8] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:17:03 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-8]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1933: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.24.2.30 -r1.24.2.31 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.88.2.58 -r1.88.2.59 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.24.6.29 -r1.24.6.30 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.22.2.21 -r1.22.2.22 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.56.2.43 -r1.56.2.44 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:13:33 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1792: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.54.2.14 -r1.54.2.15 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.29 -r1.199.2.30 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.12 -r1.56.2.13 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.41.2.11 -r1.41.2.12 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.125.2.24 -r1.125.2.25 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/ixgbe/ix_txrx.c diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.14 src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.15 --- src/sys/dev/pci/ixgbe/ix_txrx.c:1.54.2.14 Wed Oct 18 14:05:27 2023 +++ src/sys/dev/pci/ixgbe/ix_txrx.c Sat Feb 3 12:13:32 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $ */ +/* $NetBSD: ix_txrx.c,v 1.54.2.15 2024/02/03 12:13:32 martin Exp $ */ /** @@ -64,13 +64,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.14 2023/10/18 14:05:27 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.54.2.15 2024/02/03 12:13:32 martin Exp $"); #include "opt_inet.h" #include "opt_inet6.h" #include "ixgbe.h" +#ifdef RSC /* * HW RSC control: * this feature only works with @@ -84,7 +85,9 @@ __KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v * to enable. */ static bool ixgbe_rsc_enable = FALSE; +#endif +#ifdef IXGBE_FDIR /* * For Flow Director: this is the * number of TX packets we sample @@ -95,6 +98,7 @@ static bool ixgbe_rsc_enable = FALSE; * setting this to 0. */ static int atr_sample_rate = 20; +#endif #define IXGBE_M_ADJ(sc, rxr, mp) \ if (sc->max_frame_size <= (rxr->mbuf_sz - ETHER_ALIGN)) \ @@ -122,8 +126,9 @@ static __inline void ixgbe_rx_input(stru static int ixgbe_dma_malloc(struct ixgbe_softc *, bus_size_t, struct ixgbe_dma_alloc *, int); static void ixgbe_dma_free(struct ixgbe_softc *, struct ixgbe_dma_alloc *); - -static void ixgbe_setup_hw_rsc(struct rx_ring *); +#ifdef RSC +static void ixgbe_setup_hw_rsc(struct rx_ring *); +#endif / * ixgbe_legacy_start_locked - Transmit entry point @@ -406,7 +411,7 @@ ixgbe_drain_all(struct ixgbe_softc *sc) static int ixgbe_xmit(struct tx_ring *txr, struct mbuf *m_head) { - struct ixgbe_softc *sc = txr->sc; + struct ixgbe_softc *sc = txr->sc; struct ixgbe_tx_buf *txbuf; union ixgbe_adv_tx_desc *txd = NULL; struct ifnet *ifp = sc->ifp; @@ -487,8 +492,8 @@ retry: } /* - * Set up the appropriate offload context - * this will consume the first descriptor + * Set up the appropriate offload context if requested, + * this may consume one TX descriptor. */ error = ixgbe_tx_ctx_setup(txr, m_head, _type_len, _status); if (__predict_false(error)) { @@ -625,14 +630,8 @@ ixgbe_allocate_transmit_buffers(struct t goto fail; } - txr->tx_buffers = - (struct ixgbe_tx_buf *) malloc(sizeof(struct ixgbe_tx_buf) * - sc->num_tx_desc, M_DEVBUF, M_NOWAIT | M_ZERO); - if (txr->tx_buffers == NULL) { - aprint_error_dev(dev,
CVS commit: [netbsd-9] src/sys/dev/pci/ixgbe
Module Name:src Committed By: martin Date: Sat Feb 3 12:13:33 UTC 2024 Modified Files: src/sys/dev/pci/ixgbe [netbsd-9]: ix_txrx.c ixgbe.c ixgbe.h ixgbe_type.h ixv.c Log Message: Pull up the following, requested by msaitoh in ticket #1792: sys/dev/pci/ixgbe/ix_txrx.c 1.105-1.116 via patch sys/dev/pci/ixgbe/ixgbe.c 1.345-1.346,1.349 via patch sys/dev/pci/ixgbe/ixgbe.h 1.94-1.98 sys/dev/pci/ixgbe/ixgbe_type.h 1.62 sys/dev/pci/ixgbe/ixv.c 1.193,1.195-1.196 - Clear the WTHRESH bit field before writing it. - Optimize ixgbe_txeof(). - Use kmem_zalloc() instead of malloc(,M_ZERO). - Add QPRDC(Queue Packet Receive Drop Count) into iqdrops. - No functional change - Move assignment of TXD. - ixv(4): Remove unused IFF_OACTIVE. - Don't include the Flow Director related members to reduce the size of struct tx_ring. On amd64 and aarch64, the real size is not changed because of the alignment. - The descriptor ring size and the alignment are tested in the attach function, so it's not required to use roundup2(size, DBA_ALIGN). - Use #ifdef LRO more to reduce the size of struct rx_ring. - Change "me" from 32bit to 8bit because the max is 128. This commit doesn't change the real size of ix_queue, tx_ring and rx_ring because of the alignment. - Th RSC (hardware receive side coalescing) feature has been disabled all along, so enclose the code with #ifdef RSC. - Remove unused. - Modify for the readability. - Modify comment. - Fix comment. Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.54.2.14 -r1.54.2.15 src/sys/dev/pci/ixgbe/ix_txrx.c cvs rdiff -u -r1.199.2.29 -r1.199.2.30 src/sys/dev/pci/ixgbe/ixgbe.c cvs rdiff -u -r1.56.2.12 -r1.56.2.13 src/sys/dev/pci/ixgbe/ixgbe.h cvs rdiff -u -r1.41.2.11 -r1.41.2.12 src/sys/dev/pci/ixgbe/ixgbe_type.h cvs rdiff -u -r1.125.2.24 -r1.125.2.25 src/sys/dev/pci/ixgbe/ixv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sbin/blkdiscard
Module Name:src Committed By: martin Date: Sat Feb 3 12:09:07 UTC 2024 Modified Files: src/sbin/blkdiscard [netbsd-10]: blkdiscard.8 blkdiscard.c Log Message: Pull up following revision(s) (requested by mrg in ticket #565): sbin/blkdiscard/blkdiscard.c: revision 1.2 sbin/blkdiscard/blkdiscard.c: revision 1.3 sbin/blkdiscard/blkdiscard.8: revision 1.3 determine the tty width instead off writing 100 chars before a new line. blkdiscard: avoid asserting when passed a bsd disklabel raw device PR#57856 shows when using blkdiscard on eg, /dev/ld0 it asserts because '0' is not between 'a' and 'p'. switch this to using DISKPART() on the returned st_rdev, so it works on 'ld0c' or 'ld0' (rawpart=2.) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sbin/blkdiscard/blkdiscard.8 cvs rdiff -u -r1.1 -r1.1.2.1 src/sbin/blkdiscard/blkdiscard.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-10] src/sbin/blkdiscard
Module Name:src Committed By: martin Date: Sat Feb 3 12:09:07 UTC 2024 Modified Files: src/sbin/blkdiscard [netbsd-10]: blkdiscard.8 blkdiscard.c Log Message: Pull up following revision(s) (requested by mrg in ticket #565): sbin/blkdiscard/blkdiscard.c: revision 1.2 sbin/blkdiscard/blkdiscard.c: revision 1.3 sbin/blkdiscard/blkdiscard.8: revision 1.3 determine the tty width instead off writing 100 chars before a new line. blkdiscard: avoid asserting when passed a bsd disklabel raw device PR#57856 shows when using blkdiscard on eg, /dev/ld0 it asserts because '0' is not between 'a' and 'p'. switch this to using DISKPART() on the returned st_rdev, so it works on 'ld0c' or 'ld0' (rawpart=2.) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.2.1 src/sbin/blkdiscard/blkdiscard.8 cvs rdiff -u -r1.1 -r1.1.2.1 src/sbin/blkdiscard/blkdiscard.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/blkdiscard/blkdiscard.8 diff -u src/sbin/blkdiscard/blkdiscard.8:1.2 src/sbin/blkdiscard/blkdiscard.8:1.2.2.1 --- src/sbin/blkdiscard/blkdiscard.8:1.2 Sat Oct 15 21:53:21 2022 +++ src/sbin/blkdiscard/blkdiscard.8 Sat Feb 3 12:09:06 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: blkdiscard.8,v 1.2 2022/10/15 21:53:21 andvar Exp $ +.\" $NetBSD: blkdiscard.8,v 1.2.2.1 2024/02/03 12:09:06 martin Exp $ .\" .\" Copyright (c) 2022 Matthew R. Green .\" All rights reserved. @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 6, 2022 +.Dd January 13, 2024 .Dt BLKDISCARD 8 .Os .Sh NAME @@ -156,7 +156,7 @@ The .Nm command was written by .An Matthew R. Green -.Aq m...@eterna.com.au . +.Aq m...@eterna23.net . .Sh BUGS The secure erase functionality of the .Fl s Index: src/sbin/blkdiscard/blkdiscard.c diff -u src/sbin/blkdiscard/blkdiscard.c:1.1 src/sbin/blkdiscard/blkdiscard.c:1.1.2.1 --- src/sbin/blkdiscard/blkdiscard.c:1.1 Mon Feb 7 09:33:26 2022 +++ src/sbin/blkdiscard/blkdiscard.c Sat Feb 3 12:09:06 2024 @@ -1,7 +1,7 @@ -/* $NetBSD: blkdiscard.c,v 1.1 2022/02/07 09:33:26 mrg Exp $ */ +/* $NetBSD: blkdiscard.c,v 1.1.2.1 2024/02/03 12:09:06 martin Exp $ */ /* - * Copyright (c) 2019, 2020, 2022 Matthew R. Green + * Copyright (c) 2019, 2020, 2022, 2024 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -45,14 +45,14 @@ #include #include #include -#include #include static bool secure = false; static bool zeroout = false; static char *zeros = NULL; +static unsigned ttywidth = 80; -#define FDISCARD_VERSION 20220206u +#define FDISCARD_VERSION 20240113u static void __dead usage(const char* msg) @@ -104,6 +104,7 @@ main(int argc, char *argv[]) int64_t val; int i; bool verbose = false; + struct stat sb; /* Default /sbin/blkdiscard to be "run" */ bool norun = strcmp(getprogname(), "blkdiscard") != 0; @@ -175,6 +176,7 @@ main(int argc, char *argv[]) if (size == 0) { struct dkwedge_info dkw; + if (ioctl(fd, DIOCGWEDGEINFO, ) == 0) { size = dkw.dkw_size * DEV_BSIZE; if (verbose) @@ -183,24 +185,20 @@ main(int argc, char *argv[]) } } - if (size == 0) { + if (size == 0 && fstat(fd, ) != -1) { struct disklabel dl; + if (ioctl(fd, DIOCGDINFO, ) != -1) { - char partchar = name[strlen(name)-1]; - assert(partchar >= 'a' && partchar <= 'p'); - int part = partchar - 'a'; + unsigned part = DISKPART(sb.st_rdev); size = (uint64_t)dl.d_partitions[part].p_size * dl.d_secsize; if (verbose) -printf("%s: disklabel size is %lld\n", name, -(long long)size); +printf("%s: partition %u disklabel size is" + " %lld\n", name, part, (long long)size); } - } - if (size == 0) { - struct stat sb; - if (fstat(fd, ) != -1) { + if (size == 0) { size = sb.st_size; if (verbose) printf("%s: stat size is %lld\n", name, @@ -224,7 +222,9 @@ main(int argc, char *argv[]) size = end_offset; } - if (verbose) + if (verbose) { + struct winsize winsize; + printf("%sgoing to %s on %s from byte %lld for " "%lld bytes, %lld at a time\n", norun ? "not " : "", @@ -233,7 +233,12 @@ main(int argc, char *argv[]) name, (long long)first_byte, (long long)size, (long long)max_per_call); - int loop = 0; + if (ioctl(fileno(stdout), TIOCGWINSZ, ) != -1 && + winsize.ws_col > 1) + ttywidth = winsize.ws_col - 1; + } + + unsigned loop = 0; while (size > 0) { if (size > max_per_call) discard_size = max_per_call; @@ -248,7 +253,7 @@ main(int argc, char *argv[]) if (verbose) { printf("."); fflush(stdout); - if (loop++ > 100) { + if (++loop >= ttywidth) { loop = 0; printf("\n"); }
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:04:07 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-8]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1932): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.508.4.53 -r1.508.4.54 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.508.4.53 src/sys/dev/pci/if_wm.c:1.508.4.54 --- src/sys/dev/pci/if_wm.c:1.508.4.53 Wed Oct 18 14:41:54 2023 +++ src/sys/dev/pci/if_wm.c Sat Feb 3 12:04:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.508.4.53 2023/10/18 14:41:54 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.508.4.54 2024/02/03 12:04:06 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.53 2023/10/18 14:41:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.54 2024/02/03 12:04:06 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1732,6 +1732,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM19, "I219 LM (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM20, + "I219 LM (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM21, + "I219 LM (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM22, "I219 LM (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ @@ -1792,6 +1798,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V19, "I219 V (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V20, + "I219 V (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V21, + "I219 V (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V22, "I219 V (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */
CVS commit: [netbsd-8] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:04:07 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-8]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1932): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.508.4.53 -r1.508.4.54 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:02:58 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1791): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.645.2.19 -r1.645.2.20 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.645.2.19 src/sys/dev/pci/if_wm.c:1.645.2.20 --- src/sys/dev/pci/if_wm.c:1.645.2.19 Wed Oct 18 14:29:18 2023 +++ src/sys/dev/pci/if_wm.c Sat Feb 3 12:02:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $ */ +/* $NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.19 2023/10/18 14:29:18 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.645.2.20 2024/02/03 12:02:58 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1761,6 +1761,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM19, "I219 LM (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM20, + "I219 LM (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM21, + "I219 LM (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_LM22, "I219 LM (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */ @@ -1821,6 +1827,12 @@ static const struct wm_product { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V19, "I219 V (19) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V20, + "I219 V (20) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V21, + "I219 V (21) Ethernet Connection", + WM_T_PCH_TGP, WMP_F_COPPER }, /* MTP */ { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_I219_V22, "I219 V (22) Ethernet Connection", WM_T_PCH_TGP, WMP_F_COPPER }, /* ADP(RPL) */
CVS commit: [netbsd-9] src/sys/dev/pci
Module Name:src Committed By: martin Date: Sat Feb 3 12:02:58 UTC 2024 Modified Files: src/sys/dev/pci [netbsd-9]: if_wm.c Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1791): sys/dev/pci/if_wm.c: revision 1.793 Add Intel I219-{LM,V}(20,21) support. To generate a diff of this commit: cvs rdiff -u -r1.645.2.19 -r1.645.2.20 src/sys/dev/pci/if_wm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.