From owner-svn-src-projects@freebsd.org Mon Oct 9 01:17:13 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A7841E44D6B for ; Mon, 9 Oct 2017 01:17:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68A7913E1; Mon, 9 Oct 2017 01:17:13 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v991HC4c086104; Mon, 9 Oct 2017 01:17:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v991HCrr086102; Mon, 9 Oct 2017 01:17:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710090117.v991HCrr086102@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Oct 2017 01:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324421 - in projects/runtime-coverage: . share/mk X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/runtime-coverage: . share/mk X-SVN-Commit-Revision: 324421 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 01:17:13 -0000 Author: ngie Date: Mon Oct 9 01:17:12 2017 New Revision: 324421 URL: https://svnweb.freebsd.org/changeset/base/324421 Log: Add MK_COVERAGE_SUPPORT This is being done for reasons parallel to MK_TESTS_SUPPORT's addition in ^/head@r273449 Unlike ^/head@r273449 though, we do want binaries to be built with coverage support in the libraries phase, but not in the cross-tools phase. Modified: projects/runtime-coverage/Makefile.inc1 projects/runtime-coverage/share/mk/src.opts.mk Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Sun Oct 8 22:17:39 2017 (r324420) +++ projects/runtime-coverage/Makefile.inc1 Mon Oct 9 01:17:12 2017 (r324421) @@ -558,7 +558,8 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - MK_GDB=no MK_LLD_IS_LD=${MK_LLD_BOOTSTRAP} MK_TESTS=no + MK_COVERAGE_SUPPORT=${MK_COVERAGE} MK_GDB=no \ + MK_LLD_IS_LD=${MK_LLD_BOOTSTRAP} MK_TESTS=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ @@ -2079,8 +2080,8 @@ _lld= usr.bin/clang/lld .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif -.if ${MK_COVERAGE} != "no" -.if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" +.if ${MK_COVERAGE_SUPPORT} != "no" +.if ${MK_CLANG} != "no" _coverage_libs= lib/libclang_rt/profile .endif .endif Modified: projects/runtime-coverage/share/mk/src.opts.mk ============================================================================== --- projects/runtime-coverage/share/mk/src.opts.mk Sun Oct 8 22:17:39 2017 (r324420) +++ projects/runtime-coverage/share/mk/src.opts.mk Mon Oct 9 01:17:12 2017 (r324421) @@ -449,6 +449,7 @@ MK_${vv:H}:= ${MK_${vv:T}} .for var in \ BLACKLIST \ BZIP2 \ + COVERAGE \ INET \ INET6 \ KERBEROS \ From owner-svn-src-projects@freebsd.org Mon Oct 9 16:27:33 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0C2DDE356EE for ; Mon, 9 Oct 2017 16:27:33 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C6E4664C5; Mon, 9 Oct 2017 16:27:32 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v99GRVfX063665; Mon, 9 Oct 2017 16:27:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v99GRVRF063664; Mon, 9 Oct 2017 16:27:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710091627.v99GRVRF063664@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 9 Oct 2017 16:27:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324440 - projects/runtime-coverage X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage X-SVN-Commit-Revision: 324440 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2017 16:27:33 -0000 Author: ngie Date: Mon Oct 9 16:27:31 2017 New Revision: 324440 URL: https://svnweb.freebsd.org/changeset/base/324440 Log: First attempt at adding coverage libraries for gcc-only platforms gnu/lib/libgcov is needed for gcc --coverage , whereas libprofile-rt is required for clang --coverage . Adopt a pattern similar to SUBDIR.yes for handling both the clang and gcc cases. Modified: projects/runtime-coverage/Makefile.inc1 Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Mon Oct 9 16:20:39 2017 (r324439) +++ projects/runtime-coverage/Makefile.inc1 Mon Oct 9 16:27:31 2017 (r324440) @@ -2080,11 +2080,11 @@ _lld= usr.bin/clang/lld .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif + .if ${MK_COVERAGE_SUPPORT} != "no" -.if ${MK_CLANG} != "no" -_coverage_libs= lib/libclang_rt/profile +_coverage_libs.${MK_CLANG}+= lib/libclang_rt/profile +_coverage_lib.${MK_GCC}+= gnu/lib/libgcov .endif -.endif .if ${MK_GCC_BOOTSTRAP} != "no" _gcc= gnu/usr.bin/cc @@ -2097,7 +2097,7 @@ cross-tools: .MAKE .PHONY .for _tool in \ ${LOCAL_XTOOL_DIRS} \ ${_clang_libs} \ - ${_coverage_libs} \ + ${_coverage_libs.yes} \ ${_clang} \ ${_lld} \ ${_binutils} \ From owner-svn-src-projects@freebsd.org Tue Oct 10 06:20:34 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57A19E259E3 for ; Tue, 10 Oct 2017 06:20:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24AD46E4ED; Tue, 10 Oct 2017 06:20:34 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A6KXH7012638; Tue, 10 Oct 2017 06:20:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A6KXLU012637; Tue, 10 Oct 2017 06:20:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100620.v9A6KXLU012637@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 06:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324481 - projects/runtime-coverage X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage X-SVN-Commit-Revision: 324481 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 06:20:34 -0000 Author: ngie Date: Tue Oct 10 06:20:33 2017 New Revision: 324481 URL: https://svnweb.freebsd.org/changeset/base/324481 Log: Building libprofile-rt in cross-tools unfortunately doesn't work When built with cross-tools, it builds for the host architecture. We want the target architecture instead. Move the libraries to _prebuild_libs instead so they get built along with libssp_nonshared, etc (libraries that don't rely on --coverage being baked into them because NO_PIC is set). Modified: projects/runtime-coverage/Makefile.inc1 Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Tue Oct 10 06:12:07 2017 (r324480) +++ projects/runtime-coverage/Makefile.inc1 Tue Oct 10 06:20:33 2017 (r324481) @@ -557,8 +557,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ - TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - MK_COVERAGE_SUPPORT=${MK_COVERAGE} MK_GDB=no \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} MK_GDB=no \ MK_LLD_IS_LD=${MK_LLD_BOOTSTRAP} MK_TESTS=no # kernel-tools stage @@ -2080,12 +2079,6 @@ _lld= usr.bin/clang/lld .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no" _clang_libs= lib/clang .endif - -.if ${MK_COVERAGE_SUPPORT} != "no" -_coverage_libs.${MK_CLANG}+= lib/libclang_rt/profile -_coverage_lib.${MK_GCC}+= gnu/lib/libgcov -.endif - .if ${MK_GCC_BOOTSTRAP} != "no" _gcc= gnu/usr.bin/cc .endif @@ -2097,7 +2090,6 @@ cross-tools: .MAKE .PHONY .for _tool in \ ${LOCAL_XTOOL_DIRS} \ ${_clang_libs} \ - ${_coverage_libs.yes} \ ${_clang} \ ${_lld} \ ${_binutils} \ @@ -2251,6 +2243,16 @@ _prereq_libs= lib/libcompiler_rt .if ${MK_SSP} != "no" _prereq_libs+= gnu/lib/libssp/libssp_nonshared .endif + +# +# The coverage libraries must be built for the target prior to ${_startup_libs} +# in order for them to have runtime coverage instrumentation. +# +.if ${MK_COVERAGE} != "no" +_coverage_libs.${MK_CLANG}+= lib/libclang_rt/profile +_coverage_lib.${MK_GCC}+= gnu/lib/libgcov +.endif +_prereq_libs+= ${_coverage_libs.yes} # These dependencies are not automatically generated: # From owner-svn-src-projects@freebsd.org Tue Oct 10 06:20:56 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45024E25A43 for ; Tue, 10 Oct 2017 06:20:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12B1F6E611; Tue, 10 Oct 2017 06:20:56 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A6KtJA012696; Tue, 10 Oct 2017 06:20:55 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A6Ktek012695; Tue, 10 Oct 2017 06:20:55 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100620.v9A6Ktek012695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 06:20:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324482 - projects/runtime-coverage/share/mk X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage/share/mk X-SVN-Commit-Revision: 324482 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 06:20:56 -0000 Author: ngie Date: Tue Oct 10 06:20:55 2017 New Revision: 324482 URL: https://svnweb.freebsd.org/changeset/base/324482 Log: Per r324481, remove MK_COVERAGE_SUPPORT Modified: projects/runtime-coverage/share/mk/src.opts.mk Modified: projects/runtime-coverage/share/mk/src.opts.mk ============================================================================== --- projects/runtime-coverage/share/mk/src.opts.mk Tue Oct 10 06:20:33 2017 (r324481) +++ projects/runtime-coverage/share/mk/src.opts.mk Tue Oct 10 06:20:55 2017 (r324482) @@ -449,7 +449,6 @@ MK_${vv:H}:= ${MK_${vv:T}} .for var in \ BLACKLIST \ BZIP2 \ - COVERAGE \ INET \ INET6 \ KERBEROS \ From owner-svn-src-projects@freebsd.org Tue Oct 10 06:26:15 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F5E6E25EEB for ; Tue, 10 Oct 2017 06:26:15 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10FC16EBA1; Tue, 10 Oct 2017 06:26:14 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A6QEGi016669; Tue, 10 Oct 2017 06:26:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A6QDtj016657; Tue, 10 Oct 2017 06:26:13 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100626.v9A6QDtj016657@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 06:26:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324483 - in projects/runtime-coverage: . bin bin/ps bin/rcp cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolari... X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/runtime-coverage: . bin bin/ps bin/rcp cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd/ztest cddl/contrib/... X-SVN-Commit-Revision: 324483 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 06:26:15 -0000 Author: ngie Date: Tue Oct 10 06:26:12 2017 New Revision: 324483 URL: https://svnweb.freebsd.org/changeset/base/324483 Log: MFhead@r324482 Added: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 - copied unchanged from r324482, head/cddl/contrib/opensolaris/cmd/zfs/zfs-program.8 - copied unchanged from r324482, head/sys/amd64/amd64/efirt_machdep.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_sun8i_r.c - copied unchanged from r324482, head/sys/arm/allwinner/clkng/ccu_sun8i_r.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_sun8i_r.h - copied unchanged from r324482, head/sys/arm/allwinner/clkng/ccu_sun8i_r.h projects/runtime-coverage/sys/arm/conf/VIRT - copied unchanged from r324482, head/sys/arm/conf/VIRT projects/runtime-coverage/sys/arm/conf/std.armv7 - copied unchanged from r324482, head/sys/arm/conf/std.armv7 projects/runtime-coverage/sys/boot/libsa/ - copied from r324482, head/sys/boot/libsa/ projects/runtime-coverage/sys/boot/userboot/Makefile.inc - copied unchanged from r324482, head/sys/boot/userboot/Makefile.inc projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ - copied from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp.h - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_global.h - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_global.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_iter.h - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_iter.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_prop.h - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zcp_prop.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_global.c - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_global.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_iter.c - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_iter.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c - copied unchanged from r324482, head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c projects/runtime-coverage/sys/contrib/dev/iwm/iwm-8265-22.fw.uu - copied unchanged from r324482, head/sys/contrib/dev/iwm/iwm-8265-22.fw.uu projects/runtime-coverage/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu - copied unchanged from r324482, head/sys/dev/cxgbe/firmware/t4fw-1.16.63.0.bin.uu projects/runtime-coverage/sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu - copied unchanged from r324482, head/sys/dev/cxgbe/firmware/t5fw-1.16.63.0.bin.uu projects/runtime-coverage/sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu - copied unchanged from r324482, head/sys/dev/cxgbe/firmware/t6fw-1.16.63.0.bin.uu - copied unchanged from r324482, head/sys/dev/efidev/efirt.c projects/runtime-coverage/sys/modules/iwmfw/iwm8265fw/ - copied from r324482, head/sys/modules/iwmfw/iwm8265fw/ projects/runtime-coverage/tests/sys/netpfil/ - copied from r324482, head/tests/sys/netpfil/ Directory Properties: projects/runtime-coverage/sys/amd64/amd64/efirt_machdep.c (props changed) projects/runtime-coverage/sys/dev/efidev/efirt.c (props changed) Deleted: projects/runtime-coverage/bin/rcp/ projects/runtime-coverage/etc/pam.d/rsh projects/runtime-coverage/libexec/rlogind/ projects/runtime-coverage/libexec/rshd/ projects/runtime-coverage/release/doc/ projects/runtime-coverage/sys/amd64/amd64/efirt.c projects/runtime-coverage/sys/arm/allwinner/a10_gpio.h projects/runtime-coverage/sys/boot/README projects/runtime-coverage/sys/dev/cxgbe/firmware/t4fw-1.16.59.0.bin.uu projects/runtime-coverage/sys/dev/cxgbe/firmware/t5fw-1.16.59.0.bin.uu projects/runtime-coverage/sys/dev/cxgbe/firmware/t6fw-1.16.59.0.bin.uu projects/runtime-coverage/sys/sys/sockstate.h projects/runtime-coverage/tools/build/options/WITHOUT_RCMDS projects/runtime-coverage/tools/build/options/WITH_RCMDS projects/runtime-coverage/usr.bin/rlogin/ projects/runtime-coverage/usr.bin/rsh/ Modified: projects/runtime-coverage/Makefile projects/runtime-coverage/Makefile.inc1 projects/runtime-coverage/Makefile.libcompat projects/runtime-coverage/ObsoleteFiles.inc projects/runtime-coverage/UPDATING projects/runtime-coverage/bin/Makefile projects/runtime-coverage/bin/ps/keyword.c projects/runtime-coverage/bin/ps/ps.1 projects/runtime-coverage/bin/ps/ps.c projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.8 projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.c projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zfs/zfs.8 projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c projects/runtime-coverage/cddl/contrib/opensolaris/cmd/ztest/ztest.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dis.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_impl.h projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzpool/common/kernel.c projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzpool/common/util.c projects/runtime-coverage/cddl/lib/libzpool/Makefile projects/runtime-coverage/cddl/sbin/zfs/Makefile projects/runtime-coverage/contrib/mdocml/Makefile projects/runtime-coverage/contrib/mdocml/NEWS projects/runtime-coverage/contrib/mdocml/man_term.c projects/runtime-coverage/contrib/mdocml/mansearch.c projects/runtime-coverage/contrib/mdocml/mdoc_validate.c projects/runtime-coverage/contrib/mdocml/tbl_html.c projects/runtime-coverage/contrib/mdocml/tbl_term.c projects/runtime-coverage/contrib/tcpdump/addrtoname.c projects/runtime-coverage/contrib/tcpdump/tcpdump.c projects/runtime-coverage/etc/devd/zfs.conf projects/runtime-coverage/etc/inetd.conf projects/runtime-coverage/etc/mtree/BSD.tests.dist projects/runtime-coverage/etc/pam.d/Makefile projects/runtime-coverage/gnu/usr.bin/binutils/as/Makefile projects/runtime-coverage/gnu/usr.bin/cc/Makefile.inc projects/runtime-coverage/lib/Makefile projects/runtime-coverage/lib/clang/llvm.build.mk projects/runtime-coverage/lib/libc/Makefile projects/runtime-coverage/lib/libc/arm/Makefile.inc projects/runtime-coverage/lib/libc/arm/aeabi/Makefile.inc projects/runtime-coverage/lib/libc/arm/gen/Makefile.inc projects/runtime-coverage/lib/libc/gen/tls.c projects/runtime-coverage/lib/libc/net/gethostbyname.3 projects/runtime-coverage/lib/libc/sys/Makefile.inc projects/runtime-coverage/lib/libc/sys/recv.2 projects/runtime-coverage/lib/libcapsicum/capsicum_helpers.h projects/runtime-coverage/lib/libcompiler_rt/Makefile.inc projects/runtime-coverage/lib/libcuse/cuse.3 projects/runtime-coverage/lib/libprocstat/libprocstat.c projects/runtime-coverage/lib/libprocstat/libprocstat.h projects/runtime-coverage/lib/libthr/thread/thr_private.h projects/runtime-coverage/lib/libthr/thread/thr_spec.c projects/runtime-coverage/lib/msun/arm/Makefile.inc projects/runtime-coverage/libexec/Makefile projects/runtime-coverage/libexec/ftpd/ftpd.c projects/runtime-coverage/release/Makefile projects/runtime-coverage/release/Makefile.mirrors projects/runtime-coverage/release/arm/BANANAPI.conf projects/runtime-coverage/release/arm/BEAGLEBONE.conf projects/runtime-coverage/release/arm/CUBIEBOARD.conf projects/runtime-coverage/release/arm/CUBIEBOARD2.conf projects/runtime-coverage/release/arm/CUBOX-HUMMINGBOARD.conf projects/runtime-coverage/release/arm/GUMSTIX.conf projects/runtime-coverage/release/arm/PANDABOARD.conf projects/runtime-coverage/release/arm/RPI-B.conf projects/runtime-coverage/release/arm/RPI2.conf projects/runtime-coverage/release/arm/WANDBOARD.conf projects/runtime-coverage/rescue/rescue/Makefile projects/runtime-coverage/sbin/fsck_ffs/main.c projects/runtime-coverage/sbin/geom/class/part/geom_part.c projects/runtime-coverage/sbin/growfs/tests/legacy_test.pl projects/runtime-coverage/sbin/init/init.c projects/runtime-coverage/sbin/ipfw/ipfw.8 projects/runtime-coverage/sbin/ipfw/ipfw2.h projects/runtime-coverage/share/man/man4/cxgbe.4 projects/runtime-coverage/share/man/man4/mpr.4 projects/runtime-coverage/share/man/man4/mps.4 projects/runtime-coverage/share/man/man4/rtwn_usb.4 projects/runtime-coverage/share/man/man5/src.conf.5 projects/runtime-coverage/share/man/man7/arch.7 projects/runtime-coverage/share/man/man9/EVENTHANDLER.9 projects/runtime-coverage/share/man/man9/mbpool.9 projects/runtime-coverage/share/man/man9/mbuf.9 projects/runtime-coverage/share/man/man9/stack.9 projects/runtime-coverage/share/misc/bsd-family-tree projects/runtime-coverage/share/misc/iso3166 projects/runtime-coverage/share/misc/organization.dot projects/runtime-coverage/share/mk/bsd.cpu.mk projects/runtime-coverage/share/mk/bsd.libnames.mk projects/runtime-coverage/share/mk/local.meta.sys.mk projects/runtime-coverage/share/mk/src.libnames.mk projects/runtime-coverage/share/mk/src.opts.mk projects/runtime-coverage/share/mk/sys.mk projects/runtime-coverage/sys/amd64/amd64/cpu_switch.S projects/runtime-coverage/sys/amd64/amd64/pmap.c projects/runtime-coverage/sys/amd64/amd64/sys_machdep.c projects/runtime-coverage/sys/amd64/include/efi.h projects/runtime-coverage/sys/amd64/include/proc.h projects/runtime-coverage/sys/arm/allwinner/a10_ahci.c projects/runtime-coverage/sys/arm/allwinner/a10_gpio.c projects/runtime-coverage/sys/arm/allwinner/clkng/aw_ccung.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_a31.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_a31.h projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_a64.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_a64.h projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_h3.c projects/runtime-coverage/sys/arm/allwinner/clkng/ccu_h3.h projects/runtime-coverage/sys/arm/allwinner/h3/files.h3 projects/runtime-coverage/sys/arm/allwinner/std.allwinner projects/runtime-coverage/sys/arm/allwinner/std.allwinner_up projects/runtime-coverage/sys/arm/altera/socfpga/std.socfpga projects/runtime-coverage/sys/arm/amlogic/aml8726/std.aml8726 projects/runtime-coverage/sys/arm/annapurna/alpine/std.alpine projects/runtime-coverage/sys/arm/broadcom/bcm2835/bcm2835_bsc.c projects/runtime-coverage/sys/arm/broadcom/bcm2835/bcm2835_bscreg.h projects/runtime-coverage/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h projects/runtime-coverage/sys/arm/broadcom/bcm2835/bcm2835_machdep.c projects/runtime-coverage/sys/arm/broadcom/bcm2835/bcm2835_rng.c projects/runtime-coverage/sys/arm/broadcom/bcm2835/std.bcm2836 projects/runtime-coverage/sys/arm/conf/ALLWINNER_UP projects/runtime-coverage/sys/arm/conf/ALPINE projects/runtime-coverage/sys/arm/conf/AML8726 projects/runtime-coverage/sys/arm/conf/ARMADA38X projects/runtime-coverage/sys/arm/conf/ARMADAXP projects/runtime-coverage/sys/arm/conf/BEAGLEBONE projects/runtime-coverage/sys/arm/conf/EFIKA_MX projects/runtime-coverage/sys/arm/conf/EXYNOS5.common projects/runtime-coverage/sys/arm/conf/GENERIC projects/runtime-coverage/sys/arm/conf/IMX53 projects/runtime-coverage/sys/arm/conf/IMX6 projects/runtime-coverage/sys/arm/conf/PANDABOARD projects/runtime-coverage/sys/arm/conf/RK3188 projects/runtime-coverage/sys/arm/conf/RPI2 projects/runtime-coverage/sys/arm/conf/SOCFPGA projects/runtime-coverage/sys/arm/conf/TEGRA124 projects/runtime-coverage/sys/arm/conf/VYBRID projects/runtime-coverage/sys/arm/conf/ZEDBOARD projects/runtime-coverage/sys/arm/conf/std.armv6 projects/runtime-coverage/sys/arm/freescale/imx/imx6_ahci.c projects/runtime-coverage/sys/arm/freescale/imx/imx6_hdmi.c projects/runtime-coverage/sys/arm/freescale/imx/std.imx51 projects/runtime-coverage/sys/arm/freescale/imx/std.imx53 projects/runtime-coverage/sys/arm/freescale/imx/std.imx6 projects/runtime-coverage/sys/arm/freescale/vybrid/std.vybrid projects/runtime-coverage/sys/arm/include/param.h projects/runtime-coverage/sys/arm/mv/armada38x/std.armada38x projects/runtime-coverage/sys/arm/mv/std-pj4b.mv projects/runtime-coverage/sys/arm/nvidia/tegra124/std.tegra124 projects/runtime-coverage/sys/arm/nvidia/tegra_ahci.c projects/runtime-coverage/sys/arm/qemu/std.virt projects/runtime-coverage/sys/arm/rockchip/std.rk30xx projects/runtime-coverage/sys/arm/samsung/exynos/std.exynos5250 projects/runtime-coverage/sys/arm/samsung/exynos/std.exynos5420 projects/runtime-coverage/sys/arm/ti/std.ti projects/runtime-coverage/sys/arm/ti/ti_pruss.c projects/runtime-coverage/sys/arm/ti/ti_pruss.h projects/runtime-coverage/sys/arm/xilinx/std.zynq7 projects/runtime-coverage/sys/arm64/arm64/mp_machdep.c projects/runtime-coverage/sys/boot/Makefile projects/runtime-coverage/sys/boot/Makefile.inc projects/runtime-coverage/sys/boot/arm/uboot/Makefile projects/runtime-coverage/sys/boot/common/Makefile.inc projects/runtime-coverage/sys/boot/efi/boot1/Makefile projects/runtime-coverage/sys/boot/efi/fdt/Makefile projects/runtime-coverage/sys/boot/efi/include/efilib.h projects/runtime-coverage/sys/boot/efi/include/efizfs.h projects/runtime-coverage/sys/boot/efi/libefi/Makefile projects/runtime-coverage/sys/boot/efi/libefi/devpath.c projects/runtime-coverage/sys/boot/efi/libefi/efizfs.c projects/runtime-coverage/sys/boot/efi/loader/Makefile projects/runtime-coverage/sys/boot/efi/loader/main.c projects/runtime-coverage/sys/boot/fdt/dts/arm/rpi2.dts projects/runtime-coverage/sys/boot/i386/gptboot/Makefile projects/runtime-coverage/sys/boot/i386/gptzfsboot/Makefile projects/runtime-coverage/sys/boot/i386/libfirewire/Makefile projects/runtime-coverage/sys/boot/i386/libi386/Makefile projects/runtime-coverage/sys/boot/i386/loader/Makefile projects/runtime-coverage/sys/boot/i386/zfsboot/Makefile projects/runtime-coverage/sys/boot/libstand32/Makefile projects/runtime-coverage/sys/boot/mips/beri/boot2/Makefile projects/runtime-coverage/sys/boot/mips/beri/loader/Makefile projects/runtime-coverage/sys/boot/mips/uboot/Makefile projects/runtime-coverage/sys/boot/ofw/libofw/Makefile projects/runtime-coverage/sys/boot/powerpc/kboot/Makefile projects/runtime-coverage/sys/boot/powerpc/ofw/Makefile projects/runtime-coverage/sys/boot/powerpc/ps3/Makefile projects/runtime-coverage/sys/boot/powerpc/uboot/Makefile projects/runtime-coverage/sys/boot/sparc64/loader/Makefile projects/runtime-coverage/sys/boot/uboot/fdt/Makefile projects/runtime-coverage/sys/boot/uboot/lib/Makefile projects/runtime-coverage/sys/boot/userboot/libstand/Makefile projects/runtime-coverage/sys/boot/userboot/userboot/Makefile projects/runtime-coverage/sys/boot/userboot/zfs/Makefile projects/runtime-coverage/sys/boot/zfs/Makefile projects/runtime-coverage/sys/cam/ctl/ctl_frontend_iscsi.c projects/runtime-coverage/sys/cddl/compat/opensolaris/kern/opensolaris_sunddi.c projects/runtime-coverage/sys/cddl/compat/opensolaris/sys/mutex.h projects/runtime-coverage/sys/cddl/compat/opensolaris/sys/sunddi.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/Makefile.files projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/blkptr.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_destroy.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/runtime-coverage/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h projects/runtime-coverage/sys/compat/linuxkpi/common/include/linux/random.h projects/runtime-coverage/sys/compat/linuxkpi/common/include/linux/workqueue.h projects/runtime-coverage/sys/compat/linuxkpi/common/src/linux_work.c projects/runtime-coverage/sys/compat/ndis/kern_ndis.c projects/runtime-coverage/sys/compat/ndis/ndis_var.h projects/runtime-coverage/sys/conf/Makefile.arm projects/runtime-coverage/sys/conf/files projects/runtime-coverage/sys/conf/files.amd64 projects/runtime-coverage/sys/conf/files.arm projects/runtime-coverage/sys/conf/files.arm64 projects/runtime-coverage/sys/conf/kern.mk projects/runtime-coverage/sys/conf/kern.opts.mk projects/runtime-coverage/sys/conf/kern.pre.mk projects/runtime-coverage/sys/conf/kmod.mk projects/runtime-coverage/sys/conf/options.arm projects/runtime-coverage/sys/crypto/aesni/aesni.c projects/runtime-coverage/sys/dev/ahci/ahci.c projects/runtime-coverage/sys/dev/ahci/ahci.h projects/runtime-coverage/sys/dev/ahci/ahci_mv_fdt.c projects/runtime-coverage/sys/dev/ahci/ahci_pci.c projects/runtime-coverage/sys/dev/bnxt/if_bnxt.c projects/runtime-coverage/sys/dev/cas/if_cas.c projects/runtime-coverage/sys/dev/cas/if_casvar.h projects/runtime-coverage/sys/dev/cxgbe/adapter.h projects/runtime-coverage/sys/dev/cxgbe/firmware/t4fw_interface.h projects/runtime-coverage/sys/dev/cxgbe/firmware/t6fw_cfg_uwire.txt projects/runtime-coverage/sys/dev/cxgbe/t4_main.c projects/runtime-coverage/sys/dev/cxgbe/t4_sge.c projects/runtime-coverage/sys/dev/cxgbe/tom/t4_cpl_io.c projects/runtime-coverage/sys/dev/dpaa/if_dtsec_rm.c projects/runtime-coverage/sys/dev/e1000/if_em.c projects/runtime-coverage/sys/dev/hwpmc/hwpmc_amd.c projects/runtime-coverage/sys/dev/hwpmc/hwpmc_amd.h projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hn.c projects/runtime-coverage/sys/dev/if_ndis/if_ndis.c projects/runtime-coverage/sys/dev/iscsi_initiator/isc_soc.c projects/runtime-coverage/sys/dev/iwm/if_iwm.c projects/runtime-coverage/sys/dev/iwm/if_iwm_8000.c projects/runtime-coverage/sys/dev/iwm/if_iwm_config.h projects/runtime-coverage/sys/dev/lge/if_lge.c projects/runtime-coverage/sys/dev/md/md.c projects/runtime-coverage/sys/dev/mlx4/mlx4_en/en.h projects/runtime-coverage/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c projects/runtime-coverage/sys/dev/mlx4/mlx4_en/mlx4_en_rx.c projects/runtime-coverage/sys/dev/mlx5/mlx5_en/en.h projects/runtime-coverage/sys/dev/mlx5/mlx5_en/mlx5_en_main.c projects/runtime-coverage/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c projects/runtime-coverage/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c projects/runtime-coverage/sys/dev/mpr/mpr.c projects/runtime-coverage/sys/dev/mps/mps.c projects/runtime-coverage/sys/dev/mwl/if_mwl.c projects/runtime-coverage/sys/dev/netmap/netmap_generic.c projects/runtime-coverage/sys/dev/ntb/ntb_hw/ntb_hw_plx.c projects/runtime-coverage/sys/dev/ofw/ofw_bus_subr.h projects/runtime-coverage/sys/dev/pccbb/pccbb_isa.c projects/runtime-coverage/sys/dev/pci/pci.c projects/runtime-coverage/sys/dev/psci/psci.c projects/runtime-coverage/sys/dev/qlxgbe/ql_hw.c projects/runtime-coverage/sys/dev/qlxgbe/ql_os.c projects/runtime-coverage/sys/dev/random/fortuna.c projects/runtime-coverage/sys/dev/random/random_harvestq.c projects/runtime-coverage/sys/dev/random/randomdev.c projects/runtime-coverage/sys/dev/smbus/smb.c projects/runtime-coverage/sys/dev/smbus/smbconf.h projects/runtime-coverage/sys/dev/usb/net/if_smsc.c projects/runtime-coverage/sys/dev/wb/if_wb.c projects/runtime-coverage/sys/fs/cd9660/cd9660_vnops.c projects/runtime-coverage/sys/fs/cuse/cuse.c projects/runtime-coverage/sys/fs/cuse/cuse_defs.h projects/runtime-coverage/sys/fs/nfs/nfs_var.h projects/runtime-coverage/sys/fs/nfs/nfsproto.h projects/runtime-coverage/sys/fs/nfsclient/nfs_clrpcops.c projects/runtime-coverage/sys/fs/nfsclient/nfs_clstate.c projects/runtime-coverage/sys/fs/tmpfs/tmpfs_vnops.c projects/runtime-coverage/sys/fs/udf/udf_vnops.c projects/runtime-coverage/sys/geom/geom_disk.h projects/runtime-coverage/sys/geom/geom_subr.c projects/runtime-coverage/sys/geom/mountver/g_mountver.c projects/runtime-coverage/sys/geom/mountver/g_mountver.h projects/runtime-coverage/sys/i386/i386/machdep.c projects/runtime-coverage/sys/i386/i386/swtch.s projects/runtime-coverage/sys/i386/i386/sys_machdep.c projects/runtime-coverage/sys/i386/include/md_var.h projects/runtime-coverage/sys/kern/kern_linker.c projects/runtime-coverage/sys/kern/kern_mbuf.c projects/runtime-coverage/sys/kern/kern_proc.c projects/runtime-coverage/sys/kern/kern_rwlock.c projects/runtime-coverage/sys/kern/kern_sendfile.c projects/runtime-coverage/sys/kern/kern_sx.c projects/runtime-coverage/sys/kern/kern_sysctl.c projects/runtime-coverage/sys/kern/subr_blist.c projects/runtime-coverage/sys/kern/subr_bus.c projects/runtime-coverage/sys/kern/subr_eventhandler.c projects/runtime-coverage/sys/kern/subr_gtaskqueue.c projects/runtime-coverage/sys/kern/subr_mbpool.c projects/runtime-coverage/sys/kern/subr_sleepqueue.c projects/runtime-coverage/sys/kern/subr_stack.c projects/runtime-coverage/sys/kern/uipc_mbuf.c projects/runtime-coverage/sys/kern/uipc_shm.c projects/runtime-coverage/sys/kern/uipc_usrreq.c projects/runtime-coverage/sys/kern/vfs_cache.c projects/runtime-coverage/sys/kern/vfs_export.c projects/runtime-coverage/sys/modules/Makefile projects/runtime-coverage/sys/modules/cloudabi32/Makefile projects/runtime-coverage/sys/modules/cxgbe/t4_firmware/Makefile projects/runtime-coverage/sys/modules/cxgbe/t5_firmware/Makefile projects/runtime-coverage/sys/modules/cxgbe/t6_firmware/Makefile projects/runtime-coverage/sys/modules/efirt/Makefile projects/runtime-coverage/sys/modules/em/Makefile projects/runtime-coverage/sys/modules/iwmfw/Makefile projects/runtime-coverage/sys/modules/zfs/Makefile projects/runtime-coverage/sys/net/iflib.c projects/runtime-coverage/sys/net/iflib.h projects/runtime-coverage/sys/netinet/sctp_input.c projects/runtime-coverage/sys/netinet/tcp_syncache.c projects/runtime-coverage/sys/netinet/tcp_timer.c projects/runtime-coverage/sys/netinet/tcp_timer.h projects/runtime-coverage/sys/netinet/tcp_timewait.c projects/runtime-coverage/sys/netinet6/send.c projects/runtime-coverage/sys/netpfil/ipfw/ip_fw2.c projects/runtime-coverage/sys/powerpc/include/intr_machdep.h projects/runtime-coverage/sys/sys/blist.h projects/runtime-coverage/sys/sys/disk.h projects/runtime-coverage/sys/sys/efi.h projects/runtime-coverage/sys/sys/eventhandler.h projects/runtime-coverage/sys/sys/lock.h projects/runtime-coverage/sys/sys/mbpool.h projects/runtime-coverage/sys/sys/mbuf.h projects/runtime-coverage/sys/sys/param.h projects/runtime-coverage/sys/sys/random.h projects/runtime-coverage/sys/sys/sockbuf.h projects/runtime-coverage/sys/sys/socketvar.h projects/runtime-coverage/sys/sys/stack.h projects/runtime-coverage/sys/sys/sysctl.h projects/runtime-coverage/sys/sys/unpcb.h projects/runtime-coverage/sys/vm/swap_pager.c projects/runtime-coverage/tests/sys/Makefile projects/runtime-coverage/tests/sys/geom/class/eli/resize_test.sh projects/runtime-coverage/tools/build/mk/OptionalObsoleteFiles.inc projects/runtime-coverage/tools/tools/nanobsd/dhcpd/common projects/runtime-coverage/tools/tools/nanobsd/embedded/common projects/runtime-coverage/tools/tools/nanobsd/gateworks/common projects/runtime-coverage/usr.bin/Makefile projects/runtime-coverage/usr.bin/bluetooth/btsockstat/btsockstat.c projects/runtime-coverage/usr.bin/chpass/chpass.c projects/runtime-coverage/usr.bin/hexdump/tests/hexdump_test.sh projects/runtime-coverage/usr.bin/lock/lock.c projects/runtime-coverage/usr.bin/netstat/inet.c projects/runtime-coverage/usr.bin/netstat/netgraph.c projects/runtime-coverage/usr.bin/netstat/unix.c projects/runtime-coverage/usr.bin/patch/pch.c projects/runtime-coverage/usr.bin/procstat/procstat.1 projects/runtime-coverage/usr.bin/procstat/procstat_files.c projects/runtime-coverage/usr.bin/sockstat/sockstat.c projects/runtime-coverage/usr.bin/systat/netstat.c projects/runtime-coverage/usr.sbin/bsdinstall/scripts/hardening projects/runtime-coverage/usr.sbin/cxgbetool/cxgbetool.c projects/runtime-coverage/usr.sbin/diskinfo/diskinfo.8 projects/runtime-coverage/usr.sbin/diskinfo/diskinfo.c projects/runtime-coverage/usr.sbin/freebsd-update/freebsd-update.sh projects/runtime-coverage/usr.sbin/mountd/mountd.c projects/runtime-coverage/usr.sbin/ppp/auth.c projects/runtime-coverage/usr.sbin/tcpdump/tcpdump/Makefile projects/runtime-coverage/usr.sbin/tcpdump/tcpdump/config.h Directory Properties: projects/runtime-coverage/ (props changed) projects/runtime-coverage/cddl/ (props changed) projects/runtime-coverage/cddl/contrib/opensolaris/ (props changed) projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/ (props changed) projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zfs/ (props changed) projects/runtime-coverage/cddl/contrib/opensolaris/lib/libzfs/ (props changed) projects/runtime-coverage/contrib/mdocml/ (props changed) projects/runtime-coverage/contrib/tcpdump/ (props changed) projects/runtime-coverage/gnu/usr.bin/binutils/ (props changed) projects/runtime-coverage/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/runtime-coverage/Makefile ============================================================================== --- projects/runtime-coverage/Makefile Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/Makefile Tue Oct 10 06:26:12 2017 (r324483) @@ -435,7 +435,7 @@ worlds: .PHONY .if make(universe) || make(universe_kernels) || make(tinderbox) || make(targets) TARGETS?=amd64 arm arm64 i386 mips powerpc riscv sparc64 _UNIVERSE_TARGETS= ${TARGETS} -TARGET_ARCHES_arm?= arm armeb armv6 +TARGET_ARCHES_arm?= arm armeb armv6 armv7 TARGET_ARCHES_arm64?= aarch64 TARGET_ARCHES_mips?= mipsel mips mips64el mips64 mipsn32 mipselhf mipshf mips64elhf mips64hf TARGET_ARCHES_powerpc?= powerpc powerpc64 powerpcspe Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/Makefile.inc1 Tue Oct 10 06:26:12 2017 (r324483) @@ -398,6 +398,7 @@ KNOWN_ARCHES?= aarch64/arm64 \ arm \ armeb/arm \ armv6/arm \ + armv7/arm \ i386 \ mips \ mipsel/mips \ @@ -615,7 +616,7 @@ BFLAGS+= -B${CROSS_BINUTILS_PREFIX} BFLAGS+= -B${WORLDTMP}/usr/bin .endif .if ${TARGET} == "arm" -.if ${TARGET_ARCH:Marmv6*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" +.if ${TARGET_ARCH:Marmv[67]*} != "" && ${TARGET_CPUTYPE:M*soft*} == "" TARGET_ABI= gnueabihf .else TARGET_ABI= gnueabi @@ -651,7 +652,7 @@ XCFLAGS+= ${BFLAGS} ${TARGET_ARCH} == "powerpc64" || ${TARGET_ARCH:Mmips64*} != "") LIBCOMPAT= 32 .include "Makefile.libcompat" -.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH} == "armv6" +.elif ${MK_LIBSOFT} != "no" && ${TARGET_ARCH:Marmv[67]*} != "" LIBCOMPAT= SOFT .include "Makefile.libcompat" .endif @@ -1359,6 +1360,10 @@ BUILDKERNELS+= dummy BUILDKERNELS+= ${_kernel} .if empty(INSTALLKERNEL) && !defined(NO_INSTALLKERNEL) INSTALLKERNEL= ${_kernel} +.endif +.else +.if make(buildkernel) +.error Missing KERNCONF ${KERNCONFDIR}/${_kernel} .endif .endif .endfor Modified: projects/runtime-coverage/Makefile.libcompat ============================================================================== --- projects/runtime-coverage/Makefile.libcompat Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/Makefile.libcompat Tue Oct 10 06:26:12 2017 (r324483) @@ -59,10 +59,10 @@ LIB32WMAKEFLAGS+= -DCOMPAT_32BIT # ------------------------------------------------------------------- # soft-fp world -.if ${TARGET_ARCH} == "armv6" +.if ${TARGET_ARCH:Marmv[67]*} != "" LIBSOFTCFLAGS= -DCOMPAT_SOFTFP LIBSOFTCPUFLAGS= -mfloat-abi=softfp -LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=armv6 +LIBSOFTWMAKEENV= CPUTYPE=soft MACHINE=arm MACHINE_ARCH=${TARGET_ARCH} LIBSOFTWMAKEFLAGS= -DCOMPAT_SOFTFP .endif Modified: projects/runtime-coverage/ObsoleteFiles.inc ============================================================================== --- projects/runtime-coverage/ObsoleteFiles.inc Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/ObsoleteFiles.inc Tue Oct 10 06:26:12 2017 (r324483) @@ -38,6 +38,23 @@ # xargs -n1 | sort | uniq -d; # done +# 20161010: Remove libstand +OLD_FILES+=usr/lib/libstand.a +OLD_FILES+=usr/lib/libstand_p.a +OLD_FILES+=usr/include/stand.h +OLD_FILES+=usr/share/man/man3/libstand.3 +# 20171003: remove RCMDS +OLD_FILES+=bin/rcp +OLD_FILES+=rescue/rcp +OLD_FILES+=usr/bin/rlogin +OLD_FILES+=usr/bin/rsh +OLD_FILES+=usr/libexec/rlogind +OLD_FILES+=usr/libexec/rshd +OLD_FILES+=usr/share/man/man1/rcp.1.gz +OLD_FILES+=usr/share/man/man1/rlogin.1.gz +OLD_FILES+=usr/share/man/man1/rsh.1.gz +OLD_FILES+=usr/share/man/man8/rlogind.8.gz +OLD_FILES+=usr/share/man/man8/rshd.8.gz # 20170927: crshared OLD_FILES+=usr/share/man/man9/crshared.9.gz # 20170927: procctl Modified: projects/runtime-coverage/UPDATING ============================================================================== --- projects/runtime-coverage/UPDATING Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/UPDATING Tue Oct 10 06:26:12 2017 (r324483) @@ -51,6 +51,23 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20171010: + libstand has turned into a private library for sys/boot use only. + It is no longer supported as a public interface outside of sys/boot. + +20171005: + The arm port has split armv6 into armv6 and armv7. armv7 is now + a valid TARGET_ARCH/MACHINE_ARCH setting. If you have an armv7 system + and are running a kernel from before r324363, you will need to add + MACHINE_ARCH=armv7 to 'make buildworld' to do a native build. + +20171003: + When building multiple kernels using KERNCONF, non-existent KERNCONF + files will produce an error and buildkernel will fail. Previously + missing KERNCONF files silently failed giving no indication as to + why, only to subsequently discover during installkernel that the + desired kernel was never built in the first place. + 20170912: The default serial number format for CTL LUNs has changed. This will affect users who use /dev/diskid/* device nodes, or whose FibreChannel Modified: projects/runtime-coverage/bin/Makefile ============================================================================== --- projects/runtime-coverage/bin/Makefile Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/bin/Makefile Tue Oct 10 06:26:12 2017 (r324483) @@ -40,7 +40,6 @@ SUBDIR= cat \ test \ uuidgen -SUBDIR.${MK_RCMDS}+= rcp SUBDIR.${MK_SENDMAIL}+= rmail SUBDIR.${MK_TCSH}+= csh SUBDIR.${MK_TESTS}+= tests Modified: projects/runtime-coverage/bin/ps/keyword.c ============================================================================== --- projects/runtime-coverage/bin/ps/keyword.c Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/bin/ps/keyword.c Tue Oct 10 06:26:12 2017 (r324483) @@ -199,7 +199,8 @@ static VAR var[] = { {"tdaddr", "TDADDR", NULL, "thread-address", 0, kvar, KOFF(ki_tdaddr), KPTR, "lx", 0}, {"tdev", "TDEV", NULL, "terminal-device", 0, tdev, 0, CHAR, NULL, 0}, - {"tdnam", "TDNAM", NULL, "terminal-device-name", LJUST, tdnam, 0, CHAR, + {"tdnam", "", "tdname", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"tdname", "TDNAME", NULL, "thread-name", LJUST, tdnam, 0, CHAR, NULL, 0}, {"time", "TIME", NULL, "cpu-time", USER, cputime, 0, CHAR, NULL, 0}, {"tpgid", "TPGID", NULL, "terminal-process-gid", 0, kvar, Modified: projects/runtime-coverage/bin/ps/ps.1 ============================================================================== --- projects/runtime-coverage/bin/ps/ps.1 Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/bin/ps/ps.1 Tue Oct 10 06:26:12 2017 (r324483) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd September 7, 2017 +.Dd October 9, 2017 .Dt PS 1 .Os .Sh NAME @@ -675,6 +675,8 @@ saved UID from a setuid executable accumulated system CPU time .It Cm tdaddr thread address +.It Cm tdname +thread name .It Cm tdev control terminal device number .It Cm time Modified: projects/runtime-coverage/bin/ps/ps.c ============================================================================== --- projects/runtime-coverage/bin/ps/ps.c Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/bin/ps/ps.c Tue Oct 10 06:26:12 2017 (r324483) @@ -523,7 +523,11 @@ main(int argc, char *argv[]) */ nentries = -1; kp = kvm_getprocs(kd, what, flag, &nentries); - if ((kp == NULL && nentries > 0) || (kp != NULL && nentries < 0)) + /* + * Ignore ESRCH to preserve behaviour of "ps -p nonexistent-pid" + * not reporting an error. + */ + if ((kp == NULL && errno != ESRCH) || (kp != NULL && nentries < 0)) xo_errx(1, "%s", kvm_geterr(kd)); nkept = 0; if (nentries > 0) { Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.8 ============================================================================== --- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.8 Tue Oct 10 06:26:12 2017 (r324483) @@ -1,6 +1,3 @@ -'\" te -.\" Copyright (c) 2012, Martin Matuska . -.\" All Rights Reserved. .\" .\" This file and its contents are supplied under the terms of the .\" Common Development and Distribution License ("CDDL"), version 1.0. @@ -13,71 +10,75 @@ .\" .\" .\" Copyright 2012, Richard Lowe. -.\" Copyright (c) 2012, Marcelo Araujo . -.\" Copyright (c) 2012, 2014 by Delphix. All rights reserved. -.\" All Rights Reserved. +.\" Copyright (c) 2012, 2017 by Delphix. All rights reserved. +.\" Copyright 2017 Nexenta Systems, Inc. .\" -.\" $FreeBSD$ -.\" -.Dd July 26, 2014 +.Dd October 06, 2017 .Dt ZDB 8 .Os .Sh NAME .Nm zdb -.Nd Display zpool debugging and consistency information +.Nd display zpool debugging and consistency information .Sh SYNOPSIS .Nm -.Op Fl CumdibcsDvhLMXFPA -.Op Fl e Op Fl p Ar path... +.Op Fl AbcdDFGhiLMPsvX +.Op Fl e Oo Fl V Oc Op Fl p Ar path ... +.Op Fl I Ar inflight I/Os +.Oo Fl o Ar var Ns = Ns Ar value Oc Ns ... .Op Fl t Ar txg .Op Fl U Ar cache -.Op Fl I Ar inflight I/Os .Op Fl x Ar dumpdir -.Ar poolname -.Op Ar object ... +.Op Ar poolname Op Ar object ... .Nm -.Op Fl divPA -.Op Fl e Op Fl p Ar path... +.Op Fl AdiPv +.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl U Ar cache -.Ar dataset -.Op Ar object ... +.Ar dataset Op Ar object ... .Nm -.Fl m Op Fl MLXFPA +.Fl C +.Op Fl A +.Op Fl U Ar cache +.Nm +.Fl E +.Op Fl A +.Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15 +.Nm +.Fl l +.Op Fl Aqu +.Ar device +.Nm +.Fl m +.Op Fl AFLPX +.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl t Ar txg -.Op Fl e Op Fl p Ar path... .Op Fl U Ar cache -.Ar poolname +.Ar poolname Op Ar vdev Op Ar metaslab ... .Nm -.Fl R Op Fl A -.Op Fl e Op Fl p Ar path... +.Fl O +.Ar dataset path +.Nm +.Fl R +.Op Fl A +.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl U Ar cache -.Ar poolname -.Ar poolname -.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags +.Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags .Nm .Fl S .Op Fl AP -.Op Fl e Op Fl p Ar path... +.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl U Ar cache .Ar poolname -.Ar poolname -.Nm -.Fl l -.Op Fl uA -.Ar device -.Nm -.Fl C -.Op Fl A -.Op Fl U Ar cache .Sh DESCRIPTION The .Nm -utility displays information about a ZFS pool useful for debugging and -performs some amount of consistency checking. -It is a not a general purpose tool and options (and facilities) may change. +utility displays information about a ZFS pool useful for debugging and performs +some amount of consistency checking. +It is a not a general purpose tool and options +.Pq and facilities +may change. This is neither a .Xr fsck 8 -nor a +nor an .Xr fsdb 8 utility. .Pp @@ -89,74 +90,97 @@ internals is assumed. If the .Ar dataset argument does not contain any -.Sy / +.Qq Sy / or -.Sy @ +.Qq Sy @ characters, it is interpreted as a pool name. The root dataset can be specified as -.Pa pool Ns Sy / -(pool name followed by a slash). +.Ar pool Ns / +.Pq pool name followed by a slash . .Pp When operating on an imported and active pool it is possible, though unlikely, that zdb may interpret inconsistent pool data and behave erratically. .Sh OPTIONS Display options: -.Bl -tag -width indent +.Bl -tag -width Ds .It Fl b -Display statistics regarding the number, size (logical, physical and -allocated) and deduplication of blocks. +Display statistics regarding the number, size +.Pq logical, physical and allocated +and deduplication of blocks. .It Fl c Verify the checksum of all metadata blocks while printing block statistics -(see -.Fl b Ns ). +.Po see +.Fl b +.Pc . .Pp If specified multiple times, verify the checksums of all blocks. .It Fl C -Display information about the configuration. If specified with no other -options, instead display information about the cache file -.Po Pa /etc/zfs/zpool.cache Pc . +Display information about the configuration. +If specified with no other options, instead display information about the cache +file +.Pq Pa /boot/zfs/zpool.cache . To specify the cache file to display, see -.Fl U +.Fl U . .Pp -If specified multiple times, and a pool name is also specified display both -the cached configuration and the on-disk configuration. +If specified multiple times, and a pool name is also specified display both the +cached configuration and the on-disk configuration. If specified multiple times with .Fl e -also display the configuration that would be used were the pool to be -imported. +also display the configuration that would be used were the pool to be imported. .It Fl d -Display information about datasets. Specified once, displays basic dataset -information: ID, create transaction, size, and object count. +Display information about datasets. +Specified once, displays basic dataset information: ID, create transaction, +size, and object count. .Pp If specified multiple times provides greater and greater verbosity. .Pp -If object IDs are specified, display information about those specific objects only. +If object IDs are specified, display information about those specific objects +only. .It Fl D -Display deduplication statistics, including the deduplication ratio (dedup), -compression ratio (compress), inflation due to the zfs copies property -(copies), and an overall effective ratio (dedup * compress / copies). -.Pp -If specified twice, display a histogram of deduplication statistics, showing -the allocated (physically present on disk) and referenced (logically -referenced in the pool) block counts and sizes by reference count. -.Pp -If specified a third time, display the statistics independently for each deduplication table. -.Pp -If specified a fourth time, dump the contents of the deduplication tables describing duplicate blocks. -.Pp -If specified a fifth time, also dump the contents of the deduplication tables describing unique blocks. +Display deduplication statistics, including the deduplication ratio +.Pq Sy dedup , +compression ratio +.Pq Sy compress , +inflation due to the zfs copies property +.Pq Sy copies , +and an overall effective ratio +.Pq Sy dedup No * Sy compress No / Sy copies . +.It Fl DD +Display a histogram of deduplication statistics, showing the allocated +.Pq physically present on disk +and referenced +.Pq logically referenced in the pool +block counts and sizes by reference count. +.It Fl DDD +Display the statistics independently for each deduplication table. +.It Fl DDDD +Dump the contents of the deduplication tables describing duplicate blocks. +.It Fl DDDDD +Also dump the contents of the deduplication tables describing unique blocks. +.It Fl E Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15 +Decode and display block from an embedded block pointer specified by the +.Ar word +arguments. .It Fl h Display pool history similar to -.Cm zpool history , +.Nm zpool Cm history , but include internal changes, transaction, and dataset information. .It Fl i -Display information about intent log (ZIL) entries relating to each -dataset. -If specified multiple times, display counts of each intent log transaction -type. +Display information about intent log +.Pq ZIL +entries relating to each dataset. +If specified multiple times, display counts of each intent log transaction type. .It Fl l Ar device -Display the vdev labels from the specified device. +Read the vdev labels from the specified device. +.Nm Fl l +will return 0 if valid label was found, 1 if error occurred, and 2 if no valid +labels were found. +.Pp If the +.Fl q +option is also specified, don't print the labels. +.Pp +If the .Fl u option is also specified, also display the uberblocks on this device. .It Fl L @@ -166,36 +190,55 @@ By default, verifies that all non-free blocks are referenced, which can be very expensive. .It Fl m Display the offset, spacemap, and free space of each metaslab. -When specified twice, also display information about the on-disk free -space histogram associated with each metaslab. When specified three time, -display the maximum contiguous free space, the in-core free space histogram, -and the percentage of free space in each space map. When specified -four times display every spacemap record. +.It Fl mm +Also display information about the on-disk free space histogram associated with +each metaslab. +.It Fl mmm +Display the maximum contiguous free space, the in-core free space histogram, and +the percentage of free space in each space map. +.It Fl mmmm +Display every spacemap record. .It Fl M Display the offset, spacemap, and free space of each metaslab. -When specified twice, also display information about the maximum contiguous -free space and the percentage of free space in each space map. -When specified three times display every spacemap record. +.It Fl MM +Also display information about the maximum contiguous free space and the +percentage of free space in each space map. +.It Fl MMM +Display every spacemap record. +.It Fl O Ar dataset path +Look up the specified +.Ar path +inside of the +.Ar dataset +and display its metadata and indirect blocks. +Specified +.Ar path +must be relative to the root of +.Ar dataset . +This option can be combined with +.Fl v +for increasing verbosity. .It Xo -.Fl R Ar poolname -.Ar vdev Ns : Ns Ar offset Ns : Ns Ar size Ns Op Ns : Ns Ar flags +.Fl R Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar size Ns Op : Ns Ar flags .Xc -Read and display a block from the specified device. By default the block is -displayed as a hex dump, but see the description of the -.Fl r +Read and display a block from the specified device. +By default the block is displayed as a hex dump, but see the description of the +.Sy r flag, below. .Pp The block is specified in terms of a colon-separated tuple .Ar vdev -(an integer vdev identifier) +.Pq an integer vdev identifier .Ar offset -(the offset within the vdev) +.Pq the offset within the vdev .Ar size -(the size of the block to read) and, optionally, +.Pq the size of the block to read +and, optionally, .Ar flags -(a set of flags, described below). -.Bl -tag -width indent -.It Sy b offset +.Pq a set of flags, described below . +.Pp +.Bl -tag -compact -width "b offset" +.It Sy b Ar offset Print block pointer .It Sy d Decompress the block @@ -210,19 +253,20 @@ Dump raw uninterpreted block data .El .It Fl s Report statistics on -.Nm Ns 's +.Nm zdb I/O. Display operation counts, bandwidth, and error counts of I/O to the pool from .Nm . .It Fl S Simulate the effects of deduplication, constructing a DDT and then display -that DDT as with \fB-DD\fR. +that DDT as with +.Fl DD . .It Fl u Display the current uberblock. .El .Pp Other options: -.Bl -tag -width indent +.Bl -tag -width Ds .It Fl A Do not abort should any assertion fail. .It Fl AA @@ -230,28 +274,41 @@ Enable panic recovery, certain errors which would othe demoted to warnings. .It Fl AAA Do not abort if asserts fail and also enable panic recovery. -.It Fl e Op Fl p Ar path... +.It Fl e Op Fl p Ar path ... Operate on an exported pool, not present in -.Pa /etc/zfs/zpool.cache . +.Pa /boot/zfs/zpool.cache . The .Fl p flag specifies the path under which devices are to be searched. .It Fl x Ar dumpdir All blocks accessed will be copied to files in the specified directory. The blocks will be placed in sparse files whose name is the same as -that of the file or device read. zdb can be then run on the generated files. +that of the file or device read. +.Nm +can be then run on the generated files. Note that the .Fl bbc -flags are sufficient to access (and thus copy) +flags are sufficient to access +.Pq and thus copy all metadata on the pool. .It Fl F Attempt to make an unreadable pool readable by trying progressively older transactions. +.It Fl G +Dump the contents of the zfs_dbgmsg buffer before exiting +.Nm . +zfs_dbgmsg is a buffer used by ZFS to dump advanced debug information. .It Fl I Ar inflight I/Os Limit the number of outstanding checksum I/Os to the specified value. -The default value is 200. This option affects the performance of the +The default value is 200. +This option affects the performance of the .Fl c option. +.It Fl o Ar var Ns = Ns Ar value ... +Set the given global libzpool variable to the provided value. +The value must be an unsigned 32-bit integer. +Currently only little-endian systems are supported to avoid accidentally setting +the high 32 bits of 64-bit variables. .It Fl P Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather than 1M. @@ -269,9 +326,14 @@ Use a cache file other than .It Fl v Enable verbosity. Specify multiple times for increased verbosity. +.It Fl V +Attempt verbatim import. +This mimics the behavior of the kernel when loading a pool from a cachefile. +Only usable with +.Fl e . .It Fl X Attempt -.Ql extreme +.Qq extreme transaction rewind, that is attempt the same recovery as .Fl F but read transactions otherwise deemed too old. @@ -283,46 +345,58 @@ option, with more occurrences enabling more verbosity. If no options are specified, all information about the named pool will be displayed at default verbosity. .Sh EXAMPLES -.Bl -tag -width 0n -.It Sy Example 1 Display the configuration of imported pool 'rpool' -.Bd -literal -offset 2n -.Li # Ic zdb -C rpool +.Bl -tag -width Ds +.It Xo +.Sy Example 1 +Display the configuration of imported pool +.Pa rpool +.Xc +.Bd -literal +# zdb -C rpool MOS Configuration: version: 28 name: 'rpool' ... .Ed -.It Sy Example 2 Display basic dataset information about 'rpool' -.Bd -literal -offset 2n -.Li # Ic zdb -d rpool +.It Xo +.Sy Example 2 +Display basic dataset information about +.Pa rpool +.Xc +.Bd -literal +# zdb -d rpool Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects ... .Ed -.It Xo Sy Example 3 Display basic information about object 0 in -.Sy 'rpool/export/home' +.It Xo +.Sy Example 3 +Display basic information about object 0 in +.Pa rpool/export/home .Xc -.Bd -literal -offset 2n -.Li # Ic zdb -d rpool/export/home 0 +.Bd -literal +# zdb -d rpool/export/home 0 Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects Object lvl iblk dblk dsize lsize %full type 0 7 16K 16K 15.0K 16K 25.00 DMU dnode .Ed -.It Xo Sy Example 4 Display the predicted effect of enabling deduplication on -.Sy 'rpool' +.It Xo +.Sy Example 4 +Display the predicted effect of enabling deduplication on +.Pa rpool .Xc -.Bd -literal -offset 2n -.Li # Ic zdb -S rpool +.Bd -literal +# zdb -S rpool Simulated DDT histogram: -bucket allocated referenced -______ ______________________________ ______________________________ -refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE ------- ------ ----- ----- ----- ------ ----- ----- ----- - 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G - 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G +bucket allocated referenced +______ ______________________________ ______________________________ +refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE +------ ------ ----- ----- ----- ------ ----- ----- ----- + 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G + 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G ... dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00 .Ed @@ -330,22 +404,3 @@ dedup = 1.11, compress = 1.80, copies = 1.00, dedup * .Sh SEE ALSO .Xr zfs 8 , .Xr zpool 8 -.Sh AUTHORS -This manual page is a -.Xr mdoc 7 -reimplementation of the -.Tn illumos -manual page -.Em zdb(1M) , -modified and customized for -.Fx -and licensed under the -Common Development and Distribution License -.Pq Tn CDDL . -.Pp -The -.Xr mdoc 7 -implementation of this manual page was initially written by -.An Martin Matuska Aq mm@FreeBSD.org -and -.An Marcelo Araujo Aq araujo@FreeBSD.org . Modified: projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Oct 10 06:20:55 2017 (r324482) +++ projects/runtime-coverage/cddl/contrib/opensolaris/cmd/zdb/zdb.c Tue Oct 10 06:26:12 2017 (r324483) @@ -23,6 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2016 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright 2017 Nexenta Systems, Inc. */ #include @@ -60,6 +61,7 @@ #include #include #include +#include #include #undef verify #include @@ -120,18 +122,24 @@ static void usage(void) { (void) fprintf(stderr, - "Usage: %s [-CumMdibcsDvhLXFPAG] [-t txg] [-e [-p path...]] " - "[-U config] [-I inflight I/Os] [-x dumpdir] poolname [object...]\n" - " %s [-divPA] [-e -p path...] [-U config] dataset " - "[object...]\n" - " %s -mM [-LXFPA] [-t txg] [-e [-p path...]] [-U config] " - "poolname [vdev [metaslab...]]\n" - " %s -R [-A] [-e [-p path...]] poolname " - "vdev:offset:size[:flags]\n" - " %s -S [-PA] [-e [-p path...]] [-U config] poolname\n" - " %s -l [-uA] device\n" - " %s -C [-A] [-U config]\n\n", - cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname); + "Usage:\t%s [-AbcdDFGhiLMPsvX] [-e [-V] [-p ...]] " + "[-I ]\n" + "\t\t[-o =]... [-t ] [-U ] [-x ]\n" + "\t\t[ [ ...]]\n" + "\t%s [-AdiPv] [-e [-V] [-p ...]] [-U ] " + "[ ...]\n" + "\t%s -C [-A] [-U ]\n" + "\t%s -l [-Aqu] \n" + "\t%s -m [-AFLPX] [-e [-V] [-p ...]] [-t ] " + "[-U ]\n\t\t [ [ ...]]\n" + "\t%s -O \n" + "\t%s -R [-A] [-e [-V] [-p ...]] [-U ]\n" + "\t\t ::[:]\n" + "\t%s -E [-A] word0:word1:...:word15\n" + "\t%s -S [-AP] [-e [-V] [-p ...]] [-U ] " + "\n\n", + cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, cmdname, + cmdname, cmdname); (void) fprintf(stderr, " Dataset name must include at least one " "separator character '/' or '@'\n"); @@ -140,49 +148,57 @@ usage(void) (void) fprintf(stderr, " If object numbers are specified, only " "those objects are dumped\n\n"); (void) fprintf(stderr, " Options to control amount of output:\n"); - (void) fprintf(stderr, " -u uberblock\n"); - (void) fprintf(stderr, " -d dataset(s)\n"); - (void) fprintf(stderr, " -i intent logs\n"); - (void) fprintf(stderr, " -C config (or cachefile if alone)\n"); - (void) fprintf(stderr, " -h pool history\n"); (void) fprintf(stderr, " -b block statistics\n"); - (void) fprintf(stderr, " -m metaslabs\n"); - (void) fprintf(stderr, " -M metaslab groups\n"); (void) fprintf(stderr, " -c checksum all metadata (twice for " "all data) blocks\n"); - (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); + (void) fprintf(stderr, " -C config (or cachefile if alone)\n"); + (void) fprintf(stderr, " -d dataset(s)\n"); (void) fprintf(stderr, " -D dedup statistics\n"); - (void) fprintf(stderr, " -S simulate dedup to measure effect\n"); - (void) fprintf(stderr, " -v verbose (applies to all others)\n"); - (void) fprintf(stderr, " -l dump label contents\n"); + (void) fprintf(stderr, " -E decode and display block from an " + "embedded block pointer\n"); + (void) fprintf(stderr, " -h pool history\n"); + (void) fprintf(stderr, " -i intent logs\n"); + (void) fprintf(stderr, " -l read label contents\n"); (void) fprintf(stderr, " -L disable leak tracking (do not " "load spacemaps)\n"); + (void) fprintf(stderr, " -m metaslabs\n"); + (void) fprintf(stderr, " -M metaslab groups\n"); + (void) fprintf(stderr, " -O perform object lookups by path\n"); (void) fprintf(stderr, " -R read and display block from a " - "device\n\n"); + "device\n"); + (void) fprintf(stderr, " -s report stats on zdb's I/O\n"); + (void) fprintf(stderr, " -S simulate dedup to measure effect\n"); + (void) fprintf(stderr, " -v verbose (applies to all " + "others)\n\n"); (void) fprintf(stderr, " Below options are intended for use " "with other options:\n"); (void) fprintf(stderr, " -A ignore assertions (-A), enable " "panic recovery (-AA) or both (-AAA)\n"); - (void) fprintf(stderr, " -F attempt automatic rewind within " - "safe range of transaction groups\n"); - (void) fprintf(stderr, " -U -- use alternate " - "cachefile\n"); - (void) fprintf(stderr, " -X attempt extreme rewind (does not " - "work with dataset)\n"); (void) fprintf(stderr, " -e pool is exported/destroyed/" "has altroot/not in a cachefile\n"); + (void) fprintf(stderr, " -F attempt automatic rewind within " + "safe range of transaction groups\n"); + (void) fprintf(stderr, " -G dump zfs_dbgmsg buffer before " + "exiting\n"); + (void) fprintf(stderr, " -I -- " + "specify the maximum number of " + "checksumming I/Os [default is 200]\n"); + (void) fprintf(stderr, " -o = set global " + "variable to an unsigned 32-bit integer value\n"); (void) fprintf(stderr, " -p -- use one or more with " "-e to specify path to vdev dir\n"); - (void) fprintf(stderr, " -x -- " - "dump all read blocks into specified directory\n"); (void) fprintf(stderr, " -P print numbers in parseable form\n"); + (void) fprintf(stderr, " -q don't print label contents\n"); (void) fprintf(stderr, " -t -- highest txg to use when " "searching for uberblocks\n"); - (void) fprintf(stderr, " -I -- " - "specify the maximum number of " - "checksumming I/Os [default is 200]\n"); - (void) fprintf(stderr, " -G dump zfs_dbgmsg buffer before " - "exiting\n"); + (void) fprintf(stderr, " -u uberblock\n"); + (void) fprintf(stderr, " -U -- use alternate " + "cachefile\n"); + (void) fprintf(stderr, " -V do verbatim import\n"); + (void) fprintf(stderr, " -x -- " + "dump all read blocks into specified directory\n"); + (void) fprintf(stderr, " -X attempt extreme rewind (does not " + "work with dataset)\n\n"); (void) fprintf(stderr, "Specify an option more than once (e.g. -bb) " "to make only that option verbose\n"); (void) fprintf(stderr, "Default is to dump everything non-verbosely\n"); @@ -1582,8 +1598,9 @@ dump_deadlist(dsl_deadlist_t *dl) dle = AVL_NEXT(&dl->dl_tree, dle)) { if (dump_opt['d'] >= 5) { char buf[128]; - (void) snprintf(buf, sizeof (buf), "mintxg %llu -> " - "obj %llu", (longlong_t)dle->dle_mintxg, + (void) snprintf(buf, sizeof (buf), + "mintxg %llu -> obj %llu", + (longlong_t)dle->dle_mintxg, (longlong_t)dle->dle_bpobj.bpo_object); dump_full_bpobj(&dle->dle_bpobj, buf, 0); } else { @@ -1597,10 +1614,57 @@ dump_deadlist(dsl_deadlist_t *dl) static avl_tree_t idx_tree; static avl_tree_t domain_tree; static boolean_t fuid_table_loaded; -static boolean_t sa_loaded; -sa_attr_type_t *sa_attr_table; +static objset_t *sa_os = NULL; +static sa_attr_type_t *sa_attr_table = NULL; +static int +open_objset(const char *path, dmu_objset_type_t type, void *tag, objset_t **osp) +{ + int err; + uint64_t sa_attrs = 0; + uint64_t version = 0; + + VERIFY3P(sa_os, ==, NULL); + err = dmu_objset_own(path, type, B_TRUE, tag, osp); + if (err != 0) { + (void) fprintf(stderr, "failed to own dataset '%s': %s\n", path, + strerror(err)); + return (err); + } + + if (dmu_objset_type(*osp) == DMU_OST_ZFS) { + (void) zap_lookup(*osp, MASTER_NODE_OBJ, ZPL_VERSION_STR, + 8, 1, &version); + if (version >= ZPL_VERSION_SA) { + (void) zap_lookup(*osp, MASTER_NODE_OBJ, ZFS_SA_ATTRS, + 8, 1, &sa_attrs); + } + err = sa_setup(*osp, sa_attrs, zfs_attr_table, ZPL_END, + &sa_attr_table); + if (err != 0) { + (void) fprintf(stderr, "sa_setup failed: %s\n", + strerror(err)); + dmu_objset_disown(*osp, tag); + *osp = NULL; + } + } + sa_os = *osp; + + return (0); +} + static void +close_objset(objset_t *os, void *tag) +{ + VERIFY3P(os, ==, sa_os); + if (os->os_sa != NULL) + sa_tear_down(os); + dmu_objset_disown(os, tag); + sa_attr_table = NULL; + sa_os = NULL; +} + +static void fuid_table_destroy() { if (fuid_table_loaded) { @@ -1670,25 +1734,7 @@ dump_znode(objset_t *os, uint64_t object, void *data, int idx = 0; int error; - if (!sa_loaded) { - uint64_t sa_attrs = 0; - uint64_t version; - - VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZPL_VERSION_STR, - 8, 1, &version) == 0); - if (version >= ZPL_VERSION_SA) { - VERIFY(zap_lookup(os, MASTER_NODE_OBJ, ZFS_SA_ATTRS, - 8, 1, &sa_attrs) == 0); - } - if ((error = sa_setup(os, sa_attrs, zfs_attr_table, - ZPL_END, &sa_attr_table)) != 0) { - (void) printf("sa_setup failed errno %d, can't " - "display znode contents\n", error); - return; - } - sa_loaded = B_TRUE; - } - + VERIFY3P(os, ==, sa_os); if (sa_handle_get(os, object, NULL, SA_HDL_PRIVATE, &hdl)) { (void) printf("Failed to get handle for SA znode\n"); return; @@ -2156,44 +2202,154 @@ dump_label_uberblocks(vdev_label_t *lbl, uint64_t ashi } } -static void +static char curpath[PATH_MAX]; + +/* + * Iterate through the path components, recursively passing + * current one's obj and remaining path until we find the obj + * for the last one. + */ +static int +dump_path_impl(objset_t *os, uint64_t obj, char *name) +{ + int err; + int header = 1; + uint64_t child_obj; + char *s; + dmu_buf_t *db; + dmu_object_info_t doi; + + if ((s = strchr(name, '/')) != NULL) + *s = '\0'; + err = zap_lookup(os, obj, name, 8, 1, &child_obj); + + (void) strlcat(curpath, name, sizeof (curpath)); + + if (err != 0) { + (void) fprintf(stderr, "failed to lookup %s: %s\n", + curpath, strerror(err)); + return (err); + } + + child_obj = ZFS_DIRENT_OBJ(child_obj); + err = sa_buf_hold(os, child_obj, FTAG, &db); + if (err != 0) { + (void) fprintf(stderr, + "failed to get SA dbuf for obj %llu: %s\n", + (u_longlong_t)child_obj, strerror(err)); + return (EINVAL); + } + dmu_object_info_from_db(db, &doi); + sa_buf_rele(db, FTAG); + + if (doi.doi_bonus_type != DMU_OT_SA && + doi.doi_bonus_type != DMU_OT_ZNODE) { + (void) fprintf(stderr, "invalid bonus type %d for obj %llu\n", + doi.doi_bonus_type, (u_longlong_t)child_obj); + return (EINVAL); + } + + if (dump_opt['v'] > 6) { + (void) printf("obj=%llu %s type=%d bonustype=%d\n", + (u_longlong_t)child_obj, curpath, doi.doi_type, + doi.doi_bonus_type); + } + + (void) strlcat(curpath, "/", sizeof (curpath)); + + switch (doi.doi_type) { + case DMU_OT_DIRECTORY_CONTENTS: + if (s != NULL && *(s + 1) != '\0') + return (dump_path_impl(os, child_obj, s + 1)); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Tue Oct 10 07:38:01 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0929AE275FE for ; Tue, 10 Oct 2017 07:38:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD3B270968; Tue, 10 Oct 2017 07:38:00 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A7bx6P045563; Tue, 10 Oct 2017 07:37:59 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A7bxi4045562; Tue, 10 Oct 2017 07:37:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100737.v9A7bxi4045562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 07:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324484 - projects/runtime-coverage X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage X-SVN-Commit-Revision: 324484 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 07:38:01 -0000 Author: ngie Date: Tue Oct 10 07:37:59 2017 New Revision: 324484 URL: https://svnweb.freebsd.org/changeset/base/324484 Log: Fix the typo I accidentally added with _coverage_libs.${MK_GCC} Modified: projects/runtime-coverage/Makefile.inc1 Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Tue Oct 10 06:26:12 2017 (r324483) +++ projects/runtime-coverage/Makefile.inc1 Tue Oct 10 07:37:59 2017 (r324484) @@ -2255,7 +2255,7 @@ _prereq_libs+= gnu/lib/libssp/libssp_nonshared # .if ${MK_COVERAGE} != "no" _coverage_libs.${MK_CLANG}+= lib/libclang_rt/profile -_coverage_lib.${MK_GCC}+= gnu/lib/libgcov +_coverage_libs.${MK_GCC}+= gnu/lib/libgcov .endif _prereq_libs+= ${_coverage_libs.yes} From owner-svn-src-projects@freebsd.org Tue Oct 10 07:42:38 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D42E27836 for ; Tue, 10 Oct 2017 07:42:38 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEF8C70CF3; Tue, 10 Oct 2017 07:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A7gbGP049338; Tue, 10 Oct 2017 07:42:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A7gbsW049337; Tue, 10 Oct 2017 07:42:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100742.v9A7gbsW049337@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 07:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324485 - projects/runtime-coverage X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage X-SVN-Commit-Revision: 324485 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 07:42:38 -0000 Author: ngie Date: Tue Oct 10 07:42:36 2017 New Revision: 324485 URL: https://svnweb.freebsd.org/changeset/base/324485 Log: Tweak wording for _coverage_libs.* Modified: projects/runtime-coverage/Makefile.inc1 Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Tue Oct 10 07:37:59 2017 (r324484) +++ projects/runtime-coverage/Makefile.inc1 Tue Oct 10 07:42:36 2017 (r324485) @@ -2251,7 +2251,7 @@ _prereq_libs+= gnu/lib/libssp/libssp_nonshared # # The coverage libraries must be built for the target prior to ${_startup_libs} -# in order for them to have runtime coverage instrumentation. +# for world to have runtime coverage instrumentation. # .if ${MK_COVERAGE} != "no" _coverage_libs.${MK_CLANG}+= lib/libclang_rt/profile From owner-svn-src-projects@freebsd.org Tue Oct 10 08:07:06 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6A7B6E28254 for ; Tue, 10 Oct 2017 08:07:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 391E0717E8; Tue, 10 Oct 2017 08:07:06 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9A875hT057655; Tue, 10 Oct 2017 08:07:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9A875QC057653; Tue, 10 Oct 2017 08:07:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710100807.v9A875QC057653@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 08:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324486 - in projects/runtime-coverage: . share/mk X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/runtime-coverage: . share/mk X-SVN-Commit-Revision: 324486 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 08:07:06 -0000 Author: ngie Date: Tue Oct 10 08:07:05 2017 New Revision: 324486 URL: https://svnweb.freebsd.org/changeset/base/324486 Log: Add appropriate safety belts for riscv so it compiles out of the box when MK_COVERAGE ==yes Modified: projects/runtime-coverage/Makefile projects/runtime-coverage/share/mk/src.opts.mk Modified: projects/runtime-coverage/Makefile ============================================================================== --- projects/runtime-coverage/Makefile Tue Oct 10 07:42:36 2017 (r324485) +++ projects/runtime-coverage/Makefile Tue Oct 10 08:07:05 2017 (r324486) @@ -444,7 +444,7 @@ TARGET_ARCHES_riscv?= riscv64 riscv64sf TARGET_ARCHES_${target}?= ${target} .endfor -MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc +MAKE_PARAMS_riscv?= CROSS_TOOLCHAIN=riscv64-gcc MK_COVERAGE=no # XXX Remove architectures only supported by external toolchain from universe # if required toolchain packages are missing. Modified: projects/runtime-coverage/share/mk/src.opts.mk ============================================================================== --- projects/runtime-coverage/share/mk/src.opts.mk Tue Oct 10 07:42:36 2017 (r324485) +++ projects/runtime-coverage/share/mk/src.opts.mk Tue Oct 10 08:07:05 2017 (r324486) @@ -240,6 +240,7 @@ BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BO .endif .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=PROFILE # "sorry, unimplemented: profiler support for RISC-V" +BROKEN_OPTIONS+=COVERAGE # External toolchain (GNU-based) doesn't have libgcov.a . BROKEN_OPTIONS+=TESTS # "undefined reference to `_Unwind_Resume'" BROKEN_OPTIONS+=CXX # "libcxxrt.so: undefined reference to `_Unwind_Resume_or_Rethrow'" .endif @@ -410,6 +411,7 @@ MK_GCC_BOOTSTRAP:= no .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no +MK_COVERAGE:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no @@ -467,13 +469,15 @@ MK_${var}_SUPPORT:= yes MK_LLDB:= no .endif +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 +# Cross-toolchains unfortunately don't install libgcov.a . +MK_COVERAGE:=no # gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. # while in theory we could build it with that, we don't want to do # that since it creates too much confusion for too little gain. # XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too # to prevent Makefile.inc1 from bootstrapping unneeded dependencies # and to support 'make delete-old' when supplying an external toolchain. -.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 MK_GNUCXX:=no MK_GCC:=no .endif From owner-svn-src-projects@freebsd.org Tue Oct 10 15:47:01 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F6BEE35934 for ; Tue, 10 Oct 2017 15:47:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5823C24E0; Tue, 10 Oct 2017 15:47:01 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9AFl0hT052775; Tue, 10 Oct 2017 15:47:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9AFkwxv052749; Tue, 10 Oct 2017 15:46:58 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710101546.v9AFkwxv052749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Tue, 10 Oct 2017 15:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324498 - in projects/runtime-coverage: . sys/arm64/arm64 sys/arm64/include sys/conf sys/contrib/rdma/krping sys/dev/hyperv/include sys/dev/hyperv/netvsc sys/dev/hyperv/vmbus sys/dev/ml... X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: in projects/runtime-coverage: . sys/arm64/arm64 sys/arm64/include sys/conf sys/contrib/rdma/krping sys/dev/hyperv/include sys/dev/hyperv/netvsc sys/dev/hyperv/vmbus sys/dev/mlx5/mlx5_ib sys/modules sy... X-SVN-Commit-Revision: 324498 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Oct 2017 15:47:01 -0000 Author: ngie Date: Tue Oct 10 15:46:58 2017 New Revision: 324498 URL: https://svnweb.freebsd.org/changeset/base/324498 Log: MFhead@r324497 Added: projects/runtime-coverage/sys/arm64/arm64/efirt_machdep.c - copied unchanged from r324497, head/sys/arm64/arm64/efirt_machdep.c projects/runtime-coverage/sys/arm64/include/fpu.h - copied unchanged from r324497, head/sys/arm64/include/fpu.h Modified: projects/runtime-coverage/Makefile.inc1 projects/runtime-coverage/sys/arm64/arm64/machdep.c projects/runtime-coverage/sys/arm64/arm64/pmap.c projects/runtime-coverage/sys/arm64/include/efi.h projects/runtime-coverage/sys/arm64/include/pte.h projects/runtime-coverage/sys/conf/files.arm64 projects/runtime-coverage/sys/conf/options.arm64 projects/runtime-coverage/sys/contrib/rdma/krping/krping.c projects/runtime-coverage/sys/dev/hyperv/include/hyperv.h projects/runtime-coverage/sys/dev/hyperv/netvsc/hn_nvs.c projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hn.c projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hnvar.h projects/runtime-coverage/sys/dev/hyperv/vmbus/hyperv.c projects/runtime-coverage/sys/dev/hyperv/vmbus/vmbus.c projects/runtime-coverage/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c projects/runtime-coverage/sys/modules/Makefile projects/runtime-coverage/sys/ofed/include/rdma/ib_addr.h projects/runtime-coverage/usr.bin/su/su.c Directory Properties: projects/runtime-coverage/ (props changed) Modified: projects/runtime-coverage/Makefile.inc1 ============================================================================== --- projects/runtime-coverage/Makefile.inc1 Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/Makefile.inc1 Tue Oct 10 15:46:58 2017 (r324498) @@ -2601,7 +2601,7 @@ check-old-files: .PHONY done; \ done # Check for catpages without corresponding manpages. - @find ${DESTDIR}/usr/share/man/cat* ! -type d | \ + @find ${DESTDIR}/usr/share/man/cat* ! -type d 2>/dev/null | \ sed -ep -e's:${DESTDIR}/usr/share/man/cat:${DESTDIR}/usr/share/man/man:' | \ while read catpage; do \ read manpage; \ Copied: projects/runtime-coverage/sys/arm64/arm64/efirt_machdep.c (from r324497, head/sys/arm64/arm64/efirt_machdep.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/runtime-coverage/sys/arm64/arm64/efirt_machdep.c Tue Oct 10 15:46:58 2017 (r324498, copy of r324497, head/sys/arm64/arm64/efirt_machdep.c) @@ -0,0 +1,252 @@ +/*- + * Copyright (c) 2004 Marcel Moolenaar + * Copyright (c) 2001 Doug Rabson + * Copyright (c) 2016 The FreeBSD Foundation + * Copyright (c) 2017 Andrew Turner + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +static vm_object_t obj_1t1_pt; +static vm_page_t efi_l0_page; +static pd_entry_t *efi_l0; + +void +efi_destroy_1t1_map(void) +{ + vm_page_t m; + + if (obj_1t1_pt != NULL) { + VM_OBJECT_RLOCK(obj_1t1_pt); + TAILQ_FOREACH(m, &obj_1t1_pt->memq, listq) + m->wire_count = 0; + atomic_subtract_int(&vm_cnt.v_wire_count, + obj_1t1_pt->resident_page_count); + VM_OBJECT_RUNLOCK(obj_1t1_pt); + vm_object_deallocate(obj_1t1_pt); + } + + obj_1t1_pt = NULL; + efi_l0 = NULL; + efi_l0_page = NULL; +} + +static vm_page_t +efi_1t1_page(vm_pindex_t idx) +{ + + return (vm_page_grab(obj_1t1_pt, idx, VM_ALLOC_NOBUSY | + VM_ALLOC_WIRED | VM_ALLOC_ZERO)); +} + +static pt_entry_t * +efi_1t1_l3(vm_offset_t va) +{ + pd_entry_t *l0, *l1, *l2; + pt_entry_t *l3; + vm_pindex_t l0_idx, l1_idx, l2_idx; + vm_page_t m; + vm_paddr_t mphys; + + l0_idx = pmap_l0_index(va); + l0 = &efi_l0[l0_idx]; + if (*l0 == 0) { + m = efi_1t1_page(1 + l0_idx); + mphys = VM_PAGE_TO_PHYS(m); + *l0 = mphys | L0_TABLE; + } else { + mphys = *l0 & ~ATTR_MASK; + } + + l1 = (pd_entry_t *)PHYS_TO_DMAP(mphys); + l1_idx = pmap_l1_index(va); + l1 += l1_idx; + if (*l1 == 0) { + m = efi_1t1_page(1 + L0_ENTRIES + (l0_idx + 1) * (l1_idx + 1)); + mphys = VM_PAGE_TO_PHYS(m); + *l1 = mphys | L1_TABLE; + } else { + mphys = *l1 & ~ATTR_MASK; + } + + l2 = (pd_entry_t *)PHYS_TO_DMAP(mphys); + l2_idx = pmap_l2_index(va); + l2 += l2_idx; + if (*l2 == 0) { + m = efi_1t1_page(1 + L0_ENTRIES + L0_ENTRIES * Ln_ENTRIES + + (l0_idx + 1) * (l1_idx + 1) * (l2_idx + 1)); + mphys = VM_PAGE_TO_PHYS(m); + *l2 = mphys | L2_TABLE; + } else { + mphys = *l2 & ~ATTR_MASK; + } + + l3 = (pt_entry_t *)PHYS_TO_DMAP(mphys); + l3 += pmap_l3_index(va); + KASSERT(*l3 == 0, ("%s: Already mapped: va %#jx *pt %#jx", __func__, + va, *l3)); + + return (l3); +} + +/* + * Create the 1:1 virtual to physical map for EFI + */ +bool +efi_create_1t1_map(struct efi_md *map, int ndesc, int descsz) +{ + struct efi_md *p; + pt_entry_t *l3; + vm_offset_t va; + uint64_t idx; + int i, mode; + + obj_1t1_pt = vm_pager_allocate(OBJT_PHYS, NULL, L0_ENTRIES + + L0_ENTRIES * Ln_ENTRIES + L0_ENTRIES * Ln_ENTRIES * Ln_ENTRIES + + L0_ENTRIES * Ln_ENTRIES * Ln_ENTRIES * Ln_ENTRIES, + VM_PROT_ALL, 0, NULL); + VM_OBJECT_WLOCK(obj_1t1_pt); + efi_l0_page = efi_1t1_page(0); + VM_OBJECT_WUNLOCK(obj_1t1_pt); + efi_l0 = (pd_entry_t *)PHYS_TO_DMAP(VM_PAGE_TO_PHYS(efi_l0_page)); + bzero(efi_l0, L0_ENTRIES * sizeof(*efi_l0)); + + for (i = 0, p = map; i < ndesc; i++, p = efi_next_descriptor(p, + descsz)) { + if ((p->md_attr & EFI_MD_ATTR_RT) == 0) + continue; + if (p->md_virt != NULL) { + if (bootverbose) + printf("EFI Runtime entry %d is mapped\n", i); + goto fail; + } + if ((p->md_phys & EFI_PAGE_MASK) != 0) { + if (bootverbose) + printf("EFI Runtime entry %d is not aligned\n", + i); + goto fail; + } + if (p->md_phys + p->md_pages * EFI_PAGE_SIZE < p->md_phys || + p->md_phys + p->md_pages * EFI_PAGE_SIZE >= + VM_MAXUSER_ADDRESS) { + printf("EFI Runtime entry %d is not in mappable for RT:" + "base %#016jx %#jx pages\n", + i, (uintmax_t)p->md_phys, + (uintmax_t)p->md_pages); + goto fail; + } + if ((p->md_attr & EFI_MD_ATTR_WB) != 0) + mode = VM_MEMATTR_WRITE_BACK; + else if ((p->md_attr & EFI_MD_ATTR_WT) != 0) + mode = VM_MEMATTR_WRITE_THROUGH; + else if ((p->md_attr & EFI_MD_ATTR_WC) != 0) + mode = VM_MEMATTR_WRITE_COMBINING; + else if ((p->md_attr & EFI_MD_ATTR_UC) != 0) + mode = VM_MEMATTR_UNCACHEABLE; + else { + if (bootverbose) + printf("EFI Runtime entry %d mapping " + "attributes unsupported\n", i); + mode = VM_MEMATTR_UNCACHEABLE; + } + + printf("MAP %lx mode %x pages %lu\n", p->md_phys, mode, p->md_pages); + VM_OBJECT_WLOCK(obj_1t1_pt); + for (va = p->md_phys, idx = 0; idx < p->md_pages; idx++, + va += PAGE_SIZE) { + l3 = efi_1t1_l3(va); + *l3 = va | ATTR_DEFAULT | ATTR_IDX(mode) | + ATTR_AP(ATTR_AP_RW) | L3_PAGE; + } + VM_OBJECT_WUNLOCK(obj_1t1_pt); + } + + return (true); +fail: + efi_destroy_1t1_map(); + return (false); +} + +int +efi_arch_enter(void) +{ + + __asm __volatile( + "msr ttbr0_el1, %0 \n" + "dsb ishst \n" + "tlbi vmalle1is \n" + "dsb ish \n" + "isb \n" + : : "r"(VM_PAGE_TO_PHYS(efi_l0_page))); + + return (0); +} + +void +efi_arch_leave(void) +{ + struct thread *td; + + td = curthread; + __asm __volatile( + "msr ttbr0_el1, %0 \n" + "dsb ishst \n" + "tlbi vmalle1is \n" + "dsb ish \n" + "isb \n" + : : "r"(td->td_proc->p_md.md_l0addr)); +} Modified: projects/runtime-coverage/sys/arm64/arm64/machdep.c ============================================================================== --- projects/runtime-coverage/sys/arm64/arm64/machdep.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/arm64/arm64/machdep.c Tue Oct 10 15:46:58 2017 (r324498) @@ -121,6 +121,12 @@ int64_t idcache_line_size; /* The minimum cache line s int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */ int has_pan; +/* + * Physical address of the EFI System Table. Stashed from the metadata hints + * passed into the kernel and used by the EFI code to call runtime services. + */ +vm_paddr_t efi_systbl_phys; + /* pagezero_* implementations are provided in support.S */ void pagezero_simple(void *); void pagezero_cache(void *); @@ -985,6 +991,8 @@ initarm(struct arm64_bootparams *abp) #ifdef FDT try_load_dtb(kmdp); #endif + + efi_systbl_phys = MD_FETCH(kmdp, MODINFOMD_FW_HANDLE, vm_paddr_t); /* Find the address to start allocating from */ lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t); Modified: projects/runtime-coverage/sys/arm64/arm64/pmap.c ============================================================================== --- projects/runtime-coverage/sys/arm64/arm64/pmap.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/arm64/arm64/pmap.c Tue Oct 10 15:46:58 2017 (r324498) @@ -306,11 +306,6 @@ pagecopy(void *s, void *d) memcpy(d, s, PAGE_SIZE); } -#define pmap_l0_index(va) (((va) >> L0_SHIFT) & L0_ADDR_MASK) -#define pmap_l1_index(va) (((va) >> L1_SHIFT) & Ln_ADDR_MASK) -#define pmap_l2_index(va) (((va) >> L2_SHIFT) & Ln_ADDR_MASK) -#define pmap_l3_index(va) (((va) >> L3_SHIFT) & Ln_ADDR_MASK) - static __inline pd_entry_t * pmap_l0(pmap_t pmap, vm_offset_t va) { Modified: projects/runtime-coverage/sys/arm64/include/efi.h ============================================================================== --- projects/runtime-coverage/sys/arm64/include/efi.h Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/arm64/include/efi.h Tue Oct 10 15:46:58 2017 (r324498) @@ -1,6 +1,32 @@ /*- - * This file is in the public domain since it's just boilerplate. + * Copyright (c) 2017 Andrew Turner + * All rights reserved. * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * * $FreeBSD$ */ @@ -8,5 +34,11 @@ #define __ARM64_INCLUDE_EFI_H_ #define EFIABI_ATTR + +#ifdef _KERNEL +#define EFI_TIME_LOCK() +#define EFI_TIME_UNLOCK() +#define EFI_TIME_OWNED() +#endif #endif /* __ARM64_INCLUDE_EFI_H_ */ Copied: projects/runtime-coverage/sys/arm64/include/fpu.h (from r324497, head/sys/arm64/include/fpu.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/runtime-coverage/sys/arm64/include/fpu.h Tue Oct 10 15:46:58 2017 (r324498, copy of r324497, head/sys/arm64/include/fpu.h) @@ -0,0 +1,6 @@ +/*- + * This file is in the public domain. + * + * $FreeBSD$ + */ +#include Modified: projects/runtime-coverage/sys/arm64/include/pte.h ============================================================================== --- projects/runtime-coverage/sys/arm64/include/pte.h Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/arm64/include/pte.h Tue Oct 10 15:46:58 2017 (r324498) @@ -118,6 +118,11 @@ typedef uint64_t pt_entry_t; /* page table entry */ #define Ln_ADDR_MASK (Ln_ENTRIES - 1) #define Ln_TABLE_MASK ((1 << 12) - 1) +#define pmap_l0_index(va) (((va) >> L0_SHIFT) & L0_ADDR_MASK) +#define pmap_l1_index(va) (((va) >> L1_SHIFT) & Ln_ADDR_MASK) +#define pmap_l2_index(va) (((va) >> L2_SHIFT) & Ln_ADDR_MASK) +#define pmap_l3_index(va) (((va) >> L3_SHIFT) & Ln_ADDR_MASK) + #endif /* !_MACHINE_PTE_H_ */ /* End of pte.h */ Modified: projects/runtime-coverage/sys/conf/files.arm64 ============================================================================== --- projects/runtime-coverage/sys/conf/files.arm64 Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/conf/files.arm64 Tue Oct 10 15:46:58 2017 (r324498) @@ -95,6 +95,7 @@ arm64/arm64/db_trace.c optional ddb arm64/arm64/debug_monitor.c optional ddb arm64/arm64/disassem.c optional ddb arm64/arm64/dump_machdep.c standard +arm64/arm64/efirt_machdep.c optional efirt arm64/arm64/elf_machdep.c standard arm64/arm64/exception.S standard arm64/arm64/gicv3_its.c optional intrng fdt Modified: projects/runtime-coverage/sys/conf/options.arm64 ============================================================================== --- projects/runtime-coverage/sys/conf/options.arm64 Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/conf/options.arm64 Tue Oct 10 15:46:58 2017 (r324498) @@ -7,6 +7,10 @@ SOCDEV_VA opt_global.h THUNDERX_PASS_1_1_ERRATA opt_global.h VFP opt_global.h +# EFI Runtime services support +EFIRT opt_efirt.h + +# Devices DEV_PSCI opt_platform.h # SoC Support Modified: projects/runtime-coverage/sys/contrib/rdma/krping/krping.c ============================================================================== --- projects/runtime-coverage/sys/contrib/rdma/krping/krping.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/contrib/rdma/krping/krping.c Tue Oct 10 15:46:58 2017 (r324498) @@ -86,6 +86,7 @@ static const struct krping_option krping_opts[] = { {"count", OPT_INT, 'C'}, {"size", OPT_INT, 'S'}, {"addr", OPT_STRING, 'a'}, + {"addr6", OPT_STRING, 'A'}, {"port", OPT_INT, 'p'}, {"verbose", OPT_NOPARAM, 'v'}, {"validate", OPT_NOPARAM, 'V'}, @@ -220,7 +221,11 @@ struct krping_cb { struct krping_stats stats; uint16_t port; /* dst port in NBO */ - struct in_addr addr; /* dst addr in NBO */ + union { + struct in_addr v4; + struct in6_addr v6; + } addr; /* dst addr in NBO */ + int addr_type; /* AF_INET or AF_INET6 */ char *addr_str; /* dst addr string */ int verbose; /* verbose logging */ int count; /* ping count */ @@ -1600,15 +1605,31 @@ static int fastreg_supported(struct krping_cb *cb, int static int krping_bind_server(struct krping_cb *cb) { - struct sockaddr_in sin; + union { + struct sockaddr_in v4; + struct sockaddr_in6 v6; + } sin; int ret; memset(&sin, 0, sizeof(sin)); - sin.sin_len = sizeof sin; - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = cb->addr.s_addr; - sin.sin_port = cb->port; + switch (cb->addr_type) { + case AF_INET: + sin.v4.sin_len = sizeof sin.v4; + sin.v4.sin_family = AF_INET; + sin.v4.sin_addr = cb->addr.v4; + sin.v4.sin_port = cb->port; + break; + case AF_INET6: + sin.v6.sin6_len = sizeof sin.v6; + sin.v6.sin6_family = AF_INET6; + sin.v6.sin6_addr = cb->addr.v6; + sin.v6.sin6_port = cb->port; + break; + default: + return (-EINVAL); + } + ret = rdma_bind_addr(cb->cm_id, (struct sockaddr *) &sin); if (ret) { PRINTF(cb, "rdma_bind_addr error %d\n", ret); @@ -3059,15 +3080,31 @@ static int krping_connect_client(struct krping_cb *cb) static int krping_bind_client(struct krping_cb *cb) { - struct sockaddr_in sin; + union { + struct sockaddr_in v4; + struct sockaddr_in6 v6; + } sin; int ret; memset(&sin, 0, sizeof(sin)); - sin.sin_len = sizeof sin; - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = cb->addr.s_addr; - sin.sin_port = cb->port; + switch (cb->addr_type) { + case AF_INET: + sin.v4.sin_len = sizeof sin.v4; + sin.v4.sin_family = AF_INET; + sin.v4.sin_addr = cb->addr.v4; + sin.v4.sin_port = cb->port; + break; + case AF_INET6: + sin.v6.sin6_len = sizeof sin.v6; + sin.v6.sin6_family = AF_INET6; + sin.v6.sin6_addr = cb->addr.v6; + sin.v6.sin6_port = cb->port; + break; + default: + return (-EINVAL); + } + ret = rdma_resolve_addr(cb->cm_id, NULL, (struct sockaddr *) &sin, 2000); if (ret) { @@ -3140,12 +3177,29 @@ err1: krping_free_qp(cb); } +static uint16_t +krping_get_ipv6_scope_id(char *name) +{ + struct ifnet *ifp; + uint16_t retval; + + if (name == NULL) + return (0); + ifp = ifunit_ref(name); + if (ifp == NULL) + return (0); + retval = ifp->if_index; + if_rele(ifp); + return (retval); +} + int krping_doit(char *cmd, void *cookie) { struct krping_cb *cb; int op; int ret = 0; char *optarg; + char *scope; unsigned long optint; cb = kzalloc(sizeof(*cb), GFP_KERNEL); @@ -3162,6 +3216,7 @@ int krping_doit(char *cmd, void *cookie) cb->size = 64; cb->txdepth = RPING_SQ_DEPTH; cb->mem = DMA; + cb->addr_type = AF_INET; init_waitqueue_head(&cb->sem); while ((op = krping_getopt("krping", &cmd, krping_opts, NULL, &optarg, @@ -3169,11 +3224,33 @@ int krping_doit(char *cmd, void *cookie) switch (op) { case 'a': cb->addr_str = optarg; - DEBUG_LOG(cb, "ipaddr (%s)\n", optarg); - if (!inet_aton(optarg, &cb->addr)) { + cb->addr_type = AF_INET; + DEBUG_LOG(cb, "ipv4addr (%s)\n", optarg); + if (inet_pton(AF_INET, optarg, &cb->addr) != 1) { PRINTF(cb, "bad addr string %s\n", optarg); ret = EINVAL; + } + break; + case 'A': + cb->addr_str = optarg; + cb->addr_type = AF_INET6; + DEBUG_LOG(cb, "ipv6addr (%s)\n", optarg); + scope = strstr(optarg, "%"); + /* extract scope ID, if any */ + if (scope != NULL) + *scope++ = 0; + /* extract IPv6 network address */ + if (inet_pton(AF_INET6, optarg, &cb->addr) != 1) { + PRINTF(cb, "bad addr string %s\n", + optarg); + ret = EINVAL; + } else if (IN6_IS_SCOPE_LINKLOCAL(&cb->addr.v6) || + IN6_IS_ADDR_MC_INTFACELOCAL(&cb->addr.v6)) { + uint16_t scope_id = krping_get_ipv6_scope_id(scope); + DEBUG_LOG(cb, "ipv6 scope ID = %d\n", scope_id); + cb->addr.v6.s6_addr[2] = scope_id >> 8; + cb->addr.v6.s6_addr[3] = scope_id & 0xFF; } break; case 'p': Modified: projects/runtime-coverage/sys/dev/hyperv/include/hyperv.h ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/include/hyperv.h Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/include/hyperv.h Tue Oct 10 15:46:58 2017 (r324498) @@ -90,6 +90,7 @@ int hyperv_guid2str(const struct hyperv_guid *, char */ extern hyperv_tc64_t hyperv_tc64; extern u_int hyperv_features; /* CPUID_HV_MSR_ */ +extern u_int hyperv_ver_major; #endif /* _KERNEL */ Modified: projects/runtime-coverage/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/netvsc/hn_nvs.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/netvsc/hn_nvs.c Tue Oct 10 15:46:58 2017 (r324498) @@ -601,6 +601,11 @@ hn_nvs_attach(struct hn_softc *sc, int mtu) { int error; + if (hyperv_ver_major >= 10) { + /* UDP 4-tuple hash is enforced. */ + sc->hn_caps |= HN_CAP_UDPHASH; + } + /* * Initialize NVS. */ Modified: projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hn.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hn.c Tue Oct 10 15:46:58 2017 (r324498) @@ -385,6 +385,7 @@ static void hn_link_status(struct hn_softc *); static int hn_create_rx_data(struct hn_softc *, int); static void hn_destroy_rx_data(struct hn_softc *); static int hn_check_iplen(const struct mbuf *, int); +static void hn_rxpkt_proto(const struct mbuf *, int *, int *); static int hn_set_rxfilter(struct hn_softc *, uint32_t); static int hn_rxfilter_config(struct hn_softc *); static int hn_rss_reconfig(struct hn_softc *); @@ -399,6 +400,7 @@ static int hn_tx_ring_create(struct hn_softc *, int) static void hn_tx_ring_destroy(struct hn_tx_ring *); static int hn_create_tx_data(struct hn_softc *, int); static void hn_fixup_tx_data(struct hn_softc *); +static void hn_fixup_rx_data(struct hn_softc *); static void hn_destroy_tx_data(struct hn_softc *); static void hn_txdesc_dmamap_destroy(struct hn_txdesc *); static void hn_txdesc_gc(struct hn_tx_ring *, @@ -2238,9 +2240,10 @@ hn_attach(device_t dev) #endif /* - * Fixup TX stuffs after synthetic parts are attached. + * Fixup TX/RX stuffs after synthetic parts are attached. */ hn_fixup_tx_data(sc); + hn_fixup_rx_data(sc); ctx = device_get_sysctl_ctx(dev); child = SYSCTL_CHILDREN(device_get_sysctl_tree(dev)); @@ -3378,6 +3381,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int struct mbuf *m_new; int size, do_lro = 0, do_csum = 1, is_vf = 0; int hash_type = M_HASHTYPE_NONE; + int l3proto = ETHERTYPE_MAX, l4proto = IPPROTO_DONE; ifp = hn_ifp; if (rxr->hn_rxvf_ifp != NULL) { @@ -3477,31 +3481,9 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int (NDIS_RXCSUM_INFO_TCPCS_OK | NDIS_RXCSUM_INFO_IPCS_OK)) do_lro = 1; } else { - const struct ether_header *eh; - uint16_t etype; - int hoff; - - hoff = sizeof(*eh); - /* Checked at the beginning of this function. */ - KASSERT(m_new->m_len >= hoff, ("not ethernet frame")); - - eh = mtod(m_new, struct ether_header *); - etype = ntohs(eh->ether_type); - if (etype == ETHERTYPE_VLAN) { - const struct ether_vlan_header *evl; - - hoff = sizeof(*evl); - if (m_new->m_len < hoff) - goto skip; - evl = mtod(m_new, struct ether_vlan_header *); - etype = ntohs(evl->evl_proto); - } - - if (etype == ETHERTYPE_IP) { - int pr; - - pr = hn_check_iplen(m_new, hoff); - if (pr == IPPROTO_TCP) { + hn_rxpkt_proto(m_new, &l3proto, &l4proto); + if (l3proto == ETHERTYPE_IP) { + if (l4proto == IPPROTO_TCP) { if (do_csum && (rxr->hn_trust_hcsum & HN_TRUST_HCSUM_TCP)) { @@ -3512,7 +3494,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int m_new->m_pkthdr.csum_data = 0xffff; } do_lro = 1; - } else if (pr == IPPROTO_UDP) { + } else if (l4proto == IPPROTO_UDP) { if (do_csum && (rxr->hn_trust_hcsum & HN_TRUST_HCSUM_UDP)) { @@ -3522,7 +3504,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int CSUM_DATA_VALID | CSUM_PSEUDO_HDR); m_new->m_pkthdr.csum_data = 0xffff; } - } else if (pr != IPPROTO_DONE && do_csum && + } else if (l4proto != IPPROTO_DONE && do_csum && (rxr->hn_trust_hcsum & HN_TRUST_HCSUM_IP)) { rxr->hn_csum_trusted++; m_new->m_pkthdr.csum_flags |= @@ -3530,7 +3512,7 @@ hn_rxpkt(struct hn_rx_ring *rxr, const void *data, int } } } -skip: + if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { m_new->m_pkthdr.ether_vtag = EVL_MAKETAG( NDIS_VLAN_INFO_ID(info->vlan_info), @@ -3585,6 +3567,35 @@ skip: case NDIS_HASH_TCP_IPV4: hash_type = M_HASHTYPE_RSS_TCP_IPV4; + if (rxr->hn_rx_flags & HN_RX_FLAG_UDP_HASH) { + int def_htype = M_HASHTYPE_OPAQUE_HASH; + + if (is_vf) + def_htype = M_HASHTYPE_NONE; + + /* + * UDP 4-tuple hash is delivered as + * TCP 4-tuple hash. + */ + if (l3proto == ETHERTYPE_MAX) { + hn_rxpkt_proto(m_new, + &l3proto, &l4proto); + } + if (l3proto == ETHERTYPE_IP) { + if (l4proto == IPPROTO_UDP) { + hash_type = + M_HASHTYPE_RSS_UDP_IPV4; + do_lro = 0; + } else if (l4proto != + IPPROTO_TCP) { + hash_type = def_htype; + do_lro = 0; + } + } else { + hash_type = def_htype; + do_lro = 0; + } + } break; case NDIS_HASH_IPV6: @@ -4835,6 +4846,36 @@ hn_check_iplen(const struct mbuf *m, int hoff) return ip->ip_p; } +static void +hn_rxpkt_proto(const struct mbuf *m_new, int *l3proto, int *l4proto) +{ + const struct ether_header *eh; + uint16_t etype; + int hoff; + + hoff = sizeof(*eh); + /* Checked at the beginning of this function. */ + KASSERT(m_new->m_len >= hoff, ("not ethernet frame")); + + eh = mtod(m_new, const struct ether_header *); + etype = ntohs(eh->ether_type); + if (etype == ETHERTYPE_VLAN) { + const struct ether_vlan_header *evl; + + hoff = sizeof(*evl); + if (m_new->m_len < hoff) + return; + evl = mtod(m_new, const struct ether_vlan_header *); + etype = ntohs(evl->evl_proto); + } + *l3proto = etype; + + if (etype == ETHERTYPE_IP) + *l4proto = hn_check_iplen(m_new, hoff); + else + *l4proto = IPPROTO_DONE; +} + static int hn_create_rx_data(struct hn_softc *sc, int ring_cnt) { @@ -5543,6 +5584,18 @@ hn_fixup_tx_data(struct hn_softc *sc) if_printf(sc->hn_ifp, "support HASHVAL pktinfo\n"); for (i = 0; i < sc->hn_tx_ring_cnt; ++i) sc->hn_tx_ring[i].hn_tx_flags |= HN_TX_FLAG_HASHVAL; + } +} + +static void +hn_fixup_rx_data(struct hn_softc *sc) +{ + + if (sc->hn_caps & HN_CAP_UDPHASH) { + int i; + + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) + sc->hn_rx_ring[i].hn_rx_flags |= HN_RX_FLAG_UDP_HASH; } } Modified: projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hnvar.h Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/netvsc/if_hnvar.h Tue Oct 10 15:46:58 2017 (r324498) @@ -97,6 +97,7 @@ struct hn_rx_ring { #define HN_RX_FLAG_ATTACHED 0x0001 #define HN_RX_FLAG_BR_REF 0x0002 #define HN_RX_FLAG_XPNT_VF 0x0004 +#define HN_RX_FLAG_UDP_HASH 0x0008 struct hn_tx_ring { #ifndef HN_USE_TXDESC_BUFRING @@ -304,11 +305,12 @@ do { \ #define HN_CAP_TSO4 0x0080 #define HN_CAP_TSO6 0x0100 #define HN_CAP_HASHVAL 0x0200 +#define HN_CAP_UDPHASH 0x0400 /* Capability description for use with printf(9) %b identifier. */ #define HN_CAP_BITS \ "\020\1VLAN\2MTU\3IPCS\4TCP4CS\5TCP6CS" \ - "\6UDP4CS\7UDP6CS\10TSO4\11TSO6\12HASHVAL" + "\6UDP4CS\7UDP6CS\10TSO4\11TSO6\12HASHVAL\13UDPHASH" #define HN_LINK_FLAG_LINKUP 0x0001 #define HN_LINK_FLAG_NETCHG 0x0002 Modified: projects/runtime-coverage/sys/dev/hyperv/vmbus/hyperv.c ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/vmbus/hyperv.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/vmbus/hyperv.c Tue Oct 10 15:46:58 2017 (r324498) @@ -77,6 +77,8 @@ static u_int hyperv_get_timecount(struct timecounter static bool hyperv_identify(void); static void hypercall_memfree(void); +u_int hyperv_ver_major; + u_int hyperv_features; u_int hyperv_recommends; @@ -169,8 +171,9 @@ hyperv_identify(void) hyperv_features3 = regs[3]; do_cpuid(CPUID_LEAF_HV_IDENTITY, regs); + hyperv_ver_major = regs[1] >> 16; printf("Hyper-V Version: %d.%d.%d [SP%d]\n", - regs[1] >> 16, regs[1] & 0xffff, regs[0], regs[2]); + hyperv_ver_major, regs[1] & 0xffff, regs[0], regs[2]); printf(" Features=0x%b\n", hyperv_features, "\020" Modified: projects/runtime-coverage/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- projects/runtime-coverage/sys/dev/hyperv/vmbus/vmbus.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/hyperv/vmbus/vmbus.c Tue Oct 10 15:46:58 2017 (r324498) @@ -128,6 +128,13 @@ static void vmbus_event_proc_dummy(struct vmbus_soft static struct vmbus_softc *vmbus_sc; +SYSCTL_NODE(_hw, OID_AUTO, vmbus, CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, + "Hyper-V vmbus"); + +static int vmbus_pin_evttask = 1; +SYSCTL_INT(_hw_vmbus, OID_AUTO, pin_evttask, CTLFLAG_RDTUN, + &vmbus_pin_evttask, 0, "Pin event tasks to their respective CPU"); + extern inthand_t IDTVEC(vmbus_isr); static const uint32_t vmbus_version[] = { @@ -905,10 +912,16 @@ vmbus_intr_setup(struct vmbus_softc *sc) VMBUS_PCPU_GET(sc, event_tq, cpu) = taskqueue_create_fast( "hyperv event", M_WAITOK, taskqueue_thread_enqueue, VMBUS_PCPU_PTR(sc, event_tq, cpu)); - CPU_SETOF(cpu, &cpu_mask); - taskqueue_start_threads_cpuset( - VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, &cpu_mask, - "hvevent%d", cpu); + if (vmbus_pin_evttask) { + CPU_SETOF(cpu, &cpu_mask); + taskqueue_start_threads_cpuset( + VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, + &cpu_mask, "hvevent%d", cpu); + } else { + taskqueue_start_threads( + VMBUS_PCPU_PTR(sc, event_tq, cpu), 1, PI_NET, + "hvevent%d", cpu); + } /* * Setup tasks and taskqueues to handle messages. Modified: projects/runtime-coverage/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c ============================================================================== --- projects/runtime-coverage/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c Tue Oct 10 15:46:58 2017 (r324498) @@ -562,26 +562,6 @@ mlx5_make_default_gid(struct net_device *dev, union ib mlx5_addrconf_ifid_eui48(&gid->raw[8], dev); } -static inline int -mlx5_ip2gid(const struct sockaddr *addr, union ib_gid *gid) -{ - switch (addr->sa_family) { - case AF_INET: - ipv6_addr_set_v4mapped(((const struct sockaddr_in *)addr)->sin_addr.s_addr, - (struct in6_addr *)gid->raw); - break; - case AF_INET6: - memcpy(gid->raw, &((const struct sockaddr_in6 *)addr)->sin6_addr, 16); - /* clear SCOPE ID */ - gid->raw[2] = 0; - gid->raw[3] = 0; - break; - default: - return -EINVAL; - } - return 0; -} - static void mlx5_ib_roce_port_update(void *arg) { @@ -639,7 +619,7 @@ mlx5_ib_roce_port_update(void *arg) gid_index >= MLX5_IB_GID_MAX) continue; memset(&gid_temp, 0, sizeof(gid_temp)); - mlx5_ip2gid(ifa->ifa_addr, &gid_temp); + rdma_ip2gid(ifa->ifa_addr, &gid_temp); /* check for existing entry */ for (j = 0; j != gid_index; j++) { if (bcmp(&gid_temp, &port->gid_table[j], sizeof(gid_temp)) == 0) Modified: projects/runtime-coverage/sys/modules/Makefile ============================================================================== --- projects/runtime-coverage/sys/modules/Makefile Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/modules/Makefile Tue Oct 10 15:46:58 2017 (r324498) @@ -562,6 +562,7 @@ _cxgb= cxgb .if ${MACHINE_CPUARCH} == "aarch64" _armv8crypto= armv8crypto +_efirt= efirt _em= em .endif Modified: projects/runtime-coverage/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- projects/runtime-coverage/sys/ofed/include/rdma/ib_addr.h Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/sys/ofed/include/rdma/ib_addr.h Tue Oct 10 15:46:58 2017 (r324498) @@ -157,6 +157,12 @@ static inline int rdma_ip2gid(struct sockaddr *addr, u case AF_INET6: memcpy(gid->raw, &((struct sockaddr_in6 *)addr)->sin6_addr, 16); + /* make sure scope ID gets zeroed inside GID */ + if (IN6_IS_SCOPE_LINKLOCAL((struct in6_addr *)gid->raw) || + IN6_IS_ADDR_MC_INTFACELOCAL((struct in6_addr *)gid->raw)) { + gid->raw[2] = 0; + gid->raw[3] = 0; + } break; default: return -EINVAL; Modified: projects/runtime-coverage/usr.bin/su/su.c ============================================================================== --- projects/runtime-coverage/usr.bin/su/su.c Tue Oct 10 15:41:35 2017 (r324497) +++ projects/runtime-coverage/usr.bin/su/su.c Tue Oct 10 15:46:58 2017 (r324498) @@ -172,7 +172,7 @@ main(int argc, char *argv[]) au_id_t auid; #endif - shell = class = cleanenv = NULL; + p = shell = class = cleanenv = NULL; asme = asthem = fastlogin = statusp = 0; user = "root"; iscsh = UNSET; From owner-svn-src-projects@freebsd.org Wed Oct 11 05:04:47 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 669FBE467FC for ; Wed, 11 Oct 2017 05:04:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 342657DCBF; Wed, 11 Oct 2017 05:04:47 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9B54kmP084473; Wed, 11 Oct 2017 05:04:46 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9B54ke8084472; Wed, 11 Oct 2017 05:04:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201710110504.v9B54ke8084472@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Wed, 11 Oct 2017 05:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324514 - projects/runtime-coverage/sys/boot/sparc64/boot1 X-SVN-Group: projects X-SVN-Commit-Author: ngie X-SVN-Commit-Paths: projects/runtime-coverage/sys/boot/sparc64/boot1 X-SVN-Commit-Revision: 324514 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2017 05:04:47 -0000 Author: ngie Date: Wed Oct 11 05:04:46 2017 New Revision: 324514 URL: https://svnweb.freebsd.org/changeset/base/324514 Log: Chase r322551 with sys/boot/sparc64/boot1 Modified: projects/runtime-coverage/sys/boot/sparc64/boot1/Makefile Modified: projects/runtime-coverage/sys/boot/sparc64/boot1/Makefile ============================================================================== --- projects/runtime-coverage/sys/boot/sparc64/boot1/Makefile Wed Oct 11 05:02:36 2017 (r324513) +++ projects/runtime-coverage/sys/boot/sparc64/boot1/Makefile Wed Oct 11 05:04:46 2017 (r324514) @@ -1,5 +1,8 @@ # $FreeBSD$ +.include +MK_COVERAGE= no + PROG= boot1.elf INTERNALPROG= MAN= From owner-svn-src-projects@freebsd.org Wed Oct 11 13:33:13 2017 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94C8DE2C831 for ; Wed, 11 Oct 2017 13:33:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 602F868371; Wed, 11 Oct 2017 13:33:13 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v9BDXCnR095148; Wed, 11 Oct 2017 13:33:12 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9BDXCck095142; Wed, 11 Oct 2017 13:33:12 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201710111333.v9BDXCck095142@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Wed, 11 Oct 2017 13:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r324530 - in projects/pnfs-planb-server-stable11/sys/fs: nfs nfsclient nfsserver X-SVN-Group: projects X-SVN-Commit-Author: rmacklem X-SVN-Commit-Paths: in projects/pnfs-planb-server-stable11/sys/fs: nfs nfsclient nfsserver X-SVN-Commit-Revision: 324530 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Oct 2017 13:33:13 -0000 Author: rmacklem Date: Wed Oct 11 13:33:11 2017 New Revision: 324530 URL: https://svnweb.freebsd.org/changeset/base/324530 Log: Update the stable11 pNFS client/server. The main changes are: - Make the pNFS client use a taskqueue to do writes and commits concurrently. - Convert the pNFS server to using this taskqueue instead of kproc_create(). Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonkrpc.c projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsclstate.h projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clrpcops.c projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonkrpc.c Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonkrpc.c Wed Oct 11 13:33:11 2017 (r324530) @@ -1119,9 +1119,29 @@ nfsmout: int newnfs_nmcancelreqs(struct nfsmount *nmp) { + struct nfsclds *dsp; + struct __rpc_client *cl; if (nmp->nm_sockreq.nr_client != NULL) CLNT_CLOSE(nmp->nm_sockreq.nr_client); +lookformore: + NFSLOCKMNT(nmp); + TAILQ_FOREACH(dsp, &nmp->nm_sess, nfsclds_list) { + NFSLOCKDS(dsp); + if (dsp != TAILQ_FIRST(&nmp->nm_sess) && + (dsp->nfsclds_flags & NFSCLDS_CLOSED) == 0 && + dsp->nfsclds_sockp != NULL && + dsp->nfsclds_sockp->nr_client != NULL) { + dsp->nfsclds_flags |= NFSCLDS_CLOSED; + cl = dsp->nfsclds_sockp->nr_client; + NFSUNLOCKDS(dsp); + NFSUNLOCKMNT(nmp); + CLNT_CLOSE(cl); + goto lookformore; + } + NFSUNLOCKDS(dsp); + } + NFSUNLOCKMNT(nmp); return (0); } Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfs/nfs_commonport.c Wed Oct 11 13:33:11 2017 (r324530) @@ -40,7 +40,9 @@ __FBSDID("$FreeBSD$"); * to this BSD variant. */ #include +#include #include +#include #include #include #include @@ -74,6 +76,8 @@ struct nfsdevicehead nfsrv_devidhead; void (*nfsd_call_servertimer)(void) = NULL; void (*ncl_call_invalcaches)(struct vnode *) = NULL; +int nfs_pnfsio(task_fn_t *, void *); + static int nfs_realign_test; static int nfs_realign_count; static struct ext_nfsstats oldnfsstats; @@ -90,6 +94,9 @@ SYSCTL_INT(_vfs_nfs, OID_AUTO, debuglevel, CTLFLAG_RW, 0, "Debug level for NFS client"); SYSCTL_INT(_vfs_nfs, OID_AUTO, userhashsize, CTLFLAG_RDTUN, &nfsrv_lughashsize, 0, "Size of hash tables for uid/name mapping"); +int nfs_pnfsiothreads = 0; +SYSCTL_INT(_vfs_nfs, OID_AUTO, pnfsiothreads, CTLFLAG_RW, &nfs_pnfsiothreads, + 0, "Number of pNFS mirror I/O threads"); /* * Defines for malloc @@ -676,6 +683,50 @@ nfs_supportsnfsv4acls(struct vnode *vp) if (error == 0 && retval != 0) return (1); return (0); +} + +/* + * These are the first fields of all the context structures passed into + * nfs_pnfsio(). + */ +struct pnfsio { + int done; + int inprog; + struct task tsk; +}; + +/* + * Do a mirror I/O on a pNFS thread. + */ +int +nfs_pnfsio(task_fn_t *func, void *context) +{ + struct pnfsio *pio; + int ret; + static struct taskqueue *pnfsioq = NULL; + + pio = (struct pnfsio *)context; + if (pnfsioq == NULL) { + if (nfs_pnfsiothreads == 0) + nfs_pnfsiothreads = mp_ncpus * 8; + pnfsioq = taskqueue_create("pnfsioq", M_WAITOK, + taskqueue_thread_enqueue, &pnfsioq); + if (pnfsioq == NULL) + return (ENOMEM); + ret = taskqueue_start_threads(&pnfsioq, nfs_pnfsiothreads, + 0, "pnfsiot"); + if (ret != 0) { + taskqueue_free(pnfsioq); + pnfsioq = NULL; + return (ret); + } + } + pio->inprog = 1; + TASK_INIT(&pio->tsk, 0, func, context); + ret = taskqueue_enqueue(pnfsioq, &pio->tsk); + if (ret != 0) + pio->inprog = 0; + return (ret); } extern int (*nfsd_call_nfscommon)(struct thread *, struct nfssvc_args *); Modified: projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsclstate.h ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsclstate.h Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfs/nfsclstate.h Wed Oct 11 13:33:11 2017 (r324530) @@ -91,6 +91,7 @@ struct nfsclds { #define NFSCLDS_HASWRITEVERF 0x0001 #define NFSCLDS_MDS 0x0002 #define NFSCLDS_DS 0x0004 +#define NFSCLDS_CLOSED 0x0008 struct nfsclclient { LIST_ENTRY(nfsclclient) nfsc_list; Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clrpcops.c Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsclient/nfs_clrpcops.c Wed Oct 11 13:33:11 2017 (r324530) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include SYSCTL_DECL(_vfs_nfs); @@ -64,6 +65,7 @@ extern nfstype nfsv34_type[9]; extern int nfsrv_useacl; extern char nfsv4_callbackaddr[INET6_ADDRSTRLEN]; extern int nfscl_debuglevel; +extern int nfs_pnfsiothreads; NFSCLSTATEMUTEX; int nfstest_outofseq = 0; int nfscl_assumeposixlocks = 1; @@ -87,6 +89,30 @@ enum nfsclds_state { NFSDSP_NOTFOUND = 2, }; +/* + * Do a write RPC on a DS data file, using this structure for the arguments, + * so that this function can be executed by a separate kernel process. + */ +struct nfsclwritedsdorpc { + int done; + int inprog; + struct task tsk; + struct vnode *vp; + int iomode; + int must_commit; + nfsv4stateid_t *stateidp; + struct nfsclds *dsp; + uint64_t off; + int len; + struct nfsfh *fhp; + struct mbuf *m; + int vers; + int minorvers; + struct ucred *cred; + NFSPROC_T *p; + int err; +}; + static int nfsrpc_setattrrpc(vnode_t , struct vattr *, nfsv4stateid_t *, struct ucred *, NFSPROC_T *, struct nfsvattr *, int *, void *); static int nfsrpc_readrpc(vnode_t , struct uio *, struct ucred *, @@ -119,7 +145,7 @@ static int nfscl_doflayoutio(vnode_t, struct uio *, in static int nfscl_dofflayoutio(vnode_t, struct uio *, int *, int *, int *, nfsv4stateid_t *, int, struct nfscldevinfo *, struct nfscllayout *, struct nfsclflayout *, uint64_t, uint64_t, int, int, struct mbuf *, - struct ucred *, NFSPROC_T *); + struct nfsclwritedsdorpc *, struct ucred *, NFSPROC_T *); static struct mbuf *nfsm_copym(struct mbuf *, int, int); static int nfsrpc_readds(vnode_t, struct uio *, nfsv4stateid_t *, int *, struct nfsclds *, uint64_t, int, struct nfsfh *, int, int, int, @@ -127,11 +153,17 @@ static int nfsrpc_readds(vnode_t, struct uio *, nfsv4s static int nfsrpc_writeds(vnode_t, struct uio *, int *, int *, nfsv4stateid_t *, struct nfsclds *, uint64_t, int, struct nfsfh *, int, int, int, int, struct ucred *, NFSPROC_T *); +static int nfsio_writedsmir(vnode_t, int *, int *, nfsv4stateid_t *, + struct nfsclds *, uint64_t, int, struct nfsfh *, struct mbuf *, int, int, + struct nfsclwritedsdorpc *, struct ucred *, NFSPROC_T *); static int nfsrpc_writedsmir(vnode_t, int *, int *, nfsv4stateid_t *, struct nfsclds *, uint64_t, int, struct nfsfh *, struct mbuf *, int, int, struct ucred *, NFSPROC_T *); static enum nfsclds_state nfscl_getsameserver(struct nfsmount *, struct nfsclds *, struct nfsclds **); +static int nfsio_commitds(vnode_t, uint64_t, int, struct nfsclds *, + struct nfsfh *, int, int, struct nfsclwritedsdorpc *, struct ucred *, + NFSPROC_T *); static int nfsrpc_commitds(vnode_t, uint64_t, int, struct nfsclds *, struct nfsfh *, int, int, struct ucred *, NFSPROC_T *); static void nfsrv_setuplayoutget(struct nfsrv_descript *, int, uint64_t, @@ -163,6 +195,8 @@ static int nfsrpc_layoutgetres(struct nfsmount *, vnod int, nfsv4stateid_t *, int, uint32_t *, struct nfscllayout **, struct nfsclflayouthead *, int, int, int *, struct ucred *, NFSPROC_T *); +int nfs_pnfsio(task_fn_t *, void *); + /* * nfs null call from vfs. */ @@ -5539,10 +5573,11 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode struct nfscldevinfo *dip; struct nfsclflayout *rflp; struct mbuf *m; + struct nfsclwritedsdorpc *drpc, *tdrpc; nfsv4stateid_t stateid; struct ucred *newcred; uint64_t lastbyte, len, off, oresid, xfer; - int eof, error, firstmirror, i, iolaymode, mirrorcnt, recalled; + int eof, error, firstmirror, i, iolaymode, mirrorcnt, recalled, timo; void *lckp; uint8_t *dev; void *iovbase; @@ -5622,6 +5657,7 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode * do all mirrors. */ m = NULL; + drpc = NULL; firstmirror = 0; mirrorcnt = 1; if ((layp->nfsly_flags & NFSLY_FLEXFILE) != 0 && @@ -5629,17 +5665,24 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode if (rwaccess == NFSV4OPEN_ACCESSREAD) { firstmirror = arc4random() % mirrorcnt; mirrorcnt = firstmirror + 1; - } else if (docommit == 0) { - /* - * Save values, so uiop can be rolled - * back upon a write error. - */ - offs = uiop->uio_offset; - resid = uiop->uio_resid; - iovbase = uiop->uio_iov->iov_base; - iovlen = uiop->uio_iov->iov_len; - m = nfsm_uiombuflist(uiop, len, NULL, - NULL); + } else { + if (docommit == 0) { + /* + * Save values, so uiop can be + * rolled back upon a write + * error. + */ + offs = uiop->uio_offset; + resid = uiop->uio_resid; + iovbase = + uiop->uio_iov->iov_base; + iovlen = uiop->uio_iov->iov_len; + m = nfsm_uiombuflist(uiop, len, + NULL, NULL); + } + tdrpc = drpc = malloc(sizeof(*drpc) * + (mirrorcnt - 1), M_TEMP, M_WAITOK | + M_ZERO); } } for (i = firstmirror; i < mirrorcnt && error == 0; i++){ @@ -5656,8 +5699,8 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode uiop, iomode, must_commit, &eof, &stateid, rwaccess, dip, layp, rflp, off, xfer, - i, docommit, m, newcred, - p); + i, docommit, m, tdrpc, + newcred, p); else error = nfscl_doflayoutio(vp, uiop, iomode, must_commit, @@ -5667,9 +5710,27 @@ nfscl_doiods(vnode_t vp, struct uio *uiop, int *iomode nfscl_reldevinfo(dip); } else error = EIO; + tdrpc++; } if (m != NULL) m_freem(m); + tdrpc = drpc; + timo = hz / 50; /* Wait for 20msec. */ + if (timo < 1) + timo = 1; + for (i = firstmirror; i < mirrorcnt - 1 && + tdrpc != NULL; i++, tdrpc++) { + /* + * For the unused drpc entries, both inprog and + * err == 0, so this loop won't break. + */ + while (tdrpc->inprog != 0 && tdrpc->done == 0) + tsleep(&tdrpc->tsk, PVFS, "clrpcio", + timo); + if (error == 0 && tdrpc->err != 0) + error = tdrpc->err; + } + free(drpc, M_TEMP); if (error == 0) { if (mirrorcnt > 1 && rwaccess == NFSV4OPEN_ACCESSWRITE && docommit == 0) { @@ -5893,8 +5954,8 @@ static int nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, int *eofp, nfsv4stateid_t *stateidp, int rwflag, struct nfscldevinfo *dp, struct nfscllayout *lyp, struct nfsclflayout *flp, uint64_t off, - uint64_t len, int mirror, int docommit, struct mbuf *mp, struct ucred *cred, - NFSPROC_T *p) + uint64_t len, int mirror, int docommit, struct mbuf *mp, + struct nfsclwritedsdorpc *drpc, struct ucred *cred, NFSPROC_T *p) { uint64_t transfer, xfer; int error, rel_off; @@ -5935,13 +5996,23 @@ nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int * else xfer = len; if (docommit != 0) { - if (error == 0) - error = nfsrpc_commitds(vp, off, xfer, *dspp, - fhp, dp->nfsdi_vers, dp->nfsdi_minorvers, - tcred, p); - NFSCL_DEBUG(4, "aft nfsrpc_commitds=%d\n", error); if (error == 0) { /* + * Do last mirrored DS commit with this thread. + */ + if (mirror < flp->nfsfl_mirrorcnt - 1) + error = nfsio_commitds(vp, off, xfer, + *dspp, fhp, dp->nfsdi_vers, + dp->nfsdi_minorvers, drpc, tcred, + p); + else + error = nfsrpc_commitds(vp, off, xfer, + *dspp, fhp, dp->nfsdi_vers, + dp->nfsdi_minorvers, tcred, p); + } + NFSCL_DEBUG(4, "aft nfsio_commitds=%d\n", error); + if (error == 0) { + /* * Set both eof and uio_resid = 0 to end any * loops. */ @@ -5971,11 +6042,22 @@ nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int * m = nfsm_copym(mp, rel_off, xfer); NFSCL_DEBUG(4, "mcopy reloff=%d xfer=%jd\n", rel_off, (uintmax_t)xfer); - error = nfsrpc_writedsmir(vp, iomode, - must_commit, stateidp, *dspp, off, xfer, - fhp, m, dp->nfsdi_vers, dp->nfsdi_minorvers, - tcred, p); - NFSCL_DEBUG(4, "nfsrpc_writedsmir=%d\n", error); + /* + * Do last write to a mirrored DS with this + * thread. + */ + if (mirror < flp->nfsfl_mirrorcnt - 1) + error = nfsio_writedsmir(vp, iomode, + must_commit, stateidp, *dspp, off, + xfer, fhp, m, dp->nfsdi_vers, + dp->nfsdi_minorvers, drpc, tcred, + p); + else + error = nfsrpc_writedsmir(vp, iomode, + must_commit, stateidp, *dspp, off, + xfer, fhp, m, dp->nfsdi_vers, + dp->nfsdi_minorvers, tcred, p); + NFSCL_DEBUG(4, "nfsio_writedsmir=%d\n", error); } } NFSCL_DEBUG(4, "aft read/writeds=%d\n", error); @@ -6302,6 +6384,62 @@ nfsmout: } /* + * Start up the thread that will execute nfsrpc_writedsmir(). + */ +static void +start_writedsmir(void *arg, int pending) +{ + struct nfsclwritedsdorpc *drpc; + + drpc = (struct nfsclwritedsdorpc *)arg; + drpc->err = nfsrpc_writedsmir(drpc->vp, &drpc->iomode, + &drpc->must_commit, drpc->stateidp, drpc->dsp, drpc->off, drpc->len, + drpc->fhp, drpc->m, drpc->vers, drpc->minorvers, drpc->cred, + drpc->p); + drpc->done = 1; + NFSCL_DEBUG(4, "start_writedsmir: err=%d\n", drpc->err); +} + +/* + * Set up the write DS mirror call for the pNFS I/O thread. + */ +static int +nfsio_writedsmir(vnode_t vp, int *iomode, int *must_commit, + nfsv4stateid_t *stateidp, struct nfsclds *dsp, uint64_t off, int len, + struct nfsfh *fhp, struct mbuf *m, int vers, int minorvers, + struct nfsclwritedsdorpc *drpc, struct ucred *cred, NFSPROC_T *p) +{ + int error, ret; + + error = 0; + drpc->done = 0; + drpc->vp = vp; + drpc->iomode = *iomode; + drpc->must_commit = *must_commit; + drpc->stateidp = stateidp; + drpc->dsp = dsp; + drpc->off = off; + drpc->len = len; + drpc->fhp = fhp; + drpc->m = m; + drpc->vers = vers; + drpc->minorvers = minorvers; + drpc->cred = cred; + drpc->p = p; + drpc->inprog = 0; + ret = EIO; + if (nfs_pnfsiothreads > 0) { + ret = nfs_pnfsio(start_writedsmir, drpc); + NFSCL_DEBUG(4, "nfsio_writedsmir: nfs_pnfsio=%d\n", ret); + } + if (ret != 0) + error = nfsrpc_writedsmir(vp, iomode, must_commit, stateidp, + dsp, off, len, fhp, m, vers, minorvers, cred, p); + NFSCL_DEBUG(4, "nfsio_writedsmir: error=%d\n", error); + return (error); +} + +/* * Free up the nfsclds structure. */ void @@ -6427,6 +6565,56 @@ nfsmout: if (error == 0 && nd->nd_repstat != 0) error = nd->nd_repstat; mbuf_freem(nd->nd_mrep); + return (error); +} + +/* + * Start up the thread that will execute nfsrpc_commitds(). + */ +static void +start_commitds(void *arg, int pending) +{ + struct nfsclwritedsdorpc *drpc; + + drpc = (struct nfsclwritedsdorpc *)arg; + drpc->err = nfsrpc_commitds(drpc->vp, drpc->off, drpc->len, + drpc->dsp, drpc->fhp, drpc->vers, drpc->minorvers, drpc->cred, + drpc->p); + drpc->done = 1; + NFSCL_DEBUG(4, "start_commitds: err=%d\n", drpc->err); +} + +/* + * Set up the commit DS mirror call for the pNFS I/O thread. + */ +static int +nfsio_commitds(vnode_t vp, uint64_t offset, int cnt, struct nfsclds *dsp, + struct nfsfh *fhp, int vers, int minorvers, + struct nfsclwritedsdorpc *drpc, struct ucred *cred, NFSPROC_T *p) +{ + int error, ret; + + error = 0; + drpc->done = 0; + drpc->vp = vp; + drpc->off = offset; + drpc->len = cnt; + drpc->dsp = dsp; + drpc->fhp = fhp; + drpc->vers = vers; + drpc->minorvers = minorvers; + drpc->cred = cred; + drpc->p = p; + drpc->inprog = 0; + ret = EIO; + if (nfs_pnfsiothreads > 0) { + ret = nfs_pnfsio(start_commitds, drpc); + NFSCL_DEBUG(4, "nfsio_commitds: nfs_pnfsio=%d\n", ret); + } + if (ret != 0) + error = nfsrpc_commitds(vp, offset, cnt, dsp, fhp, vers, + minorvers, cred, p); + NFSCL_DEBUG(4, "nfsio_commitds: error=%d\n", error); return (error); } Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdport.c Wed Oct 11 13:33:11 2017 (r324530) @@ -72,6 +72,7 @@ extern struct mtx nfsrv_dsrmlock_mtx; extern struct mtx nfsrv_dwrpclock_mtx; extern struct mtx nfsrv_dsrpclock_mtx; extern struct mtx nfsrv_darpclock_mtx; +extern int nfs_pnfsiothreads; struct vfsoptlist nfsv4root_opt, nfsv4root_newopt; NFSDLOCKMUTEX; NFSSTATESPINLOCK; @@ -127,6 +128,8 @@ static int nfsrv_putfhname(fhandle_t *, char *); static int nfsrv_pnfslookupds(struct vnode *, struct pnfsdsfile *, struct vnode *, NFSPROC_T *); +int nfs_pnfsio(task_fn_t *, void *); + SYSCTL_NODE(_vfs, OID_AUTO, nfsd, CTLFLAG_RW, 0, "NFS server"); SYSCTL_INT(_vfs_nfsd, OID_AUTO, mirrormnt, CTLFLAG_RW, &nfsrv_enable_crossmntpt, 0, "Enable nfsd to cross mount points"); @@ -4419,6 +4422,9 @@ nfsmout: * so that this function can be executed by a separate kernel process. */ struct nfsrvwritedsdorpc { + int done; + int inprog; + struct task tsk; fhandle_t fh; off_t off; int len; @@ -4426,7 +4432,6 @@ struct nfsrvwritedsdorpc { struct ucred *cred; NFSPROC_T *p; struct mbuf *m; - int haskproc; int err; }; @@ -4543,18 +4548,15 @@ nfsmout: * Start up the thread that will execute nfsrv_writedsdorpc(). */ static void -start_writedsdorpc(void *arg) +start_writedsdorpc(void *arg, int pending) { struct nfsrvwritedsdorpc *drpc; drpc = (struct nfsrvwritedsdorpc *)arg; drpc->err = nfsrv_writedsdorpc(drpc->nmp, &drpc->fh, drpc->off, drpc->len, NULL, drpc->m, drpc->cred, drpc->p); - NFSDWRPCLOCK(); - drpc->haskproc = 0; - wakeup(drpc); - NFSDWRPCUNLOCK(); - kproc_exit(0); + drpc->done = 1; + NFSD_DEBUG(4, "start_writedsdorpc: err=%d\n", drpc->err); } static int @@ -4565,7 +4567,7 @@ nfsrv_writedsrpc(fhandle_t *fhp, off_t off, int len, s struct nfsrvwritedsdorpc *drpc, *tdrpc; struct nfsvattr na; struct mbuf *m; - int error, haskproc, i, offs, ret; + int error, i, offs, ret, timo; NFSD_DEBUG(4, "in nfsrv_writedsrpc\n"); KASSERT(*mpp != NULL, ("nfsrv_writedsrpc: NULL mbuf chain")); @@ -4582,23 +4584,25 @@ nfsrv_writedsrpc(fhandle_t *fhp, off_t off, int len, s * Do the write RPC for every DS, using a separate kernel process * for every DS except the last one. */ - haskproc = 0; error = 0; for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + tdrpc->done = 0; tdrpc->fh = *fhp; tdrpc->off = off; tdrpc->len = len; tdrpc->nmp = *nmpp; tdrpc->cred = cred; tdrpc->p = p; + tdrpc->inprog = 0; + tdrpc->err = 0; tdrpc->m = m_copym(*mpp, offs, NFSM_RNDUP(len), M_WAITOK); - tdrpc->haskproc = 1; - ret = kproc_create(start_writedsdorpc, (void *)tdrpc, NULL, 0, - 0, "nfsdpw"); - if (ret == 0) - haskproc = 1; - else { - tdrpc->haskproc = 0; + ret = EIO; + if (nfs_pnfsiothreads > 0) { + ret = nfs_pnfsio(start_writedsdorpc, tdrpc); + NFSD_DEBUG(4, "nfsrv_writedsrpc: nfs_pnfsio=%d\n", + ret); + } + if (ret != 0) { ret = nfsrv_writedsdorpc(*nmpp, fhp, off, len, NULL, tdrpc->m, cred, p); if (error == 0 && ret != 0) @@ -4615,17 +4619,16 @@ nfsrv_writedsrpc(fhandle_t *fhp, off_t off, int len, s error = nfsrv_setextattr(vp, &na, p); NFSD_DEBUG(4, "nfsrv_writedsrpc: aft setextat=%d\n", error); - if (haskproc != 0) { - /* Wait for kernel proc(s) to complete. */ - NFSDWRPCLOCK(); - for (tdrpc = drpc, i = 0; i < mirrorcnt - 1; i++, tdrpc++) { - while (tdrpc->haskproc != 0) - mtx_sleep(tdrpc, NFSDWRPCLOCKMUTEXPTR, PVFS, - "nfspw", 0); - if (error == 0 && tdrpc->err != 0) - error = tdrpc->err; - } - NFSDWRPCUNLOCK(); + tdrpc = drpc; + timo = hz / 50; /* Wait for 20msec. */ + if (timo < 1) + timo = 1; + for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + /* Wait for RPCs on separate threads to complete. */ + while (tdrpc->inprog != 0 && tdrpc->done == 0) + tsleep(&tdrpc->tsk, PVFS, "srvwrds", timo); + if (error == 0 && tdrpc->err != 0) + error = tdrpc->err; } free(drpc, M_TEMP); return (error); @@ -4715,6 +4718,9 @@ nfsmout: } struct nfsrvsetattrdsdorpc { + int done; + int inprog; + struct task tsk; fhandle_t fh; struct nfsmount *nmp; struct vnode *vp; @@ -4722,7 +4728,6 @@ struct nfsrvsetattrdsdorpc { NFSPROC_T *p; struct nfsvattr na; struct nfsvattr dsna; - int haskproc; int err; }; @@ -4730,18 +4735,14 @@ struct nfsrvsetattrdsdorpc { * Start up the thread that will execute nfsrv_setattrdsdorpc(). */ static void -start_setattrdsdorpc(void *arg) +start_setattrdsdorpc(void *arg, int pending) { struct nfsrvsetattrdsdorpc *drpc; drpc = (struct nfsrvsetattrdsdorpc *)arg; drpc->err = nfsrv_setattrdsdorpc(&drpc->fh, drpc->cred, drpc->p, drpc->vp, drpc->nmp, &drpc->na, &drpc->dsna); - NFSDSRPCLOCK(); - drpc->haskproc = 0; - wakeup(drpc); - NFSDSRPCUNLOCK(); - kproc_exit(0); + drpc->done = 1; } static int @@ -4751,7 +4752,7 @@ nfsrv_setattrdsrpc(fhandle_t *fhp, struct ucred *cred, { struct nfsrvsetattrdsdorpc *drpc, *tdrpc; struct nfsvattr na; - int error, haskproc, i, ret; + int error, i, ret, timo; NFSD_DEBUG(4, "in nfsrv_setattrdsrpc\n"); drpc = NULL; @@ -4763,22 +4764,24 @@ nfsrv_setattrdsrpc(fhandle_t *fhp, struct ucred *cred, * Do the setattr RPC for every DS, using a separate kernel process * for every DS except the last one. */ - haskproc = 0; error = 0; for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + tdrpc->done = 0; + tdrpc->inprog = 0; tdrpc->fh = *fhp; tdrpc->nmp = *nmpp; tdrpc->vp = vp; tdrpc->cred = cred; tdrpc->p = p; tdrpc->na = *nap; - tdrpc->haskproc = 1; - ret = kproc_create(start_setattrdsdorpc, (void *)tdrpc, NULL, 0, - 0, "nfsdps"); - if (ret == 0) - haskproc = 1; - else { - tdrpc->haskproc = 0; + tdrpc->err = 0; + ret = EIO; + if (nfs_pnfsiothreads > 0) { + ret = nfs_pnfsio(start_setattrdsdorpc, tdrpc); + NFSD_DEBUG(4, "nfsrv_setattrdsrpc: nfs_pnfsio=%d\n", + ret); + } + if (ret != 0) { ret = nfsrv_setattrdsdorpc(fhp, cred, p, vp, *nmpp, nap, &na); if (error == 0 && ret != 0) @@ -4793,17 +4796,16 @@ nfsrv_setattrdsrpc(fhandle_t *fhp, struct ucred *cred, if (error == 0) error = nfsrv_setextattr(vp, &na, p); NFSD_DEBUG(4, "nfsrv_setattrdsrpc: aft setextat=%d\n", error); - if (haskproc != 0) { - /* Wait for kernel proc(s) to complete. */ - NFSDSRPCLOCK(); - for (tdrpc = drpc, i = 0; i < mirrorcnt - 1; i++, tdrpc++) { - while (tdrpc->haskproc != 0) - mtx_sleep(tdrpc, NFSDSRPCLOCKMUTEXPTR, PVFS, - "nfsps", 0); - if (error == 0 && tdrpc->err != 0) - error = tdrpc->err; - } - NFSDSRPCUNLOCK(); + tdrpc = drpc; + timo = hz / 50; /* Wait for 20msec. */ + if (timo < 1) + timo = 1; + for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + /* Wait for RPCs on separate threads to complete. */ + while (tdrpc->inprog != 0 && tdrpc->done == 0) + tsleep(&tdrpc->tsk, PVFS, "srvsads", timo); + if (error == 0 && tdrpc->err != 0) + error = tdrpc->err; } free(drpc, M_TEMP); return (error); @@ -4860,13 +4862,15 @@ nfsrv_setacldsdorpc(fhandle_t *fhp, struct ucred *cred } struct nfsrvsetacldsdorpc { + int done; + int inprog; + struct task tsk; fhandle_t fh; struct nfsmount *nmp; struct vnode *vp; struct ucred *cred; NFSPROC_T *p; struct acl *aclp; - int haskproc; int err; }; @@ -4874,18 +4878,14 @@ struct nfsrvsetacldsdorpc { * Start up the thread that will execute nfsrv_setacldsdorpc(). */ static void -start_setacldsdorpc(void *arg) +start_setacldsdorpc(void *arg, int pending) { struct nfsrvsetacldsdorpc *drpc; drpc = (struct nfsrvsetacldsdorpc *)arg; drpc->err = nfsrv_setacldsdorpc(&drpc->fh, drpc->cred, drpc->p, drpc->vp, drpc->nmp, drpc->aclp); - NFSDARPCLOCK(); - drpc->haskproc = 0; - wakeup(drpc); - NFSDARPCUNLOCK(); - kproc_exit(0); + drpc->done = 1; } static int @@ -4893,7 +4893,7 @@ nfsrv_setacldsrpc(fhandle_t *fhp, struct ucred *cred, struct vnode *vp, struct nfsmount **nmpp, int mirrorcnt, struct acl *aclp) { struct nfsrvsetacldsdorpc *drpc, *tdrpc; - int error, haskproc, i, ret; + int error, i, ret, timo; NFSD_DEBUG(4, "in nfsrv_setacldsrpc\n"); drpc = NULL; @@ -4905,22 +4905,24 @@ nfsrv_setacldsrpc(fhandle_t *fhp, struct ucred *cred, * Do the setattr RPC for every DS, using a separate kernel process * for every DS except the last one. */ - haskproc = 0; error = 0; for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + tdrpc->done = 0; + tdrpc->inprog = 0; tdrpc->fh = *fhp; tdrpc->nmp = *nmpp; tdrpc->vp = vp; tdrpc->cred = cred; tdrpc->p = p; tdrpc->aclp = aclp; - tdrpc->haskproc = 1; - ret = kproc_create(start_setacldsdorpc, (void *)tdrpc, NULL, 0, - 0, "nfsdpa"); - if (ret == 0) - haskproc = 1; - else { - tdrpc->haskproc = 0; + tdrpc->err = 0; + ret = EIO; + if (nfs_pnfsiothreads > 0) { + ret = nfs_pnfsio(start_setacldsdorpc, tdrpc); + NFSD_DEBUG(4, "nfsrv_setacldsrpc: nfs_pnfsio=%d\n", + ret); + } + if (ret != 0) { ret = nfsrv_setacldsdorpc(fhp, cred, p, vp, *nmpp, aclp); if (error == 0 && ret != 0) @@ -4933,17 +4935,16 @@ nfsrv_setacldsrpc(fhandle_t *fhp, struct ucred *cred, if (error == 0 && ret != 0) error = ret; NFSD_DEBUG(4, "nfsrv_setacldsrpc: aft setextat=%d\n", error); - if (haskproc != 0) { - /* Wait for kernel proc(s) to complete. */ - NFSDARPCLOCK(); - for (tdrpc = drpc, i = 0; i < mirrorcnt - 1; i++, tdrpc++) { - while (tdrpc->haskproc != 0) - mtx_sleep(tdrpc, NFSDARPCLOCKMUTEXPTR, PVFS, - "nfspa", 0); - if (error == 0 && tdrpc->err != 0) - error = tdrpc->err; - } - NFSDARPCUNLOCK(); + tdrpc = drpc; + timo = hz / 50; /* Wait for 20msec. */ + if (timo < 1) + timo = 1; + for (i = 0; i < mirrorcnt - 1; i++, tdrpc++) { + /* Wait for RPCs on separate threads to complete. */ + while (tdrpc->inprog != 0 && tdrpc->done == 0) + tsleep(&tdrpc->tsk, PVFS, "srvacds", timo); + if (error == 0 && tdrpc->err != 0) + error = tdrpc->err; } free(drpc, M_TEMP); return (error); Modified: projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c Wed Oct 11 13:20:24 2017 (r324529) +++ projects/pnfs-planb-server-stable11/sys/fs/nfsserver/nfs_nfsdserv.c Wed Oct 11 13:33:11 2017 (r324530) @@ -1000,7 +1000,7 @@ nfsrvd_write(struct nfsrv_descript *nd, __unused int i nd->nd_md, nd->nd_dpos, nd->nd_cred, p); error = nfsm_advance(nd, NFSM_RNDUP(retlen), -1); if (error) - panic("nfsrv_write mbuf"); + goto nfsmout; } if (nd->nd_flag & ND_NFSV4) aftat_ret = 0;