CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Jun 3 01:00:24 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: ksyms(4): Don't skip symbol tables that are soon to be freed, take 2. They will not actually be freed until /dev/ksyms is closed, so continued access to them remains kosher. The previous change was busted because of an off-by-one error in a previous previous change's iteration over the symtabs; that error has since been corrected. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.95 src/sys/kern/kern_ksyms.c:1.96 --- src/sys/kern/kern_ksyms.c:1.95 Thu Jun 3 01:00:15 2021 +++ src/sys/kern/kern_ksyms.c Thu Jun 3 01:00:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.95 2021/06/03 01:00:15 riastradh Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.96 2021/06/03 01:00:24 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.95 2021/06/03 01:00:15 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.96 2021/06/03 01:00:24 riastradh Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -1089,8 +1089,6 @@ ksymsread(dev_t dev, struct uio *uio, in for (st = TAILQ_FIRST(_symtabs); ; st = TAILQ_NEXT(st, sd_queue)) { - if (__predict_false(st->sd_gone)) - continue; if (uio->uio_resid == 0) return 0; if (uio->uio_offset <= st->sd_symsize + filepos) { @@ -1108,13 +1106,11 @@ ksymsread(dev_t dev, struct uio *uio, in /* * Copy out the string table */ - KASSERT(filepos <= sizeof(struct ksyms_hdr) + + KASSERT(filepos == sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); for (st = TAILQ_FIRST(_symtabs); ; st = TAILQ_NEXT(st, sd_queue)) { - if (__predict_false(st->sd_gone)) - continue; if (uio->uio_resid == 0) return 0; if (uio->uio_offset <= st->sd_strsize + filepos) {
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Jun 3 01:00:24 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: ksyms(4): Don't skip symbol tables that are soon to be freed, take 2. They will not actually be freed until /dev/ksyms is closed, so continued access to them remains kosher. The previous change was busted because of an off-by-one error in a previous previous change's iteration over the symtabs; that error has since been corrected. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Jun 3 01:00:15 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: ksyms(4): Fix race in ksymsread iteration. TAILQ_NEXT(ksyms_last_snapshot) might change while we are iterating, but ksyms_last_snapshot itself cannot, so invert the loop structure. Discussed with rin@. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Thu Jun 3 01:00:15 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: ksyms(4): Fix race in ksymsread iteration. TAILQ_NEXT(ksyms_last_snapshot) might change while we are iterating, but ksyms_last_snapshot itself cannot, so invert the loop structure. Discussed with rin@. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.94 src/sys/kern/kern_ksyms.c:1.95 --- src/sys/kern/kern_ksyms.c:1.94 Wed Jun 2 15:43:33 2021 +++ src/sys/kern/kern_ksyms.c Thu Jun 3 01:00:15 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.95 2021/06/03 01:00:15 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.95 2021/06/03 01:00:15 riastradh Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -1087,7 +1087,7 @@ ksymsread(dev_t dev, struct uio *uio, in */ filepos = sizeof(struct ksyms_hdr); for (st = TAILQ_FIRST(_symtabs); - st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); + ; st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue; @@ -1101,6 +1101,8 @@ ksymsread(dev_t dev, struct uio *uio, in return error; } filepos += st->sd_symsize; + if (st == ksyms_last_snapshot) + break; } /* @@ -1109,7 +,7 @@ ksymsread(dev_t dev, struct uio *uio, in KASSERT(filepos <= sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); for (st = TAILQ_FIRST(_symtabs); - st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); + ; st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue; @@ -1123,6 +1125,8 @@ ksymsread(dev_t dev, struct uio *uio, in return error; } filepos += st->sd_strsize; + if (st == ksyms_last_snapshot) + break; } /*
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jun 2 22:32:29 UTC 2021 Modified Files: src/share/man/man4: urtwn.4 Log Message: Add commented out ASUSTek USB-N13 B1 The urtwn driver attaches, but I didn't have a chance to try if it actually works. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/urtwn.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jun 2 22:32:29 UTC 2021 Modified Files: src/share/man/man4: urtwn.4 Log Message: Add commented out ASUSTek USB-N13 B1 The urtwn driver attaches, but I didn't have a chance to try if it actually works. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/urtwn.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/urtwn.4 diff -u src/share/man/man4/urtwn.4:1.17 src/share/man/man4/urtwn.4:1.18 --- src/share/man/man4/urtwn.4:1.17 Thu Dec 20 15:19:31 2018 +++ src/share/man/man4/urtwn.4 Wed Jun 2 22:32:29 2021 @@ -1,4 +1,4 @@ -.\" $NetBSD: urtwn.4,v 1.17 2018/12/20 15:19:31 tih Exp $ +.\" $NetBSD: urtwn.4,v 1.18 2021/06/02 22:32:29 wiz Exp $ .\" $OpenBSD: urtwn.4,v 1.15 2011/11/26 06:39:33 ckuethe Exp $ .\" .\" Copyright (c) 2010 Damien Bergamini @@ -106,6 +106,7 @@ The following adapters should work: .It Airlink101 AWLL5088 .It Aus. Linx AL-9604R1S .It ASUSTeK USB-N10 NANO +.\".It ASUSTek USB-N13 B1 .It B-Link BL-LW05-5R .It Belkin F7D1102 Surf Wireless Micro .It D-Link DWA-121
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Wed Jun 2 21:35:17 UTC 2021 Modified Files: src/sys/dev/ic: tpm.c Log Message: tpm(4): Preserve error if any on ending commands. This way we don't spuriously suppress an error, such as TPM_DEACTIVATED, in a loop where we rely on it. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/tpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/tpm.c diff -u src/sys/dev/ic/tpm.c:1.21 src/sys/dev/ic/tpm.c:1.22 --- src/sys/dev/ic/tpm.c:1.21 Sat May 29 08:45:29 2021 +++ src/sys/dev/ic/tpm.c Wed Jun 2 21:35:17 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tpm.c,v 1.21 2021/05/29 08:45:29 riastradh Exp $ */ +/* $NetBSD: tpm.c,v 1.22 2021/06/02 21:35:17 riastradh Exp $ */ /* * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.21 2021/05/29 08:45:29 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tpm.c,v 1.22 2021/06/02 21:35:17 riastradh Exp $"); #include #include @@ -811,7 +811,7 @@ tpm_tis12_end(struct tpm_softc *sc, int if (rw == UIO_READ) { rv = tpm_waitfor(sc, TPM_STS_VALID, TPM_READ_TMO, sc->sc_intf->read); if (rv) - return rv; + goto out; /* Still more data? */ sc->sc_status = tpm_status(sc); @@ -836,7 +836,7 @@ tpm_tis12_end(struct tpm_softc *sc, int err ? TPM_STS_CMD_READY : TPM_STS_GO); } - return rv; +out: return err ? err : rv; } const struct tpm_intf tpm_intf_tis12 = {
CVS commit: src/sys/dev/ic
Module Name:src Committed By: riastradh Date: Wed Jun 2 21:35:17 UTC 2021 Modified Files: src/sys/dev/ic: tpm.c Log Message: tpm(4): Preserve error if any on ending commands. This way we don't spuriously suppress an error, such as TPM_DEACTIVATED, in a loop where we rely on it. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/dev/ic/tpm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 21:34:58 UTC 2021 Modified Files: src/sys/kern: kern_tc.c Log Message: timecounter(9): Zero the next pointer after tc_detach. This reverts it to a state where tc_init works again. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/kern/kern_tc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_tc.c diff -u src/sys/kern/kern_tc.c:1.61 src/sys/kern/kern_tc.c:1.62 --- src/sys/kern/kern_tc.c:1.61 Thu Apr 8 06:20:47 2021 +++ src/sys/kern/kern_tc.c Wed Jun 2 21:34:58 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $ */ +/* $NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -40,7 +40,7 @@ #include /* __FBSDID("$FreeBSD: src/sys/kern/kern_tc.c,v 1.166 2005/09/19 22:16:31 andre Exp $"); */ -__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.61 2021/04/08 06:20:47 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_tc.c,v 1.62 2021/06/02 21:34:58 riastradh Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -698,10 +698,13 @@ tc_detach(struct timecounter *target) * before retrying. */ if (l == NULL) { - return 0; + break; } (void)kpause("tcdetach", false, mstohz(10), NULL); } + + tc->tc_next = NULL; + return 0; } /* Report the frequency of the current timecounter. */
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 21:34:58 UTC 2021 Modified Files: src/sys/kern: kern_tc.c Log Message: timecounter(9): Zero the next pointer after tc_detach. This reverts it to a state where tc_init works again. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/kern/kern_tc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Wed Jun 2 17:56:41 UTC 2021 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Clear sc_mode only on last close. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.104 src/sys/dev/dkwedge/dk.c:1.105 --- src/sys/dev/dkwedge/dk.c:1.104 Wed Jun 2 15:59:08 2021 +++ src/sys/dev/dkwedge/dk.c Wed Jun 2 17:56:40 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.104 2021/06/02 15:59:08 mlelstv Exp $ */ +/* $NetBSD: dk.c,v 1.105 2021/06/02 17:56:40 mlelstv Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.104 2021/06/02 15:59:08 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.105 2021/06/02 17:56:40 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -1221,6 +1221,7 @@ dklastclose(struct dkwedge_softc *sc) KASSERT(sc->sc_parent->dk_rawvp != NULL); vp = sc->sc_parent->dk_rawvp; sc->sc_parent->dk_rawvp = NULL; + sc->sc_mode = 0; } } @@ -1264,9 +1265,7 @@ dkclose(dev_t dev, int flags, int fmt, s if (sc->sc_dk.dk_openmask == 0) { error = dklastclose(sc); /* releases locks */ - sc->sc_mode = 0; } else { - sc->sc_mode = 0; mutex_exit(>sc_parent->dk_rawlock); mutex_exit(>sc_dk.dk_openlock); }
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Wed Jun 2 17:56:41 UTC 2021 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Clear sc_mode only on last close. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/dev/dkwedge/dk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/kern
Hmm, misleading commit log (code itself is correct). More precisely: s/the last element of ksyms_symtabs/ksyms_last_snapshot/ Anyway, does this help you to reintroduce "ksyms(4): Don't skip symbol tables that are soon to be freed."? That KASSERT does not fire anymore for aarch64, as far as I can see. Thanks, rin On 2021/06/03 0:43, Rin Okuyama wrote: Module Name:src Committed By: rin Date: Wed Jun 2 15:43:33 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: Fix regression introduced in rev 1.90: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_ksyms.c#rev1.90 in which the last element of ksyms_symtabs is skipped by mistake. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.93 src/sys/kern/kern_ksyms.c:1.94 --- src/sys/kern/kern_ksyms.c:1.93 Wed Jun 2 08:46:16 2021 +++ src/sys/kern/kern_ksyms.c Wed Jun 2 15:43:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -1087,7 +1087,7 @@ ksymsread(dev_t dev, struct uio *uio, in */ filepos = sizeof(struct ksyms_hdr); for (st = TAILQ_FIRST(_symtabs); -st != ksyms_last_snapshot; +st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue; @@ -1109,7 +1109,7 @@ ksymsread(dev_t dev, struct uio *uio, in KASSERT(filepos <= sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); for (st = TAILQ_FIRST(_symtabs); -st != ksyms_last_snapshot; +st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue;
CVS commit: src/distrib/amd64/installimage
Module Name:src Committed By: pgoyette Date: Wed Jun 2 16:07:33 UTC 2021 Modified Files: src/distrib/amd64/installimage: Makefile Log Message: The install image grew again - update size To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/amd64/installimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/amd64/installimage
Module Name:src Committed By: pgoyette Date: Wed Jun 2 16:07:33 UTC 2021 Modified Files: src/distrib/amd64/installimage: Makefile Log Message: The install image grew again - update size To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/distrib/amd64/installimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amd64/installimage/Makefile diff -u src/distrib/amd64/installimage/Makefile:1.16 src/distrib/amd64/installimage/Makefile:1.17 --- src/distrib/amd64/installimage/Makefile:1.16 Mon Apr 26 14:08:11 2021 +++ src/distrib/amd64/installimage/Makefile Wed Jun 2 16:07:33 2021 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.16 2021/04/26 14:08:11 pgoyette Exp $ +# $NetBSD: Makefile,v 1.17 2021/06/02 16:07:33 pgoyette Exp $ .include INSTIMGBASE= NetBSD-${DISTRIBVER}-amd64-install # gives ${IMGBASE}.img -INSTIMAGEMB?= 1700 # for all installation binaries +INSTIMAGEMB?= 1800 # for all installation binaries PRIMARY_BOOT= bootxx_ffsv1 SECONDARY_BOOT= boot
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Wed Jun 2 15:59:08 UTC 2021 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Copy mode of open wedges with the same parent and validate it. Remove race on mode value when closing. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/dev/dkwedge/dk.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/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.103 src/sys/dev/dkwedge/dk.c:1.104 --- src/sys/dev/dkwedge/dk.c:1.103 Sat May 22 13:43:50 2021 +++ src/sys/dev/dkwedge/dk.c Wed Jun 2 15:59:08 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.103 2021/05/22 13:43:50 mlelstv Exp $ */ +/* $NetBSD: dk.c,v 1.104 2021/06/02 15:59:08 mlelstv Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.103 2021/05/22 13:43:50 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.104 2021/06/02 15:59:08 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -1137,6 +1137,7 @@ static int dkopen(dev_t dev, int flags, int fmt, struct lwp *l) { struct dkwedge_softc *sc = dkwedge_lookup(dev); + struct dkwedge_softc *nsc; struct vnode *vp; int error = 0; int mode; @@ -1169,13 +1170,24 @@ dkopen(dev_t dev, int flags, int fmt, st } if (error) goto popen_fail; - /* remember open mode */ - sc->sc_mode = mode; sc->sc_parent->dk_rawvp = vp; + } else { + /* + * Retrieve mode from an already opened wedge. + */ + mode = 0; + LIST_FOREACH(nsc, >sc_parent->dk_wedges, sc_plink) { +if (nsc == sc || nsc->sc_dk.dk_openmask == 0) + continue; +mode = nsc->sc_mode; +break; + } } + sc->sc_mode = mode; sc->sc_parent->dk_rawopens++; - } else if (flags & ~sc->sc_mode & FWRITE) { - /* parent is opened read-only, cannot open read-write */ + } + KASSERT(sc->sc_mode != 0); + if (flags & ~sc->sc_mode & FWRITE) { error = EROFS; goto popen_fail; } @@ -1199,7 +1211,9 @@ static int dklastclose(struct dkwedge_softc *sc) { struct vnode *vp; - int error = 0; + int error = 0, mode; + + mode = sc->sc_mode; vp = NULL; if (sc->sc_parent->dk_rawopens > 0) { @@ -1214,7 +1228,7 @@ dklastclose(struct dkwedge_softc *sc) mutex_exit(>sc_dk.dk_openlock); if (vp) { - dk_close_parent(vp, sc->sc_mode); + dk_close_parent(vp, mode); } return error; @@ -1248,9 +1262,11 @@ dkclose(dev_t dev, int flags, int fmt, s sc->sc_dk.dk_openmask = sc->sc_dk.dk_copenmask | sc->sc_dk.dk_bopenmask; - if (sc->sc_dk.dk_openmask == 0) + if (sc->sc_dk.dk_openmask == 0) { error = dklastclose(sc); /* releases locks */ - else { + sc->sc_mode = 0; + } else { + sc->sc_mode = 0; mutex_exit(>sc_parent->dk_rawlock); mutex_exit(>sc_dk.dk_openlock); }
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Wed Jun 2 15:59:08 UTC 2021 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Copy mode of open wedges with the same parent and validate it. Remove race on mode value when closing. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.104 src/sys/dev/dkwedge/dk.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: nia Date: Wed Jun 2 15:45:29 UTC 2021 Modified Files: src/sys/conf: Makefile.kern.inc src/sys/external/bsd/drm2/drm: files.drmkms src/sys/external/bsd/drm2/i915drm: files.i915drmkms src/sys/external/bsd/drm2/nouveau: files.nouveau src/sys/external/bsd/drm2/radeon: files.radeon Log Message: drm2: build with -fwrapv, since the Linux kernel does and we don't want to spend too much time fixing their code. silences a lot of KUBSAN warnings. we need to use COPTS to have per-option compiler flags. help from Riastradh. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.34 -r1.35 src/sys/external/bsd/drm2/drm/files.drmkms cvs rdiff -u -r1.40 -r1.41 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.28 -r1.29 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/conf/Makefile.kern.inc diff -u src/sys/conf/Makefile.kern.inc:1.280 src/sys/conf/Makefile.kern.inc:1.281 --- src/sys/conf/Makefile.kern.inc:1.280 Tue Apr 6 15:05:12 2021 +++ src/sys/conf/Makefile.kern.inc Wed Jun 2 15:45:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.kern.inc,v 1.280 2021/04/06 15:05:12 simonb Exp $ +# $NetBSD: Makefile.kern.inc,v 1.281 2021/06/02 15:45:28 nia Exp $ # # This file contains common `MI' targets and definitions and it is included # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}. @@ -449,7 +449,7 @@ CFLAGS+= ${COPTS.${.IMPSRC:T}} ${CPUFLAG CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} -.for _v in CFLAGS CPPFLAGS CWARNFLAGS +.for _v in COPTS CPPFLAGS CWARNFLAGS .for _c in ${CSRCS} ${_v}.${_c:T}+=${OPT.${_c:T}:@.o.@${${_v}.${.o.}}@} .endfor Index: src/sys/external/bsd/drm2/drm/files.drmkms diff -u src/sys/external/bsd/drm2/drm/files.drmkms:1.34 src/sys/external/bsd/drm2/drm/files.drmkms:1.35 --- src/sys/external/bsd/drm2/drm/files.drmkms:1.34 Fri Feb 14 04:30:05 2020 +++ src/sys/external/bsd/drm2/drm/files.drmkms Wed Jun 2 15:45:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.drmkms,v 1.34 2020/02/14 04:30:05 riastradh Exp $ +# $NetBSD: files.drmkms,v 1.35 2021/06/02 15:45:28 nia Exp $ include "external/bsd/drm2/linux/files.drmkms_linux" @@ -12,6 +12,10 @@ define drmkms: drmkms_linux, drmkms_i2c, defflag opt_drmkms.h DRMKMS_DEBUG +# This code comes from the Linux kernel, which assumes signed +# overflow is OK. +makeoptions drmkms "COPTS.drmkms"+="-fwrapv" + # Overrides first. makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include" makeoptions drmkms_ttm CPPFLAGS+="-I$S/external/bsd/drm2/include/drm" Index: src/sys/external/bsd/drm2/i915drm/files.i915drmkms diff -u src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.40 src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.41 --- src/sys/external/bsd/drm2/i915drm/files.i915drmkms:1.40 Tue Apr 13 04:59:00 2021 +++ src/sys/external/bsd/drm2/i915drm/files.i915drmkms Wed Jun 2 15:45:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.i915drmkms,v 1.40 2021/04/13 04:59:00 mrg Exp $ +# $NetBSD: files.i915drmkms,v 1.41 2021/06/02 15:45:28 nia Exp $ version 20180827 @@ -9,6 +9,10 @@ attach i915drmkms at pci device intelfb: intelfbbus, drmfb, drmfb_pci, wsemuldisplaydev attach intelfb at intelfbbus +# This code comes from the Linux kernel, which assumes signed +# overflow is OK. +makeoptions i915drmkms "COPTS.i915drmkms"+="-fwrapv" + makeoptions i915drmkms CPPFLAGS+="-I$S/external/bsd/drm2/i915drm" makeoptions i915drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/i915" Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.29 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.30 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.29 Fri Feb 14 04:30:05 2020 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Wed Jun 2 15:45:28 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.29 2020/02/14 04:30:05 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.30 2021/06/02 15:45:28 nia Exp $ version 20180827 @@ -16,6 +16,10 @@ file external/bsd/drm2/nouveau/nouveau_s file external/bsd/drm2/nouveau/nouveau_vga.c nouveau file external/bsd/drm2/nouveau/nouveaufb.c nouveaufb +# This code comes from the Linux kernel, which assumes signed +# overflow is OK. +makeoptions nouveau "COPTS.nouveau"+="-fwrapv" + makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau" makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include" makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include/nvkm" Index: src/sys/external/bsd/drm2/radeon/files.radeon diff -u src/sys/external/bsd/drm2/radeon/files.radeon:1.28
CVS commit: src/sys
Module Name:src Committed By: nia Date: Wed Jun 2 15:45:29 UTC 2021 Modified Files: src/sys/conf: Makefile.kern.inc src/sys/external/bsd/drm2/drm: files.drmkms src/sys/external/bsd/drm2/i915drm: files.i915drmkms src/sys/external/bsd/drm2/nouveau: files.nouveau src/sys/external/bsd/drm2/radeon: files.radeon Log Message: drm2: build with -fwrapv, since the Linux kernel does and we don't want to spend too much time fixing their code. silences a lot of KUBSAN warnings. we need to use COPTS to have per-option compiler flags. help from Riastradh. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/conf/Makefile.kern.inc cvs rdiff -u -r1.34 -r1.35 src/sys/external/bsd/drm2/drm/files.drmkms cvs rdiff -u -r1.40 -r1.41 src/sys/external/bsd/drm2/i915drm/files.i915drmkms cvs rdiff -u -r1.29 -r1.30 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.28 -r1.29 src/sys/external/bsd/drm2/radeon/files.radeon Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: rin Date: Wed Jun 2 15:43:33 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: Fix regression introduced in rev 1.90: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_ksyms.c#rev1.90 in which the last element of ksyms_symtabs is skipped by mistake. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/kern
Module Name:src Committed By: rin Date: Wed Jun 2 15:43:33 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: Fix regression introduced in rev 1.90: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_ksyms.c#rev1.90 in which the last element of ksyms_symtabs is skipped by mistake. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.93 src/sys/kern/kern_ksyms.c:1.94 --- src/sys/kern/kern_ksyms.c:1.93 Wed Jun 2 08:46:16 2021 +++ src/sys/kern/kern_ksyms.c Wed Jun 2 15:43:33 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.94 2021/06/02 15:43:33 rin Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -1087,7 +1087,7 @@ ksymsread(dev_t dev, struct uio *uio, in */ filepos = sizeof(struct ksyms_hdr); for (st = TAILQ_FIRST(_symtabs); - st != ksyms_last_snapshot; + st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue; @@ -1109,7 +1109,7 @@ ksymsread(dev_t dev, struct uio *uio, in KASSERT(filepos <= sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); for (st = TAILQ_FIRST(_symtabs); - st != ksyms_last_snapshot; + st != TAILQ_NEXT(ksyms_last_snapshot, sd_queue); st = TAILQ_NEXT(st, sd_queue)) { if (__predict_false(st->sd_gone)) continue;
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/appres
Module Name:src Committed By: cjep Date: Wed Jun 2 15:31:33 UTC 2021 Modified Files: src/external/mit/xorg/bin/appres [cjep_sun2x]: Makefile Log Message: Convert to x11 mk vars. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.24.1 src/external/mit/xorg/bin/appres/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/appres/Makefile diff -u src/external/mit/xorg/bin/appres/Makefile:1.5 src/external/mit/xorg/bin/appres/Makefile:1.5.24.1 --- src/external/mit/xorg/bin/appres/Makefile:1.5 Mon Jul 20 23:50:22 2015 +++ src/external/mit/xorg/bin/appres/Makefile Wed Jun 2 15:31:33 2021 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.5 2015/07/20 23:50:22 mrg Exp $ +# $NetBSD: Makefile,v 1.5.24.1 2021/06/02 15:31:33 cjep Exp $ .include PROG= appres -LDADD+= -lXt -lSM -lICE -lXext -lX11 -lxcb -lXdmcp -lXau -DPADD+= ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11} ${LIBXCB} ${LIBXDMCP} ${LIBXAU} +LDADD+= ${XLIBLDADD_XT} +DPADD+= ${XLIBDPADD_XT} .PATH: ${X11SRCDIR.${PROG}} .PATH: ${X11SRCDIR.${PROG}}/man
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/appres
Module Name:src Committed By: cjep Date: Wed Jun 2 15:31:33 UTC 2021 Modified Files: src/external/mit/xorg/bin/appres [cjep_sun2x]: Makefile Log Message: Convert to x11 mk vars. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.24.1 src/external/mit/xorg/bin/appres/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xbiff
Module Name:src Committed By: cjep Date: Wed Jun 2 15:04:23 UTC 2021 Modified Files: src/external/mit/xorg/bin/xbiff [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/xbiff/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xbiff/Makefile diff -u src/external/mit/xorg/bin/xbiff/Makefile:1.3 src/external/mit/xorg/bin/xbiff/Makefile:1.3.8.1 --- src/external/mit/xorg/bin/xbiff/Makefile:1.3 Mon Jul 15 05:41:16 2019 +++ src/external/mit/xorg/bin/xbiff/Makefile Wed Jun 2 15:04:23 2021 @@ -1,13 +1,12 @@ -# $NetBSD: Makefile,v 1.3 2019/07/15 05:41:16 mrg Exp $ +# $NetBSD: Makefile,v 1.3.8.1 2021/06/02 15:04:23 cjep Exp $ .include PROG= xbiff SRCS= xbiff.c Mailbox.c -LDADD+= -lXext -lXaw -lXmu -lXt -lX11 -lSM -lICE -lXau -DPADD+= ${LIBXEXT} ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBX11} ${LIBSM} ${LIBICE} \ - ${LIBXAU} +LDADD+= ${XLIBLDADD_XAW} +DPADD+= ${XLIBDPADD_XAW} CPPFLAGS+= -I${X11SRCDIR.${PROG}}/../include CPPFLAGS+= -D_CONST_X_STRING
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xbiff
Module Name:src Committed By: cjep Date: Wed Jun 2 15:04:23 UTC 2021 Modified Files: src/external/mit/xorg/bin/xbiff [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/xbiff/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xcalc
Module Name:src Committed By: cjep Date: Wed Jun 2 15:03:56 UTC 2021 Modified Files: src/external/mit/xorg/bin/xcalc [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.8.1 src/external/mit/xorg/bin/xcalc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xcalc/Makefile diff -u src/external/mit/xorg/bin/xcalc/Makefile:1.5 src/external/mit/xorg/bin/xcalc/Makefile:1.5.8.1 --- src/external/mit/xorg/bin/xcalc/Makefile:1.5 Mon Jul 8 20:37:33 2019 +++ src/external/mit/xorg/bin/xcalc/Makefile Wed Jun 2 15:03:56 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2019/07/08 20:37:33 mrg Exp $ +# $NetBSD: Makefile,v 1.5.8.1 2021/06/02 15:03:56 cjep Exp $ .include @@ -7,9 +7,8 @@ SRCS= actions.c math.c xcalc.c APPDEFS=XCalc XCalc-color -LDADD+= -lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11 -lm -DPADD+= ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} \ - ${LIBXPM} ${LIBXEXT} ${LIBX11} ${LIBM} +LDADD+= ${XLIBLDADD_XAW} -lm +DPADD+= ${XLIBDPADD_XAW} ${LIBM} CPPFLAGS+= -DHAVE_STRLCPY -D_CONST_X_STRING
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xcalc
Module Name:src Committed By: cjep Date: Wed Jun 2 15:03:56 UTC 2021 Modified Files: src/external/mit/xorg/bin/xcalc [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.8.1 src/external/mit/xorg/bin/xcalc/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xcompmgr
Module Name:src Committed By: cjep Date: Wed Jun 2 15:02:43 UTC 2021 Modified Files: src/external/mit/xorg/bin/xcompmgr [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.4.1 src/external/mit/xorg/bin/xcompmgr/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xcompmgr/Makefile diff -u src/external/mit/xorg/bin/xcompmgr/Makefile:1.1 src/external/mit/xorg/bin/xcompmgr/Makefile:1.1.4.1 --- src/external/mit/xorg/bin/xcompmgr/Makefile:1.1 Fri Oct 16 08:28:17 2020 +++ src/external/mit/xorg/bin/xcompmgr/Makefile Wed Jun 2 15:02:43 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2020/10/16 08:28:17 nia Exp $ +# $NetBSD: Makefile,v 1.1.4.1 2021/06/02 15:02:43 cjep Exp $ .include @@ -6,8 +6,8 @@ PROG= xcompmgr LDADD+= -lm -lXcomposite -lXdamage -lXfixes -lXrender DPADD+= ${LIBM} ${LIBXCOMPOSITE} ${LIBXDAMAGE} ${LIBXFIXES} ${LIBXRENDER} -LDADD+= -lX11 -lXext -DPADD+= ${LIBX11} ${LIBXEXT} +LDADD+= ${XLIBLDADD_XEXT} +DPADD+= ${XLIBDPADD_XEXT} .PATH: ${X11SRCDIR.${PROG}} .PATH: ${X11SRCDIR.${PROG}}/man
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xcompmgr
Module Name:src Committed By: cjep Date: Wed Jun 2 15:02:43 UTC 2021 Modified Files: src/external/mit/xorg/bin/xcompmgr [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.4.1 src/external/mit/xorg/bin/xcompmgr/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: rin Date: Wed Jun 2 15:01:18 UTC 2021 Modified Files: xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd: ppc_video.c Log Message: Declare IOPortBase for mips, as done for xorg-server. Fix build for sgimips, which still uses xorg-server.old. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.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/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c diff -u xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.1.1.1 xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.2 --- xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c:1.1.1.1 Thu Jun 9 09:07:59 2016 +++ xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c Wed Jun 2 15:01:18 2021 @@ -145,7 +145,7 @@ xf86EnableInterrupts() } /* XXX why the hell is this necessary?! */ -#ifdef __arm__ +#if defined(__arm__) || defined(__mips__) unsigned int IOPortBase = (int)MAP_FAILED; #endif
CVS commit: xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd
Module Name:xsrc Committed By: rin Date: Wed Jun 2 15:01:18 UTC 2021 Modified Files: xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd: ppc_video.c Log Message: Declare IOPortBase for mips, as done for xorg-server. Fix build for sgimips, which still uses xorg-server.old. To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.2 \ xsrc/external/mit/xorg-server.old/dist/hw/xfree86/os-support/bsd/ppc_video.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xclipboard
Module Name:src Committed By: cjep Date: Wed Jun 2 14:55:47 UTC 2021 Modified Files: src/external/mit/xorg/bin/xclipboard [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.36.1 src/external/mit/xorg/bin/xclipboard/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin/xclipboard
Module Name:src Committed By: cjep Date: Wed Jun 2 14:55:47 UTC 2021 Modified Files: src/external/mit/xorg/bin/xclipboard [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.36.1 src/external/mit/xorg/bin/xclipboard/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/bin/xclipboard/Makefile diff -u src/external/mit/xorg/bin/xclipboard/Makefile:1.3 src/external/mit/xorg/bin/xclipboard/Makefile:1.3.36.1 --- src/external/mit/xorg/bin/xclipboard/Makefile:1.3 Fri May 31 06:24:05 2013 +++ src/external/mit/xorg/bin/xclipboard/Makefile Wed Jun 2 14:55:47 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2013/05/31 06:24:05 mrg Exp $ +# $NetBSD: Makefile,v 1.3.36.1 2021/06/02 14:55:47 cjep Exp $ .include @@ -6,9 +6,8 @@ PROG= xclipboard APPDEFS=XClipboard -LDADD+= -lXaw -lXmu -lXt -lSM -lICE -lXpm -lXext -lX11 -DPADD+= ${LIBXAW} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} \ - ${LIBXPM} ${LIBXEXT} ${LIBX11} +LDADD+= ${XLIBLDADD_XAW} +DPADD+= ${XLIBDPADD_XAW} .PATH: ${X11SRCDIR.${PROG}} ${X11SRCDIR.${PROG}}/app-defaults .PATH: ${X11SRCDIR.${PROG}}/man
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin
Module Name:src Committed By: cjep Date: Wed Jun 2 14:46:25 UTC 2021 Modified Files: src/external/mit/xorg/bin/bitmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/editres [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-cache [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-cat [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-conflist [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-list [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-match [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-pattern [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-query [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-scan [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-validate [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fstobdf [cjep_sun2x]: Makefile src/external/mit/xorg/bin/ico [cjep_sun2x]: Makefile src/external/mit/xorg/bin/listres [cjep_sun2x]: Makefile src/external/mit/xorg/bin/oclock [cjep_sun2x]: Makefile src/external/mit/xorg/bin/proxymngr [cjep_sun2x]: Makefile src/external/mit/xorg/bin/setxkbmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/smproxy [cjep_sun2x]: Makefile src/external/mit/xorg/bin/transset [cjep_sun2x]: Makefile src/external/mit/xorg/bin/twm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xcmsdb [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xconsole [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xcutsel [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xedit/xedit [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xev [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xf86dga [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xfindproxy [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xfontsel [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xgc [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xhost [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xinit [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbcomp [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbevd [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbprint [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkill [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xload [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsatoms [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsclients [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsfonts [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmag [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xman [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmessage [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmh [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmodmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmore [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xprop [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrandr [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrdb [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrefresh [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetmode [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetpointer [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetwallpaper [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xstdcmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xvinfo [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xwd [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xwud [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.36.1 src/external/mit/xorg/bin/bitmap/Makefile cvs rdiff -u -r1.3 -r1.3.36.1 src/external/mit/xorg/bin/editres/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-cache/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-cat/Makefile cvs rdiff -u -r1.1 -r1.1.10.1 src/external/mit/xorg/bin/fc-conflist/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-list/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-match/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-pattern/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-query/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-scan/Makefile cvs rdiff -u -r1.2 -r1.2.8.1 src/external/mit/xorg/bin/fc-validate/Makefile cvs rdiff -u -r1.3 -r1.3.24.1 src/external/mit/xorg/bin/fstobdf/Makefile cvs rdiff -u -r1.3 -r1.3.10.1 src/external/mit/xorg/bin/ico/Makefile cvs rdiff -u -r1.2 -r1.2.36.1 src/external/mit/xorg/bin/listres/Makefile cvs rdiff -u -r1.3 -r1.3.36.1
CVS commit: [cjep_sun2x] src/external/mit/xorg/bin
Module Name:src Committed By: cjep Date: Wed Jun 2 14:46:25 UTC 2021 Modified Files: src/external/mit/xorg/bin/bitmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/editres [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-cache [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-cat [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-conflist [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-list [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-match [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-pattern [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-query [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-scan [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fc-validate [cjep_sun2x]: Makefile src/external/mit/xorg/bin/fstobdf [cjep_sun2x]: Makefile src/external/mit/xorg/bin/ico [cjep_sun2x]: Makefile src/external/mit/xorg/bin/listres [cjep_sun2x]: Makefile src/external/mit/xorg/bin/oclock [cjep_sun2x]: Makefile src/external/mit/xorg/bin/proxymngr [cjep_sun2x]: Makefile src/external/mit/xorg/bin/setxkbmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/smproxy [cjep_sun2x]: Makefile src/external/mit/xorg/bin/transset [cjep_sun2x]: Makefile src/external/mit/xorg/bin/twm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xcmsdb [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xconsole [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xcutsel [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xedit/xedit [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xev [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xf86dga [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xfindproxy [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xfontsel [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xgc [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xhost [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xinit [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbcomp [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbevd [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkbprint [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xkill [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xload [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsatoms [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsclients [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xlsfonts [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmag [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xman [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmessage [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmh [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmodmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xmore [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xprop [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrandr [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrdb [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xrefresh [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetmode [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetpointer [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsetwallpaper [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xsm [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xstdcmap [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xvinfo [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xwd [cjep_sun2x]: Makefile src/external/mit/xorg/bin/xwud [cjep_sun2x]: Makefile Log Message: Use x11 variables for LDADD and DPADD. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.36.1 src/external/mit/xorg/bin/bitmap/Makefile cvs rdiff -u -r1.3 -r1.3.36.1 src/external/mit/xorg/bin/editres/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-cache/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-cat/Makefile cvs rdiff -u -r1.1 -r1.1.10.1 src/external/mit/xorg/bin/fc-conflist/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-list/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-match/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-pattern/Makefile cvs rdiff -u -r1.4 -r1.4.8.1 src/external/mit/xorg/bin/fc-query/Makefile cvs rdiff -u -r1.3 -r1.3.8.1 src/external/mit/xorg/bin/fc-scan/Makefile cvs rdiff -u -r1.2 -r1.2.8.1 src/external/mit/xorg/bin/fc-validate/Makefile cvs rdiff -u -r1.3 -r1.3.24.1 src/external/mit/xorg/bin/fstobdf/Makefile cvs rdiff -u -r1.3 -r1.3.10.1 src/external/mit/xorg/bin/ico/Makefile cvs rdiff -u -r1.2 -r1.2.36.1 src/external/mit/xorg/bin/listres/Makefile cvs rdiff -u -r1.3 -r1.3.36.1
CVS commit: [cjep_sun2x] src/external/mit/ctwm/bin/ctwm
Module Name:src Committed By: cjep Date: Wed Jun 2 14:27:56 UTC 2021 Modified Files: src/external/mit/ctwm/bin/ctwm [cjep_sun2x]: Makefile Log Message: Use new X11 LDADD/DPADD flags. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.4.1 src/external/mit/ctwm/bin/ctwm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/ctwm/bin/ctwm/Makefile diff -u src/external/mit/ctwm/bin/ctwm/Makefile:1.11 src/external/mit/ctwm/bin/ctwm/Makefile:1.11.4.1 --- src/external/mit/ctwm/bin/ctwm/Makefile:1.11 Mon Apr 12 03:57:06 2021 +++ src/external/mit/ctwm/bin/ctwm/Makefile Wed Jun 2 14:27:56 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.11 2021/04/12 03:57:06 mrg Exp $ +# $NetBSD: Makefile,v 1.11.4.1 2021/06/02 14:27:56 cjep Exp $ .include @@ -57,8 +57,8 @@ FILES= 3D_Expand15.xpm 3D_Iconify15.xp xrn-compose.xpm xrn.goodnews.xpm xrn.nonews.xpm xrn.xpm \ xterm.xpm -LDADD+= -lXpm -lXmu -lXt -lSM -lICE -lXext -lX11 -DPADD+= ${LIBXPM} ${LIBXMU} ${LIBXT} ${LIBSM} ${LIBICE} ${LIBXEXT} ${LIBX11} +LDADD+= ${XLIBLDADD_XMU_XPM} +DPADD+= ${XLIBDPADD_XMU_XPM} .PATH: ${CTWMDIR} ${CTWMDIR}/xpm ${CTWMDIR}/ext ${CTWMDIR}/gen
CVS commit: [cjep_sun2x] src/external/mit/ctwm/bin/ctwm
Module Name:src Committed By: cjep Date: Wed Jun 2 14:27:56 UTC 2021 Modified Files: src/external/mit/ctwm/bin/ctwm [cjep_sun2x]: Makefile Log Message: Use new X11 LDADD/DPADD flags. Now builds on sun2. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.11.4.1 src/external/mit/ctwm/bin/ctwm/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [cjep_sun2x] src/share/mk
Module Name:src Committed By: cjep Date: Wed Jun 2 14:22:55 UTC 2021 Modified Files: src/share/mk [cjep_sun2x]: bsd.x11.mk Log Message: Work towards X sources building statically and on sun2. Setup specific make variables to contain the full set of library flags (LDADD and DPADD) for programs in the xorg suite. Each list contains all needed dependencies so that the programs will build statically. Suggested by mrg@ To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.138.4.1 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.x11.mk diff -u src/share/mk/bsd.x11.mk:1.138 src/share/mk/bsd.x11.mk:1.138.4.1 --- src/share/mk/bsd.x11.mk:1.138 Tue Apr 27 04:02:09 2021 +++ src/share/mk/bsd.x11.mk Wed Jun 2 14:22:55 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.x11.mk,v 1.138 2021/04/27 04:02:09 mrg Exp $ +# $NetBSD: bsd.x11.mk,v 1.138.4.1 2021/06/02 14:22:55 cjep Exp $ .include @@ -172,6 +172,93 @@ CPPFLAGS+= -D__AMD64__ LDFLAGS+= -Wl,-rpath,${X11USRLIBDIR} -L=${X11USRLIBDIR} +# Library adds including full dependencies needed for static linking +# Avoids repetition where possible +# +XLIBLDADD_XAU= -lXau +XLIBDPADD_XAU= ${LIBXAU} + +XLIBLDADD_FC= -lfontconfig -lfreetype -lexpat -lz -lbz2 +XLIBDPADD_FC= ${LIBFONTCONFIG} ${LIBFREETYPE} ${LIBEXPAT} \ + ${LIBZ} ${LIBBZ2} + +# XAU+ +# +XLIBLDADD_XCB= -lxcb ${XLIBLDADD_XAU} -lXdmcp +XLIBDPADD_XCB= ${LIBXCB} ${XLIBDPADD_XAU} ${LIBXDMCP} + +# XCB+ +# +XLIBLDADD_XCB_ATOM= -lxcb-atom ${XLIBLDADD_XCB} +XLIBDPADD_XCB_ATOM= ${LIBXCB-ATOM} ${XLIBDPADD_XCB} + +XLIBLDADD_XCB_SHAPE= -lxcb-shape ${XLIBLDADD_XCB} +XLIBDPADD_XCB_SHAPE= ${LIBXCB-SHAPE} ${XLIBDPADD_XCB} + +# X11 & XEXT +# +XLIBLDADD_X11= -lX11 ${XLIBLDADD_XCB} +XLIBDPADD_X11= ${LIBX11} ${XLIBDPADD_XCB} + +XLIBLDADD_XEXT= -lXext ${XLIBLDADD_X11} +XLIBDPADD_XEXT= ${LIBXEXT} ${XLIBDPADD_X11} + +# X11+ +# +XLIBLDADD_XT= -lXt ${XLIBLDADD_X11} -lSM -lICE +XLIBDPADD_XT= ${LIBXT} ${XLIBDPADD_X11} ${LIBSM} ${LIBICE} + +# XEXT+ +# +XLIBLDADD_XI= -lXi ${XLIBLDADD_XEXT} +XLIBDPADD_XI= ${LIBXI} ${XLIBDPADD_XEXT} + +XLIBLDADD_XV= -lXv ${XLIBLDADD_XEXT} +XLIBDPADD_XV= ${LIBXV} ${XLIBDPADD_XEXT} + +XLIBLDADD_XF86DGA= -lXxf86dga ${XLIBLDADD_XEXT} +XLIBDPADD_XF86DGA= ${LIBXXF86DGA} ${XLIBDPADD_XEXT} + +XLIBLDADD_XRENDER= -lXrender ${XLIBLDADD_XEXT} +XLIBDPADD_XRENDER= ${LIBXRENDER} ${XLIBDPADD_XEXT} + +XLIBLDADD_XCURSOR= -lXcursor ${XLIBLDADD_XRENDER} +XLIBDPADD_XCURSOR= ${LIBXCURSOR} ${XLIBDPADD_XRENDER} + +XLIBLDADD_XRANDR= -lXrandr ${XLIBLDADD_XRENDER} +XLIBDPADD_XRANDR= ${LIBXRANDR} ${XLIBDPADD_XRENDER} + +XLIBLDADD_XPM= -lXpm ${XLIBLDADD_XEXT} +XLIBDPADD_XPM= ${LIBXPM} ${XLIBDPADD_XEXT} + +XLIBLDADD_XSS= -lXss ${XLIBLDADD_XEXT} +XLIBDPADD_XSS= ${LIBXSS} ${XLIBDPADD_XEXT} + +XLIBLDADD_KDFILE= -lxkbfile ${XLIBLDADD_XEXT} +XLIBDPADD_KDFILE= ${LIBXKDFILE} ${XLIBCPADD_XEXT} + +# XRANDR & FC+ +# +XLIBLDADD_XFT= -lXft ${XLIBLDADD_XRANDR} ${XLIBLDADD_FC} +XLIBDPADD_XFT= ${LIBXFT} ${XLIBDPADD_XRANDR} ${XLIBDPADD_FC} + +# XMU and XMUU depend on XT and XEXT which have overlapping dependencies +# +XLIBLDADD_XT_XEXT= -lXt ${XLIBLDADD_XEXT} -lSM -lICE +XLIBDPADD_XT_XEXT= ${LIBXT} ${XLIBDPADD_XEXT} ${LIBSM} ${LIBICE} + +XLIBLDADD_XMU= -lXmu ${XLIBLDADD_XT_XEXT} +XLIBDPADD_XMU= ${LIBXMU} ${XLIBDPADD_XT_XEXT} +XLIBLDADD_XMUU= -lXmuu ${XLIBLDADD_XT_XEXT} +XLIBDPADD_XMUU= ${LIBXMUU} ${XLIBDPADD_XT_XEXT} + +# XAW depends on XMU and XPM which have overlapping dependencies +# +XLIBLDADD_XMU_XPM= -lXmu -lXt -lXpm ${XLIBLDADD_XT_XEXT} +XLIBDPADD_XMU_XPM= ${LIBXMU} ${LIBXT} ${LIBXPM} ${XLIBDPADD_XT_XEXT} + +XLIBLDADD_XAW= -lXaw ${XLIBLDADD_XMU_XPM} +XLIBCPADD_XAW= ${LIBXAW} ${XLIBDPADD_XMU_XPM} # # .cpp -> "" handling
CVS commit: [cjep_sun2x] src/share/mk
Module Name:src Committed By: cjep Date: Wed Jun 2 14:22:55 UTC 2021 Modified Files: src/share/mk [cjep_sun2x]: bsd.x11.mk Log Message: Work towards X sources building statically and on sun2. Setup specific make variables to contain the full set of library flags (LDADD and DPADD) for programs in the xorg suite. Each list contains all needed dependencies so that the programs will build statically. Suggested by mrg@ To generate a diff of this commit: cvs rdiff -u -r1.138 -r1.138.4.1 src/share/mk/bsd.x11.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nia Date: Wed Jun 2 11:32:24 UTC 2021 Modified Files: src/sys/dev/pci: if_iwmreg.h Log Message: Can't left shift a signed int by 31. Found by kubsan. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_iwmreg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwmreg.h diff -u src/sys/dev/pci/if_iwmreg.h:1.7 src/sys/dev/pci/if_iwmreg.h:1.8 --- src/sys/dev/pci/if_iwmreg.h:1.7 Thu Apr 19 21:50:09 2018 +++ src/sys/dev/pci/if_iwmreg.h Wed Jun 2 11:32:24 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwmreg.h,v 1.7 2018/04/19 21:50:09 christos Exp $ */ +/* $NetBSD: if_iwmreg.h,v 1.8 2021/06/02 11:32:24 nia Exp $ */ /* OpenBSD: if_iwmreg.h,v 1.19 2016/09/20 11:46:09 stsp Exp */ /*- @@ -191,7 +191,7 @@ /* interrupt flags in INTA, set by uCode or hardware (e.g. dma), * acknowledged (reset) by host writing "1" to flagged bits. */ -#define IWM_CSR_INT_BIT_FH_RX (1 << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */ +#define IWM_CSR_INT_BIT_FH_RX (1U << 31) /* Rx DMA, cmd responses, FH_INT[17:16] */ #define IWM_CSR_INT_BIT_HW_ERR (1 << 29) /* DMA hardware error FH_INT[31] */ #define IWM_CSR_INT_BIT_RX_PERIODIC (1 << 28) /* Rx periodic */ #define IWM_CSR_INT_BIT_FH_TX (1 << 27) /* Tx DMA FH_INT[1:0] */ @@ -214,7 +214,7 @@ IWM_CSR_INT_BIT_RX_PERIODIC) /* interrupt flags in FH (flow handler) (PCI busmaster DMA) */ -#define IWM_CSR_FH_INT_BIT_ERR (1 << 31) /* Error */ +#define IWM_CSR_FH_INT_BIT_ERR (1U << 31) /* Error */ #define IWM_CSR_FH_INT_BIT_HI_PRIOR (1 << 30) /* High priority Rx, bypass coalescing */ #define IWM_CSR_FH_INT_BIT_RX_CHNL1 (1 << 17) /* Rx channel 1 */ #define IWM_CSR_FH_INT_BIT_RX_CHNL0 (1 << 16) /* Rx channel 0 */ @@ -405,7 +405,7 @@ #define IWM_CSR_DBG_HPET_MEM_REG_VAL (0x) /* DRAM INT TABLE */ -#define IWM_CSR_DRAM_INT_TBL_ENABLE (1 << 31) +#define IWM_CSR_DRAM_INT_TBL_ENABLE (1U << 31) #define IWM_CSR_DRAM_INIT_TBL_WRITE_POINTER (1 << 28) #define IWM_CSR_DRAM_INIT_TBL_WRAP_CHECK (1 << 27) @@ -558,7 +558,7 @@ enum iwm_secure_load_status_reg { #define IWM_HOST_INT_TIMEOUT_MAX (0xFF) #define IWM_HOST_INT_TIMEOUT_DEF (0x40) #define IWM_HOST_INT_TIMEOUT_MIN (0x0) -#define IWM_HOST_INT_OPER_MODE (1 << 31) +#define IWM_HOST_INT_OPER_MODE (1U << 31) /* *7000/3000 series SHR DTS addresses * @@ -643,7 +643,7 @@ enum iwm_ucode_tlv_flag { IWM_UCODE_TLV_FLAGS_P2P_PS_UAPSD = (1 << 26), IWM_UCODE_TLV_FLAGS_BCAST_FILTERING = (1 << 29), IWM_UCODE_TLV_FLAGS_GO_UAPSD = (1 << 30), - IWM_UCODE_TLV_FLAGS_LTE_COEX = (1 << 31), + IWM_UCODE_TLV_FLAGS_LTE_COEX = (1U << 31), }; #define IWM_UCODE_TLV_FLAG_BITS \ "\020\1PAN\2NEWSCAN\3MFP\4P2P\5DW_BC_TABLE\6NEWBT_COEX\7PM_CMD\10SHORT_BL\11RX_ENERGY\12TIME_EVENT_V2\13D3_6_IPV6\14BF_UPDATED\15NO_BASIC_SSID\17D3_CONTINUITY\20NEW_NSOFFL_S\21NEW_NSOFFL_L\22SCHED_SCAN\24STA_KEY_CMD\25DEVICE_PS_CMD\26P2P_PS\27P2P_PS_DCM\30P2P_PS_SCM\31UAPSD_SUPPORT\32EBS\33P2P_PS_UAPSD\36BCAST_FILTERING\37GO_UAPSD\40LTE_COEX" @@ -4369,7 +4369,7 @@ enum iwm_tx_flags { IWM_TX_CMD_FLG_FW_DROP = (1 << 26), IWM_TX_CMD_FLG_EXEC_PAPD = (1 << 27), IWM_TX_CMD_FLG_PAPD_TYPE = (1 << 28), - IWM_TX_CMD_FLG_HCCA_CHUNK = (1 << 31) + IWM_TX_CMD_FLG_HCCA_CHUNK = (1U << 31) }; /* IWM_TX_FLAGS_BITS_API_S_VER_1 */ /**
CVS commit: src/sys/dev/pci
Module Name:src Committed By: nia Date: Wed Jun 2 11:32:24 UTC 2021 Modified Files: src/sys/dev/pci: if_iwmreg.h Log Message: Can't left shift a signed int by 31. Found by kubsan. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_iwmreg.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: jmcneill Date: Wed Jun 2 10:31:18 UTC 2021 Modified Files: src/distrib/sets/lists/dtb: ad.aarch64 ad.aarch64eb ad.earmv6 ad.earmv6eb ad.earmv6hf ad.earmv6hfeb ad.earmv7 ad.earmv7hf ad.earmv7hfeb src/sys/dtb/arm64/rockchip: Makefile Log Message: Install a copy of rk3399-pinebook-pro.dtb to the base dtb directory for compatibility with the factory firmware. Normally this is frowned upon, but this is the only easy way to boot NetBSD on this board without having to crack open the case and/or hook up a serial console. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/dtb/ad.aarch64 cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/dtb/ad.aarch64eb \ src/distrib/sets/lists/dtb/ad.earmv7 \ src/distrib/sets/lists/dtb/ad.earmv7hf \ src/distrib/sets/lists/dtb/ad.earmv7hfeb cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/dtb/ad.earmv6 \ src/distrib/sets/lists/dtb/ad.earmv6eb \ src/distrib/sets/lists/dtb/ad.earmv6hf \ src/distrib/sets/lists/dtb/ad.earmv6hfeb cvs rdiff -u -r1.1 -r1.2 src/sys/dtb/arm64/rockchip/Makefile 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: jmcneill Date: Wed Jun 2 10:31:18 UTC 2021 Modified Files: src/distrib/sets/lists/dtb: ad.aarch64 ad.aarch64eb ad.earmv6 ad.earmv6eb ad.earmv6hf ad.earmv6hfeb ad.earmv7 ad.earmv7hf ad.earmv7hfeb src/sys/dtb/arm64/rockchip: Makefile Log Message: Install a copy of rk3399-pinebook-pro.dtb to the base dtb directory for compatibility with the factory firmware. Normally this is frowned upon, but this is the only easy way to boot NetBSD on this board without having to crack open the case and/or hook up a serial console. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/dtb/ad.aarch64 cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/dtb/ad.aarch64eb \ src/distrib/sets/lists/dtb/ad.earmv7 \ src/distrib/sets/lists/dtb/ad.earmv7hf \ src/distrib/sets/lists/dtb/ad.earmv7hfeb cvs rdiff -u -r1.4 -r1.5 src/distrib/sets/lists/dtb/ad.earmv6 \ src/distrib/sets/lists/dtb/ad.earmv6eb \ src/distrib/sets/lists/dtb/ad.earmv6hf \ src/distrib/sets/lists/dtb/ad.earmv6hfeb cvs rdiff -u -r1.1 -r1.2 src/sys/dtb/arm64/rockchip/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/dtb/ad.aarch64 diff -u src/distrib/sets/lists/dtb/ad.aarch64:1.6 src/distrib/sets/lists/dtb/ad.aarch64:1.7 --- src/distrib/sets/lists/dtb/ad.aarch64:1.6 Sat Jan 2 11:36:36 2021 +++ src/distrib/sets/lists/dtb/ad.aarch64 Wed Jun 2 10:31:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.aarch64,v 1.6 2021/01/02 11:36:36 ryo Exp $ +# $NetBSD: ad.aarch64,v 1.7 2021/06/02 10:31:18 jmcneill Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets" in sys/dtb @@ -101,6 +101,7 @@ ./boot/dtb/nvidia/tegra210-p2894-0050-a08.dtbdtb-base-boot dtb ./boot/dtb/nvidia/tegra210-p3450-.dtbdtb-base-boot dtb ./boot/dtb/nvidia/tegra210-smaug.dtb dtb-base-boot dtb +./boot/dtb/rk3399-pinebook-pro.dtb dtb-base-boot dtb ./boot/dtb/rockchip dtb-base-boot dtb ./boot/dtb/rockchip/px30-evb.dtb dtb-base-boot dtb ./boot/dtb/rockchip/rk3308-evb.dtb dtb-base-boot dtb Index: src/distrib/sets/lists/dtb/ad.aarch64eb diff -u src/distrib/sets/lists/dtb/ad.aarch64eb:1.5 src/distrib/sets/lists/dtb/ad.aarch64eb:1.6 --- src/distrib/sets/lists/dtb/ad.aarch64eb:1.5 Sat Jan 2 11:36:36 2021 +++ src/distrib/sets/lists/dtb/ad.aarch64eb Wed Jun 2 10:31:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.aarch64eb,v 1.5 2021/01/02 11:36:36 ryo Exp $ +# $NetBSD: ad.aarch64eb,v 1.6 2021/06/02 10:31:18 jmcneill Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets" in sys/dtb @@ -101,6 +101,7 @@ ./boot/dtb/nvidia/tegra210-p2894-0050-a08.dtbdtb-base-boot dtb ./boot/dtb/nvidia/tegra210-p3450-.dtbdtb-base-boot dtb ./boot/dtb/nvidia/tegra210-smaug.dtb dtb-base-boot dtb +./boot/dtb/rk3399-pinebook-pro.dtb dtb-base-boot dtb ./boot/dtb/rockchip dtb-base-boot dtb ./boot/dtb/rockchip/px30-evb.dtb dtb-base-boot dtb ./boot/dtb/rockchip/rk3308-evb.dtb dtb-base-boot dtb Index: src/distrib/sets/lists/dtb/ad.earmv7 diff -u src/distrib/sets/lists/dtb/ad.earmv7:1.5 src/distrib/sets/lists/dtb/ad.earmv7:1.6 --- src/distrib/sets/lists/dtb/ad.earmv7:1.5 Wed Jun 10 18:53:31 2020 +++ src/distrib/sets/lists/dtb/ad.earmv7 Wed Jun 2 10:31:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.earmv7,v 1.5 2020/06/10 18:53:31 jmcneill Exp $ +# $NetBSD: ad.earmv7,v 1.6 2021/06/02 10:31:18 jmcneill Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets" in sys/dtb Index: src/distrib/sets/lists/dtb/ad.earmv7hf diff -u src/distrib/sets/lists/dtb/ad.earmv7hf:1.5 src/distrib/sets/lists/dtb/ad.earmv7hf:1.6 --- src/distrib/sets/lists/dtb/ad.earmv7hf:1.5 Wed Jun 10 18:53:31 2020 +++ src/distrib/sets/lists/dtb/ad.earmv7hf Wed Jun 2 10:31:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.earmv7hf,v 1.5 2020/06/10 18:53:31 jmcneill Exp $ +# $NetBSD: ad.earmv7hf,v 1.6 2021/06/02 10:31:18 jmcneill Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets" in sys/dtb Index: src/distrib/sets/lists/dtb/ad.earmv7hfeb diff -u src/distrib/sets/lists/dtb/ad.earmv7hfeb:1.5 src/distrib/sets/lists/dtb/ad.earmv7hfeb:1.6 --- src/distrib/sets/lists/dtb/ad.earmv7hfeb:1.5 Wed Jun 10 18:53:31 2020 +++ src/distrib/sets/lists/dtb/ad.earmv7hfeb Wed Jun 2 10:31:18 2021 @@ -1,4 +1,4 @@ -# $NetBSD: ad.earmv7hfeb,v 1.5 2020/06/10 18:53:31 jmcneill Exp $ +# $NetBSD: ad.earmv7hfeb,v 1.6 2021/06/02 10:31:18 jmcneill Exp $ # # DO NOT EDIT THIS FILE MANUALLY # Generated by "make update-sets"
CVS commit: src/share/mk
Module Name:src Committed By: jmcneill Date: Wed Jun 2 10:28:21 UTC 2021 Modified Files: src/share/mk: bsd.dtb.mk Log Message: Add support for installing a copy of dtb files to the base dtb directory when DTBSUBDIR is defined. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/mk/bsd.dtb.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: jmcneill Date: Wed Jun 2 10:28:21 UTC 2021 Modified Files: src/share/mk: bsd.dtb.mk Log Message: Add support for installing a copy of dtb files to the base dtb directory when DTBSUBDIR is defined. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/mk/bsd.dtb.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.dtb.mk diff -u src/share/mk/bsd.dtb.mk:1.2 src/share/mk/bsd.dtb.mk:1.3 --- src/share/mk/bsd.dtb.mk:1.2 Tue May 19 08:59:36 2020 +++ src/share/mk/bsd.dtb.mk Wed Jun 2 10:28:21 2021 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.dtb.mk,v 1.2 2020/05/19 08:59:36 rin Exp $ +# $NetBSD: bsd.dtb.mk,v 1.3 2021/06/02 10:28:21 jmcneill Exp $ .include .include @@ -71,11 +71,24 @@ dtbinstall: dtb ${INSTALL_FILE} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ ${.OBJDIR}/${_dtb} ${DESTDIR}${DTBINSTDIR} .endfor +.if defined(DTSSUBDIR) +.for _dtb in ${DTB_NOSUBDIR} + ${_MKSHMSG_INSTALL} ${_dtb} + ${_MKSHECHO} "${INSTALL_FILE} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${.OBJDIR}/${_dtb} ${DESTDIR}${DTBDIR}" + ${INSTALL_FILE} -o ${DTBOWN} -g ${DTBGRP} -m ${DTBMODE} \ + ${.OBJDIR}/${_dtb} ${DESTDIR}${DTBDIR} +.endfor +.endif dtblist: .if defined(DTSSUBDIR) @echo ".${DTBINSTDIR}\t\tdtb-base-boot\tdtb" | \ ${TOOL_SED} 's/\\t/ /g' +.for _dtb in ${DTB_NOSUBDIR} + @echo ".${DTBDIR}/${_dtb}\t\tdtb-base-boot\tdtb" | \ + ${TOOL_SED} 's/\\t/ /g' +.endfor .endif .for _dtb in ${DTB} @echo ".${DTBINSTDIR}/${_dtb}\t\tdtb-base-boot\tdtb" | \
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 09:23:32 UTC 2021 Modified Files: src/sys/kern: subr_psref.c Log Message: psref(9): Make use-after-free panic message more obvious. Previously it would almost always manifest as mismatched psref target class: 0x0 (ref) != 0x... (expected) and now it will manifest as psref target already destroyed: 0x... To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_psref.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/subr_psref.c diff -u src/sys/kern/subr_psref.c:1.13 src/sys/kern/subr_psref.c:1.14 --- src/sys/kern/subr_psref.c:1.13 Fri May 17 03:34:26 2019 +++ src/sys/kern/subr_psref.c Wed Jun 2 09:23:32 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_psref.c,v 1.13 2019/05/17 03:34:26 ozaki-r Exp $ */ +/* $NetBSD: subr_psref.c,v 1.14 2021/06/02 09:23:32 riastradh Exp $ */ /*- * Copyright (c) 2016 The NetBSD Foundation, Inc. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: subr_psref.c,v 1.13 2019/05/17 03:34:26 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_psref.c,v 1.14 2021/06/02 09:23:32 riastradh Exp $"); #include #include @@ -293,11 +293,11 @@ psref_acquire(struct psref *psref, const "passive references are CPU-local," " but preemption is enabled and the caller is not" " in a softint or CPU-bound LWP"); + KASSERTMSG(!target->prt_draining, "psref target already destroyed: %p", + target); KASSERTMSG((target->prt_class == class), "mismatched psref target class: %p (ref) != %p (expected)", target->prt_class, class); - KASSERTMSG(!target->prt_draining, "psref target already destroyed: %p", - target); /* Block interrupts and acquire the current CPU's reference list. */ s = splraiseipl(class->prc_iplcookie); @@ -516,13 +516,13 @@ psref_target_destroy(struct psref_target ASSERT_SLEEPABLE(); + KASSERTMSG(!target->prt_draining, "psref target already destroyed: %p", + target); KASSERTMSG((target->prt_class == class), "mismatched psref target class: %p (ref) != %p (expected)", target->prt_class, class); /* Request psref_release to notify us when done. */ - KASSERTMSG(!target->prt_draining, "psref target already destroyed: %p", - target); target->prt_draining = true; /* Wait until there are no more references on any CPU. */
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 09:23:32 UTC 2021 Modified Files: src/sys/kern: subr_psref.c Log Message: psref(9): Make use-after-free panic message more obvious. Previously it would almost always manifest as mismatched psref target class: 0x0 (ref) != 0x... (expected) and now it will manifest as psref target already destroyed: 0x... To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_psref.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/kern
> Date: Wed, 2 Jun 2021 17:33:39 +0900 > From: Rin Okuyama > > On 2021/06/02 6:11, Taylor R Campbell wrote: > > - KASSERT(filepos <= sizeof(struct ksyms_hdr) + > > + KASSERT(filepos == sizeof(struct ksyms_hdr) + > > ksyms_hdr.kh_shdr[SYMTAB].sh_size); > ... > > This KASSERT fires at least for arm and aarch64, with savecore or ``nm > /dev/ksyms'': Oops. I reverted that change for now, will investigate later.
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 08:46:17 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: Revert "ksyms(4): Don't skip symbol tables that are soon to be freed." Apparently the equality kassert this restored doesn't work; to be analyzed. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.92 src/sys/kern/kern_ksyms.c:1.93 --- src/sys/kern/kern_ksyms.c:1.92 Tue Jun 1 21:11:52 2021 +++ src/sys/kern/kern_ksyms.c Wed Jun 2 08:46:16 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_ksyms.c,v 1.92 2021/06/01 21:11:52 riastradh Exp $ */ +/* $NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -73,7 +73,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.92 2021/06/01 21:11:52 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ksyms.c,v 1.93 2021/06/02 08:46:16 riastradh Exp $"); #if defined(_KERNEL) && defined(_KERNEL_OPT) #include "opt_copy_symtab.h" @@ -1089,6 +1089,8 @@ ksymsread(dev_t dev, struct uio *uio, in for (st = TAILQ_FIRST(_symtabs); st != ksyms_last_snapshot; st = TAILQ_NEXT(st, sd_queue)) { + if (__predict_false(st->sd_gone)) + continue; if (uio->uio_resid == 0) return 0; if (uio->uio_offset <= st->sd_symsize + filepos) { @@ -1104,11 +1106,13 @@ ksymsread(dev_t dev, struct uio *uio, in /* * Copy out the string table */ - KASSERT(filepos == sizeof(struct ksyms_hdr) + + KASSERT(filepos <= sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); for (st = TAILQ_FIRST(_symtabs); st != ksyms_last_snapshot; st = TAILQ_NEXT(st, sd_queue)) { + if (__predict_false(st->sd_gone)) + continue; if (uio->uio_resid == 0) return 0; if (uio->uio_offset <= st->sd_strsize + filepos) {
CVS commit: src/sys/kern
Module Name:src Committed By: riastradh Date: Wed Jun 2 08:46:17 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: Revert "ksyms(4): Don't skip symbol tables that are soon to be freed." Apparently the equality kassert this restored doesn't work; to be analyzed. To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/kern/kern_ksyms.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/kern
Hi, On 2021/06/02 6:11, Taylor R Campbell wrote: Module Name:src Committed By: riastradh Date: Tue Jun 1 21:11:52 UTC 2021 Modified Files: src/sys/kern: kern_ksyms.c Log Message: ksyms(4): Don't skip symbol tables that are soon to be freed. They will not actually be freed until /dev/ksyms is closed, so continued access to them remains kosher. To generate a diff of this commit: cvs rdiff -u -r1.91 -r1.92 src/sys/kern/kern_ksyms.c ... Index: src/sys/kern/kern_ksyms.c diff -u src/sys/kern/kern_ksyms.c:1.91 src/sys/kern/kern_ksyms.c:1.92 --- src/sys/kern/kern_ksyms.c:1.91 Tue Jun 1 21:11:07 2021 +++ src/sys/kern/kern_ksyms.c Tue Jun 1 21:11:52 2021 ... - KASSERT(filepos <= sizeof(struct ksyms_hdr) + + KASSERT(filepos == sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size); ... This KASSERT fires at least for arm and aarch64, with savecore or ``nm /dev/ksyms'': $ nm /dev/ksyms [ 1501.3538912] panic: kernel diagnostic assertion "filepos == sizeof(struct ksyms_hdr) + ksyms_hdr.kh_shdr[SYMTAB].sh_size" failed: file "../../../../kern/kern_ksyms.c", line 1107 [ 1501.3701109] cpu0: Begin traceback... [ 1501.3701109] 0xc9c2ecfc: netbsd:db_panic+0xc [ 1501.3806387] 0xc9c2ed14: netbsd:vpanic+0xc4 [ 1501.3806387] 0xc9c2ed2c: netbsd:kern_assert+0x3c [ 1501.3906766] 0xc9c2ed6c: netbsd:ksymsread+0x208 [ 1501.4006964] 0xc9c2ee1c: netbsd:spec_read+0xbc [ 1501.4112302] 0xc9c2ee44: netbsd:VOP_READ+0x58 [ 1501.4112302] 0xc9c2ee6c: netbsd:vn_read+0x78 [ 1501.4215160] 0xc9c2eebc: netbsd:dofileread+0x80 [ 1501.4315439] 0xc9c2eeec: netbsd:sys_read+0x50 [ 1501.4426847] 0xc9c2efac: netbsd:syscall+0x188 [ 1501.4426847] cpu0: End traceback... Stopped in pid 11825.11825 (nm) at netbsd:cpu_Debugger+0x4:bx r14 db> Can you please take a look? Thanks, rin
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: nia Date: Wed Jun 2 06:48:10 UTC 2021 Modified Files: src/sys/arch/x86/x86: tsc.c Log Message: when warning about TSC going backwards, provide advice to the sysadmin. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/x86/x86/tsc.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/x86/x86/tsc.c diff -u src/sys/arch/x86/x86/tsc.c:1.55 src/sys/arch/x86/x86/tsc.c:1.56 --- src/sys/arch/x86/x86/tsc.c:1.55 Tue Jun 1 21:29:24 2021 +++ src/sys/arch/x86/x86/tsc.c Wed Jun 2 06:48:10 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tsc.c,v 1.55 2021/06/01 21:29:24 riastradh Exp $ */ +/* $NetBSD: tsc.c,v 1.56 2021/06/02 06:48:10 nia Exp $ */ /*- * Copyright (c) 2008, 2020 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.55 2021/06/01 21:29:24 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tsc.c,v 1.56 2021/06/02 06:48:10 nia Exp $"); #include #include @@ -427,7 +427,8 @@ tsc_get_timecount(struct timecounter *tc ticks = getticks(); if (ticks - lastwarn >= hz) { printf( -"WARNING: TSC time went backwards by %u\n", +"WARNING: TSC time went backwards by %u - " +"change sysctl(7) kern.timecounter?\n", (unsigned)(prev - cur)); lastwarn = ticks; }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: nia Date: Wed Jun 2 06:48:10 UTC 2021 Modified Files: src/sys/arch/x86/x86: tsc.c Log Message: when warning about TSC going backwards, provide advice to the sysadmin. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/x86/x86/tsc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.