CVS commit: src/sys/dist/pf/net
Module Name:src Committed By: msaitoh Date: Wed Jun 27 03:31:44 UTC 2018 Modified Files: src/sys/dist/pf/net: if_pfsync.c Log Message: Add missing BPF_D_OUT. Reported by John D. Baker. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dist/pf/net/if_pfsync.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dist/pf/net
Module Name:src Committed By: msaitoh Date: Wed Jun 27 03:31:44 UTC 2018 Modified Files: src/sys/dist/pf/net: if_pfsync.c Log Message: Add missing BPF_D_OUT. Reported by John D. Baker. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dist/pf/net/if_pfsync.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/dist/pf/net/if_pfsync.c diff -u src/sys/dist/pf/net/if_pfsync.c:1.16 src/sys/dist/pf/net/if_pfsync.c:1.17 --- src/sys/dist/pf/net/if_pfsync.c:1.16 Tue Jun 26 06:48:02 2018 +++ src/sys/dist/pf/net/if_pfsync.c Wed Jun 27 03:31:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: if_pfsync.c,v 1.16 2018/06/26 06:48:02 msaitoh Exp $ */ +/* $NetBSD: if_pfsync.c,v 1.17 2018/06/27 03:31:44 msaitoh Exp $ */ /* $OpenBSD: if_pfsync.c,v 1.83 2007/06/26 14:44:12 mcbride Exp $ */ /* @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pfsync.c,v 1.16 2018/06/26 06:48:02 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pfsync.c,v 1.17 2018/06/27 03:31:44 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1556,7 +1556,7 @@ pfsync_tdb_sendout(struct pfsync_softc * sc->sc_mbuf_tdb = NULL; sc->sc_statep_tdb.t = NULL; - bpf_mtap(ifp, m); + bpf_mtap(ifp, m, BPF_D_OUT); return pfsync_sendout_mbuf(sc, m); }
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: kre Date: Wed Jun 27 01:25:49 UTC 2018 Modified Files: src/external/gpl3/gcc/lib: Makefile Log Message: Since liblsan has been added to the sets already, we should build it. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib
Module Name:src Committed By: kre Date: Wed Jun 27 01:25:49 UTC 2018 Modified Files: src/external/gpl3/gcc/lib: Makefile Log Message: Since liblsan has been added to the sets already, we should build it. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/lib/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/gpl3/gcc/lib/Makefile diff -u src/external/gpl3/gcc/lib/Makefile:1.13 src/external/gpl3/gcc/lib/Makefile:1.14 --- src/external/gpl3/gcc/lib/Makefile:1.13 Tue Mar 7 16:26:37 2017 +++ src/external/gpl3/gcc/lib/Makefile Wed Jun 27 01:25:49 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2017/03/07 16:26:37 christos Exp $ +# $NetBSD: Makefile,v 1.14 2018/06/27 01:25:49 kre Exp $ .include @@ -6,6 +6,7 @@ SUBDIR+= libgcc .WAIT SUBDIR+= libiberty libobjc libgomp SUBDIR+= libbacktrace +SUBDIR+= liblsan SUBDIR+= liblto_plugin .if (${MKLIBSTDCXX} != "no") && (${MKCXX} != "no")
CVS commit: src/sbin/disklabel
Module Name:src Committed By: kamil Date: Wed Jun 27 01:14:48 UTC 2018 Modified Files: src/sbin/disklabel: main.c Log Message: Avoid misaligned access in disklabel(8) in find_label() Introduce a new helper variable tlp and use it for memory access. Detected with MKSANITIZER/UBSan A patch by To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sbin/disklabel/main.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/disklabel/main.c diff -u src/sbin/disklabel/main.c:1.49 src/sbin/disklabel/main.c:1.50 --- src/sbin/disklabel/main.c:1.49 Sun Apr 1 04:35:02 2018 +++ src/sbin/disklabel/main.c Wed Jun 27 01:14:48 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.49 2018/04/01 04:35:02 ryo Exp $ */ +/* $NetBSD: main.c,v 1.50 2018/06/27 01:14:48 kamil Exp $ */ /* * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -76,7 +76,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19 static char sccsid[] = "@(#)disklabel.c 8.4 (Berkeley) 5/4/95"; /* from static char sccsid[] = "@(#)disklabel.c 1.2 (Symmetric) 11/28/85"; */ #else -__RCSID("$NetBSD: main.c,v 1.49 2018/04/01 04:35:02 ryo Exp $"); +__RCSID("$NetBSD: main.c,v 1.50 2018/06/27 01:14:48 kamil Exp $"); #endif #endif /* not lint */ @@ -1189,7 +1189,7 @@ readlabel(int f) static struct disklabel * find_label(int f, u_int sector) { - struct disklabel *disk_lp, hlp; + struct disklabel *disk_lp, hlp, tlp; int i; off_t offset; const char *is_deleted; @@ -1209,30 +1209,31 @@ find_label(int f, u_int sector) /* Check expected offset first */ for (offset = LABEL_OFFSET, i = -4;; offset = i += 4) { is_deleted = ""; - disk_lp = (void *)(bootarea + offset); if (i == LABEL_OFFSET) continue; + disk_lp = (void *)(bootarea + offset); + memcpy(, disk_lp, sizeof(tlp)); if ((char *)(disk_lp + 1) > bootarea + bootarea_len) break; - if (disk_lp->d_magic2 != disk_lp->d_magic) + if (tlp.d_magic2 != tlp.d_magic) continue; - if (read_all && (disk_lp->d_magic == DISKMAGIC_DELETED || - disk_lp->d_magic == DISKMAGIC_DELETED_REV)) { - disk_lp->d_magic ^= ~0u; - disk_lp->d_magic2 ^= ~0u; + if (read_all && (tlp.d_magic == DISKMAGIC_DELETED || + tlp.d_magic == DISKMAGIC_DELETED_REV)) { + tlp.d_magic ^= ~0u; + tlp.d_magic2 ^= ~0u; is_deleted = "deleted "; } - if (target32toh(disk_lp->d_magic) != DISKMAGIC) { + if (target32toh(tlp.d_magic) != DISKMAGIC) { /* XXX: Do something about byte-swapped labels ? */ - if (target32toh(disk_lp->d_magic) == DISKMAGIC_REV && - target32toh(disk_lp->d_magic2) == DISKMAGIC_REV) + if (target32toh(tlp.d_magic) == DISKMAGIC_REV && + target32toh(tlp.d_magic2) == DISKMAGIC_REV) warnx("ignoring %sbyteswapped label" " at offset %jd from sector %u", is_deleted, (intmax_t)offset, sector); continue; } - if (target16toh(disk_lp->d_npartitions) > maxpartitions || - dkcksum_target(disk_lp) != 0) { + if (target16toh(tlp.d_npartitions) > maxpartitions || + dkcksum_target() != 0) { if (verbose > 0) warnx("corrupt label found at offset %jd in " "sector %u", (intmax_t)offset, sector); @@ -1246,7 +1247,7 @@ find_label(int f, u_int sector) /* To print all the labels we have to do it here */ /* XXX: maybe we should compare them? */ - targettohlabel(, disk_lp); + targettohlabel(, ); printf("# %ssector %u offset %jd bytes\n", is_deleted, sector, (intmax_t)offset); if (tflag) @@ -1256,7 +1257,8 @@ find_label(int f, u_int sector) showpartitions(stdout, , Cflag); } checklabel(); - htotargetlabel(disk_lp, ); + htotargetlabel(, ); + memcpy(disk_lp, , sizeof(tlp)); /* Remember we've found a label */ read_all = 2; }
CVS commit: src/sbin/disklabel
Module Name:src Committed By: kamil Date: Wed Jun 27 01:14:48 UTC 2018 Modified Files: src/sbin/disklabel: main.c Log Message: Avoid misaligned access in disklabel(8) in find_label() Introduce a new helper variable tlp and use it for memory access. Detected with MKSANITIZER/UBSan A patch by To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sbin/disklabel/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: sevan Date: Tue Jun 26 22:16:45 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add another ARC, DCL, Emacs To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 src/share/misc/acronyms.comp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/acronyms.comp diff -u src/share/misc/acronyms.comp:1.209 src/share/misc/acronyms.comp:1.210 --- src/share/misc/acronyms.comp:1.209 Tue Jun 26 00:06:08 2018 +++ src/share/misc/acronyms.comp Tue Jun 26 22:16:45 2018 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.209 2018/06/26 00:06:08 kamil Exp $ +$NetBSD: acronyms.comp,v 1.210 2018/06/26 22:16:45 sevan Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -68,6 +68,7 @@ APT advanced persistent threat AQM active queue management ARAT always running APIC timer ARC adaptive replacement cache +ARC Advanced RISC Computing ARC automatic reference counting ARM Advanced RISC Machines ARP Address Resolution Protocol @@ -313,6 +314,7 @@ DCC direct cable connect DCD data carrier detect DCE data control equipment DCE distributed computing environment +DCL Digital Command Language DCOM distributed component object model DCOP Desktop COmmunication Protocol DCS data collection systems @@ -450,6 +452,7 @@ ELS entry level system EMI electro-magnetic interference EMP electro-magnetic pulse EMR electro-magnetic radiation +EMACS Editor MACroS EOF end of file EOI end of interrupt EOL end of line
CVS commit: src/share/misc
Module Name:src Committed By: sevan Date: Tue Jun 26 22:16:45 UTC 2018 Modified Files: src/share/misc: acronyms.comp Log Message: Add another ARC, DCL, Emacs To generate a diff of this commit: cvs rdiff -u -r1.209 -r1.210 src/share/misc/acronyms.comp 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: christos Date: Tue Jun 26 21:09:48 UTC 2018 Modified Files: src/doc: CHANGES Log Message: mention lsan To generate a diff of this commit: cvs rdiff -u -r1.2404 -r1.2405 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2404 src/doc/CHANGES:1.2405 --- src/doc/CHANGES:1.2404 Tue Jun 26 02:52:43 2018 +++ src/doc/CHANGES Tue Jun 26 17:09:48 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2404 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2405 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -167,3 +167,4 @@ Changes from NetBSD 8.0 to NetBSD 9.0: dhcpcd: Import 7.0.6. [roy 20180621] bpf(4): Add the BPF direction filter (BIOC[GS]DIRECTION). [msaitoh 20180626] + gcc: add lsan the Leak Sanitizer [christos 20180626]
CVS commit: src/doc
Module Name:src Committed By: christos Date: Tue Jun 26 21:09:48 UTC 2018 Modified Files: src/doc: CHANGES Log Message: mention lsan To generate a diff of this commit: cvs rdiff -u -r1.2404 -r1.2405 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib/liblsan
Module Name:src Committed By: christos Date: Tue Jun 26 21:06:45 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/liblsan: Makefile Log Message: remove temp hack. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/liblsan/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/lib/liblsan
Module Name:src Committed By: christos Date: Tue Jun 26 21:06:45 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/liblsan: Makefile Log Message: remove temp hack. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/lib/liblsan/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/gpl3/gcc/lib/liblsan/Makefile diff -u src/external/gpl3/gcc/lib/liblsan/Makefile:1.1 src/external/gpl3/gcc/lib/liblsan/Makefile:1.2 --- src/external/gpl3/gcc/lib/liblsan/Makefile:1.1 Tue Jun 26 16:54:32 2018 +++ src/external/gpl3/gcc/lib/liblsan/Makefile Tue Jun 26 17:06:45 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/06/26 20:54:32 christos Exp $ +# $NetBSD: Makefile,v 1.2 2018/06/26 21:06:45 christos Exp $ .include @@ -8,7 +8,6 @@ .PATH: ${SANITIZER}/lsan ${SANITIZER}/asan LSAN_SRCS+= \ -sanitizer_stoptheworld_linux_libcdep.cc \ lsan.cc \ lsan_allocator.cc \ lsan_common.cc \
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Tue Jun 26 21:01:34 UTC 2018 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi shl.mi Log Message: Add the lsan libraries To generate a diff of this commit: cvs rdiff -u -r1.839 -r1.840 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2203 -r1.2204 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.316 -r1.317 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.252 -r1.253 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.198 -r1.199 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.839 src/distrib/sets/lists/base/shl.mi:1.840 --- src/distrib/sets/lists/base/shl.mi:1.839 Mon May 28 17:04:59 2018 +++ src/distrib/sets/lists/base/shl.mi Tue Jun 26 17:01:33 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.839 2018/05/28 21:04:59 chs Exp $ +# $NetBSD: shl.mi,v 1.840 2018/06/26 21:01:33 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -381,6 +381,9 @@ ./usr/lib/libldap_r.sobase-ldap-shlib ldap,compatfile ./usr/lib/libldap_r.so.4 base-ldap-shlib ldap,compatfile ./usr/lib/libldap_r.so.4.3 base-ldap-shlib ldap,compatfile +./usr/lib/liblsan.sobase-sys-shlib compatfile,gcc +./usr/lib/liblsan.so.1base-sys-shlib compatfile,gcc=6 +./usr/lib/liblsan.so.1.0 base-sys-shlib compatfile,gcc=6 ./usr/lib/liblua.sobase-sys-shlib compatfile ./usr/lib/liblua.so.5base-sys-shlib compatfile ./usr/lib/liblua.so.5.3base-sys-shlib compatfile Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.2203 src/distrib/sets/lists/comp/mi:1.2204 --- src/distrib/sets/lists/comp/mi:1.2203 Sun Jun 3 18:32:57 2018 +++ src/distrib/sets/lists/comp/mi Tue Jun 26 17:01:33 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2203 2018/06/03 22:32:57 pgoyette Exp $ +# $NetBSD: mi,v 1.2204 2018/06/26 21:01:33 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.compcomp-sys-root @@ -3423,6 +3423,8 @@ ./usr/lib/libldap_p.acomp-ldap-proflib compatfile,ldap,profile ./usr/lib/libldap_r.acomp-ldap-lib compatfile,ldap ./usr/lib/libldap_r_p.acomp-ldap-proflib compatfile,ldap,profile +./usr/lib/liblsan.acomp-c-lib compatfile,gcc +./usr/lib/liblsan_p.acomp-c-proflib compatfile,profile,gcc ./usr/lib/liblua.acomp-c-lib compatfile ./usr/lib/liblua_p.acomp-c-proflib compatfile,profile ./usr/lib/liblutok.acomp-c-lib compatfile,kyua Index: src/distrib/sets/lists/comp/shl.mi diff -u src/distrib/sets/lists/comp/shl.mi:1.316 src/distrib/sets/lists/comp/shl.mi:1.317 --- src/distrib/sets/lists/comp/shl.mi:1.316 Mon May 28 17:04:59 2018 +++ src/distrib/sets/lists/comp/shl.mi Tue Jun 26 17:01:33 2018 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.316 2018/05/28 21:04:59 chs Exp $ +# $NetBSD: shl.mi,v 1.317 2018/06/26 21:01:33 christos Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -83,6 +83,7 @@ ./usr/lib/liblber_pic.acomp-ldap-piclib compatfile,picinstall,ldap ./usr/lib/libldap_pic.acomp-ldap-piclib compatfile,picinstall,ldap ./usr/lib/libldap_r_pic.a comp-ldap-piclib compatfile,picinstall,ldap +./usr/lib/liblsan_pic.acomp-c-piclib compatfile,picinstall,gcc ./usr/lib/liblua_pic.acomp-c-piclib compatfile,picinstall ./usr/lib/liblutok_pic.a comp-c-piclib compatfile,picinstall,kyua ./usr/lib/liblwres_pic.a comp-bind-piclib compatfile,picinstall Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.252 src/distrib/sets/lists/debug/mi:1.253 --- src/distrib/sets/lists/debug/mi:1.252 Tue Jun 19 23:51:27 2018 +++ src/distrib/sets/lists/debug/mi Tue Jun 26 17:01:34 2018 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.252 2018/06/20 03:51:27 maya Exp $ +# $NetBSD: mi,v 1.253 2018/06/26 21:01:34 christos Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -95,6 +95,7 @@ ./usr/lib/liblber_g.acomp-c-debuglib debuglib,ldap,compatfile ./usr/lib/libldap_g.acomp-c-debuglib debuglib,ldap,compatfile ./usr/lib/libldap_r_g.acomp-c-debuglib debuglib,ldap,compatfile +./usr/lib/liblsan_g.acomp-c-debuglib debuglib,compatfile,gcc ./usr/lib/liblua_g.acomp-c-debuglib debuglib,compatfile ./usr/lib/liblwres_g.acomp-c-debuglib debuglib,compatfile ./usr/lib/liblzf_g.acomp-c-debuglib debuglib,compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.198 src/distrib/sets/lists/debug/shl.mi:1.199 ---
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Tue Jun 26 21:01:34 UTC 2018 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/comp: mi shl.mi src/distrib/sets/lists/debug: mi shl.mi Log Message: Add the lsan libraries To generate a diff of this commit: cvs rdiff -u -r1.839 -r1.840 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.2203 -r1.2204 src/distrib/sets/lists/comp/mi cvs rdiff -u -r1.316 -r1.317 src/distrib/sets/lists/comp/shl.mi cvs rdiff -u -r1.252 -r1.253 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.198 -r1.199 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/libsanitizer
Module Name:src Committed By: christos Date: Tue Jun 26 20:55:38 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_common.h lsan_common_linux.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc sanitizer_linux.h sanitizer_stoptheworld_linux_libcdep.cc Log Message: Add support for lsan (Leak Sanitizer), crashes on exit, but works from gdb... To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc cvs rdiff -u -r1.18 -r1.19 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc/dist/libsanitizer
Module Name:src Committed By: christos Date: Tue Jun 26 20:55:38 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_common.h lsan_common_linux.cc src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common: sanitizer_linux.cc sanitizer_linux.h sanitizer_stoptheworld_linux_libcdep.cc Log Message: Add support for lsan (Leak Sanitizer), crashes on exit, but works from gdb... To generate a diff of this commit: cvs rdiff -u -r1.1.1.2 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h \ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc cvs rdiff -u -r1.18 -r1.19 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc cvs rdiff -u -r1.4 -r1.5 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h:1.1.1.2 Thu Feb 1 20:58:47 2018 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common.h Tue Jun 26 16:55:37 2018 @@ -20,7 +20,7 @@ #include "sanitizer_common/sanitizer_stoptheworld.h" #include "sanitizer_common/sanitizer_symbolizer.h" -#if (SANITIZER_LINUX && !SANITIZER_ANDROID) && (SANITIZER_WORDSIZE == 64) \ +#if (SANITIZER_NETBSD || SANITIZER_LINUX) && !SANITIZER_ANDROID && (SANITIZER_WORDSIZE == 64) \ && (defined(__x86_64__) || defined(__mips64) || defined(__aarch64__)) #define CAN_SANITIZE_LEAKS 1 #else Index: src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc:1.1.1.2 src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc:1.2 --- src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc:1.1.1.2 Thu Feb 1 20:58:47 2018 +++ src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_common_linux.cc Tue Jun 26 16:55:37 2018 @@ -13,7 +13,7 @@ #include "sanitizer_common/sanitizer_platform.h" #include "lsan_common.h" -#if CAN_SANITIZE_LEAKS && SANITIZER_LINUX +#if CAN_SANITIZE_LEAKS && (SANITIZER_LINUX || SANITIZER_NETBSD) #include #include "sanitizer_common/sanitizer_common.h" @@ -174,4 +174,4 @@ void DoStopTheWorld(StopTheWorldCallback } // namespace __lsan -#endif // CAN_SANITIZE_LEAKS && SANITIZER_LINUX +#endif // CAN_SANITIZE_LEAKS && (SANITIZER_LINUX || SANITIZER_NETBSD) Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.18 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.19 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc:1.18 Mon Jun 4 09:12:54 2018 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc Tue Jun 26 16:55:38 2018 @@ -633,6 +633,16 @@ int internal_fork() { #endif } +#if SANITIZER_NETBSD +#include +extern "C" int __sigaction14(int, const struct sigaction *, struct sigaction *); +int internal_sigaction_norestorer(int signum, const void *act, void *oldact) { + +return __sigaction14(signum, + reinterpret_cast(act), + reinterpret_cast(oldact)); +} +#endif #if SANITIZER_LINUX #define SA_RESTORER 0x0400 // Doesn't set sa_restorer, use with caution (see below). Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.4 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.5 --- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h:1.4 Thu Feb 1 22:41:11 2018 +++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.h Tue Jun 26 16:55:38 2018 @@ -48,6 +48,15 @@ uptr internal_clone(int (*fn)(void *), v #endif #endif // SANITIZER_LINUX +#ifdef SANITIZER_NETBSD +int internal_sigaction_norestorer(int signum, const void *act, void *oldact); +#define internal_sigdelset(set, signum) \ +__sigdelset(set, signum) +#define internal_clone(fn, child_stack, flags, arg, \ +parent_tidptr, newtls, child_tidptr) \ +__clone(fn, child_stack, flags, arg) +#endif + // This class reads thread IDs from /proc//task using only syscalls. class ThreadLister { public: Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:1.1.1.3
CVS commit: src/external/gpl3/gcc/lib/liblsan
Module Name:src Committed By: christos Date: Tue Jun 26 20:54:32 UTC 2018 Added Files: src/external/gpl3/gcc/lib/liblsan: Makefile shlib_version test-lsan.c Log Message: Add lsan support. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/liblsan/Makefile \ src/external/gpl3/gcc/lib/liblsan/shlib_version \ src/external/gpl3/gcc/lib/liblsan/test-lsan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/external/gpl3/gcc/lib/liblsan/Makefile diff -u /dev/null src/external/gpl3/gcc/lib/liblsan/Makefile:1.1 --- /dev/null Tue Jun 26 16:54:32 2018 +++ src/external/gpl3/gcc/lib/liblsan/Makefile Tue Jun 26 16:54:32 2018 @@ -0,0 +1,25 @@ +# $NetBSD: Makefile,v 1.1 2018/06/26 20:54:32 christos Exp $ + +.include + +.include "../Makefile.inc" +.include "../Makefile.sanitizer" + +.PATH: ${SANITIZER}/lsan ${SANITIZER}/asan + +LSAN_SRCS+= \ +sanitizer_stoptheworld_linux_libcdep.cc \ +lsan.cc \ +lsan_allocator.cc \ +lsan_common.cc \ +lsan_common_linux.cc \ +lsan_interceptors.cc \ +lsan_preinit.cc \ +lsan_thread.cc + + +LIB= lsan +SRCS+= ${LSAN_SRCS} +LIBDPLIBS+= rt ${NETBSDSRCDIR}/lib/librt + +.include Index: src/external/gpl3/gcc/lib/liblsan/shlib_version diff -u /dev/null src/external/gpl3/gcc/lib/liblsan/shlib_version:1.1 --- /dev/null Tue Jun 26 16:54:32 2018 +++ src/external/gpl3/gcc/lib/liblsan/shlib_version Tue Jun 26 16:54:32 2018 @@ -0,0 +1,2 @@ +major=1 +minor=0 Index: src/external/gpl3/gcc/lib/liblsan/test-lsan.c diff -u /dev/null src/external/gpl3/gcc/lib/liblsan/test-lsan.c:1.1 --- /dev/null Tue Jun 26 16:54:32 2018 +++ src/external/gpl3/gcc/lib/liblsan/test-lsan.c Tue Jun 26 16:54:32 2018 @@ -0,0 +1,13 @@ +#include +#include + +int +main(void) +{ + int *a = malloc(7); + + for (int i = 0; i < 10; i++) + a[i] = i; + printf("%d\n", a[6]); + return 0; +}
CVS commit: src/external/gpl3/gcc/lib/liblsan
Module Name:src Committed By: christos Date: Tue Jun 26 20:54:32 UTC 2018 Added Files: src/external/gpl3/gcc/lib/liblsan: Makefile shlib_version test-lsan.c Log Message: Add lsan support. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/external/gpl3/gcc/lib/liblsan/Makefile \ src/external/gpl3/gcc/lib/liblsan/shlib_version \ src/external/gpl3/gcc/lib/liblsan/test-lsan.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/arm/rockchip
Module Name:src Committed By: jmcneill Date: Tue Jun 26 17:44:04 UTC 2018 Modified Files: src/sys/arch/arm/rockchip: rk_cru.c Log Message: device_printf -> aprint_debug To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_cru.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/arm/rockchip
Module Name:src Committed By: jmcneill Date: Tue Jun 26 17:44:04 UTC 2018 Modified Files: src/sys/arch/arm/rockchip: rk_cru.c Log Message: device_printf -> aprint_debug To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/rockchip/rk_cru.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/arm/rockchip/rk_cru.c diff -u src/sys/arch/arm/rockchip/rk_cru.c:1.2 src/sys/arch/arm/rockchip/rk_cru.c:1.3 --- src/sys/arch/arm/rockchip/rk_cru.c:1.2 Sun Jun 17 11:52:38 2018 +++ src/sys/arch/arm/rockchip/rk_cru.c Tue Jun 26 17:44:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rk_cru.c,v 1.2 2018/06/17 11:52:38 jmcneill Exp $ */ +/* $NetBSD: rk_cru.c,v 1.3 2018/06/26 17:44:04 jmcneill Exp $ */ /*- * Copyright (c) 2018 Jared McNeill @@ -30,7 +30,7 @@ #include "opt_fdt_arm.h" #include -__KERNEL_RCSID(0, "$NetBSD: rk_cru.c,v 1.2 2018/06/17 11:52:38 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rk_cru.c,v 1.3 2018/06/26 17:44:04 jmcneill Exp $"); #include #include @@ -367,13 +367,13 @@ rk_cru_print(struct rk_cru_softc *sc) default: type = "???"; break; } - device_printf(sc->sc_dev, + aprint_debug_dev(sc->sc_dev, "%3d %-14s %2s %-14s %-7s ", clk->id, clk->base.name, clkp_parent ? "<-" : "", clkp_parent ? clkp_parent->name : "", type); - printf("%10d Hz\n", clk_get_rate(>base)); + aprint_debug("%10d Hz\n", clk_get_rate(>base)); } }
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Tue Jun 26 17:13:41 UTC 2018 Added Files: src/doc: TODO.sanitizers Log Message: Add TODO.sanitizer Note short term, long term and unspecified tasks with sanitizers. The long term goals are planned to be started after emptying TODO.ptrace. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/doc/TODO.sanitizers Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/doc/TODO.sanitizers diff -u /dev/null src/doc/TODO.sanitizers:1.1 --- /dev/null Tue Jun 26 17:13:41 2018 +++ src/doc/TODO.sanitizers Tue Jun 26 17:13:41 2018 @@ -0,0 +1,55 @@ +Sanitizer and related tasks. + +Short term: + - upgrade base Clang/LLVM, libcxx, libcxxabi to at least 7svn (HEAD) + - compiler-rt import and integration with base + - merge TSan, MSan and libFuzzer ATF tests + - prepare MKSANITIZER readme + - kernel-asan port + - kernel-ubsan port + - switch syscall(2)/__syscall(2) to libc calls + - upstream local patches, mostly to compiler-rt + - develop fts(3) interceptors (MSan, for ls(1), find(1), mtree(8) + - investigate and address the libcxx failing tests on NetBSD + - expr(1) fixes for issue detected with libFuzzer, addition of new ATF tests + - no-ASLR boot.cfg option, required for MKSANITIZER + +Long term: + - FILE and DIR sanitization (needed by at least: ESan, MSan) + - add missing interceptors (mostly MSan-centric) + - improve the framework for ioctl(2) database and handle special cases when a + part of a struct can be uninitialized and passed to the kernel (MSan) + - port or finish the port of: + * ESan, + * LSan, + * XRay, + * shadowcallstack, + * cfi, + * scudo, + * profile, + * DFSan. + - finish the research of a new syscall for StopTheWorld() operation + ptrace(2) style for self-introspection and debugging (LSan) + - port HWASan -- aarch64 specific, needs hardware or emulator + - make MKSANITIZER usable with any supported by a compiler combination of + sanitizers + - detect and fix more bugs in basesystem + - pkgsrc integration with sanitizers and MKSANITIER (PKGSANITIER?) + - port what possible to !amd64 + - fixes with the signal code + - attach a NetBSD buildbot testing build of compiler-rt and executing tests + - make compiler-rt buildable with GCC + - finish the support of float128 for Clang/LLVM/libstdc++/libgcc + - lld port to NetBSD (GNU ld(1) is too slow for serious LLVM development) + - merge of the libFuzzer integration with the basesystem + - oom-killer ATF tests and fixes + - uvm_map.c E2BIG workaround or limit raise (1MB -> 10MB?), needed by libFuzzer + +Unspecified: + - kernel-tsan? upstream development is stalled with patches for Linux 4.2 + https://github.com/google/ktsan + - kernek-msan? in development for Linux + https://github.com/google/kmsan + - kernel-safestack? implemented in Fuchsia/Magenta + - kernel coverage (KCOV?) + - syzkaller port
CVS commit: src/doc
Module Name:src Committed By: kamil Date: Tue Jun 26 17:13:41 UTC 2018 Added Files: src/doc: TODO.sanitizers Log Message: Add TODO.sanitizer Note short term, long term and unspecified tasks with sanitizers. The long term goals are planned to be started after emptying TODO.ptrace. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/doc/TODO.sanitizers Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc/roadmaps/people
Module Name:src Committed By: kamil Date: Tue Jun 26 16:06:21 UTC 2018 Removed Files: src/doc/roadmaps/people: kamil Log Message: Remove roadmap/kamil -8 goals finished in the possible scope for 8.0RC2 -9 abandoned in that scope after research To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/doc/roadmaps/people/kamil Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc/roadmaps/people
Module Name:src Committed By: kamil Date: Tue Jun 26 16:06:21 UTC 2018 Removed Files: src/doc/roadmaps/people: kamil Log Message: Remove roadmap/kamil -8 goals finished in the possible scope for 8.0RC2 -9 abandoned in that scope after research To generate a diff of this commit: cvs rdiff -u -r1.1 -r0 src/doc/roadmaps/people/kamil Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes
Module Name:src Committed By: martin Date: Tue Jun 26 10:49:55 UTC 2018 Modified Files: src/distrib/notes/bebox: prep src/distrib/notes/common: main src/distrib/notes/ews4800mips: xfer src/distrib/notes/i386: xfer src/distrib/notes/news68k: xfer src/distrib/notes/newsmips: xfer Log Message: Replace references to i386 install media for Rawrite32 with links to the homepage. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/bebox/prep cvs rdiff -u -r1.546 -r1.547 src/distrib/notes/common/main cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/ews4800mips/xfer cvs rdiff -u -r1.20 -r1.21 src/distrib/notes/i386/xfer cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/news68k/xfer cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/newsmips/xfer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/notes
Module Name:src Committed By: martin Date: Tue Jun 26 10:49:55 UTC 2018 Modified Files: src/distrib/notes/bebox: prep src/distrib/notes/common: main src/distrib/notes/ews4800mips: xfer src/distrib/notes/i386: xfer src/distrib/notes/news68k: xfer src/distrib/notes/newsmips: xfer Log Message: Replace references to i386 install media for Rawrite32 with links to the homepage. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/bebox/prep cvs rdiff -u -r1.546 -r1.547 src/distrib/notes/common/main cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/ews4800mips/xfer cvs rdiff -u -r1.20 -r1.21 src/distrib/notes/i386/xfer cvs rdiff -u -r1.3 -r1.4 src/distrib/notes/news68k/xfer cvs rdiff -u -r1.2 -r1.3 src/distrib/notes/newsmips/xfer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/notes/bebox/prep diff -u src/distrib/notes/bebox/prep:1.2 src/distrib/notes/bebox/prep:1.3 --- src/distrib/notes/bebox/prep:1.2 Mon Nov 15 21:39:12 2010 +++ src/distrib/notes/bebox/prep Tue Jun 26 10:49:54 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: prep,v 1.2 2010/11/15 21:39:12 wiz Exp $ +.\" $NetBSD: prep,v 1.3 2018/06/26 10:49:54 martin Exp $ . .Pp . @@ -45,13 +45,8 @@ If you have an x86 PC which runs and use it to write the floppy image(s) to floppy disk, you can use the .Ic Rawrite32 -Windows32 program -.Pq installed by Pa rawr32.exe -available in the -.Pa i386/installation/misc/ -directory of the -.Nx -distribution. +Windows program which can be found at +.Lk https://www.NetBSD.org/~martin/rawrite32 . .Pp Also you can create boot.fs in the following way: .Pp Index: src/distrib/notes/common/main diff -u src/distrib/notes/common/main:1.546 src/distrib/notes/common/main:1.547 --- src/distrib/notes/common/main:1.546 Sat Jun 23 17:46:00 2018 +++ src/distrib/notes/common/main Tue Jun 26 10:49:54 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: main,v 1.546 2018/06/23 17:46:00 snj Exp $ +.\" $NetBSD: main,v 1.547 2018/06/26 10:49:54 martin Exp $ .\" .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -257,15 +257,14 @@ with the appropriate device for your sys On Windows, you will need to use a program such as Win32 Disk Imager, which can be found at .Lk http://sourceforge.net/projects/win32diskimager/ +or +Rawrite32 which can be found at +.Lk https://www.NetBSD.org/~martin/rawrite32 . .if \n[amd64]:\n[i386] \{\ If you have problems writing a raw image to a floppy, the .Ic rawrite.exe MS-DOS program -or the -.Ic Rawrite32 -Windows32 program (installed by -.Pa rawr32.exe ) in the .Pa \*M/installation/misc/ directory may be of help. Index: src/distrib/notes/ews4800mips/xfer diff -u src/distrib/notes/ews4800mips/xfer:1.2 src/distrib/notes/ews4800mips/xfer:1.3 --- src/distrib/notes/ews4800mips/xfer:1.2 Fri May 27 17:38:43 2011 +++ src/distrib/notes/ews4800mips/xfer Tue Jun 26 10:49:54 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: xfer,v 1.2 2011/05/27 17:38:43 tsutsui Exp $ +.\" $NetBSD: xfer,v 1.3 2018/06/26 10:49:54 martin Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -59,14 +59,9 @@ If you have an i386 machine which runs .Tn Microsoft Windows and use it to write the floppy image(s) to floppy disk, you can use the .Ic Rawrite32 -Windows32 program. -It can be installed by -Pa rawr32.exe -provided in the -.Pa i386/installation/misc/ -directory of the -.Nx -distribution. +Windows program. +It can be downloaded from +.Lk https://www.NetBSD.org/~martin/rawrite32 . .Ic rawrite utility for the .Tn MS-DOS Index: src/distrib/notes/i386/xfer diff -u src/distrib/notes/i386/xfer:1.20 src/distrib/notes/i386/xfer:1.21 --- src/distrib/notes/i386/xfer:1.20 Fri May 27 17:38:43 2011 +++ src/distrib/notes/i386/xfer Tue Jun 26 10:49:54 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: xfer,v 1.20 2011/05/27 17:38:43 tsutsui Exp $ +.\" $NetBSD: xfer,v 1.21 2018/06/26 10:49:54 martin Exp $ .\" .\" Copyright (c) 1999-2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -59,21 +59,16 @@ If you are using .Tn Microsoft Windows to write the floppy image(s) to floppy disk, you can use the .Ic Rawrite32 -Windows32 program. -It can be installed by -Pa rawr32.exe -provieded in the -.Pa i386/installation/misc -directory of the -.Nx -distribution. +Windows program. +It can be downloaded from +.Lk https://www.NetBSD.org/~martin/rawrite32 . A .Ic rawrite utility for the .Tn MS-DOS environment is also available in the .Pa i386/installation/misc/ -directory. +directory of the i386 install media. .Pp . .\" - MI instructions for getting distribution off installation medium Index: src/distrib/notes/news68k/xfer diff -u src/distrib/notes/news68k/xfer:1.3 src/distrib/notes/news68k/xfer:1.4 --- src/distrib/notes/news68k/xfer:1.3 Fri May 27 17:38:44 2011 +++ src/distrib/notes/news68k/xfer Tue Jun 26
CVS commit: src/sys/arch/i386/stand/misc
Module Name:src Committed By: martin Date: Tue Jun 26 10:15:37 UTC 2018 Modified Files: src/sys/arch/i386/stand/misc: Makefile Removed Files: src/sys/arch/i386/stand/misc: rawr32.exe.uue Log Message: Remove Rawrite32 installer - no point having an outdated version on some install media, the windows machine it needs to run on will have internet and can easily download it. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/misc/Makefile cvs rdiff -u -r1.7 -r0 src/sys/arch/i386/stand/misc/rawr32.exe.uue 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/i386/stand/misc/Makefile diff -u src/sys/arch/i386/stand/misc/Makefile:1.8 src/sys/arch/i386/stand/misc/Makefile:1.9 --- src/sys/arch/i386/stand/misc/Makefile:1.8 Tue May 1 19:59:45 2018 +++ src/sys/arch/i386/stand/misc/Makefile Tue Jun 26 10:15:36 2018 @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.8 2018/05/01 19:59:45 christos Exp $ +# $NetBSD: Makefile,v 1.9 2018/06/26 10:15:36 martin Exp $ .include MISC_FILES= rawrite.c UUDECODE_FILES= pfdisk.doc pfdisk.exe pfdisktc.zip \ - rawr32.exe \ rawrite.doc rawrite.exe .include
CVS commit: src/sys/arch/i386/stand/misc
Module Name:src Committed By: martin Date: Tue Jun 26 10:15:37 UTC 2018 Modified Files: src/sys/arch/i386/stand/misc: Makefile Removed Files: src/sys/arch/i386/stand/misc: rawr32.exe.uue Log Message: Remove Rawrite32 installer - no point having an outdated version on some install media, the windows machine it needs to run on will have internet and can easily download it. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/i386/stand/misc/Makefile cvs rdiff -u -r1.7 -r0 src/sys/arch/i386/stand/misc/rawr32.exe.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/fstat
Module Name:src Committed By: msaitoh Date: Tue Jun 26 10:00:25 UTC 2018 Modified Files: src/usr.bin/fstat: misc.c Log Message: Print BPF direction correctly. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/fstat/misc.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/fstat
Module Name:src Committed By: msaitoh Date: Tue Jun 26 10:00:25 UTC 2018 Modified Files: src/usr.bin/fstat: misc.c Log Message: Print BPF direction correctly. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/fstat/misc.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/fstat/misc.c diff -u src/usr.bin/fstat/misc.c:1.19 src/usr.bin/fstat/misc.c:1.20 --- src/usr.bin/fstat/misc.c:1.19 Tue Jun 26 06:48:03 2018 +++ src/usr.bin/fstat/misc.c Tue Jun 26 10:00:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: misc.c,v 1.19 2018/06/26 06:48:03 msaitoh Exp $ */ +/* $NetBSD: misc.c,v 1.20 2018/06/26 10:00:25 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__RCSID("$NetBSD: misc.c,v 1.19 2018/06/26 06:48:03 msaitoh Exp $"); +__RCSID("$NetBSD: misc.c,v 1.20 2018/06/26 10:00:25 msaitoh Exp $"); #include #include @@ -142,8 +142,12 @@ p_bpf(struct file *f) (void)printf(", promisc"); if (bpf.bd_immediate) (void)printf(", immed"); - if (bpf.bd_direction) - (void)printf(", direction"); + if (bpf.bd_direction == BPF_D_IN) + (void)printf(", in"); + else if (bpf.bd_direction == BPF_D_INOUT) + (void)printf(", inout"); + else if (bpf.bd_direction == BPF_D_OUT) + (void)printf(", out"); if (bpf.bd_jitcode != NULL) (void)printf(", jit"); if (bpf.bd_async)
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: msaitoh Date: Tue Jun 26 09:50:42 UTC 2018 Modified Files: src/usr.bin/netstat: bpf.c Log Message: Fix a bug that BPF_D_OUT isn't printed correctly. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/netstat/bpf.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/netstat/bpf.c diff -u src/usr.bin/netstat/bpf.c:1.12 src/usr.bin/netstat/bpf.c:1.13 --- src/usr.bin/netstat/bpf.c:1.12 Tue Jun 26 06:48:03 2018 +++ src/usr.bin/netstat/bpf.c Tue Jun 26 09:50:42 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.12 2018/06/26 06:48:03 msaitoh Exp $ */ +/* $NetBSD: bpf.c,v 1.13 2018/06/26 09:50:42 msaitoh Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -148,7 +148,7 @@ bpf_dump(const char *bpfif) printf("%c", BPFEXT(bde_promisc) ? 'P' : '-'); printf("%c", BPFEXT(bde_immediate) ? 'R' : '-'); printf("%c", (BPFEXT(bde_direction) == BPF_D_IN) ? '-' - : (BPFEXT(bde_direction) == BPF_D_IN) ? 'O' : 'S'); + : (BPFEXT(bde_direction) == BPF_D_OUT) ? 'O' : 'S'); printf("%c", BPFEXT(bde_hdrcmplt) ? 'H' : '-'); printf(" %-8d ", BPFEXT(bde_bufsize));
CVS commit: src/usr.bin/netstat
Module Name:src Committed By: msaitoh Date: Tue Jun 26 09:50:42 UTC 2018 Modified Files: src/usr.bin/netstat: bpf.c Log Message: Fix a bug that BPF_D_OUT isn't printed correctly. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/usr.bin/netstat/bpf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:52:43 UTC 2018 Modified Files: src/doc: CHANGES Log Message: Add the BPF direction filter (BIOC[GS]DIRECTION). To generate a diff of this commit: cvs rdiff -u -r1.2403 -r1.2404 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2403 src/doc/CHANGES:1.2404 --- src/doc/CHANGES:1.2403 Sat Jun 23 11:54:06 2018 +++ src/doc/CHANGES Tue Jun 26 06:52:43 2018 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2403 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2404 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -165,3 +165,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0: arm: Add support for QEMU ARM Virtual Machine ("virt"). [jmcneill 20180614] arm: Add support for Rockchip RK3328 SoC. [jmcneill 20180615] dhcpcd: Import 7.0.6. [roy 20180621] + bpf(4): Add the BPF direction filter (BIOC[GS]DIRECTION). + [msaitoh 20180626]
CVS commit: src/doc
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:52:43 UTC 2018 Modified Files: src/doc: CHANGES Log Message: Add the BPF direction filter (BIOC[GS]DIRECTION). To generate a diff of this commit: cvs rdiff -u -r1.2403 -r1.2404 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:50:52 UTC 2018 Modified Files: src/sys/sys: param.h Log Message: Bump version to 8.99.21 (bpf_mtap*() API change & BIOC[GS]DIRECTION). To generate a diff of this commit: cvs rdiff -u -r1.565 -r1.566 src/sys/sys/param.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/sys/param.h diff -u src/sys/sys/param.h:1.565 src/sys/sys/param.h:1.566 --- src/sys/sys/param.h:1.565 Mon Jun 25 03:23:55 2018 +++ src/sys/sys/param.h Tue Jun 26 06:50:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.565 2018/06/25 03:23:55 msaitoh Exp $ */ +/* $NetBSD: param.h,v 1.566 2018/06/26 06:50:52 msaitoh Exp $ */ /*- * Copyright (c) 1982, 1986, 1989, 1993 @@ -67,7 +67,7 @@ * 2.99.9 (299000900) */ -#define __NetBSD_Version__ 899002000 /* NetBSD 8.99.20 */ +#define __NetBSD_Version__ 899002100 /* NetBSD 8.99.21 */ #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \ (m) * 100) + (p) * 100) <= __NetBSD_Version__)
CVS commit: src/sys/sys
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:50:52 UTC 2018 Modified Files: src/sys/sys: param.h Log Message: Bump version to 8.99.21 (bpf_mtap*() API change & BIOC[GS]DIRECTION). To generate a diff of this commit: cvs rdiff -u -r1.565 -r1.566 src/sys/sys/param.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: msaitoh Date: Tue Jun 26 06:48:03 UTC 2018 Modified Files: src/share/man/man4: bpf.4 src/sys/arch/acorn32/podulebus: if_ie.c src/sys/arch/amiga/dev: if_es.c if_qn.c src/sys/arch/arm/at91: at91emac.c src/sys/arch/arm/broadcom: bcm53xx_eth.c src/sys/arch/arm/ep93xx: epe.c src/sys/arch/arm/gemini: gemini_gmac.c if_gpn.c src/sys/arch/arm/imx: if_enet.c src/sys/arch/arm/omap: if_cpsw.c omapl1x_emac.c src/sys/arch/arm/sunxi: sun4i_emac.c sunxi_emac.c src/sys/arch/arm/ti: if_cpsw.c src/sys/arch/arm/xscale: ixp425_if_npe.c src/sys/arch/emips/ebus: if_le_ebus.c src/sys/arch/mac68k/dev: if_mc.c src/sys/arch/mac68k/nubus: if_netdock_nubus.c src/sys/arch/macppc/dev: am79c950.c if_bm.c if_gm.c src/sys/arch/mips/adm5120/dev: if_admsw.c src/sys/arch/mips/alchemy/dev: if_aumac.c src/sys/arch/mips/atheros/dev: if_ae.c src/sys/arch/mips/cavium/dev: if_cnmac.c src/sys/arch/mips/ralink: ralink_eth.c src/sys/arch/mips/sibyte/dev: sbmac.c src/sys/arch/newsmips/apbus: if_sn.c src/sys/arch/next68k/dev: mb8795.c src/sys/arch/playstation2/dev: if_smap.c src/sys/arch/powerpc/booke/dev: pq3etsec.c src/sys/arch/powerpc/ibm4xx/dev: if_emac.c src/sys/arch/sgimips/hpc: if_sq.c src/sys/arch/sgimips/mace: if_mec.c src/sys/arch/sun2/dev: if_ec.c src/sys/arch/sun3/dev: if_ie.c src/sys/arch/usermode/dev: if_veth.c src/sys/arch/x86/pci: if_vmx.c src/sys/arch/xen/xen: if_xennet_xenbus.c xennetback_xenbus.c src/sys/dev/bi: if_ni.c src/sys/dev/cadence: if_cemac.c src/sys/dev/ic: aic6915.c am7990.c am79900.c an.c arn5008.c arn9003.c ath.c athn.c atw.c awi.c bwfm.c bwi.c cs89x0.c dm9000.c dp8390.c dp83932.c dwc_gmac.c elink3.c elinkxl.c gem.c hd64570.c hme.c i82557.c i82586.c i82596.c lan9118.c lemac.c malo.c mb86950.c mb86960.c midway.c mtd803.c pdq_ifsubr.c pdqvar.h rrunner.c rt2560.c rt2661.c rt2860.c rtl8169.c rtl81x9.c rtw.c seeq8005.c sgec.c smc83c170.c smc90cx6.c smc91cxx.c tropic.c tulip.c wi.c src/sys/dev/if_ndis: if_ndis.c src/sys/dev/isa: if_eg.c if_el.c if_iy.c src/sys/dev/marvell: if_gfe.c if_mvgbe.c if_mvxpe.c src/sys/dev/ofw: ofnet.c src/sys/dev/pci: if_age.c if_alc.c if_ale.c if_bce.c if_bge.c if_bnx.c if_cas.c if_de.c if_dge.c if_ena.c if_et.c if_ipw.c if_iwi.c if_iwm.c if_iwn.c if_jme.c if_kse.c if_lii.c if_lmc.c if_msk.c if_nfe.c if_pcn.c if_rtwn.c if_sip.c if_sk.c if_ste.c if_stge.c if_ti.c if_tl.c if_txp.c if_vge.c if_vioif.c if_vr.c if_vte.c if_wm.c if_wpi.c if_xge.c src/sys/dev/pci/cxgb: cxgb_main.c src/sys/dev/pci/ixgbe: ix_txrx.c src/sys/dev/pcmcia: if_cnw.c if_malo_pcmcia.c if_ray.c if_xi.c src/sys/dev/ppbus: if_plip.c src/sys/dev/qbus: if_de.c if_qe.c if_qt.c src/sys/dev/sbus: be.c qe.c src/sys/dev/scsipi: if_se.c src/sys/dev/usb: if_athn_usb.c if_atu.c if_aue.c if_axe.c if_axen.c if_cdce.c if_cue.c if_kue.c if_otus.c if_rum.c if_run.c if_smsc.c if_udav.c if_upgt.c if_upl.c if_ural.c if_url.c if_urndis.c if_urtw.c if_urtwn.c if_zyd.c uhso.c src/sys/dist/pf/net: if_pflog.c if_pfsync.c src/sys/net: bpf.c bpf.h bpfdesc.h if.c if_etherip.c if_faith.c if_gif.c if_gre.c if_ieee1394subr.c if_ipsec.c if_l2tp.c if_loop.c if_mpls.c if_ppp.c if_pppoe.c if_stf.c if_tap.c if_tun.c if_vlan.c src/sys/net/agr: if_agr.c src/sys/net/npf: npf_ext_log.c src/sys/net80211: ieee80211_input.c src/sys/netcan: can.c src/sys/netinet: ip_carp.c src/sys/netisdn: i4b_ipr.c i4b_isppp.c src/sys/rump/net/lib/libshmif: if_shmem.c src/sys/rump/net/lib/libsockin: sockin.c src/sys/rump/net/lib/libvirtif: if_virt.c src/usr.bin/fstat: misc.c src/usr.bin/netstat: bpf.c Log Message: Implement the BPF direction filter (BIOC[GS]DIRECTION). It provides backward compatibility with BIOC[GS]SEESENT ioctl. The userland interface is the same as FreeBSD. This change also fixes a bug that the direction is misunderstand on some environment by passing the direction to bpf_mtap*() instead of checking m->m_pkthdr.rcvif. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/share/man/man4/bpf.4 cvs rdiff -u -r1.41 -r1.42 src/sys/arch/acorn32/podulebus/if_ie.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amiga/dev/if_es.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/amiga/dev/if_qn.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/arm/at91/at91emac.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/arm/broadcom/bcm53xx_eth.c cvs rdiff -u -r1.37 -r1.38
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:34:55 UTC 2018 Modified Files: src/sys/dev/i2c: at24cxx.c files.i2c i2c.c i2cvar.h Log Message: Remove the i2c "size" locator and corresponding property / attach arg. It was a hack meant only for EEPROMs, which have another way to specify size in the config directive ("flag" paramter), as well as a better way to detect size based on "compatible" string. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.92 -r1.93 src/sys/dev/i2c/files.i2c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/i2c/i2c.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/i2c/i2cvar.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/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.29 src/sys/dev/i2c/at24cxx.c:1.30 --- src/sys/dev/i2c/at24cxx.c:1.29 Tue Jun 26 06:21:23 2018 +++ src/sys/dev/i2c/at24cxx.c Tue Jun 26 06:34:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.29 2018/06/26 06:21:23 thorpej Exp $ */ +/* $NetBSD: at24cxx.c,v 1.30 2018/06/26 06:34:55 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.29 2018/06/26 06:21:23 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.30 2018/06/26 06:34:55 thorpej Exp $"); #include #include @@ -169,8 +169,6 @@ seeprom_attach(device_t parent, device_t */ if (device_cfdata(self)->cf_flags) sc->sc_size = (device_cfdata(self)->cf_flags << 7); - else - sc->sc_size = ia->ia_size; if (sc->sc_size <= 0 && ia->ia_ncompat > 0) { if (iic_compatible_match(ia, compat_data, )) Index: src/sys/dev/i2c/files.i2c diff -u src/sys/dev/i2c/files.i2c:1.92 src/sys/dev/i2c/files.i2c:1.93 --- src/sys/dev/i2c/files.i2c:1.92 Sun May 27 05:31:20 2018 +++ src/sys/dev/i2c/files.i2c Tue Jun 26 06:34:55 2018 @@ -1,10 +1,10 @@ -# $NetBSD: files.i2c,v 1.92 2018/05/27 05:31:20 thorpej Exp $ +# $NetBSD: files.i2c,v 1.93 2018/06/26 06:34:55 thorpej Exp $ obsolete defflag opt_i2cbus.h I2C_SCAN define i2cbus { } define i2cexec -device iic { [addr = -1], [size = -1] } : i2c_bitbang +device iic { [addr = -1] } : i2c_bitbang attach iic at i2cbus file dev/i2c/i2c.ciic file dev/i2c/i2c_exec.c iic | i2cbus | i2cexec Index: src/sys/dev/i2c/i2c.c diff -u src/sys/dev/i2c/i2c.c:1.65 src/sys/dev/i2c/i2c.c:1.66 --- src/sys/dev/i2c/i2c.c:1.65 Tue Jun 26 04:32:35 2018 +++ src/sys/dev/i2c/i2c.c Tue Jun 26 06:34:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: i2c.c,v 1.65 2018/06/26 04:32:35 thorpej Exp $ */ +/* $NetBSD: i2c.c,v 1.66 2018/06/26 06:34:55 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.65 2018/06/26 04:32:35 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: i2c.c,v 1.66 2018/06/26 06:34:55 thorpej Exp $"); #include #include @@ -285,7 +285,6 @@ iic_search(device_t parent, cfdata_t cf, } ia.ia_tag = sc->sc_tag; - ia.ia_size = cf->cf_loc[IICCF_SIZE]; ia.ia_type = sc->sc_type; ia.ia_name = NULL; @@ -441,7 +440,7 @@ iic_attach(device_t parent, device_t sel unsigned int i, count; prop_dictionary_t dev; prop_data_t cdata; - uint32_t addr, size; + uint32_t addr; uint64_t cookie; const char *name; struct i2c_attach_args ia; @@ -462,10 +461,6 @@ iic_attach(device_t parent, device_t sel if (!prop_dictionary_get_uint64(dev, "cookie", )) cookie = 0; loc[IICCF_ADDR] = addr; - if (prop_dictionary_get_uint32(dev, "size", )) -loc[IICCF_SIZE] = size; - else -size = loc[IICCF_SIZE] = IICCF_SIZE_DEFAULT; memset(, 0, sizeof ia); ia.ia_addr = addr; @@ -473,7 +468,6 @@ iic_attach(device_t parent, device_t sel ia.ia_tag = ic; ia.ia_name = name; ia.ia_cookie = cookie; - ia.ia_size = size; ia.ia_prop = dev; buf = NULL; Index: src/sys/dev/i2c/i2cvar.h diff -u src/sys/dev/i2c/i2cvar.h:1.16 src/sys/dev/i2c/i2cvar.h:1.17 --- src/sys/dev/i2c/i2cvar.h:1.16 Tue Jun 26 04:32:35 2018 +++ src/sys/dev/i2c/i2cvar.h Tue Jun 26 06:34:55 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: i2cvar.h,v 1.16 2018/06/26 04:32:35 thorpej Exp $ */ +/* $NetBSD: i2cvar.h,v 1.17 2018/06/26 06:34:55 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -133,7 +133,6 @@ struct i2cbus_attach_args { struct i2c_attach_args { i2c_tag_t ia_tag; /* our controller */ i2c_addr_t ia_addr; /* address of device */ - int ia_size; /* size (for EEPROMs) */ int ia_type; /* bus type */ /* only set if using direct config */ const char * ia_name; /* name of the device */
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:34:55 UTC 2018 Modified Files: src/sys/dev/i2c: at24cxx.c files.i2c i2c.c i2cvar.h Log Message: Remove the i2c "size" locator and corresponding property / attach arg. It was a hack meant only for EEPROMs, which have another way to specify size in the config directive ("flag" paramter), as well as a better way to detect size based on "compatible" string. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.92 -r1.93 src/sys/dev/i2c/files.i2c cvs rdiff -u -r1.65 -r1.66 src/sys/dev/i2c/i2c.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/i2c/i2cvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ofw
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:24:52 UTC 2018 Modified Files: src/sys/dev/ofw: ofw_subr.c Log Message: In of_enter_i2c_devs(), we no longer need to set a "size" property for a couple of models of Atmel EEPROMs because the driver can figure this out on its own now (based on the same "compatible" criteria that we're using). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ofw/ofw_subr.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/ofw/ofw_subr.c diff -u src/sys/dev/ofw/ofw_subr.c:1.30 src/sys/dev/ofw/ofw_subr.c:1.31 --- src/sys/dev/ofw/ofw_subr.c:1.30 Mon Jul 3 00:47:34 2017 +++ src/sys/dev/ofw/ofw_subr.c Tue Jun 26 06:24:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_subr.c,v 1.30 2017/07/03 00:47:34 jmcneill Exp $ */ +/* $NetBSD: ofw_subr.c,v 1.31 2018/06/26 06:24:52 thorpej Exp $ */ /* * Copyright 1998 @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.30 2017/07/03 00:47:34 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ofw_subr.c,v 1.31 2018/06/26 06:24:52 thorpej Exp $"); #include #include @@ -450,7 +450,7 @@ of_enter_i2c_devs(prop_dictionary_t prop int addr_shift) { int node, len; - char name[32], compatible[32]; + char name[32]; uint64_t reg64; uint32_t reg32; uint64_t addr; @@ -493,14 +493,6 @@ of_enter_i2c_devs(prop_dictionary_t prop prop_dictionary_set_uint32(dev, "addr", addr); prop_dictionary_set_uint64(dev, "cookie", node); of_to_dataprop(dev, node, "compatible", "compatible"); - if (OF_getprop(node, "compatible", compatible, - sizeof(compatible)) > 0) { - /* Set size for EEPROM's that we know about */ - if (strcmp(compatible, "i2c-at24c64") == 0) -prop_dictionary_set_uint32(dev, "size", 8192); - if (strcmp(compatible, "i2c-at34c02") == 0) -prop_dictionary_set_uint32(dev, "size", 256); - } prop_array_add(array, dev); prop_object_release(dev); }
CVS commit: src/sys/dev/ofw
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:24:52 UTC 2018 Modified Files: src/sys/dev/ofw: ofw_subr.c Log Message: In of_enter_i2c_devs(), we no longer need to set a "size" property for a couple of models of Atmel EEPROMs because the driver can figure this out on its own now (based on the same "compatible" criteria that we're using). To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/dev/ofw/ofw_subr.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/i2c
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:21:23 UTC 2018 Modified Files: src/sys/dev/i2c: at24cxx.c Log Message: Encode the size information in the compat data. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/at24cxx.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/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.28 src/sys/dev/i2c/at24cxx.c:1.29 --- src/sys/dev/i2c/at24cxx.c:1.28 Tue Jun 26 06:03:57 2018 +++ src/sys/dev/i2c/at24cxx.c Tue Jun 26 06:21:23 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.28 2018/06/26 06:03:57 thorpej Exp $ */ +/* $NetBSD: at24cxx.c,v 1.29 2018/06/26 06:21:23 thorpej Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.28 2018/06/26 06:03:57 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.29 2018/06/26 06:21:23 thorpej Exp $"); #include #include @@ -111,20 +111,11 @@ const struct cdevsw seeprom_cdevsw = { static int seeprom_wait_idle(struct seeprom_softc *); -static const struct seeprom_size { - const char *name; - int size; -} seeprom_sizes[] = { - { "atmel,24c02", 256 }, - { "atmel,24c16", 2048 }, -}; - -/* XXXJRT collapse seeprom_size stuff into compat_data; see also ofw code */ static const struct device_compatible_entry compat_data[] = { - { "i2c-at24c64", 0 }, - { "i2c-at34c02", 0 }, - { "atmel,24c02", 0 }, - { "atmel,24c16", 0 }, + { "i2c-at24c64", 8192 }, + { "i2c-at34c02", 256 }, + { "atmel,24c02", 256 }, + { "atmel,24c16", 2048 }, { NULL,0 } }; @@ -148,7 +139,7 @@ seeprom_attach(device_t parent, device_t { struct seeprom_softc *sc = device_private(self); struct i2c_attach_args *ia = aux; - u_int n, m; + const struct device_compatible_entry *dce; sc->sc_tag = ia->ia_tag; sc->sc_address = ia->ia_addr; @@ -182,15 +173,8 @@ seeprom_attach(device_t parent, device_t sc->sc_size = ia->ia_size; if (sc->sc_size <= 0 && ia->ia_ncompat > 0) { - for (n = 0; n < __arraycount(seeprom_sizes); n++) { - for (m = 0; m < ia->ia_ncompat; m++) { -if (!strcmp(seeprom_sizes[n].name, -ia->ia_compat[m])) { - sc->sc_size = seeprom_sizes[n].size; - break; -} - } - } + if (iic_compatible_match(ia, compat_data, )) + sc->sc_size = dce->data; } switch (sc->sc_size) {
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:21:23 UTC 2018 Modified Files: src/sys/dev/i2c: at24cxx.c Log Message: Encode the size information in the compat data. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/at24cxx.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:17:40 UTC 2018 Modified Files: src/sys/dev/ic: malo.c Log Message: bpf_mtap*() after ieee80211_encap() should be bpf_mtap3() rather than bpf_mtap(). bpf_mtap3() is for raw bpf. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/malo.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/malo.c diff -u src/sys/dev/ic/malo.c:1.10 src/sys/dev/ic/malo.c:1.11 --- src/sys/dev/ic/malo.c:1.10 Mon Oct 23 09:31:17 2017 +++ src/sys/dev/ic/malo.c Tue Jun 26 06:17:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: malo.c,v 1.10 2017/10/23 09:31:17 msaitoh Exp $ */ +/* $NetBSD: malo.c,v 1.11 2018/06/26 06:17:40 msaitoh Exp $ */ /* $OpenBSD: malo.c,v 1.92 2010/08/27 17:08:00 jsg Exp $ */ /* @@ -19,7 +19,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.10 2017/10/23 09:31:17 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: malo.c,v 1.11 2018/06/26 06:17:40 msaitoh Exp $"); #include #include @@ -1074,7 +1074,7 @@ malo_start(struct ifnet *ifp) m0 = ieee80211_encap(ic, m0, ni); if (m0 == NULL) continue; - bpf_mtap(ifp, m0); + bpf_mtap3(ic->ic_rawbpf, m0); if (malo_tx_data(sc, m0, ni) != 0) { ieee80211_free_node(ni);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:17:40 UTC 2018 Modified Files: src/sys/dev/ic: malo.c Log Message: bpf_mtap*() after ieee80211_encap() should be bpf_mtap3() rather than bpf_mtap(). bpf_mtap3() is for raw bpf. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/ic/malo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:16:09 UTC 2018 Modified Files: src/sys/dev/ic: rt2661.c Log Message: bpf_mtap*() before ieee80211_encap() should be bpf_mtap() rather than bpf_mtap3(). bpf_mtap3() is for raw bpf and be used after ieee80211_encap(). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/rt2661.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/rt2661.c diff -u src/sys/dev/ic/rt2661.c:1.37 src/sys/dev/ic/rt2661.c:1.38 --- src/sys/dev/ic/rt2661.c:1.37 Tue May 1 16:18:13 2018 +++ src/sys/dev/ic/rt2661.c Tue Jun 26 06:16:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: rt2661.c,v 1.37 2018/05/01 16:18:13 maya Exp $ */ +/* $NetBSD: rt2661.c,v 1.38 2018/06/26 06:16:09 msaitoh Exp $ */ /* $OpenBSD: rt2661.c,v 1.17 2006/05/01 08:41:11 damien Exp $ */ /* $FreeBSD: rt2560.c,v 1.5 2006/06/02 19:59:31 csjp Exp $ */ @@ -25,7 +25,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.37 2018/05/01 16:18:13 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rt2661.c,v 1.38 2018/06/26 06:16:09 msaitoh Exp $"); #include @@ -1878,7 +1878,7 @@ rt2661_start(struct ifnet *ifp) continue; } - bpf_mtap3(ifp->if_bpf, m0); + bpf_mtap(ifp, m0); m0 = ieee80211_encap(ic, m0, ni); if (m0 == NULL) { ieee80211_free_node(ni);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Tue Jun 26 06:16:09 UTC 2018 Modified Files: src/sys/dev/ic: rt2661.c Log Message: bpf_mtap*() before ieee80211_encap() should be bpf_mtap() rather than bpf_mtap3(). bpf_mtap3() is for raw bpf and be used after ieee80211_encap(). To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/dev/ic/rt2661.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: thorpej Date: Tue Jun 26 06:03:57 UTC 2018 Modified Files: src/sys/arch/macppc/dev: deq.c smusat.c src/sys/arch/sparc64/dev: pcf8591_envctrl.c src/sys/dev/i2c: adadc.c adm1021.c adm1026.c as3722.c at24cxx.c axp20x.c axp22x.c axppmic.c dbcool.c ds1307.c dstemp.c fcu.c ihidev.c lm75.c lm87.c max77620.c pcf8563.c sy8106a.c tcagpio.c tcakp.c titemp.c tsl256x.c src/sys/kern: subr_autoconf.c src/sys/sys: device.h Log Message: In my quest to make device_compatible_entry (and associated goo) super-general, it turns out I also made it a little to cumbersome to use (if my tired fingers are any indication). So, this is a course-correction -- one string per entry (like of_compat_data, which it will soon replace), and remove the over-verbose macros. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/macppc/dev/deq.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/macppc/dev/smusat.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/pcf8591_envctrl.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/adadc.c src/sys/dev/i2c/axp22x.c \ src/sys/dev/i2c/fcu.c src/sys/dev/i2c/max77620.c \ src/sys/dev/i2c/tsl256x.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/adm1021.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/adm1026.c src/sys/dev/i2c/ihidev.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/as3722.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/axp20x.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/axppmic.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/i2c/dbcool.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/ds1307.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/dstemp.c src/sys/dev/i2c/sy8106a.c \ src/sys/dev/i2c/tcagpio.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/lm75.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/lm87.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/pcf8563.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/tcakp.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/titemp.c cvs rdiff -u -r1.261 -r1.262 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.154 -r1.155 src/sys/sys/device.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/macppc/dev/deq.c diff -u src/sys/arch/macppc/dev/deq.c:1.15 src/sys/arch/macppc/dev/deq.c:1.16 --- src/sys/arch/macppc/dev/deq.c:1.15 Mon Jun 18 17:07:07 2018 +++ src/sys/arch/macppc/dev/deq.c Tue Jun 26 06:03:57 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: deq.c,v 1.15 2018/06/18 17:07:07 thorpej Exp $ */ +/* $NetBSD: deq.c,v 1.16 2018/06/26 06:03:57 thorpej Exp $ */ /*- * Copyright (C) 2005 Michael Lorenz @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.15 2018/06/18 17:07:07 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: deq.c,v 1.16 2018/06/26 06:03:57 thorpej Exp $"); #include #include @@ -52,18 +52,13 @@ static int deq_match(device_t, struct cf CFATTACH_DECL_NEW(deq, sizeof(struct deq_softc), deq_match, deq_attach, NULL, NULL); -static const char * deq_compats[] = { - "deq", - "tas3004", - "pcm3052", - "cs8416", - "codec", - NULL -}; - -static const struct device_compatible_entry deq_compat_data[] = { - DEVICE_COMPAT_ENTRY(deq_compats), - DEVICE_COMPAT_TERMINATOR +static const struct device_compatible_entry compat_data[] = { + { "deq", 0 }, + { "tas3004", 0 }, + { "pcm3052", 0 }, + { "cs8416", 0 }, + { "codec", 0 }, + { NULL, 0 } }; int @@ -72,7 +67,7 @@ deq_match(device_t parent, struct cfdata struct i2c_attach_args *ia = aux; int match_result; - if (iic_use_direct_match(ia, cf, deq_compat_data, _result)) + if (iic_use_direct_match(ia, cf, compat_data, _result)) return match_result; /* This driver is direct-config only. */ Index: src/sys/arch/macppc/dev/smusat.c diff -u src/sys/arch/macppc/dev/smusat.c:1.5 src/sys/arch/macppc/dev/smusat.c:1.6 --- src/sys/arch/macppc/dev/smusat.c:1.5 Mon Jun 18 17:07:07 2018 +++ src/sys/arch/macppc/dev/smusat.c Tue Jun 26 06:03:57 2018 @@ -105,15 +105,10 @@ static int smusat_sysctl_sensor_value(SY CFATTACH_DECL_NEW(smusat, sizeof(struct smusat_softc), smusat_match, smusat_attach, NULL, NULL); -static const char * smusat_compats[] = { - "sat", - "smu-sat", - NULL -}; - -static const struct device_compatible_entry smusat_compat_data[] = { - DEVICE_COMPAT_ENTRY(smusat_compats), - DEVICE_COMPAT_TERMINATOR +static const struct device_compatible_entry compat_data[] = { + { "sat", 0 }, + { "smu-sat", 0 }, + { NULL, 0 } }; static int @@ -122,7 +117,7 @@ smusat_match(device_t parent, struct cfd struct i2c_attach_args *ia = aux; int match_result; - if (iic_use_direct_match(ia, cf, smusat_compat_data, _result)) + if (iic_use_direct_match(ia, cf, compat_data, _result)) return match_result; if (ia->ia_addr == 0x58) Index: src/sys/arch/sparc64/dev/pcf8591_envctrl.c diff -u src/sys/arch/sparc64/dev/pcf8591_envctrl.c:1.8
CVS commit: src/sys
Module Name:src Committed By: thorpej Date: Tue Jun 26 06:03:57 UTC 2018 Modified Files: src/sys/arch/macppc/dev: deq.c smusat.c src/sys/arch/sparc64/dev: pcf8591_envctrl.c src/sys/dev/i2c: adadc.c adm1021.c adm1026.c as3722.c at24cxx.c axp20x.c axp22x.c axppmic.c dbcool.c ds1307.c dstemp.c fcu.c ihidev.c lm75.c lm87.c max77620.c pcf8563.c sy8106a.c tcagpio.c tcakp.c titemp.c tsl256x.c src/sys/kern: subr_autoconf.c src/sys/sys: device.h Log Message: In my quest to make device_compatible_entry (and associated goo) super-general, it turns out I also made it a little to cumbersome to use (if my tired fingers are any indication). So, this is a course-correction -- one string per entry (like of_compat_data, which it will soon replace), and remove the over-verbose macros. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/macppc/dev/deq.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/macppc/dev/smusat.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/pcf8591_envctrl.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/adadc.c src/sys/dev/i2c/axp22x.c \ src/sys/dev/i2c/fcu.c src/sys/dev/i2c/max77620.c \ src/sys/dev/i2c/tsl256x.c cvs rdiff -u -r1.18 -r1.19 src/sys/dev/i2c/adm1021.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/adm1026.c src/sys/dev/i2c/ihidev.c cvs rdiff -u -r1.14 -r1.15 src/sys/dev/i2c/as3722.c cvs rdiff -u -r1.27 -r1.28 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/i2c/axp20x.c cvs rdiff -u -r1.13 -r1.14 src/sys/dev/i2c/axppmic.c cvs rdiff -u -r1.51 -r1.52 src/sys/dev/i2c/dbcool.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/i2c/ds1307.c cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/dstemp.c src/sys/dev/i2c/sy8106a.c \ src/sys/dev/i2c/tcagpio.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/lm75.c cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/lm87.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/i2c/pcf8563.c cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/tcakp.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/i2c/titemp.c cvs rdiff -u -r1.261 -r1.262 src/sys/kern/subr_autoconf.c cvs rdiff -u -r1.154 -r1.155 src/sys/sys/device.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.