CVS commit: src
Module Name:src Committed By: kamil Date: Sun Aug 25 06:06:48 UTC 2019 Modified Files: src: Makefile src/external/bsd/compiler_rt: Makefile src/external/bsd/compiler_rt/lib/clang: Makefile src/external/bsd/compiler_rt/lib/clang/lib: Makefile Log Message: Rework the LLVM compiler_rt build rules Register external/bsd/compiler_rt as a _SUBDIR. This will allow to handle properly includes specific for compiler_rt. Centralize build_install target for external/bsd/compiler_rt. With the above changes MKOBJDIR is now respected properly for me. Do not install LLVM sanitizers into TOOLDIR for !HAVE_LLVM. To generate a diff of this commit: cvs rdiff -u -r1.328 -r1.329 src/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/lib/clang/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/compiler_rt/lib/clang/lib/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: kamil Date: Sun Aug 25 06:06:48 UTC 2019 Modified Files: src: Makefile src/external/bsd/compiler_rt: Makefile src/external/bsd/compiler_rt/lib/clang: Makefile src/external/bsd/compiler_rt/lib/clang/lib: Makefile Log Message: Rework the LLVM compiler_rt build rules Register external/bsd/compiler_rt as a _SUBDIR. This will allow to handle properly includes specific for compiler_rt. Centralize build_install target for external/bsd/compiler_rt. With the above changes MKOBJDIR is now respected properly for me. Do not install LLVM sanitizers into TOOLDIR for !HAVE_LLVM. To generate a diff of this commit: cvs rdiff -u -r1.328 -r1.329 src/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/Makefile cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/lib/clang/Makefile cvs rdiff -u -r1.2 -r1.3 src/external/bsd/compiler_rt/lib/clang/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/Makefile diff -u src/Makefile:1.328 src/Makefile:1.329 --- src/Makefile:1.328 Fri Aug 23 06:38:27 2019 +++ src/Makefile Sun Aug 25 06:06:48 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.328 2019/08/23 06:38:27 kamil Exp $ +# $NetBSD: Makefile,v 1.329 2019/08/25 06:06:48 kamil Exp $ # # This is the top-level makefile for building NetBSD. For an outline of @@ -136,7 +136,11 @@ _SRC_TOP_OBJ_= # _SUBDIR is used to set SUBDIR, after removing directories that have # BUILD_${dir}=no, or that have no ${dir}/Makefile. # -_SUBDIR= tools .WAIT lib include external crypto/external bin +_SUBDIR= tools .WAIT lib +.if ${MKLLVM} != "no" +_SUBDIR+= external/bsd/compiler_rt +.endif +_SUBDIR+= include external crypto/external bin _SUBDIR+= games libexec sbin usr.bin _SUBDIR+= usr.sbin share sys etc tests compat _SUBDIR+= .WAIT rescue .WAIT distrib regress @@ -236,8 +240,7 @@ BUILDTARGETS+= includes BUILDTARGETS+= do-lib BUILDTARGETS+= do-compat-lib .if ${MKLLVM} != "no" -BUILDTARGETS+= do-sanitizer-includes -BUILDTARGETS+= do-sanitizer-lib +BUILDTARGETS+= do-sanitizer .if ${MKSANITIZER:Uno} == "yes" BUILDTARGETS+= do-sanitizer-tools .endif @@ -477,15 +480,11 @@ do-lib: .PHONY .MAKE do-compat-lib: .PHONY .MAKE ${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib" -do-sanitizer-includes: .PHONY .MAKE - ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/include includes - ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/share includes - -do-sanitizer-lib: .PHONY .MAKE - ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/lib build_install +do-sanitizer: .PHONY .MAKE + ${MAKEDIRTARGET} external/bsd/compiler_rt build_install do-sanitizer-tools: .PHONY .MAKE -.if !exists(${TOOLDIR}/lib/clang) +.if !exists(${TOOLDIR}/lib/clang) && ${HAVE_LLVM:Uno} == "yes" mkdir -p ${TOOLDIR}/lib/clang cd ${DESTDIR}/usr/lib/clang && \ ${TOOL_PAX} -rw . ${TOOLDIR}/lib/clang Index: src/external/bsd/compiler_rt/Makefile diff -u src/external/bsd/compiler_rt/Makefile:1.1 src/external/bsd/compiler_rt/Makefile:1.2 --- src/external/bsd/compiler_rt/Makefile:1.1 Thu Aug 8 14:00:27 2019 +++ src/external/bsd/compiler_rt/Makefile Sun Aug 25 06:06:48 2019 @@ -1,5 +1,8 @@ -# $NetBSD: Makefile,v 1.1 2019/08/08 14:00:27 kamil Exp $ +# $NetBSD: Makefile,v 1.2 2019/08/25 06:06:48 kamil Exp $ + +.include SUBDIR+= lib +.include .include Index: src/external/bsd/compiler_rt/lib/clang/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/Makefile:1.1 src/external/bsd/compiler_rt/lib/clang/Makefile:1.2 --- src/external/bsd/compiler_rt/lib/clang/Makefile:1.1 Thu Aug 8 14:00:28 2019 +++ src/external/bsd/compiler_rt/lib/clang/Makefile Sun Aug 25 06:06:48 2019 @@ -1,11 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2019/08/08 14:00:28 kamil Exp $ - -.include +# $NetBSD: Makefile,v 1.2 2019/08/25 06:06:48 kamil Exp $ SUBDIR+= include share - -.if ${MACHINE_ARCH} == "x86_64" SUBDIR+= lib -.endif .include Index: src/external/bsd/compiler_rt/lib/clang/lib/Makefile diff -u src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.2 src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.3 --- src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.2 Fri Aug 23 06:38:27 2019 +++ src/external/bsd/compiler_rt/lib/clang/lib/Makefile Sun Aug 25 06:06:48 2019 @@ -1,6 +1,5 @@ -# $NetBSD: Makefile,v 1.2 2019/08/23 06:38:27 kamil Exp $ +# $NetBSD: Makefile,v 1.3 2019/08/25 06:06:48 kamil Exp $ SUBDIR+= netbsd -.include .include
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:21:13 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_misc.c Log Message: I don't see the point in having this useless printf, but add a '\n' to it, so that it at least displays useless stuff correctly. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/compat/linux/common/linux_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/sys/compat/linux/common/linux_misc.c diff -u src/sys/compat/linux/common/linux_misc.c:1.243 src/sys/compat/linux/common/linux_misc.c:1.244 --- src/sys/compat/linux/common/linux_misc.c:1.243 Fri Aug 23 08:01:42 2019 +++ src/sys/compat/linux/common/linux_misc.c Sat Aug 24 14:21:13 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.243 2019/08/23 08:01:42 maxv Exp $ */ +/* $NetBSD: linux_misc.c,v 1.244 2019/08/24 14:21:13 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.243 2019/08/23 08:01:42 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.244 2019/08/24 14:21:13 maxv Exp $"); #include #include @@ -240,7 +240,7 @@ linux_sys_wait4(struct lwp *l, const str # ifdef DIAGNOSTIC if (linux_options & LINUX_WAIT4_WNOTHREAD) printf("WARNING: %s: linux process %d.%d called " - "waitpid with __WNOTHREAD set!", + "waitpid with __WNOTHREAD set!\n", __FILE__, l->l_proc->p_pid, l->l_lid); # endif
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:21:13 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_misc.c Log Message: I don't see the point in having this useless printf, but add a '\n' to it, so that it at least displays useless stuff correctly. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/compat/linux/common/linux_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:18:43 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: Fix memory leak. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.147 src/sys/compat/linux/common/linux_socket.c:1.148 --- src/sys/compat/linux/common/linux_socket.c:1.147 Sat Aug 24 14:08:35 2019 +++ src/sys/compat/linux/common/linux_socket.c Sat Aug 24 14:18:43 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.147 2019/08/24 14:08:35 maxv Exp $ */ +/* $NetBSD: linux_socket.c,v 1.148 2019/08/24 14:18:43 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.147 2019/08/24 14:08:35 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.148 2019/08/24 14:18:43 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -546,6 +546,8 @@ linux_sys_sendmsg(struct lwp *l, const s case LINUX_SCM_CREDENTIALS: /* no native equivalent, just drop it */ + if (control != mtod(ctl_mbuf, void *)) + free(control, M_MBUF); m_free(ctl_mbuf); ctl_mbuf = NULL; msg.msg_control = NULL;
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:18:43 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: Fix memory leak. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/compat/linux/common/linux_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:08:35 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: Hum, don't pass an mbuf to realloc(). Inspired from copyin32_msg_control(). To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.146 src/sys/compat/linux/common/linux_socket.c:1.147 --- src/sys/compat/linux/common/linux_socket.c:1.146 Sat Aug 24 12:33:25 2019 +++ src/sys/compat/linux/common/linux_socket.c Sat Aug 24 14:08:35 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.146 2019/08/24 12:33:25 maxv Exp $ */ +/* $NetBSD: linux_socket.c,v 1.147 2019/08/24 14:08:35 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.146 2019/08/24 12:33:25 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.147 2019/08/24 14:08:35 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -568,14 +568,15 @@ linux_sys_sendmsg(struct lwp *l, const s /* Check the buffer is big enough */ if (__predict_false(cidx + cspace > clen)) { u_int8_t *nc; +size_t nclen; -clen = cidx + cspace; -if (clen >= PAGE_SIZE) { +nclen = cidx + cspace; +if (nclen >= PAGE_SIZE) { error = EINVAL; goto done; } nc = realloc(clen <= MLEN ? NULL : control, - clen, M_TEMP, M_WAITOK); + nclen, M_TEMP, M_WAITOK); if (!nc) { error = ENOMEM; goto done; @@ -584,6 +585,7 @@ linux_sys_sendmsg(struct lwp *l, const s /* Old buffer was in mbuf... */ memcpy(nc, control, cidx); control = nc; +clen = nclen; } /* Copy header */
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 14:08:35 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: Hum, don't pass an mbuf to realloc(). Inspired from copyin32_msg_control(). To generate a diff of this commit: cvs rdiff -u -r1.146 -r1.147 src/sys/compat/linux/common/linux_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src
Module Name:src Committed By: rmind Date: Sat Aug 24 13:20:52 UTC 2019 Modified Files: src/lib/libnpf: Makefile src/lib/npf: mod.mk src/libexec/identd: Makefile src/usr.sbin/npf/npfctl: Makefile src/usr.sbin/npf/npfd: Makefile Log Message: libnpf fix: link the library itself to libnv; libnpf users should not be expected to assume this dependency. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libnpf/Makefile cvs rdiff -u -r1.7 -r1.8 src/lib/npf/mod.mk cvs rdiff -u -r1.17 -r1.18 src/libexec/identd/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/npf/npfctl/Makefile cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/npfd/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: rmind Date: Sat Aug 24 13:20:52 UTC 2019 Modified Files: src/lib/libnpf: Makefile src/lib/npf: mod.mk src/libexec/identd: Makefile src/usr.sbin/npf/npfctl: Makefile src/usr.sbin/npf/npfd: Makefile Log Message: libnpf fix: link the library itself to libnv; libnpf users should not be expected to assume this dependency. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libnpf/Makefile cvs rdiff -u -r1.7 -r1.8 src/lib/npf/mod.mk cvs rdiff -u -r1.17 -r1.18 src/libexec/identd/Makefile cvs rdiff -u -r1.13 -r1.14 src/usr.sbin/npf/npfctl/Makefile cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/npf/npfd/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libnpf/Makefile diff -u src/lib/libnpf/Makefile:1.10 src/lib/libnpf/Makefile:1.11 --- src/lib/libnpf/Makefile:1.10 Sun Jan 27 04:39:33 2019 +++ src/lib/libnpf/Makefile Sat Aug 24 13:20:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2019/01/27 04:39:33 dholland Exp $ +# $NetBSD: Makefile,v 1.11 2019/08/24 13:20:52 rmind Exp $ USE_SHLIBDIR= yes @@ -12,8 +12,12 @@ SRCS= npf.c INCS= npf.h INCSDIR= /usr/include +LIBNV!= cd ${NETBSDSRCDIR}/external/bsd/libnv/lib && ${PRINTOBJDIR} CPPFLAGS+= -I${NETBSDSRCDIR}/sys/external/bsd/libnv/dist +DPADD+= ${LIBNV}/libnv.a +LDADD+= -L${LIBNV} -lnv + WARNS= 5 .include Index: src/lib/npf/mod.mk diff -u src/lib/npf/mod.mk:1.7 src/lib/npf/mod.mk:1.8 --- src/lib/npf/mod.mk:1.7 Sat Sep 29 14:41:36 2018 +++ src/lib/npf/mod.mk Sat Aug 24 13:20:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: mod.mk,v 1.7 2018/09/29 14:41:36 rmind Exp $ +# $NetBSD: mod.mk,v 1.8 2019/08/24 13:20:52 rmind Exp $ .include @@ -25,8 +25,6 @@ SHLIBINSTALLDIR=${LIBROOTDIR}/npf LIB= ${MOD} SRCS= npf${MOD}.c - -CPPFLAGS+= -I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist LIBDPLIBS+= npf ${NETBSDSRCDIR}/lib/libnpf .include Index: src/libexec/identd/Makefile diff -u src/libexec/identd/Makefile:1.17 src/libexec/identd/Makefile:1.18 --- src/libexec/identd/Makefile:1.17 Sat Sep 29 14:41:37 2018 +++ src/libexec/identd/Makefile Sat Aug 24 13:20:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2018/09/29 14:41:37 rmind Exp $ +# $NetBSD: Makefile,v 1.18 2019/08/24 13:20:52 rmind Exp $ .include @@ -22,10 +22,6 @@ CPPFLAGS+=-DWITH_PF .if (${MKNPF} != "no") SRCS+= npf.c CPPFLAGS+=-DWITH_NPF - -PROGDPLIBS+= nv ${NETBSDSRCDIR}/external/bsd/libnv/lib -CPPFLAGS+= -I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist - LDADD+=-lnpf DPADD+=${LIBNPF} .endif Index: src/usr.sbin/npf/npfctl/Makefile diff -u src/usr.sbin/npf/npfctl/Makefile:1.13 src/usr.sbin/npf/npfctl/Makefile:1.14 --- src/usr.sbin/npf/npfctl/Makefile:1.13 Sat Sep 29 14:41:36 2018 +++ src/usr.sbin/npf/npfctl/Makefile Sat Aug 24 13:20:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.13 2018/09/29 14:41:36 rmind Exp $ +# $NetBSD: Makefile,v 1.14 2019/08/24 13:20:52 rmind Exp $ .include @@ -13,9 +13,6 @@ CPPFLAGS+= -I${.CURDIR} SRCS+= npf_scan.l npf_parse.y YHEADER= 1 -PROGDPLIBS+= nv ${NETBSDSRCDIR}/external/bsd/libnv/lib -CPPFLAGS+= -I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist - LDADD+= -lnpf -lpcap -lutil -ly DPADD+= ${LIBNPF} ${LIBUTIL} ${LIBPCAP} ${LIBUTIL} ${LIBY} Index: src/usr.sbin/npf/npfd/Makefile diff -u src/usr.sbin/npf/npfd/Makefile:1.6 src/usr.sbin/npf/npfd/Makefile:1.7 --- src/usr.sbin/npf/npfd/Makefile:1.6 Sat Sep 29 14:41:36 2018 +++ src/usr.sbin/npf/npfd/Makefile Sat Aug 24 13:20:52 2019 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2018/09/29 14:41:36 rmind Exp $ +# $NetBSD: Makefile,v 1.7 2019/08/24 13:20:52 rmind Exp $ # # Public Domain # @@ -9,9 +9,6 @@ MAN= npfd.8 SRCS= npfd.c npfd_log.c CPPFLAGS+= -I${.CURDIR} -PROGDPLIBS+= nv ${NETBSDSRCDIR}/external/bsd/libnv/lib -CPPFLAGS+= -I ${NETBSDSRCDIR}/sys/external/bsd/libnv/dist - LDADD+= -lnpf -lpcap -lutil DPADD+= ${LIBNPF} ${LIBPCAP} ${LIBUTIL}
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:59:34 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: dnode.c Log Message: Add missing dmu_zfetch_fini() when dnode_create() lost the race. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:59:34 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: dnode.c Log Message: Add missing dmu_zfetch_fini() when dnode_create() lost the race. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c:1.7 src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c:1.8 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c:1.7 Sun May 26 10:21:00 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/dnode.c Sat Aug 24 12:59:34 2019 @@ -447,6 +447,9 @@ dnode_create(objset_t *os, dnode_phys_t if (dnh->dnh_dnode != NULL) { /* Lost the allocation race. */ mutex_exit(&os->os_lock); +#ifdef __NetBSD__ + dmu_zfetch_fini(&dn->dn_zfetch); +#endif kmem_cache_free(dnode_cache, dn); return (dnh->dnh_dnode); }
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:59:06 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Implement kqueue support. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.51 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.52 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.51 Sat Aug 24 12:58:24 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Sat Aug 24 12:59:05 2019 @@ -,6 +,16 @@ zfs_rename(vnode_t *sdvp, vnode_t **svpp if (*tvpp != NULL) cache_purge(*tvpp); cache_purge_negative(tdvp); +#ifdef __NetBSD__ + if (*svpp == *tvpp) { +VN_KNOTE(sdvp, NOTE_WRITE); +VN_KNOTE(*svpp, (szp->z_links == 0 ? +NOTE_DELETE : NOTE_LINK)); + } else { +genfs_rename_knote(sdvp, *svpp, tdvp, *tvpp, +((tzp != NULL) && (tzp->z_links == 0))); + } +#endif } } @@ -5094,6 +5104,10 @@ zfs_netbsd_write(void *v) { struct vop_write_args *ap = v; vnode_t *vp = ap->a_vp; + znode_t *zp = VTOZ(vp); + struct uio *uio = ap->a_uio; + off_t osize = zp->z_size; + int error, resid; switch (vp->v_type) { case VBLK: @@ -5105,7 +5119,13 @@ zfs_netbsd_write(void *v) return (VOCALL(fifo_vnodeop_p, VOFFSET(vop_write), ap)); } - return (zfs_write(vp, ap->a_uio, ioflags(ap->a_ioflag), ap->a_cred, NULL)); + resid = uio->uio_resid; + error = zfs_write(vp, uio, ioflags(ap->a_ioflag), ap->a_cred, NULL); + if (resid > uio->uio_resid) + VN_KNOTE(vp, NOTE_WRITE | + (zp->z_size > osize ? NOTE_EXTEND : 0)); + + return error; } static int @@ -5296,6 +5316,8 @@ zfs_netbsd_create(void *v) KASSERT((error == 0) == (*vpp != NULL)); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); + if (error == 0) + VN_KNOTE(dvp, NOTE_WRITE); VOP_UNLOCK(*vpp, 0); return (error); @@ -5334,6 +5356,8 @@ zfs_netbsd_mknod(void *v) KASSERT((error == 0) == (*vpp != NULL)); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); + if (error == 0) + VN_KNOTE(dvp, NOTE_WRITE); VOP_UNLOCK(*vpp, 0); return (error); @@ -5363,6 +5387,10 @@ zfs_netbsd_remove(void *v) error = zfs_remove(dvp, vp, nm, cnp->cn_cred); PNBUF_PUT(nm); + if (error == 0) { + VN_KNOTE(vp, NOTE_DELETE); + VN_KNOTE(dvp, NOTE_WRITE); + } vput(vp); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); return (error); @@ -5398,6 +5426,8 @@ zfs_netbsd_mkdir(void *v) KASSERT((error == 0) == (*vpp != NULL)); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); + if (error == 0) + VN_KNOTE(dvp, NOTE_WRITE | NOTE_LINK); VOP_UNLOCK(*vpp, 0); return (error); @@ -5427,6 +5457,10 @@ zfs_netbsd_rmdir(void *v) error = zfs_rmdir(dvp, vp, nm, cnp->cn_cred); PNBUF_PUT(nm); + if (error == 0) { + VN_KNOTE(dvp, NOTE_WRITE | NOTE_LINK); + VN_KNOTE(vp, NOTE_DELETE); + } vput(vp); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); return error; @@ -5571,7 +5605,11 @@ zfs_netbsd_setattr(void *v) return error; } - return (zfs_setattr(vp, (vattr_t *)&xvap, flags, cred, NULL)); + error = zfs_setattr(vp, (vattr_t *)&xvap, flags, cred, NULL); + if (error == 0) + VN_KNOTE(vp, NOTE_ATTRIB); + + return error; } static int @@ -5675,7 +5713,8 @@ zfs_netbsd_symlink(void *v) error = zfs_symlink(dvp, vpp, nm, vap, target, cnp->cn_cred, 0); PNBUF_PUT(nm); - + if (error == 0) + VN_KNOTE(ap->a_dvp, NOTE_WRITE); KASSERT((error == 0) == (*vpp != NULL)); KASSERT(VOP_ISLOCKED(dvp) == LK_EXCLUSIVE); VOP_UNLOCK(*vpp, 0); @@ -5716,6 +5755,10 @@ zfs_netbsd_link(void *v) NULL, 0); PNBUF_PUT(nm); + if (error == 0) { + VN_KNOTE(vp, NOTE_LINK); + VN_KNOTE(dvp, NOTE_WRITE); + } VOP_UNLOCK(vp, 0); return error; } @@ -6235,6 +6278,7 @@ const struct vnodeopv_entry_desc zfs_vno { &vop_write_desc, zfs_netbsd_write }, { &vop_ioctl_desc, zfs_netbsd_ioctl }, { &vop_poll_desc, genfs_poll }, + { &vop_kqfilter_desc, genfs_kqfilter }, { &vop_fsync_desc, zfs_netbsd_fsync }, { &vop_remove_desc, zfs_netbsd_remove }, { &vop_link_desc, zfs_netbsd_link }, @@ -6278,6 +6322,7 @@ const struct vnodeopv_entry_desc zfs_spe { &vop_write_desc, /**/zfs_netbsd_write }, { &vop_ioctl_desc, spec_ioctl }, { &vop_poll_desc, spec_poll }, + { &vop_kqfilter_desc, spec_kqfilter }, { &vop_fsync_desc, zfs_netbsd_fsync }, { &vop_remove_desc, spec_remove }, { &vop_link_desc, spec_link }, @@ -6321,6 +6366,7 @@ const struct vnodeopv_entry_desc zfs_fif { &vop_write_desc, /**/zfs_netbsd_write }, { &vop_ioctl_desc, vn_fifo_bypass }, { &vop_poll_desc, vn_fifo_bypass }, + { &vop_kqfilter_desc, vn_fifo_bypass }, { &vop_fsync_desc, zfs_netbsd_fsync
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:59:06 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Implement kqueue support. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:58:25 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Implement poll support. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs
Module Name:src Committed By: hannken Date: Sat Aug 24 12:58:25 UTC 2019 Modified Files: src/external/cddl/osnet/dist/uts/common/fs/zfs: zfs_vnops.c Log Message: Implement poll support. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 \ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.50 src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.51 --- src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c:1.50 Mon Jun 17 08:08:21 2019 +++ src/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c Sat Aug 24 12:58:24 2019 @@ -6234,6 +6234,7 @@ const struct vnodeopv_entry_desc zfs_vno { &vop_read_desc, zfs_netbsd_read }, { &vop_write_desc, zfs_netbsd_write }, { &vop_ioctl_desc, zfs_netbsd_ioctl }, + { &vop_poll_desc, genfs_poll }, { &vop_fsync_desc, zfs_netbsd_fsync }, { &vop_remove_desc, zfs_netbsd_remove }, { &vop_link_desc, zfs_netbsd_link }, @@ -6276,6 +6277,7 @@ const struct vnodeopv_entry_desc zfs_spe { &vop_read_desc, /**/zfs_netbsd_read }, { &vop_write_desc, /**/zfs_netbsd_write }, { &vop_ioctl_desc, spec_ioctl }, + { &vop_poll_desc, spec_poll }, { &vop_fsync_desc, zfs_netbsd_fsync }, { &vop_remove_desc, spec_remove }, { &vop_link_desc, spec_link }, @@ -6318,6 +6320,7 @@ const struct vnodeopv_entry_desc zfs_fif { &vop_read_desc, /**/zfs_netbsd_read }, { &vop_write_desc, /**/zfs_netbsd_write }, { &vop_ioctl_desc, vn_fifo_bypass }, + { &vop_poll_desc, vn_fifo_bypass }, { &vop_fsync_desc, zfs_netbsd_fsync }, { &vop_remove_desc, vn_fifo_bypass }, { &vop_link_desc, vn_fifo_bypass },
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 12:33:25 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c linux_socket.h Log Message: Don't read data from userland directly. This simply does not work on any recent x86 CPU (thanks to SMAP) and all architectures that forbid direct access to userland from the kernel. But I guess no one noticed because no one ever uses compat_linux, right? To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/linux/common/linux_socket.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: maxv Date: Sat Aug 24 12:33:25 UTC 2019 Modified Files: src/sys/compat/linux/common: linux_socket.c linux_socket.h Log Message: Don't read data from userland directly. This simply does not work on any recent x86 CPU (thanks to SMAP) and all architectures that forbid direct access to userland from the kernel. But I guess no one noticed because no one ever uses compat_linux, right? To generate a diff of this commit: cvs rdiff -u -r1.145 -r1.146 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.23 -r1.24 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.145 src/sys/compat/linux/common/linux_socket.c:1.146 --- src/sys/compat/linux/common/linux_socket.c:1.145 Thu Apr 18 17:45:12 2019 +++ src/sys/compat/linux/common/linux_socket.c Sat Aug 24 12:33:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.145 2019/04/18 17:45:12 christos Exp $ */ +/* $NetBSD: linux_socket.c,v 1.146 2019/08/24 12:33:25 maxv Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.145 2019/04/18 17:45:12 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.146 2019/08/24 12:33:25 maxv Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -605,7 +605,7 @@ linux_sys_sendmsg(struct lwp *l, const s resid -= LINUX_CMSG_ALIGN(l_cmsg.cmsg_len); cidx += cspace; - } while ((l_cc = LINUX_CMSG_NXTHDR(&msg, l_cc)) && resid > 0); + } while ((l_cc = LINUX_CMSG_NXTHDR(&msg, l_cc, &l_cmsg)) && resid > 0); /* If we allocated a buffer, attach to mbuf */ if (cidx > MLEN) { Index: src/sys/compat/linux/common/linux_socket.h diff -u src/sys/compat/linux/common/linux_socket.h:1.23 src/sys/compat/linux/common/linux_socket.h:1.24 --- src/sys/compat/linux/common/linux_socket.h:1.23 Fri Feb 3 16:57:39 2017 +++ src/sys/compat/linux/common/linux_socket.h Sat Aug 24 12:33:25 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.h,v 1.23 2017/02/03 16:57:39 christos Exp $ */ +/* $NetBSD: linux_socket.h,v 1.24 2019/08/24 12:33:25 maxv Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -186,13 +186,13 @@ struct linux_cmsghdr { /* Linux either uses this, or &((cmsg)->__cmsg_data) */ #define LINUX_CMSG_DATA(cmsg) \ ((u_char *)((struct linux_cmsghdr *)(cmsg) + 1)) -#define LINUX_CMSG_NXTHDR(mhdr, cmsg) \ - char *)(cmsg) + LINUX_CMSG_ALIGN((cmsg)->cmsg_len) + \ - sizeof(*(cmsg))) > \ +#define LINUX_CMSG_NXTHDR(mhdr, ucmsg, kcmsg) \ + char *)(ucmsg) + LINUX_CMSG_ALIGN((kcmsg)->cmsg_len) + \ + sizeof(*(ucmsg))) > \ (((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \ (struct linux_cmsghdr *)NULL : \ - (struct linux_cmsghdr *)((char *)(cmsg) + \ - LINUX_CMSG_ALIGN((cmsg)->cmsg_len))) + (struct linux_cmsghdr *)((char *)(ucmsg) + \ + LINUX_CMSG_ALIGN((kcmsg)->cmsg_len))) /* This the number of bytes removed from each item (excl. final padding) */ #define LINUX_CMSG_ALIGN_DELTA \ (CMSG_ALIGN(sizeof(struct cmsghdr)) - sizeof(struct linux_cmsghdr))
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: jmcneill Date: Sat Aug 24 11:51:26 UTC 2019 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: bus_dmamap_load_raw: support coherent mappings bus_dmamap_sync: support syncing "raw" buffer types To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/arm/arm32/bus_dma.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/arm32
Module Name:src Committed By: jmcneill Date: Sat Aug 24 11:51:26 UTC 2019 Modified Files: src/sys/arch/arm/arm32: bus_dma.c Log Message: bus_dmamap_load_raw: support coherent mappings bus_dmamap_sync: support syncing "raw" buffer types To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/arm/arm32/bus_dma.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/arm32/bus_dma.c diff -u src/sys/arch/arm/arm32/bus_dma.c:1.115 src/sys/arch/arm/arm32/bus_dma.c:1.116 --- src/sys/arch/arm/arm32/bus_dma.c:1.115 Fri Jun 14 09:09:12 2019 +++ src/sys/arch/arm/arm32/bus_dma.c Sat Aug 24 11:51:26 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.115 2019/06/14 09:09:12 skrll Exp $ */ +/* $NetBSD: bus_dma.c,v 1.116 2019/08/24 11:51:26 jmcneill Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include "opt_cputypes.h" #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.115 2019/06/14 09:09:12 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.116 2019/08/24 11:51:26 jmcneill Exp $"); #include #include @@ -750,8 +750,10 @@ _bus_dmamap_load_raw(bus_dma_tag_t t, bu sgsize = MIN(ds->ds_len, size); if (sgsize == 0) continue; + const bool coherent = + (ds->_ds_flags & _BUS_DMAMAP_COHERENT) != 0; error = _bus_dmamap_load_paddr(t, map, ds->ds_addr, - sgsize, false); + sgsize, coherent); if (error != 0) break; size -= sgsize; @@ -766,6 +768,9 @@ _bus_dmamap_load_raw(bus_dma_tag_t t, bu /* XXX TBD bounce */ map->dm_mapsize = size0; + map->_dm_origbuf = NULL; + map->_dm_buftype = _BUS_DMA_BUFTYPE_RAW; + map->_dm_vmspace = NULL; return 0; } @@ -1165,6 +1170,7 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm switch (buftype) { case _BUS_DMA_BUFTYPE_LINEAR: + case _BUS_DMA_BUFTYPE_RAW: _bus_dmamap_sync_linear(t, map, offset, len, ops); break; @@ -1176,10 +1182,6 @@ _bus_dmamap_sync(bus_dma_tag_t t, bus_dm _bus_dmamap_sync_uio(t, map, offset, len, ops); break; - case _BUS_DMA_BUFTYPE_RAW: - panic("_bus_dmamap_sync: _BUS_DMA_BUFTYPE_RAW"); - break; - case _BUS_DMA_BUFTYPE_INVALID: panic("_bus_dmamap_sync: _BUS_DMA_BUFTYPE_INVALID"); break;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: jmcneill Date: Sat Aug 24 11:40:38 UTC 2019 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.1372 -r1.1373 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1371 -r1.1372 src/sys/dev/pci/pcidevs_data.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/pci
Module Name:src Committed By: jmcneill Date: Sat Aug 24 11:40:22 UTC 2019 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Mellanox ConnectX-4, ConnectX-4 Lx, ConnectX-5, and ConnectX-5 Ex To generate a diff of this commit: cvs rdiff -u -r1.1384 -r1.1385 src/sys/dev/pci/pcidevs 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: jmcneill Date: Sat Aug 24 11:40:22 UTC 2019 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add Mellanox ConnectX-4, ConnectX-4 Lx, ConnectX-5, and ConnectX-5 Ex To generate a diff of this commit: cvs rdiff -u -r1.1384 -r1.1385 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1384 src/sys/dev/pci/pcidevs:1.1385 --- src/sys/dev/pci/pcidevs:1.1384 Wed Aug 21 06:03:57 2019 +++ src/sys/dev/pci/pcidevs Sat Aug 24 11:40:22 2019 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1384 2019/08/21 06:03:57 mrg Exp $ +$NetBSD: pcidevs,v 1.1385 2019/08/24 11:40:22 jmcneill Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5869,6 +5869,10 @@ product MATROX G550_AGP 0x2527 MGA G550 product MEDIAQ MQ200 0x0200 MQ200 /* Mellanox Technologies */ +product MELLANOX MT27700 0x1013 ConnectX-4 +product MELLANOX MT27710 0x1015 ConnectX-4 Lx +product MELLANOX MT27800 0x1017 ConnectX-5 +product MELLANOX MT28800 0x1019 ConnectX-5 Ex product MELLANOX MT23108 0x5a44 InfiniHost (Tavor) product MELLANOX MT23108_PCI 0x5a46 InfiniHost PCI Bridge (Tavor) product MELLANOX MT25204_OLD 0x5e8c InfiniHost III Lx (old Sinai)
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: mlelstv Date: Sat Aug 24 11:24:17 UTC 2019 Modified Files: src/sys/dev/sdmmc: sdmmcdevs.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/sdmmcdevs.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/sdmmc
Module Name:src Committed By: mlelstv Date: Sat Aug 24 11:24:17 UTC 2019 Modified Files: src/sys/dev/sdmmc: sdmmcdevs.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/sdmmcdevs.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/sdmmc/sdmmcdevs.h diff -u src/sys/dev/sdmmc/sdmmcdevs.h:1.5 src/sys/dev/sdmmc/sdmmcdevs.h:1.6 --- src/sys/dev/sdmmc/sdmmcdevs.h:1.5 Sun Aug 18 14:32:34 2019 +++ src/sys/dev/sdmmc/sdmmcdevs.h Sat Aug 24 11:24:17 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: sdmmcdevs.h,v 1.5 2019/08/18 14:32:34 mlelstv Exp $ */ +/* $NetBSD: sdmmcdevs.h,v 1.6 2019/08/24 11:24:17 mlelstv Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: sdmmcdevs,v 1.5 2019/08/18 14:32:04 mlelstv Exp + * NetBSD: sdmmcdevs,v 1.6 2019/08/24 11:24:00 mlelstv Exp */ /* $OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $ */ @@ -31,8 +31,8 @@ #define SDMMC_VENDOR_TOSHIBA 0x0098 /* Toshiba */ #define SDMMC_VENDOR_SOCKETCOM 0x0104 /* Socket Communications, Inc. */ #define SDMMC_VENDOR_REALTEK 0x024c /* Realtek */ -#define SDMMC_VENDOR_BROADCOM 0x0270 /* Broadcom */ #define SDMMC_VENDOR_ATHEROS 0x0271 /* Atheros */ +#define SDMMC_VENDOR_BROADCOM 0x02d0 /* Broadcom */ #define SDMMC_VENDOR_SYCHIP 0x02db /* SyChip Inc. */ #define SDMMC_VENDOR_SPECTEC 0x02fe /* Spectec Computer Co., Ltd */ #define SDMMC_VENDOR_MEDIATEK 0x037a /* MediaTek Inc. */
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: mlelstv Date: Sat Aug 24 11:24:00 UTC 2019 Modified Files: src/sys/dev/sdmmc: sdmmcdevs Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/sdmmcdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/sdmmcdevs diff -u src/sys/dev/sdmmc/sdmmcdevs:1.5 src/sys/dev/sdmmc/sdmmcdevs:1.6 --- src/sys/dev/sdmmc/sdmmcdevs:1.5 Sun Aug 18 14:32:04 2019 +++ src/sys/dev/sdmmc/sdmmcdevs Sat Aug 24 11:24:00 2019 @@ -1,4 +1,4 @@ - $NetBSD: sdmmcdevs,v 1.5 2019/08/18 14:32:04 mlelstv Exp $ + $NetBSD: sdmmcdevs,v 1.6 2019/08/24 11:24:00 mlelstv Exp $ /* $OpenBSD: sdmmcdevs,v 1.8 2007/05/11 17:16:16 mglocker Exp $ */ /* @@ -24,8 +24,8 @@ vendor CGUYS 0x0092 C-guys, Inc. vendor TOSHIBA 0x0098 Toshiba vendor SOCKETCOM 0x0104 Socket Communications, Inc. vendor REALTEK 0x024c Realtek -vendor BROADCOM 0x0270 Broadcom vendor ATHEROS 0x0271 Atheros +vendor BROADCOM 0x02d0 Broadcom vendor SYCHIP 0x02db SyChip Inc. vendor SPECTEC 0x02fe Spectec Computer Co., Ltd vendor MEDIATEK 0x037a MediaTek Inc.
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: mlelstv Date: Sat Aug 24 11:24:00 UTC 2019 Modified Files: src/sys/dev/sdmmc: sdmmcdevs Log Message: Fix typo To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/sdmmc/sdmmcdevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/audiocfg
At Sat, 24 Aug 2019 16:28:39 +1000, matthew green wrote: > > Log Message: > > Use device unit number for index. > > The index number was too confusing such as > > 0: [ ] audio1 @ wss0 > > 1: [*] audio0 @ yds0 > > in my PC for example. Here is new format: > > [*] audio0 @ yds0 > > [ ] audio1 @ wss0 > > In this style, devices are always listed in order of unit number > > and 0 always means audio0, 1 always means audio1. > > this change gives me pause. > > it seems to be a kind-of "cf_unit" abuse to me. eg, if > i configure or usb-plug a lot, such that i only end up > with just "audio10" and "audio23" attached, the index > doesn't match the cf_unit. The index may not have been good name in my change. I intended to type "audiocfg test 23" for audio23 regardless of current total number of available devices. I wanted to use device name like "audiocfg test audio23" at final. > perhaps you can sort the audio devices based upon cf_unit, > such that your original output would have the lines swapped > except for the prefix number, and then your sanity will be > saved for the normal use-case. > > at the very least, please restore the previous output > format as i've used it in at least one script and perhaps > others hvae as well. please consider that, as a general > rule, tool output is likely to be scraped and changing it > may break things, so formatting changes should be avoided > if possible. It's my wrong. I reverted these changes. Thank you for pointing out. --- Tetsuya Isaki
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat Aug 24 07:43:00 UTC 2019 Modified Files: src/sys/dev/usb: usbdi.c Log Message: don't try to deref a maybe-NULL pointer. instead of logging potentially garbage (if not NULL), log the request length. To generate a diff of this commit: cvs rdiff -u -r1.184 -r1.185 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/usb
Module Name:src Committed By: mrg Date: Sat Aug 24 07:43:00 UTC 2019 Modified Files: src/sys/dev/usb: usbdi.c Log Message: don't try to deref a maybe-NULL pointer. instead of logging potentially garbage (if not NULL), log the request length. To generate a diff of this commit: cvs rdiff -u -r1.184 -r1.185 src/sys/dev/usb/usbdi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/usb/usbdi.c diff -u src/sys/dev/usb/usbdi.c:1.184 src/sys/dev/usb/usbdi.c:1.185 --- src/sys/dev/usb/usbdi.c:1.184 Thu Aug 22 07:38:06 2019 +++ src/sys/dev/usb/usbdi.c Sat Aug 24 07:43:00 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: usbdi.c,v 1.184 2019/08/22 07:38:06 mrg Exp $ */ +/* $NetBSD: usbdi.c,v 1.185 2019/08/24 07:43:00 mrg Exp $ */ /* * Copyright (c) 1998, 2012, 2015 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.184 2019/08/22 07:38:06 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: usbdi.c,v 1.185 2019/08/24 07:43:00 mrg Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -1102,14 +1102,14 @@ usbd_do_request_flags(struct usbd_device { struct usbd_xfer *xfer; usbd_status err; + size_t len = UGETW(req->wLength); USBHIST_FUNC(); USBHIST_CALLARGS(usbdebug, "dev=%#jx req=%jx flgas=%jx len=%jx", - (uintptr_t)dev, (uintptr_t)req, flags, *actlen); + (uintptr_t)dev, (uintptr_t)req, flags, len); ASSERT_SLEEPABLE(); - size_t len = UGETW(req->wLength); int error = usbd_create_xfer(dev->ud_pipe0, len, 0, 0, &xfer); if (error) return error;
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: isaki Date: Sat Aug 24 07:39:42 UTC 2019 Modified Files: src/usr.bin/audiocfg: audiodev.c audiodev.h main.c Log Message: Revert about index number changes. It breaks its usage and output format. Pointed out by mrg@. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/audiocfg/audiodev.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/audiocfg/audiodev.h cvs rdiff -u -r1.15 -r1.16 src/usr.bin/audiocfg/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/usr.bin/audiocfg/audiodev.c diff -u src/usr.bin/audiocfg/audiodev.c:1.14 src/usr.bin/audiocfg/audiodev.c:1.15 --- src/usr.bin/audiocfg/audiodev.c:1.14 Sat Aug 24 06:32:25 2019 +++ src/usr.bin/audiocfg/audiodev.c Sat Aug 24 07:39:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audiodev.c,v 1.14 2019/08/24 06:32:25 isaki Exp $ */ +/* $NetBSD: audiodev.c,v 1.15 2019/08/24 07:39:42 isaki Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill @@ -49,7 +49,6 @@ static int audiodev_test_chmask(struct a static TAILQ_HEAD(audiodevhead, audiodev) audiodevlist = TAILQ_HEAD_INITIALIZER(audiodevlist); -static unsigned int maxunit; static int audiodev_getinfo(struct audiodev *adev) @@ -138,9 +137,6 @@ audiodev_add(const char *pdev, const cha TAILQ_INSERT_TAIL(&audiodevlist, adev, next); - if (unit > maxunit) - maxunit = unit; - return 0; } @@ -182,22 +178,29 @@ audiodev_refresh(void) } unsigned int -audiodev_maxunit(void) +audiodev_count(void) { - return maxunit; + struct audiodev *adev; + unsigned int n; + + n = 0; + TAILQ_FOREACH(adev, &audiodevlist, next) + ++n; + + return n; } -/* - * Get audiodev corresponding to audio device. - */ struct audiodev * audiodev_get(unsigned int i) { struct audiodev *adev; + unsigned int n; + n = 0; TAILQ_FOREACH(adev, &audiodevlist, next) { - if (i == adev->unit) + if (n == i) return adev; + ++n; } return NULL; Index: src/usr.bin/audiocfg/audiodev.h diff -u src/usr.bin/audiocfg/audiodev.h:1.8 src/usr.bin/audiocfg/audiodev.h:1.9 --- src/usr.bin/audiocfg/audiodev.h:1.8 Sat Aug 24 05:45:25 2019 +++ src/usr.bin/audiocfg/audiodev.h Sat Aug 24 07:39:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: audiodev.h,v 1.8 2019/08/24 05:45:25 isaki Exp $ */ +/* $NetBSD: audiodev.h,v 1.9 2019/08/24 07:39:42 isaki Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill @@ -60,7 +60,7 @@ struct audiodev { }; int audiodev_refresh(void); -unsigned int audiodev_maxunit(void); +unsigned int audiodev_count(void); struct audiodev * audiodev_get(unsigned int); int audiodev_set_default(struct audiodev *); int audiodev_set_param(struct audiodev *, int, Index: src/usr.bin/audiocfg/main.c diff -u src/usr.bin/audiocfg/main.c:1.15 src/usr.bin/audiocfg/main.c:1.16 --- src/usr.bin/audiocfg/main.c:1.15 Sat Aug 24 06:11:10 2019 +++ src/usr.bin/audiocfg/main.c Sat Aug 24 07:39:42 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.15 2019/08/24 06:11:10 isaki Exp $ */ +/* $NetBSD: main.c,v 1.16 2019/08/24 07:39:42 isaki Exp $ */ /* * Copyright (c) 2010 Jared D. McNeill @@ -75,15 +75,15 @@ const char *encoding_names[] = { u_int encoding_max = __arraycount(encoding_names); static void -print_audiodev(struct audiodev *adev) +print_audiodev(struct audiodev *adev, int i) { struct audiofmt *f; int j; assert(adev != NULL); - printf("[%c] %s @ %s: ", - adev->defaultdev ? '*' : ' ', + printf("%u: [%c] %s @ %s: ", + i, adev->defaultdev ? '*' : ' ', adev->xname, adev->pxname); printf("%s", adev->audio_device.name); if (strlen(adev->audio_device.version) > 0) @@ -142,28 +142,6 @@ print_audiodev(struct audiodev *adev) } } -/* Always return non-null adev, or exit */ -static struct audiodev * -getadev_fromstr(const char *str) -{ - struct audiodev *adev; - unsigned int i; - - if (*str < '0' || *str > '9') - usage(); - /* NOTREACHED */ - errno = 0; - i = strtoul(str, NULL, 10); - if (errno) - usage(); - /* NOTREACHED */ - adev = audiodev_get(i); - if (adev == NULL) { - errx(EXIT_FAILURE, "no such device"); - } - return adev; -} - int main(int argc, char *argv[]) { @@ -184,16 +162,36 @@ main(int argc, char *argv[]) /* NOTREACHED */ if (strcmp(argv[1], "list") == 0 && argc == 2) { - n = audiodev_maxunit(); - for (i = 0; i <= n; i++) { - adev = audiodev_get(i); - if (adev) -print_audiodev(adev); - } + n = audiodev_count(); + for (i = 0; i < n; i++) + print_audiodev(audiodev_get(i), i); } else if (strcmp(argv[1], "list") == 0 && argc == 3) { - print_audiodev(getadev_fromstr(argv[2])); + if (*argv[2] < '0' || *argv[2] > '9') + usage(); + /* NOTREACHED */ + errno = 0; + i = strtoul(argv[2], NULL, 10); + if (errno) + usage(); + /* NOTREACHED */ + adev = audiodev_get(i); + if (adev == NULL) { + errx(EXIT_FAILURE, "no such device"); + } + print_audiodev(adev, i); } else if (strcmp(argv[1], "default
CVS commit: src/usr.bin/audiocfg
Module Name:src Committed By: isaki Date: Sat Aug 24 07:39:42 UTC 2019 Modified Files: src/usr.bin/audiocfg: audiodev.c audiodev.h main.c Log Message: Revert about index number changes. It breaks its usage and output format. Pointed out by mrg@. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/audiocfg/audiodev.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/audiocfg/audiodev.h cvs rdiff -u -r1.15 -r1.16 src/usr.bin/audiocfg/main.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/arch/amd64/amd64
Le 21/08/2019 à 23:47, matthew green a écrit : "Maxime Villard" writes: Module Name:src Committed By: maxv Date: Wed Aug 21 16:35:10 UTC 2019 Modified Files: src/sys/arch/amd64/amd64: locore.S Log Message: Switch from printf to panic. These messages were notorious for being unreadable, and at least a clean panic allows the user to inspect the system via DDB. Also simplify the output, EAX gets overwritten with the error code so it indicates nothing meaningful. thanks for this. i'd been working on the same myself. do you have a reliable way to trigger this issue? i thought that returning to userland with a lock held would do it, but i wasn't able to get that to work reliably. there's more work related to crash dumps i'd like to work on but i got distracted by testing a change similar to this one and didn't get back to it yet. if you hard-code a splhigh() in a syscall and invoke it, you can see the message; to get the unreadable/garbage output you likely need to have two threads that invoke the syscall at the same time