From owner-svn-src-user@freebsd.org Sun Mar 18 19:34:09 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1701EF4D666 for ; Sun, 18 Mar 2018 19:34:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9DEA182CED; Sun, 18 Mar 2018 19:34:08 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 98EE824BA4; Sun, 18 Mar 2018 19:34:08 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2IJY8Jp057475; Sun, 18 Mar 2018 19:34:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2IJY8wj057474; Sun, 18 Mar 2018 19:34:08 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803181934.w2IJY8wj057474@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 18 Mar 2018 19:34:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331144 - user/markj/vm-playground/sys/kern X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/kern X-SVN-Commit-Revision: 331144 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 19:34:09 -0000 Author: markj Date: Sun Mar 18 19:34:08 2018 New Revision: 331144 URL: https://svnweb.freebsd.org/changeset/base/331144 Log: Fixup. Modified: user/markj/vm-playground/sys/kern/vfs_bio.c Modified: user/markj/vm-playground/sys/kern/vfs_bio.c ============================================================================== --- user/markj/vm-playground/sys/kern/vfs_bio.c Sun Mar 18 19:07:07 2018 (r331143) +++ user/markj/vm-playground/sys/kern/vfs_bio.c Sun Mar 18 19:34:08 2018 (r331144) @@ -2911,7 +2911,6 @@ vfs_vmio_iodone(struct buf *bp) static void vfs_vmio_unwire(struct buf *bp, vm_page_t m) { - bool freed; vm_page_lock(m); if (vm_page_unwire_noq(m)) { From owner-svn-src-user@freebsd.org Sun Mar 18 19:34:31 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C77BF4D720 for ; Sun, 18 Mar 2018 19:34:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BD1B482EAC; Sun, 18 Mar 2018 19:34:30 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B824724BA7; Sun, 18 Mar 2018 19:34:30 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2IJYUij057553; Sun, 18 Mar 2018 19:34:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2IJYUWR057552; Sun, 18 Mar 2018 19:34:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803181934.w2IJYUWR057552@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sun, 18 Mar 2018 19:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331145 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331145 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2018 19:34:31 -0000 Author: markj Date: Sun Mar 18 19:34:30 2018 New Revision: 331145 URL: https://svnweb.freebsd.org/changeset/base/331145 Log: Enable the assertion in vm_pagequeue_cnt_add(). Modified: user/markj/vm-playground/sys/vm/vm_pagequeue.h Modified: user/markj/vm-playground/sys/vm/vm_pagequeue.h ============================================================================== --- user/markj/vm-playground/sys/vm/vm_pagequeue.h Sun Mar 18 19:34:08 2018 (r331144) +++ user/markj/vm-playground/sys/vm/vm_pagequeue.h Sun Mar 18 19:34:30 2018 (r331145) @@ -190,9 +190,7 @@ static __inline void vm_pagequeue_cnt_add(struct vm_pagequeue *pq, int addend) { -#ifdef notyet vm_pagequeue_assert_locked(pq); -#endif pq->pq_cnt += addend; } #define vm_pagequeue_cnt_inc(pq) vm_pagequeue_cnt_add((pq), 1) From owner-svn-src-user@freebsd.org Tue Mar 20 15:04:24 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3437F545EA for ; Tue, 20 Mar 2018 15:04:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8361176D3C; Tue, 20 Mar 2018 15:04:23 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DC271E596; Tue, 20 Mar 2018 15:04:23 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2KF4NTP074236; Tue, 20 Mar 2018 15:04:23 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2KF4JpM074200; Tue, 20 Mar 2018 15:04:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803201504.w2KF4JpM074200@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Mar 2018 15:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331243 - in user/markj/netdump: . bin/ps cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftool... X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in user/markj/netdump: . bin/ps cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolchain/nm contrib/llvm/lib... X-SVN-Commit-Revision: 331243 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 15:04:24 -0000 Author: markj Date: Tue Mar 20 15:04:19 2018 New Revision: 331243 URL: https://svnweb.freebsd.org/changeset/base/331243 Log: MFH at r331242. Added: user/markj/netdump/contrib/processor-trace/ - copied from r331242, head/contrib/processor-trace/ user/markj/netdump/lib/libcasper/services/cap_pwd/cap_pwd.3 - copied unchanged from r331242, head/lib/libcasper/services/cap_pwd/cap_pwd.3 user/markj/netdump/lib/libcasper/services/cap_sysctl/cap_sysctl.3 - copied unchanged from r331242, head/lib/libcasper/services/cap_sysctl/cap_sysctl.3 user/markj/netdump/sbin/nvmecontrol/format.c - copied unchanged from r331242, head/sbin/nvmecontrol/format.c user/markj/netdump/stand/efi/libefi/efienv.c - copied unchanged from r331242, head/stand/efi/libefi/efienv.c user/markj/netdump/sys/compat/linux/linux_errno.c - copied unchanged from r331242, head/sys/compat/linux/linux_errno.c user/markj/netdump/sys/contrib/zstd/doc/images/zstd_logo86.png - copied unchanged from r331242, head/sys/contrib/zstd/doc/images/zstd_logo86.png user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_compress_internal.h - copied unchanged from r331242, head/sys/contrib/zstd/lib/compress/zstd_compress_internal.h user/markj/netdump/sys/contrib/zstd/tests/seqgen.c - copied unchanged from r331242, head/sys/contrib/zstd/tests/seqgen.c user/markj/netdump/sys/contrib/zstd/tests/seqgen.h - copied unchanged from r331242, head/sys/contrib/zstd/tests/seqgen.h user/markj/netdump/sys/dev/cxgbe/tom/t4_tls.c - copied unchanged from r331242, head/sys/dev/cxgbe/tom/t4_tls.c user/markj/netdump/sys/dev/cxgbe/tom/t4_tls.h - copied unchanged from r331242, head/sys/dev/cxgbe/tom/t4_tls.h user/markj/netdump/sys/netinet/cc/cc_newreno.h - copied unchanged from r331242, head/sys/netinet/cc/cc_newreno.h user/markj/netdump/usr.sbin/cxgbetool/tcb_common.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcb_common.c user/markj/netdump/usr.sbin/cxgbetool/tcb_common.h - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcb_common.h user/markj/netdump/usr.sbin/cxgbetool/tcbinfot4.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbinfot4.c user/markj/netdump/usr.sbin/cxgbetool/tcbinfot5.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbinfot5.c user/markj/netdump/usr.sbin/cxgbetool/tcbinfot6.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbinfot6.c user/markj/netdump/usr.sbin/cxgbetool/tcbshowt4.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbshowt4.c user/markj/netdump/usr.sbin/cxgbetool/tcbshowt5.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbshowt5.c user/markj/netdump/usr.sbin/cxgbetool/tcbshowt6.c - copied unchanged from r331242, head/usr.sbin/cxgbetool/tcbshowt6.c user/markj/netdump/usr.sbin/mpsutil/mps_debug.c - copied unchanged from r331242, head/usr.sbin/mpsutil/mps_debug.c Deleted: user/markj/netdump/sys/arm/conf/BEAGLEBONE-MMCCAM user/markj/netdump/sys/arm/conf/IMX6-MMCCAM user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_compress.h user/markj/netdump/sys/crypto/chacha20/chacha20.c user/markj/netdump/sys/crypto/chacha20/chacha20.h user/markj/netdump/sys/i386/include/pcaudioio.h user/markj/netdump/sys/modules/chacha20/ user/markj/netdump/sys/sys/dataacq.h Modified: user/markj/netdump/Makefile.inc1 user/markj/netdump/ObsoleteFiles.inc user/markj/netdump/bin/ps/extern.h user/markj/netdump/bin/ps/keyword.c user/markj/netdump/bin/ps/print.c user/markj/netdump/bin/ps/ps.1 user/markj/netdump/bin/ps/ps.c user/markj/netdump/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c user/markj/netdump/contrib/blacklist/bin/conf.c user/markj/netdump/contrib/elftoolchain/nm/nm.c user/markj/netdump/contrib/llvm/lib/Analysis/InstructionSimplify.cpp user/markj/netdump/contrib/llvm/lib/IR/ConstantFold.cpp user/markj/netdump/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp user/markj/netdump/contrib/telnet/telnetd/telnetd.c user/markj/netdump/etc/mtree/BSD.root.dist user/markj/netdump/etc/mtree/BSD.tests.dist user/markj/netdump/etc/rc.d/fsck user/markj/netdump/etc/rc.d/hostname user/markj/netdump/gnu/usr.bin/gdb/kgdb/trgt_amd64.c user/markj/netdump/lib/libc/net/getnameinfo.3 user/markj/netdump/lib/libc/net/getnameinfo.c user/markj/netdump/lib/libc/sys/sendfile.2 user/markj/netdump/lib/libcasper/libcasper/libcasper.3 user/markj/netdump/lib/libcasper/services/cap_dns/cap_dns.3 user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.3 user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.c user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.h user/markj/netdump/lib/libcasper/services/cap_pwd/Makefile user/markj/netdump/lib/libcasper/services/cap_sysctl/Makefile user/markj/netdump/lib/libdpv/dialog_util.c user/markj/netdump/lib/libdpv/dpv.3 user/markj/netdump/lib/libdpv/util.c user/markj/netdump/lib/libfigpar/figpar.3 user/markj/netdump/lib/libipsec/pfkey.c user/markj/netdump/lib/libmd/sha512.3 user/markj/netdump/lib/libsysdecode/errno.c user/markj/netdump/lib/libsysdecode/mktables user/markj/netdump/lib/libzstd/Makefile user/markj/netdump/libexec/tftpd/tests/functional.c user/markj/netdump/libexec/tftpd/tftp-transfer.c user/markj/netdump/libexec/tftpd/tftpd.c user/markj/netdump/release/packages/kernel.ucl user/markj/netdump/sbin/ifconfig/ifieee80211.c user/markj/netdump/sbin/ipfw/ipfw.8 user/markj/netdump/sbin/nvmecontrol/Makefile user/markj/netdump/sbin/nvmecontrol/identify.c user/markj/netdump/sbin/nvmecontrol/logpage.c user/markj/netdump/sbin/nvmecontrol/nvmecontrol.8 user/markj/netdump/sbin/nvmecontrol/nvmecontrol.c user/markj/netdump/sbin/nvmecontrol/nvmecontrol.h user/markj/netdump/sbin/savecore/savecore.8 user/markj/netdump/sbin/sysctl/sysctl.8 user/markj/netdump/sbin/sysctl/sysctl.c user/markj/netdump/share/examples/Makefile user/markj/netdump/share/man/man4/atrtc.4 user/markj/netdump/share/man/man4/cc_newreno.4 user/markj/netdump/share/man/man4/mod_cc.4 user/markj/netdump/share/man/man5/rc.conf.5 user/markj/netdump/share/man/man7/development.7 user/markj/netdump/share/man/man9/cnv.9 user/markj/netdump/share/man/man9/owll.9 user/markj/netdump/share/man/man9/rwlock.9 user/markj/netdump/share/man/man9/zone.9 user/markj/netdump/share/misc/committers-ports.dot user/markj/netdump/share/misc/pci_vendors user/markj/netdump/share/termcap/termcap user/markj/netdump/stand/common/bootstrap.h user/markj/netdump/stand/common/disk.c user/markj/netdump/stand/common/disk.h user/markj/netdump/stand/common/interp_lua.c user/markj/netdump/stand/common/isapnp.c user/markj/netdump/stand/common/load_elf.c user/markj/netdump/stand/common/load_elf_obj.c user/markj/netdump/stand/common/metadata.c user/markj/netdump/stand/common/misc.c user/markj/netdump/stand/common/pnp.c user/markj/netdump/stand/defaults/loader.conf user/markj/netdump/stand/defaults/loader.conf.5 user/markj/netdump/stand/defs.mk user/markj/netdump/stand/efi/boot1/boot1.c user/markj/netdump/stand/efi/boot1/ufs_module.c user/markj/netdump/stand/efi/include/efi.h user/markj/netdump/stand/efi/include/efilib.h user/markj/netdump/stand/efi/libefi/Makefile user/markj/netdump/stand/efi/libefi/devicename.c user/markj/netdump/stand/efi/libefi/efipart.c user/markj/netdump/stand/efi/libefi/efizfs.c user/markj/netdump/stand/efi/libefi/env.c user/markj/netdump/stand/efi/loader/arch/arm/exec.c user/markj/netdump/stand/efi/loader/bootinfo.c user/markj/netdump/stand/efi/loader/main.c user/markj/netdump/stand/ficl/aarch64/sysdep.c user/markj/netdump/stand/ficl/amd64/sysdep.c user/markj/netdump/stand/ficl/arm/sysdep.c user/markj/netdump/stand/ficl/i386/sysdep.c user/markj/netdump/stand/ficl/mips/sysdep.c user/markj/netdump/stand/ficl/mips64/sysdep.c user/markj/netdump/stand/ficl/powerpc/sysdep.c user/markj/netdump/stand/ficl/riscv/sysdep.c user/markj/netdump/stand/ficl/sparc64/sysdep.c user/markj/netdump/stand/i386/btx/lib/btxv86.h user/markj/netdump/stand/i386/libi386/biosacpi.c user/markj/netdump/stand/i386/libi386/bioscd.c user/markj/netdump/stand/i386/libi386/biosdisk.c user/markj/netdump/stand/i386/libi386/biospnp.c user/markj/netdump/stand/i386/libi386/bootinfo32.c user/markj/netdump/stand/i386/libi386/bootinfo64.c user/markj/netdump/stand/i386/libi386/devicename.c user/markj/netdump/stand/i386/libi386/elf64_freebsd.c user/markj/netdump/stand/i386/libi386/libi386.h user/markj/netdump/stand/i386/libi386/multiboot.c user/markj/netdump/stand/i386/libi386/pxe.c user/markj/netdump/stand/i386/loader/chain.c user/markj/netdump/stand/i386/loader/main.c user/markj/netdump/stand/libsa/arp.c user/markj/netdump/stand/libsa/bootp.c user/markj/netdump/stand/libsa/bootparam.c user/markj/netdump/stand/libsa/dosfs.h user/markj/netdump/stand/libsa/ext2fs.c user/markj/netdump/stand/libsa/net.h user/markj/netdump/stand/libsa/rpc.c user/markj/netdump/stand/libsa/stand.h user/markj/netdump/stand/lua/color.lua user/markj/netdump/stand/lua/config.lua user/markj/netdump/stand/lua/loader.lua user/markj/netdump/stand/mips/beri/boot2/boot2.c user/markj/netdump/stand/mips/beri/common/altera_jtag_uart.c user/markj/netdump/stand/mips/beri/common/cons.h user/markj/netdump/stand/mips/beri/loader/beri_console.c user/markj/netdump/stand/mips/beri/loader/beri_disk_cfi.c user/markj/netdump/stand/mips/beri/loader/beri_disk_sdcard.c user/markj/netdump/stand/mips/beri/loader/devicename.c user/markj/netdump/stand/ofw/libofw/devicename.c user/markj/netdump/stand/ofw/libofw/libofw.h user/markj/netdump/stand/ofw/libofw/openfirm.c user/markj/netdump/stand/powerpc/boot1.chrp/boot1.c user/markj/netdump/stand/powerpc/kboot/ppc64_elf_freebsd.c user/markj/netdump/stand/powerpc/ofw/elf_freebsd.c user/markj/netdump/stand/powerpc/ofw/main.c user/markj/netdump/stand/powerpc/ofw/ppc64_elf_freebsd.c user/markj/netdump/stand/sparc64/boot1/boot1.c user/markj/netdump/stand/sparc64/loader/main.c user/markj/netdump/stand/uboot/common/main.c user/markj/netdump/stand/uboot/lib/devicename.c user/markj/netdump/stand/uboot/lib/disk.c user/markj/netdump/stand/uboot/lib/elf_freebsd.c user/markj/netdump/stand/uboot/lib/libuboot.h user/markj/netdump/stand/userboot/userboot/bootinfo32.c user/markj/netdump/stand/userboot/userboot/bootinfo64.c user/markj/netdump/stand/userboot/userboot/devicename.c user/markj/netdump/stand/userboot/userboot/elf64_freebsd.c user/markj/netdump/stand/userboot/userboot/main.c user/markj/netdump/stand/userboot/userboot/userboot_disk.c user/markj/netdump/stand/zfs/libzfs.h user/markj/netdump/stand/zfs/zfs.c user/markj/netdump/sys/amd64/amd64/efirt_machdep.c (contents, props changed) user/markj/netdump/sys/amd64/linux/linux_sysvec.c user/markj/netdump/sys/amd64/linux32/linux.h user/markj/netdump/sys/amd64/linux32/linux32_sysvec.c user/markj/netdump/sys/arm/allwinner/clkng/ccu_sun8i_r.c user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_clkmsr.c user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_mp.c user/markj/netdump/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c user/markj/netdump/sys/arm/annapurna/alpine/alpine_machdep.c user/markj/netdump/sys/arm/arm/pmap-v4.c user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_fb.c user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_fbd.c user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_machdep.c user/markj/netdump/sys/arm/broadcom/bcm2835/bcm2835_rng.c user/markj/netdump/sys/arm/freescale/fsl_ocotp.c user/markj/netdump/sys/arm/freescale/vybrid/vf_machdep.c user/markj/netdump/sys/arm/mv/mv_common.c user/markj/netdump/sys/arm/samsung/exynos/chrome_ec.c user/markj/netdump/sys/arm/samsung/exynos/exynos5_ehci.c user/markj/netdump/sys/arm/ti/am335x/am335x_lcd.c user/markj/netdump/sys/arm/ti/am335x/am335x_lcd_syscons.c user/markj/netdump/sys/arm64/arm64/efirt_machdep.c user/markj/netdump/sys/cam/ata/ata_da.c user/markj/netdump/sys/cam/cam_iosched.c user/markj/netdump/sys/cam/cam_periph.c user/markj/netdump/sys/cam/cam_periph.h user/markj/netdump/sys/cam/ctl/ctl_frontend_iscsi.c user/markj/netdump/sys/cam/ctl/ctl_frontend_iscsi.h user/markj/netdump/sys/cam/nvme/nvme_da.c user/markj/netdump/sys/cam/scsi/scsi_ch.c user/markj/netdump/sys/cam/scsi/scsi_da.c user/markj/netdump/sys/cam/scsi/scsi_enc.c user/markj/netdump/sys/cam/scsi/scsi_pass.c user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c user/markj/netdump/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c user/markj/netdump/sys/compat/linux/linux_emul.h user/markj/netdump/sys/compat/linux/linux_ioctl.c user/markj/netdump/sys/compat/linux/linux_signal.c user/markj/netdump/sys/compat/linux/linux_stats.c user/markj/netdump/sys/compat/linux/linux_util.c user/markj/netdump/sys/compat/linuxkpi/common/include/linux/kernel.h user/markj/netdump/sys/conf/NOTES user/markj/netdump/sys/conf/config.mk user/markj/netdump/sys/conf/files user/markj/netdump/sys/conf/files.amd64 user/markj/netdump/sys/conf/files.i386 user/markj/netdump/sys/conf/files.powerpc user/markj/netdump/sys/conf/kern.mk user/markj/netdump/sys/conf/kern.opts.mk user/markj/netdump/sys/conf/kern.post.mk user/markj/netdump/sys/conf/kern.pre.mk user/markj/netdump/sys/conf/options user/markj/netdump/sys/contrib/dev/acpica/changes.txt user/markj/netdump/sys/contrib/dev/acpica/components/debugger/dbdisply.c user/markj/netdump/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evevent.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evgpe.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evgpeblk.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evrgnini.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evxface.c user/markj/netdump/sys/contrib/dev/acpica/components/events/evxfgpe.c user/markj/netdump/sys/contrib/dev/acpica/components/executer/exdebug.c user/markj/netdump/sys/contrib/dev/acpica/components/hardware/hwgpe.c user/markj/netdump/sys/contrib/dev/acpica/components/hardware/hwsleep.c user/markj/netdump/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c user/markj/netdump/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c user/markj/netdump/sys/contrib/dev/acpica/components/namespace/nseval.c user/markj/netdump/sys/contrib/dev/acpica/components/namespace/nsload.c user/markj/netdump/sys/contrib/dev/acpica/components/namespace/nsparse.c user/markj/netdump/sys/contrib/dev/acpica/components/namespace/nsxfname.c user/markj/netdump/sys/contrib/dev/acpica/components/parser/psargs.c user/markj/netdump/sys/contrib/dev/acpica/components/parser/psloop.c user/markj/netdump/sys/contrib/dev/acpica/components/parser/psobject.c user/markj/netdump/sys/contrib/dev/acpica/components/tables/tbdata.c user/markj/netdump/sys/contrib/dev/acpica/components/tables/tbinstal.c user/markj/netdump/sys/contrib/dev/acpica/components/tables/tbxfload.c user/markj/netdump/sys/contrib/dev/acpica/components/utilities/utosi.c user/markj/netdump/sys/contrib/dev/acpica/components/utilities/utxfinit.c user/markj/netdump/sys/contrib/dev/acpica/include/acevents.h user/markj/netdump/sys/contrib/dev/acpica/include/acmacros.h user/markj/netdump/sys/contrib/dev/acpica/include/acpixf.h user/markj/netdump/sys/contrib/dev/acpica/include/actypes.h user/markj/netdump/sys/contrib/zstd/Makefile user/markj/netdump/sys/contrib/zstd/NEWS user/markj/netdump/sys/contrib/zstd/README.md user/markj/netdump/sys/contrib/zstd/circle.yml user/markj/netdump/sys/contrib/zstd/contrib/meson/meson.build user/markj/netdump/sys/contrib/zstd/doc/zstd_compression_format.md user/markj/netdump/sys/contrib/zstd/doc/zstd_manual.html user/markj/netdump/sys/contrib/zstd/lib/BUCK user/markj/netdump/sys/contrib/zstd/lib/common/bitstream.h user/markj/netdump/sys/contrib/zstd/lib/common/mem.h user/markj/netdump/sys/contrib/zstd/lib/common/pool.c user/markj/netdump/sys/contrib/zstd/lib/common/xxhash.c user/markj/netdump/sys/contrib/zstd/lib/common/zstd_common.c user/markj/netdump/sys/contrib/zstd/lib/common/zstd_internal.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_compress.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_double_fast.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_double_fast.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_fast.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_fast.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_lazy.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_lazy.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_ldm.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_opt.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstd_opt.h user/markj/netdump/sys/contrib/zstd/lib/compress/zstdmt_compress.c user/markj/netdump/sys/contrib/zstd/lib/compress/zstdmt_compress.h user/markj/netdump/sys/contrib/zstd/lib/decompress/zstd_decompress.c user/markj/netdump/sys/contrib/zstd/lib/deprecated/zbuff_compress.c user/markj/netdump/sys/contrib/zstd/lib/dictBuilder/zdict.c user/markj/netdump/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v01.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v02.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v03.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v04.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v05.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v06.c user/markj/netdump/sys/contrib/zstd/lib/legacy/zstd_v07.c user/markj/netdump/sys/contrib/zstd/lib/zstd.h user/markj/netdump/sys/contrib/zstd/programs/BUCK user/markj/netdump/sys/contrib/zstd/programs/Makefile user/markj/netdump/sys/contrib/zstd/programs/bench.c user/markj/netdump/sys/contrib/zstd/programs/bench.h user/markj/netdump/sys/contrib/zstd/programs/dibio.c user/markj/netdump/sys/contrib/zstd/programs/fileio.c user/markj/netdump/sys/contrib/zstd/programs/fileio.h user/markj/netdump/sys/contrib/zstd/programs/platform.h user/markj/netdump/sys/contrib/zstd/programs/util.h user/markj/netdump/sys/contrib/zstd/programs/zstd.1 user/markj/netdump/sys/contrib/zstd/programs/zstd.1.md user/markj/netdump/sys/contrib/zstd/programs/zstdcli.c user/markj/netdump/sys/contrib/zstd/tests/Makefile user/markj/netdump/sys/contrib/zstd/tests/decodecorpus.c user/markj/netdump/sys/contrib/zstd/tests/fullbench.c user/markj/netdump/sys/contrib/zstd/tests/fuzzer.c user/markj/netdump/sys/contrib/zstd/tests/paramgrill.c user/markj/netdump/sys/contrib/zstd/tests/playTests.sh user/markj/netdump/sys/contrib/zstd/tests/zbufftest.c user/markj/netdump/sys/contrib/zstd/tests/zstreamtest.c user/markj/netdump/sys/contrib/zstd/zlibWrapper/BUCK user/markj/netdump/sys/contrib/zstd/zlibWrapper/examples/zwrapbench.c user/markj/netdump/sys/contrib/zstd/zlibWrapper/zstd_zlibwrapper.c user/markj/netdump/sys/crypto/aesni/aesni.c user/markj/netdump/sys/dev/aac/aac.c user/markj/netdump/sys/dev/aacraid/aacraid.c user/markj/netdump/sys/dev/acpica/acpi.c user/markj/netdump/sys/dev/acpica/acpivar.h user/markj/netdump/sys/dev/cxgbe/adapter.h user/markj/netdump/sys/dev/cxgbe/firmware/t6fw_cfg.txt user/markj/netdump/sys/dev/cxgbe/offload.h user/markj/netdump/sys/dev/cxgbe/t4_main.c user/markj/netdump/sys/dev/cxgbe/tom/t4_connect.c user/markj/netdump/sys/dev/cxgbe/tom/t4_cpl_io.c user/markj/netdump/sys/dev/cxgbe/tom/t4_ddp.c user/markj/netdump/sys/dev/cxgbe/tom/t4_listen.c user/markj/netdump/sys/dev/cxgbe/tom/t4_tom.c user/markj/netdump/sys/dev/cxgbe/tom/t4_tom.h user/markj/netdump/sys/dev/e1000/e1000_82575.c user/markj/netdump/sys/dev/e1000/e1000_mbx.c user/markj/netdump/sys/dev/e1000/e1000_phy.c user/markj/netdump/sys/dev/e1000/e1000_vf.c user/markj/netdump/sys/dev/efidev/efirt.c (contents, props changed) user/markj/netdump/sys/dev/efidev/efirtc.c user/markj/netdump/sys/dev/extres/regulator/regulator.c user/markj/netdump/sys/dev/extres/regulator/regulator.h user/markj/netdump/sys/dev/fdt/fdt_common.c user/markj/netdump/sys/dev/flash/mx25l.c user/markj/netdump/sys/dev/iscsi/iscsi.c user/markj/netdump/sys/dev/isp/isp.c user/markj/netdump/sys/dev/isp/isp_freebsd.c user/markj/netdump/sys/dev/ixgbe/if_ix.c user/markj/netdump/sys/dev/ixgbe/if_ixv.c user/markj/netdump/sys/dev/ixgbe/ixgbe_82598.c user/markj/netdump/sys/dev/ixgbe/ixgbe_82599.c user/markj/netdump/sys/dev/ixgbe/ixgbe_api.c user/markj/netdump/sys/dev/ixgbe/ixgbe_common.c user/markj/netdump/sys/dev/ixgbe/ixgbe_common.h user/markj/netdump/sys/dev/ixgbe/ixgbe_dcb.c user/markj/netdump/sys/dev/ixgbe/ixgbe_dcb_82598.c user/markj/netdump/sys/dev/ixgbe/ixgbe_dcb_82599.c user/markj/netdump/sys/dev/ixgbe/ixgbe_phy.c user/markj/netdump/sys/dev/ixgbe/ixgbe_type.h user/markj/netdump/sys/dev/ixgbe/ixgbe_vf.c user/markj/netdump/sys/dev/ixgbe/ixgbe_x540.c user/markj/netdump/sys/dev/ixgbe/ixgbe_x550.c user/markj/netdump/sys/dev/md/md.c user/markj/netdump/sys/dev/mlx5/driver.h user/markj/netdump/sys/dev/mpr/mpi/mpi2.h user/markj/netdump/sys/dev/mpr/mpi/mpi2_cnfg.h user/markj/netdump/sys/dev/mpr/mpi/mpi2_history.txt user/markj/netdump/sys/dev/mpr/mpi/mpi2_ioc.h user/markj/netdump/sys/dev/mpr/mpr.c user/markj/netdump/sys/dev/mpr/mpr_ioctl.h user/markj/netdump/sys/dev/mpr/mpr_sas.c user/markj/netdump/sys/dev/mpr/mpr_sas_lsi.c user/markj/netdump/sys/dev/mpr/mpr_user.c user/markj/netdump/sys/dev/mpr/mprvar.h user/markj/netdump/sys/dev/mps/mps.c user/markj/netdump/sys/dev/mps/mps_sas_lsi.c user/markj/netdump/sys/dev/mps/mpsvar.h user/markj/netdump/sys/dev/nvme/nvme.h user/markj/netdump/sys/dev/nvme/nvme_ctrlr.c user/markj/netdump/sys/dev/nvme/nvme_ns.c user/markj/netdump/sys/dev/nvme/nvme_private.h user/markj/netdump/sys/dev/nvme/nvme_qpair.c user/markj/netdump/sys/dev/ofw/ofw_subr.c user/markj/netdump/sys/dev/ofw/openfirmio.c user/markj/netdump/sys/dev/otus/if_otus.c user/markj/netdump/sys/dev/ow/owc_gpiobus.c user/markj/netdump/sys/dev/random/randomdev.c user/markj/netdump/sys/dev/rtwn/if_rtwn_ridx.h user/markj/netdump/sys/dev/rtwn/rtl8188e/r88e_chan.c user/markj/netdump/sys/dev/rtwn/rtl8188e/r88e_rx.c user/markj/netdump/sys/dev/rtwn/rtl8192c/r92c_chan.c user/markj/netdump/sys/dev/rtwn/rtl8192c/r92c_rx.c user/markj/netdump/sys/dev/rtwn/rtl8812a/r12a_rx.c user/markj/netdump/sys/dev/usb/wlan/if_rum.c user/markj/netdump/sys/dev/usb/wlan/if_run.c user/markj/netdump/sys/dev/usb/wlan/if_uath.c user/markj/netdump/sys/dev/usb/wlan/if_upgt.c user/markj/netdump/sys/dev/usb/wlan/if_ural.c user/markj/netdump/sys/dev/usb/wlan/if_urtw.c user/markj/netdump/sys/dev/usb/wlan/if_zyd.c user/markj/netdump/sys/dev/vnic/thunder_bgx_fdt.c user/markj/netdump/sys/dev/vt/hw/vga/vt_vga.c user/markj/netdump/sys/dts/Makefile user/markj/netdump/sys/dts/arm/rpi.dts user/markj/netdump/sys/dts/arm/rpi2.dts user/markj/netdump/sys/geom/geom.h user/markj/netdump/sys/geom/geom_subr.c user/markj/netdump/sys/geom/label/g_label.c user/markj/netdump/sys/i386/i386/vm86.c user/markj/netdump/sys/i386/linux/imgact_linux.c user/markj/netdump/sys/i386/linux/linux.h user/markj/netdump/sys/i386/linux/linux_machdep.c user/markj/netdump/sys/i386/linux/linux_sysvec.c user/markj/netdump/sys/isa/rtc.h user/markj/netdump/sys/kern/imgact_aout.c user/markj/netdump/sys/kern/imgact_binmisc.c user/markj/netdump/sys/kern/imgact_elf.c user/markj/netdump/sys/kern/imgact_gzip.c user/markj/netdump/sys/kern/imgact_shell.c user/markj/netdump/sys/kern/kern_mutex.c user/markj/netdump/sys/kern/kern_rwlock.c user/markj/netdump/sys/kern/kern_sendfile.c user/markj/netdump/sys/kern/kern_sx.c user/markj/netdump/sys/kern/subr_eventhandler.c user/markj/netdump/sys/kern/subr_gtaskqueue.c user/markj/netdump/sys/kern/subr_uio.c user/markj/netdump/sys/kern/tty_compat.c user/markj/netdump/sys/kern/vfs_bio.c user/markj/netdump/sys/kern/vfs_mountroot.c user/markj/netdump/sys/mips/include/param.h user/markj/netdump/sys/mips/mips/support.S user/markj/netdump/sys/modules/Makefile user/markj/netdump/sys/modules/aac/Makefile user/markj/netdump/sys/modules/aacraid/Makefile user/markj/netdump/sys/modules/cam/Makefile user/markj/netdump/sys/modules/cxgbe/tom/Makefile user/markj/netdump/sys/modules/hyperv/vmbus/Makefile user/markj/netdump/sys/modules/imx/imx_spi/Makefile user/markj/netdump/sys/modules/iser/Makefile user/markj/netdump/sys/modules/isp/Makefile user/markj/netdump/sys/modules/linux/Makefile user/markj/netdump/sys/modules/linux_common/Makefile user/markj/netdump/sys/modules/netgraph/checksum/Makefile user/markj/netdump/sys/modules/netmap/Makefile user/markj/netdump/sys/modules/sgx/Makefile user/markj/netdump/sys/modules/usb/rum/Makefile user/markj/netdump/sys/modules/usb/run/Makefile user/markj/netdump/sys/modules/usb/uath/Makefile user/markj/netdump/sys/modules/usb/upgt/Makefile user/markj/netdump/sys/modules/usb/ural/Makefile user/markj/netdump/sys/modules/usb/urtw/Makefile user/markj/netdump/sys/modules/usb/zyd/Makefile user/markj/netdump/sys/net/if_ethersubr.c user/markj/netdump/sys/net/if_llatbl.h user/markj/netdump/sys/net/if_media.h user/markj/netdump/sys/netinet/cc/cc.c user/markj/netdump/sys/netinet/cc/cc.h user/markj/netdump/sys/netinet/cc/cc_newreno.c user/markj/netdump/sys/netinet/if_ether.c user/markj/netdump/sys/netinet/in.c user/markj/netdump/sys/netinet/tcp_syncache.c user/markj/netdump/sys/netinet6/in6.c user/markj/netdump/sys/netipsec/keysock.c user/markj/netdump/sys/netipsec/keysock.h user/markj/netdump/sys/netpfil/ipfw/ip_fw2.c user/markj/netdump/sys/netpfil/pf/pf_table.c user/markj/netdump/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c user/markj/netdump/sys/powerpc/aim/aim_machdep.c user/markj/netdump/sys/powerpc/aim/locore64.S user/markj/netdump/sys/powerpc/aim/mmu_oea64.c user/markj/netdump/sys/powerpc/booke/pmap.c user/markj/netdump/sys/powerpc/cpufreq/mpc85xx_jog.c user/markj/netdump/sys/powerpc/ofw/ofw_machdep.c user/markj/netdump/sys/powerpc/ofw/ofwcall64.S user/markj/netdump/sys/powerpc/powerpc/machdep.c user/markj/netdump/sys/powerpc/pseries/platform_chrp.c user/markj/netdump/sys/security/audit/audit_bsm_klib.c user/markj/netdump/sys/sys/aac_ioctl.h user/markj/netdump/sys/sys/imgact_elf.h user/markj/netdump/sys/sys/ioccom.h user/markj/netdump/sys/sys/mdioctl.h user/markj/netdump/sys/vm/vm_fault.c user/markj/netdump/sys/vm/vm_page.c user/markj/netdump/sys/vm/vm_pageout.c user/markj/netdump/sys/vm/vm_pageout.h user/markj/netdump/sys/vm/vm_pagequeue.h user/markj/netdump/sys/vm/vm_reserv.c user/markj/netdump/sys/x86/include/ucontext.h user/markj/netdump/sys/x86/isa/atrtc.c user/markj/netdump/sys/x86/isa/clock.c user/markj/netdump/sys/x86/isa/isa_dma.c user/markj/netdump/sys/x86/x86/autoconf.c user/markj/netdump/sys/x86/x86/identcpu.c user/markj/netdump/tests/sys/aio/aio_kqueue_test.c user/markj/netdump/tests/sys/aio/aio_test.c user/markj/netdump/tests/sys/cddl/zfs/include/libtest.kshlib user/markj/netdump/tests/sys/cddl/zfs/tests/cache/cache.kshlib user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_005_neg.ksh user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add.kshlib user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_export/setup.ksh user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export.cfg user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_history/setup.ksh user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history.cfg user/markj/netdump/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh user/markj/netdump/tests/sys/cddl/zfs/tests/hotplug/setup.ksh user/markj/netdump/tests/sys/cddl/zfs/tests/slog/slog.kshlib user/markj/netdump/usr.bin/calendar/calendars/calendar.freebsd user/markj/netdump/usr.bin/dpv/dpv.1 user/markj/netdump/usr.bin/iscsictl/iscsictl.c user/markj/netdump/usr.bin/tftp/tftp.c user/markj/netdump/usr.sbin/bhyvectl/bhyvectl.c user/markj/netdump/usr.sbin/bsdconfig/bsdconfig.8 user/markj/netdump/usr.sbin/cxgbetool/Makefile user/markj/netdump/usr.sbin/cxgbetool/cxgbetool.c user/markj/netdump/usr.sbin/efibootmgr/efibootmgr.c user/markj/netdump/usr.sbin/lpr/common_source/ctlinfo.c user/markj/netdump/usr.sbin/mpsutil/Makefile user/markj/netdump/usr.sbin/mpsutil/mps_show.c user/markj/netdump/usr.sbin/mpsutil/mpsutil.c user/markj/netdump/usr.sbin/mpsutil/mpsutil.h user/markj/netdump/usr.sbin/rpcbind/rpcbind.c user/markj/netdump/usr.sbin/usbconfig/usbconfig.8 user/markj/netdump/usr.sbin/usbconfig/usbconfig.c Directory Properties: user/markj/netdump/ (props changed) user/markj/netdump/cddl/ (props changed) user/markj/netdump/cddl/contrib/opensolaris/ (props changed) user/markj/netdump/contrib/blacklist/ (props changed) user/markj/netdump/contrib/elftoolchain/ (props changed) user/markj/netdump/contrib/llvm/ (props changed) user/markj/netdump/contrib/llvm/tools/clang/ (props changed) user/markj/netdump/gnu/usr.bin/gdb/ (props changed) user/markj/netdump/sys/cddl/contrib/opensolaris/ (props changed) user/markj/netdump/sys/contrib/dev/acpica/ (props changed) user/markj/netdump/sys/contrib/zstd/ (props changed) user/markj/netdump/usr.sbin/cxgbetool/reg_defs_t5.c (props changed) user/markj/netdump/usr.sbin/cxgbetool/reg_defs_t6.c (props changed) Modified: user/markj/netdump/Makefile.inc1 ============================================================================== --- user/markj/netdump/Makefile.inc1 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/Makefile.inc1 Tue Mar 20 15:04:19 2018 (r331243) @@ -1698,6 +1698,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_defaul pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \ + -e "s/%KERNELDIR%/kernel/" \ -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ @@ -1733,6 +1734,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ -e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \ + -e "s/%KERNELDIR%/kernel.${_kernel}/" \ -e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ Modified: user/markj/netdump/ObsoleteFiles.inc ============================================================================== --- user/markj/netdump/ObsoleteFiles.inc Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/ObsoleteFiles.inc Tue Mar 20 15:04:19 2018 (r331243) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays +OLD_DIRS+=boot/overlays +# 20180311: remove sys/sys/i386/include/pcaudioio.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pcaudioio.h +.endif +# 20180310: remove sys/sys/dataacq.h +OLD_FILES+=usr/include/sys/dataacq.h # 20180306: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill Modified: user/markj/netdump/bin/ps/extern.h ============================================================================== --- user/markj/netdump/bin/ps/extern.h Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/bin/ps/extern.h Tue Mar 20 15:04:19 2018 (r331243) @@ -55,6 +55,7 @@ char *emulname(KINFO *, VARENT *); VARENT *find_varentry(VAR *); const char *fmt_argv(char **, char *, char *, size_t); double getpcpu(const KINFO *); +char *jailname(KINFO *, VARENT *); char *kvar(KINFO *, VARENT *); char *label(KINFO *, VARENT *); char *loginclass(KINFO *, VARENT *); Modified: user/markj/netdump/bin/ps/keyword.c ============================================================================== --- user/markj/netdump/bin/ps/keyword.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/bin/ps/keyword.c Tue Mar 20 15:04:19 2018 (r331243) @@ -108,6 +108,7 @@ static VAR var[] = { {"inblk", "INBLK", NULL, "read-blocks", USER, rvar, ROFF(ru_inblock), LONG, "ld", 0}, {"inblock", "", "inblk", NULL, 0, NULL, 0, CHAR, NULL, 0}, + {"jail", "JAIL", NULL, "jail-name", LJUST, jailname, 0, CHAR, NULL, 0}, {"jid", "JID", NULL, "jail-id", 0, kvar, KOFF(ki_jid), INT, "d", 0}, {"jobc", "JOBC", NULL, "job-control-count", 0, kvar, KOFF(ki_jobc), SHORT, "d", 0}, Modified: user/markj/netdump/bin/ps/print.c ============================================================================== --- user/markj/netdump/bin/ps/print.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/bin/ps/print.c Tue Mar 20 15:04:19 2018 (r331243) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -839,4 +840,17 @@ loginclass(KINFO *k, VARENT *ve __unused) return (strdup("-")); } return (strdup(k->ki_p->ki_loginclass)); +} + +char * +jailname(KINFO *k, VARENT *ve __unused) +{ + char *name; + + if (k->ki_p->ki_jid == 0) + return (strdup("-")); + name = jail_getname(k->ki_p->ki_jid); + if (name == NULL) + return (strdup("-")); + return (name); } Modified: user/markj/netdump/bin/ps/ps.1 ============================================================================== --- user/markj/netdump/bin/ps/ps.1 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/bin/ps/ps.1 Tue Mar 20 15:04:19 2018 (r331243) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd January 23, 2018 +.Dd March 13, 2018 .Dt PS 1 .Os .Sh NAME @@ -101,6 +101,14 @@ The default output format includes, for each process, controlling terminal, state, CPU time (including both user and system time) and associated command. .Pp +If the +.Nm +process is associated with a terminal, the default output width is that of the +terminal; otherwise the output width is unlimited. +See also the +.Fl w +option. +.Pp The options are as follows: .Bl -tag -width indent .It Fl -libxo @@ -257,13 +265,15 @@ option implies the .Fl m option. .It Fl w -Use 132 columns to display information, instead of the default which -is your window size. +Use at least 132 columns to display information, instead of the default which +is the window size if +.Nm +is associated with a terminal. If the .Fl w option is specified more than once, .Nm -will use as many columns as necessary without regard for your window size. +will use as many columns as necessary without regard for the window size. Note that this option has no effect if the .Dq command column is not the last column displayed. @@ -566,6 +576,8 @@ group name (from egid) (alias .It Cm inblk total blocks read (alias .Cm inblock ) +.It Cm jail +jail name .It Cm jid jail ID .It Cm jobc Modified: user/markj/netdump/bin/ps/ps.c ============================================================================== --- user/markj/netdump/bin/ps/ps.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/bin/ps/ps.c Tue Mar 20 15:04:19 2018 (r331243) @@ -202,6 +202,11 @@ main(int argc, char *argv[]) * any of stdout, stderr, or stdin is a terminal. The intent * is that "ps", "ps | more", and "ps | grep" all use the same * default line length unless -w is specified. + * + * If not interactive, the default length was traditionally 79. + * It has been changed to unlimited. This is mostly for the + * benefit of non-interactive scripts, which arguably should + * use -ww, but is compatible with Linux. */ if ((cols = getenv("COLUMNS")) != NULL && *cols != '\0') termwidth = atoi(cols); @@ -209,7 +214,7 @@ main(int argc, char *argv[]) ioctl(STDERR_FILENO, TIOCGWINSZ, (char *)&ws) == -1 && ioctl(STDIN_FILENO, TIOCGWINSZ, (char *)&ws) == -1) || ws.ws_col == 0) - termwidth = 79; + termwidth = UNLIMITED; else termwidth = ws.ws_col - 1; Modified: user/markj/netdump/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- user/markj/netdump/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Tue Mar 20 15:04:19 2018 (r331243) @@ -35,7 +35,7 @@ int main(int argc, char **argv) { for (;;) { - (void) syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); } return (0); Modified: user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Tue Mar 20 15:04:19 2018 (r331243) @@ -22,6 +22,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017-2018 Mark Johnston */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; Modified: user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Tue Mar 20 15:04:19 2018 (r331243) @@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags) "cannot take address of bit-field\n"); } - dtt.dtt_object = NULL; - dtt.dtt_ctfp = cp->dn_ctfp; - dtt.dtt_type = cp->dn_type; + dtt = (dtrace_typeinfo_t){ + .dtt_ctfp = cp->dn_ctfp, + .dtt_type = cp->dn_type, + }; if (dt_type_pointer(&dtt) == -1) { xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n", Modified: user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Tue Mar 20 15:04:19 2018 (r331243) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); } Modified: user/markj/netdump/contrib/blacklist/bin/conf.c ============================================================================== --- user/markj/netdump/contrib/blacklist/bin/conf.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/blacklist/bin/conf.c Tue Mar 20 15:04:19 2018 (r331243) @@ -1119,6 +1119,7 @@ conf_parse(const char *f) confset_free(&lc); confset_free(&rc); fclose(fp); + free(line); return; } } Modified: user/markj/netdump/contrib/elftoolchain/nm/nm.c ============================================================================== --- user/markj/netdump/contrib/elftoolchain/nm/nm.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/elftoolchain/nm/nm.c Tue Mar 20 15:04:19 2018 (r331243) @@ -1310,14 +1310,17 @@ read_elf(Elf *elf, const char *filename, Elf_Kind kind line_info = malloc(sizeof(struct line_info_head)); func_info = malloc(sizeof(struct func_info_head)); var_info = malloc(sizeof(struct var_info_head)); + if (line_info != NULL) + SLIST_INIT(line_info); + if (func_info != NULL) + SLIST_INIT(func_info); + if (var_info != NULL) + SLIST_INIT(var_info); if (line_info == NULL || func_info == NULL || var_info == NULL) { warn("malloc"); (void) dwarf_finish(dbg, &de); goto process_sym; } - SLIST_INIT(line_info); - SLIST_INIT(func_info); - SLIST_INIT(var_info); while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, &de)) == DW_DLV_OK) { Modified: user/markj/netdump/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- user/markj/netdump/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Tue Mar 20 15:04:19 2018 (r331243) @@ -3697,7 +3697,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P. - if (match(Ops[1], m_Zero())) + if (match(Ops[1], m_Zero()) && Ops[0]->getType() == GEPTy) return Ops[0]; Type *Ty = SrcTy; @@ -3706,7 +3706,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P if P points to a type of zero size. - if (TyAllocSize == 0) + if (TyAllocSize == 0 && Ops[0]->getType() == GEPTy) return Ops[0]; // The following transforms are only safe if the ptrtoint cast Modified: user/markj/netdump/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- user/markj/netdump/contrib/llvm/lib/IR/ConstantFold.cpp Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/llvm/lib/IR/ConstantFold.cpp Tue Mar 20 15:04:19 2018 (r331243) @@ -2018,8 +2018,16 @@ static bool isInBoundsIndices(ArrayRef Idxs) // If the first index is one and all the rest are zero, it's in bounds, // by the one-past-the-end rule. - if (!cast(Idxs[0])->isOne()) - return false; + if (auto *CI = dyn_cast(Idxs[0])) { + if (!CI->isOne()) + return false; + } else { + auto *CV = cast(Idxs[0]); + CI = dyn_cast_or_null(CV->getSplatValue()); + if (!CI || !CI->isOne()) + return false; + } + for (unsigned i = 1, e = Idxs.size(); i != e; ++i) if (!cast(Idxs[i])->isNullValue()) return false; @@ -2049,15 +2057,18 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe ArrayRef Idxs) { if (Idxs.empty()) return C; - if (isa(C)) { - Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value * const *)Idxs.data(), Idxs.size())); + Type *GEPTy = GetElementPtrInst::getGEPReturnType( + C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + + if (isa(C)) return UndefValue::get(GEPTy); - } Constant *Idx0 = cast(Idxs[0]); if (Idxs.size() == 1 && (Idx0->isNullValue() || isa(Idx0))) - return C; + return GEPTy->isVectorTy() && !C->getType()->isVectorTy() + ? ConstantVector::getSplat( + cast(GEPTy)->getNumElements(), C) + : C; if (C->isNullValue()) { bool isNull = true; Modified: user/markj/netdump/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp ============================================================================== --- user/markj/netdump/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp Tue Mar 20 15:04:19 2018 (r331243) @@ -1034,8 +1034,12 @@ Address CodeGenFunction::EmitPointerWithAlignment(cons // Derived-to-base conversions. case CK_UncheckedDerivedToBase: case CK_DerivedToBase: { - Address Addr = EmitPointerWithAlignment(CE->getSubExpr(), BaseInfo, - TBAAInfo); + // TODO: Support accesses to members of base classes in TBAA. For now, we + // conservatively pretend that the complete object is of the base class + // type. + if (TBAAInfo) + *TBAAInfo = CGM.getTBAAAccessInfo(E->getType()); + Address Addr = EmitPointerWithAlignment(CE->getSubExpr(), BaseInfo); auto Derived = CE->getSubExpr()->getType()->getPointeeCXXRecordDecl(); return GetAddressOfBaseClass(Addr, Derived, CE->path_begin(), CE->path_end(), Modified: user/markj/netdump/contrib/telnet/telnetd/telnetd.c ============================================================================== --- user/markj/netdump/contrib/telnet/telnetd/telnetd.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/contrib/telnet/telnetd/telnetd.c Tue Mar 20 15:04:19 2018 (r331243) @@ -925,7 +925,7 @@ telnet(int f, int p, char *host) edithost(HE, host_name); if (hostinfo && *IM) putf(IM, ptyibuf2); - if (IF && if_fd != -1) { + if (if_fd != -1) { if (fstat(if_fd, &statbuf) != -1 && statbuf.st_size > 0) { if_buf = (char *) mmap (0, statbuf.st_size, PROT_READ, 0, if_fd, 0); Modified: user/markj/netdump/etc/mtree/BSD.root.dist ============================================================================== --- user/markj/netdump/etc/mtree/BSD.root.dist Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/etc/mtree/BSD.root.dist Tue Mar 20 15:04:19 2018 (r331243) @@ -11,6 +11,8 @@ defaults .. dtb + overlays tags=package=runtime + .. .. firmware .. @@ -19,8 +21,6 @@ kernel .. modules - .. - overlays tags=package=runtime .. zfs .. Modified: user/markj/netdump/etc/mtree/BSD.tests.dist ============================================================================== --- user/markj/netdump/etc/mtree/BSD.tests.dist Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/etc/mtree/BSD.tests.dist Tue Mar 20 15:04:19 2018 (r331243) @@ -382,6 +382,8 @@ .. rtld-elf .. + tftpd + .. .. sbin dhclient Modified: user/markj/netdump/etc/rc.d/fsck ============================================================================== --- user/markj/netdump/etc/rc.d/fsck Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/etc/rc.d/fsck Tue Mar 20 15:04:19 2018 (r331243) @@ -57,7 +57,7 @@ fsck_start() echo "Reboot failed; help!" stop_boot ;; - 8) + 8|16) if checkyesno fsck_y_enable; then echo "File system preen failed, trying fsck -y ${fsck_y_flags}" fsck -y ${fsck_y_flags} Modified: user/markj/netdump/etc/rc.d/hostname ============================================================================== --- user/markj/netdump/etc/rc.d/hostname Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/etc/rc.d/hostname Tue Mar 20 15:04:19 2018 (r331243) @@ -60,9 +60,11 @@ hostname_start() # Have we got a hostname yet? # if [ -z "${hostname}" ]; then - # Null hostname is probably OK if DHCP is in use. + # Null hostname is probably OK if DHCP is in use, + # or when hostname is already set (common for jails). # - if [ -z "`list_net_interfaces dhcp`" ]; then + if [ -z "`list_net_interfaces dhcp`" -a \ + -z "`/bin/hostname`" ]; then warn "\$hostname is not set -- see rc.conf(5)." fi return Modified: user/markj/netdump/gnu/usr.bin/gdb/kgdb/trgt_amd64.c ============================================================================== --- user/markj/netdump/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/gnu/usr.bin/gdb/kgdb/trgt_amd64.c Tue Mar 20 15:04:19 2018 (r331243) @@ -189,6 +189,7 @@ kgdb_trgt_trapframe_sniffer(struct frame_info *next_fr if (pname == NULL) return (NULL); if (strcmp(pname, "calltrap") == 0 || + strcmp(pname, "fast_syscall_common") == 0 || strcmp(pname, "mchk_calltrap") == 0 || strcmp(pname, "nmi_calltrap") == 0 || (pname[0] == 'X' && pname[1] != '_')) Modified: user/markj/netdump/lib/libc/net/getnameinfo.3 ============================================================================== --- user/markj/netdump/lib/libc/net/getnameinfo.3 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libc/net/getnameinfo.3 Tue Mar 20 15:04:19 2018 (r331243) @@ -18,7 +18,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 28, 2016 +.Dd March 15, 2018 .Dt GETNAMEINFO 3 .Os .Sh NAME @@ -80,6 +80,20 @@ or UNIX-domain respectively that is .Fa salen bytes long. +If +.Fa salen +is shorter than the length corresponding to the specified +address family or longer than +.Fn sizeof "struct sockaddr_storage" , +it returns +.Er EAI_FAMILY . +Note that +.Va sa->sa_len +should be consistent with +.Fa salen +though the value of +.Va sa->sa_len +is not directly used in this function. .Pp The host and service names associated with .Fa sa Modified: user/markj/netdump/lib/libc/net/getnameinfo.c ============================================================================== --- user/markj/netdump/lib/libc/net/getnameinfo.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libc/net/getnameinfo.c Tue Mar 20 15:04:19 2018 (r331243) @@ -124,26 +124,36 @@ getnameinfo(const struct sockaddr *sa, socklen_t salen afd = find_afd(sa->sa_family); if (afd == NULL) return (EAI_FAMILY); + /* + * getnameinfo() accepts an salen of sizeof(struct sockaddr_storage) + * at maximum as shown in RFC 4038 Sec.6.2.3. + */ + if (salen > sizeof(struct sockaddr_storage)) + return (EAI_FAMILY); + switch (sa->sa_family) { case PF_LOCAL: /* - * PF_LOCAL uses variable sa->sa_len depending on the + * PF_LOCAL uses variable salen depending on the * content length of sun_path. Require 1 byte in * sun_path at least. */ - if (salen > afd->a_socklen || - salen <= afd->a_socklen - + if (salen <= afd->a_socklen - sizeofmember(struct sockaddr_un, sun_path)) - return (EAI_FAIL); + return (EAI_FAMILY); + else if (salen > afd->a_socklen) + salen = afd->a_socklen; break; case PF_LINK: if (salen <= afd->a_socklen - sizeofmember(struct sockaddr_dl, sdl_data)) - return (EAI_FAIL); + return (EAI_FAMILY); break; default: - if (salen != afd->a_socklen) - return (EAI_FAIL); + if (salen < afd->a_socklen) + return (EAI_FAMILY); + else + salen = afd->a_socklen; break; } @@ -517,7 +527,7 @@ getnameinfo_un(const struct afd *afd, if (serv != NULL && servlen > 0) *serv = '\0'; if (host != NULL && hostlen > 0) { - pathlen = sa->sa_len - afd->a_off; + pathlen = salen - afd->a_off; if (pathlen + 1 > hostlen) { *host = '\0'; Modified: user/markj/netdump/lib/libc/sys/sendfile.2 ============================================================================== --- user/markj/netdump/lib/libc/sys/sendfile.2 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libc/sys/sendfile.2 Tue Mar 20 15:04:19 2018 (r331243) @@ -129,8 +129,8 @@ Starting with .Nm sending files off the .Xr ffs 7 -filesystem doesn't block on I/O -(see +filesystem does not block on I/O +(see .Sx IMPLEMENTATION NOTES ), so the condition no longer applies. However, it is safe if an application utilizes @@ -140,8 +140,8 @@ and on performs the same action as it did in older .Fx -versions, e.g. -.Xr aio_read 2, +versions, e.g., +.Xr aio_read 2 , .Xr read 2 or .Nm @@ -210,7 +210,7 @@ The .Fx implementation of .Fn sendfile -doesn't block on disk I/O when it sends a file off the +does not block on disk I/O when it sends a file off the .Xr ffs 7 filesystem. The syscall returns success before the actual I/O completes, and data Modified: user/markj/netdump/lib/libcasper/libcasper/libcasper.3 ============================================================================== --- user/markj/netdump/lib/libcasper/libcasper/libcasper.3 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/libcasper/libcasper.3 Tue Mar 20 15:04:19 2018 (r331243) @@ -1,4 +1,5 @@ .\" Copyright (c) 2013 The FreeBSD Foundation +.\" Copyright (c) 2018 Mariusz Zaborski .\" All rights reserved. .\" .\" This documentation was written by Pawel Jakub Dawidek under sponsorship @@ -27,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2018 +.Dd March 6, 2018 .Dt LIBCASPER 3 .Os .Sh NAME @@ -181,7 +182,7 @@ over the given capability. The .Fn cap_xfer_nvlist function sends the given -.Xr nvlist 9, +.Xr nvlist 9 , destroys it and receives new .Xr nvlist 9 in response over the given capability. @@ -252,63 +253,18 @@ The and .Fn cap_unwrap functions always succeed. -.Sh EXAMPLES -The following example first opens capability to the casper then using this -capability creates new capability to the -.Nm system.dns -casper service and uses the latter capability to resolve IP address. -.Bd -literal -cap_channel_t *capcas, *capdns; -nvlist_t *limits; -const char *ipstr = "127.0.0.1"; -struct in_addr ip; -struct hostent *hp; - -/* Open capability to the Casper. */ -capcas = cap_init(); -if (capcas == NULL) - err(1, "Unable to contact Casper"); - -/* Enter capability mode sandbox. */ -if (cap_enter() < 0 && errno != ENOSYS) - err(1, "Unable to enter capability mode"); - -/* Use Casper capability to create capability to the system.dns service. */ -capdns = cap_service_open(capcas, "system.dns"); -if (capdns == NULL) - err(1, "Unable to open system.dns service"); - -/* Close Casper capability, we don't need it anymore. */ -cap_close(capcas); - -/* Limit system.dns to reverse DNS lookups and IPv4 addresses. */ -limits = nvlist_create(0); -nvlist_add_string(limits, "type", "ADDR"); -nvlist_add_number(limits, "family", (uint64_t)AF_INET); -if (cap_limit_set(capdns, limits) < 0) - err(1, "Unable to limit access to the system.dns service"); - -/* Convert IP address in C-string to in_addr. */ -if (!inet_aton(ipstr, &ip)) - errx(1, "Unable to parse IP address %s.", ipstr); - -/* Find hostname for the given IP address. */ -hp = cap_gethostbyaddr(capdns, (const void *)&ip, sizeof(ip), AF_INET); -if (hp == NULL) - errx(1, "No name associated with %s.", ipstr); - -printf("Name associated with %s is %s.\\n", ipstr, hp->h_name); -.Ed .Sh SEE ALSO -.Xr cap_enter 2 , +.Xr errno 2 , .Xr execve 2 , .Xr kevent 2 , .Xr poll 2 , .Xr select 2 , -.Xr cap_gethostbyaddr 3 , -.Xr err 3 , -.Xr gethostbyaddr 3 , -.Xr inet_aton 3 , +.Xr cap_dns 3 , +.Xr cap_grp 3 , +.Xr cap_pwd 3 , +.Xr cap_ranodm 3 , +.Xr cap_sysctl 3 , +.Xr cap_syslog 3 , .Xr capsicum 4 , .Xr unix 4 , .Xr nv 9 Modified: user/markj/netdump/lib/libcasper/services/cap_dns/cap_dns.3 ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_dns/cap_dns.3 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_dns/cap_dns.3 Tue Mar 20 15:04:19 2018 (r331243) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2018 +.Dd March 18, 2018 .Dt CAP_DNS 3 .Os .Sh NAME @@ -193,7 +193,7 @@ printf("Name associated with %s is %s.\\n", ipstr, hp- .Xr gethostbyaddr 3 , .Xr gethostbyname 3 , .Xr gethostbyname2 3 , -.Xr getnameinfo 3, +.Xr getnameinfo 3 , .Xr capsicum 4 , .Xr nv 9 .Sh AUTHORS Modified: user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.3 ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.3 Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.3 Tue Mar 20 15:04:19 2018 (r331243) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 26, 2018 +.Dd March 18, 2018 .Dt CAP_GRP 3 .Os .Sh NAME @@ -70,7 +70,7 @@ .Ft int .Fn cap_grp_limit_fields "cap_channel_t *chan" "const char * const *fields" "size_t nfields" .Ft int -.Fn cap_grp_limit_groups "cap_channel_t *chan" "const char * const *names" "size_t nnames" "gid_t *gids" "size_t ngids" +.Fn cap_grp_limit_groups "cap_channel_t *chan" "const char * const *names" "size_t nnames" "const gid_t *gids" "size_t ngids" .Sh DESCRIPTION The functions .Fn cap_getgrent , @@ -163,7 +163,7 @@ casper service and uses it to get a group name. cap_channel_t *capcas, *capgrp; const char *cmds[] = { "getgrgid" }; const char *fields[] = { "gr_name" }; -gid_t gid[] = { 1 }; +const gid_t gid[] = { 1 }; struct group *group; /* Open capability to Casper. */ Modified: user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.c ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.c Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.c Tue Mar 20 15:04:19 2018 (r331243) @@ -410,7 +410,7 @@ cap_grp_limit_fields(cap_channel_t *chan, const char * int cap_grp_limit_groups(cap_channel_t *chan, const char * const *names, - size_t nnames, gid_t *gids, size_t ngids) + size_t nnames, const gid_t *gids, size_t ngids) { nvlist_t *limits, *groups; unsigned int i; Modified: user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.h ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.h Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_grp/cap_grp.h Tue Mar 20 15:04:19 2018 (r331243) @@ -57,7 +57,7 @@ int cap_grp_limit_cmds(cap_channel_t *chan, const char int cap_grp_limit_fields(cap_channel_t *chan, const char * const *fields, size_t nfields); int cap_grp_limit_groups(cap_channel_t *chan, const char * const *names, - size_t nnames, gid_t *gids, size_t ngids); + size_t nnames, const gid_t *gids, size_t ngids); #else #define cap_getgrent(chan) getgrent() #define cap_getgrnam(chan, name) getgrnam(name) Modified: user/markj/netdump/lib/libcasper/services/cap_pwd/Makefile ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_pwd/Makefile Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_pwd/Makefile Tue Mar 20 15:04:19 2018 (r331243) @@ -24,4 +24,20 @@ CFLAGS+=-I${.CURDIR} HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +MAN+= cap_pwd.3 + +MLINKS+=cap_pwd.3 libcap_pwd.3 +MLINKS+=cap_pwd.3 cap_getpwent.3 +MLINKS+=cap_pwd.3 cap_getpwnam.3 +MLINKS+=cap_pwd.3 cap_getpwuid.3 +MLINKS+=cap_pwd.3 cap_getpwent_r.3 +MLINKS+=cap_pwd.3 cap_getpwnam_r.3 +MLINKS+=cap_pwd.3 cap_getpwuid_r.3 +MLINKS+=cap_pwd.3 cap_setpassent.3 +MLINKS+=cap_pwd.3 cap_setpwent.3 +MLINKS+=cap_pwd.3 cap_endpwent.3 +MLINKS+=cap_pwd.3 cap_pwd_limit_cmds.3 +MLINKS+=cap_pwd.3 cap_pwd_limit_fields.3 +MLINKS+=cap_pwd.3 cap_pwd_limit_users.3 + .include Copied: user/markj/netdump/lib/libcasper/services/cap_pwd/cap_pwd.3 (from r331242, head/lib/libcasper/services/cap_pwd/cap_pwd.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/markj/netdump/lib/libcasper/services/cap_pwd/cap_pwd.3 Tue Mar 20 15:04:19 2018 (r331243, copy of r331242, head/lib/libcasper/services/cap_pwd/cap_pwd.3) @@ -0,0 +1,234 @@ +.\" Copyright (c) 2018 Mariusz Zaborski +.\" All rights reserved. +.\" +.\" 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 AUTHORS 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 AUTHORS 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$ +.\" +.Dd March 18, 2018 +.Dt CAP_PWD 3 +.Os +.Sh NAME +.Nm cap_getpwent , +.Nm cap_getpwnam , +.Nm cap_getpwuid , +.Nm cap_getpwent_r , +.Nm cap_getpwnam_r , +.Nm cap_getpwuid_r , +.Nm cap_setpassent , +.Nm cap_setpwent , +.Nm cap_endpwent , +.Nm cap_pwd_limit_cmds , +.Nm cap_pwd_limit_fields , +.Nm cap_pwd_limit_users +.Nd "library for password database operations in capability mode" +.Sh LIBRARY +.Lb libcap_grp +.Sh SYNOPSIS +.In libcasper.h +.In casper/cap_pwd.h +.Ft struct passwd * +.Fn cap_getpwent "cap_channel_t *chan" +.Ft struct passwd * +.Fn cap_getpwnam "cap_channel_t *chan" "const char *login" +.Ft struct passwd * +.Fn cap_getpwuid "cap_channel_t *chan" "uid_t uid" +.Ft int +.Fn cap_getpwent_r "cap_channel_t *chan" "struct passwd *pwd" "char *buffer" "size_t bufsize" "struct passwd **result" +.Ft int +.Fn cap_getpwnam_r "cap_channel_t *chan" "const char *name" "struct passwd *pwd" "char *buffer" "size_t bufsize" "struct passwd **result" +.Ft int +.Fn cap_getpwuid_r "cap_channel_t *chan" "uid_t uid" "struct passwd *pwd" "char *buffer" "size_t bufsize" "struct passwd **result" +.Ft int +.Fn cap_setpassent "cap_channel_t *chan" "int stayopen" +.Ft void +.Fn cap_setpwent "cap_channel_t *chan" +.Ft void +.Fn cap_endpwent "cap_channel_t *chan" +.Ft int +.Fn cap_pwd_limit_cmds "cap_channel_t *chan" "const char * const *cmds" "size_t ncmds" +.Ft int +.Fn cap_pwd_limit_fields "cap_channel_t *chan" "const char * const *fields" "size_t nfields" +.Ft int +.Fn cap_pwd_limit_users "cap_channel_t *chan" "const char * const *names" "size_t nnames" "uid_t *uids" "size_t nuids" +.Sh DESCRIPTION +The functions +.Fn cap_getpwent , +.Fn cap_getpwnam , +.Fn cap_getpwuid , +.Fn cap_getpwent_r , +.Fn cap_getpwnam_r , +.Fn cap_getpwuid_r , +.Fn cap_setpassent , +.Fn cap_setpwent , +and +.Fn cap_endpwent +are respectively equivalent to +.Xr getpwent 3 , +.Xr getpwnam 3 , +.Xr getpwuid 3 , +.Xr getpwent_r 3 , +.Xr getpwnam_r 3 , +.Xr getpwuid_r 3 , +.Xr setpassent 3 , +.Xr setpwent 3 , +and +.Xr cap_endpwent 3 +except that the connection to the +.Nm system.pwd +service needs to be provided. +.Pp +The +.Fn cap_pwd_limit_cmds +function limits the functions allowed in the service. +The +.Fa cmds +variable can be set to +.Dv getpwent , +.Dv getpwnam , +.Dv getpwuid , +.Dv getpwent_r , +.Dv getpwnam_r , +.Dv getpwuid_r , +.Dv setpassent , +.Dv setpwent , +or +.Dv endpwent +which will allow to use the function associated with the name. +The +.Fa ncmds +variable contains the number of +.Fa cmds +provided. +.Pp +The +.Fn cap_pwd_limit_fields +function allows limit fields returned in the structure +.Vt passwd . +The +.Fa fields +variable can be set to +.Dv pw_name , +.Dv pw_passwd , +.Dv pw_uid , +.Dv pw_gid , +.Dv pw_change , +.Dv pw_class , +.Dv pw_gecos , +.Dv pw_dir , +.Dv pw_shell , +.Dv pw_expire +or +.Dv pw_fields +The field which was set as the limit will be returned, while the rest of the +values not set this way will have default values. +The +.Fa nfields +variable contains the number of +.Fa fields +provided. +.Pp +The +.Fn cap_pwd_limit_users +function allows to limit access to users. +The +.Fa names +variable allows to limit users by name and the +.Fa uids +variable by the user number. +The +.Fa nnames +and +.Fa nuids +variables provide numbers of limited names and uids. +.Sh EXAMPLES +The following example first opens a capability to casper and then uses this +capability to create the +.Nm system.pwd +casper service and uses it to get a user name. +.Bd -literal +cap_channel_t *capcas, *cappwd; +const char *cmds[] = { "getpwuid" }; +const char *fields[] = { "pw_name" }; +uid_t uid[] = { 1 }; +struct passwd *passwd; + +/* Open capability to Casper. */ +capcas = cap_init(); +if (capcas == NULL) + err(1, "Unable to contact Casper"); + +/* Enter capability mode sandbox. */ +if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Unable to enter capability mode"); + +/* Use Casper capability to create capability to the system.pwd service. */ +cappwd = cap_service_open(capcas, "system.pwd"); +if (cappwd == NULL) + err(1, "Unable to open system.pwd service"); + +/* Close Casper capability, we don't need it anymore. */ +cap_close(capcas); + +/* Limit service to one single function. */ +if (cap_pwd_limit_cmds(cappwd, cmds, nitems(cmds))) + err(1, "Unable to limit access to system.pwd service"); + +/* Limit service to one field as we only need name of the user. */ +if (cap_pwd_limit_fields(cappwd, fields, nitems(fields))) + err(1, "Unable to limit access to system.pwd service"); + +/* Limit service to one uid. */ +if (cap_pwd_limit_users(cappwd, NULL, 0, uid, nitems(uid))) + err(1, "Unable to limit access to system.pwd service"); + +passwd = cap_getpwuid(cappwd, uid[0]); +if (passwd == NULL) + err(1, "Unable to get name of user"); + +printf("UID %d is associated with name %s.\\n", uid[0], passwd->pw_name); + +cap_close(cappwd); +.Ed +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr endpwent 3 , +.Xr err 3 , +.Xr getpwent 3 , +.Xr getpwent_r 3 , +.Xr getpwnam 3 , +.Xr getpwnam_r 3 , +.Xr getpwuid 3 , +.Xr getpwuid_r 3 , +.Xr setpassent 3 , +.Xr setpwent 3 , +.Xr capsicum 4 , +.Xr nv 9 +.Sh AUTHORS +The +.Nm cap_pwd +service was implemented by +.An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net +under sponsorship from the FreeBSD Foundation. +.Pp +This manual page was written by +.An Mariusz Zaborski Aq Mt oshogbo@FreeBSD.org . Modified: user/markj/netdump/lib/libcasper/services/cap_sysctl/Makefile ============================================================================== --- user/markj/netdump/lib/libcasper/services/cap_sysctl/Makefile Tue Mar 20 13:39:41 2018 (r331242) +++ user/markj/netdump/lib/libcasper/services/cap_sysctl/Makefile Tue Mar 20 15:04:19 2018 (r331243) @@ -24,4 +24,9 @@ CFLAGS+=-I${.CURDIR} HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +MAN+= cap_sysctl.3 + +MLINKS+=cap_sysctl.3 libcap_sysctl.3 +MLINKS+=cap_sysctl.3 cap_sysctlbyname.3 + .include Copied: user/markj/netdump/lib/libcasper/services/cap_sysctl/cap_sysctl.3 (from r331242, head/lib/libcasper/services/cap_sysctl/cap_sysctl.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/markj/netdump/lib/libcasper/services/cap_sysctl/cap_sysctl.3 Tue Mar 20 15:04:19 2018 (r331243, copy of r331242, head/lib/libcasper/services/cap_sysctl/cap_sysctl.3) @@ -0,0 +1,143 @@ +.\" Copyright (c) 2018 Mariusz Zaborski +.\" All rights reserved. +.\" +.\" 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. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Thu Mar 22 11:56:07 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F91DF5EA75 for ; Thu, 22 Mar 2018 11:56:07 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 121BD70182; Thu, 22 Mar 2018 11:56:07 +0000 (UTC) (envelope-from pho@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0C8C51114A; Thu, 22 Mar 2018 11:56:07 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MBu6j3037461; Thu, 22 Mar 2018 11:56:06 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MBu6Jd037460; Thu, 22 Mar 2018 11:56:06 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201803221156.w2MBu6Jd037460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Mar 2018 11:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331351 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 331351 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 11:56:07 -0000 Author: pho Date: Thu Mar 22 11:56:06 2018 New Revision: 331351 URL: https://svnweb.freebsd.org/changeset/base/331351 Log: Added an OOM killing test scenario, which triggers a hang. Sponsored by: Dell EMC Isilon Added: user/pho/stress2/misc/oom2.sh (contents, props changed) Added: user/pho/stress2/misc/oom2.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ user/pho/stress2/misc/oom2.sh Thu Mar 22 11:56:06 2018 (r331351) @@ -0,0 +1,51 @@ +#!/bin/sh + +# +# Copyright (c) 2018 Dell EMC Isilon +# All rights reserved. +# +# 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$ +# + +# Test OOM killing. + +# sort stuck in "pfault" seen. +# https://people.freebsd.org/~pho/stress/log/oom2.txt + +[ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 +[ `sysctl -n vm.swap_total` -gt 0 ] && { swapoff -a; off=1; } + +[ `sysctl -n hw.physmem` -gt $((32 * 1024 * 1024 * 1024)) ] && + echo "RAM should be capped to no more than 32GB" +n=`sysctl -n hw.ncpu` +n=`jot $n` +start=`date +%s` +while [ $((`date +%s` - $start)) -lt 300 ]; do + for i in $n; do + sort < /dev/zero > /dev/null 2>&1 & + done + wait +done +[ $off ] && swapon -a +exit 0 From owner-svn-src-user@freebsd.org Thu Mar 22 11:57:13 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3880F5EBE8 for ; Thu, 22 Mar 2018 11:57:13 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F2AA702BC; Thu, 22 Mar 2018 11:57:13 +0000 (UTC) (envelope-from pho@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 46B961114B; Thu, 22 Mar 2018 11:57:13 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MBvDBn037544; Thu, 22 Mar 2018 11:57:13 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MBvD6D037543; Thu, 22 Mar 2018 11:57:13 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201803221157.w2MBvD6D037543@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Mar 2018 11:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331352 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 331352 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 11:57:13 -0000 Author: pho Date: Thu Mar 22 11:57:12 2018 New Revision: 331352 URL: https://svnweb.freebsd.org/changeset/base/331352 Log: Added problem found & fixed. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/contigmalloc3.sh Modified: user/pho/stress2/misc/contigmalloc3.sh ============================================================================== --- user/pho/stress2/misc/contigmalloc3.sh Thu Mar 22 11:56:06 2018 (r331351) +++ user/pho/stress2/misc/contigmalloc3.sh Thu Mar 22 11:57:12 2018 (r331352) @@ -31,6 +31,10 @@ # contigmalloc(9) / contigfree(9) test scenario. # Test allocation with 1GB +# "panic: Bad link elm 0x6766fbc next->prev != elm" seen: +# https://people.freebsd.org/~pho/stress/log/kostik1094.txt +# Fixed by r331247 + [ `id -u ` -ne 0 ] && echo "Must be root!" && exit 1 [ -d /usr/src/sys ] || exit 0 builddir=`sysctl kern.version | grep @ | sed 's/.*://'` From owner-svn-src-user@freebsd.org Thu Mar 22 12:01:31 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE7E8F5F715 for ; Thu, 22 Mar 2018 12:01:30 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A2E0A707DE; Thu, 22 Mar 2018 12:01:30 +0000 (UTC) (envelope-from pho@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9DDCF11192; Thu, 22 Mar 2018 12:01:30 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MC1U0O038517; Thu, 22 Mar 2018 12:01:30 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MC1Ug6038516; Thu, 22 Mar 2018 12:01:30 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201803221201.w2MC1Ug6038516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Thu, 22 Mar 2018 12:01:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331354 - user/pho/stress2/misc X-SVN-Group: user X-SVN-Commit-Author: pho X-SVN-Commit-Paths: user/pho/stress2/misc X-SVN-Commit-Revision: 331354 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 12:01:31 -0000 Author: pho Date: Thu Mar 22 12:01:30 2018 New Revision: 331354 URL: https://svnweb.freebsd.org/changeset/base/331354 Log: Changed wait for child to run from 200us to 1s to suppress infrequent error message from killpg(2). Style fixes while here. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/misc/killpg.sh Modified: user/pho/stress2/misc/killpg.sh ============================================================================== --- user/pho/stress2/misc/killpg.sh Thu Mar 22 11:57:59 2018 (r331353) +++ user/pho/stress2/misc/killpg.sh Thu Mar 22 12:01:30 2018 (r331354) @@ -38,7 +38,7 @@ here=`pwd` cd /tmp sed '1,/^EOF/d' < $here/$0 > killpg.c -mycc -o killpg -Wall -Wextra killpg.c +mycc -o killpg -Wall -Wextra killpg.c || exit 1 rm -f killpg.c /tmp/killpg @@ -47,6 +47,8 @@ rm -f /tmp/killpg exit 0 EOF #include +#include + #include #include #include @@ -54,10 +56,9 @@ EOF #include #include #include -#include #include -pid_t gid, pid; +static pid_t gid, pid; #define LOOPS 100 @@ -66,7 +67,7 @@ hand(int i __unused) { /* handler */ _exit(0); } -void +static void nlooper(void) { int i; @@ -85,7 +86,7 @@ nlooper(void) _exit(0); } -void +static void looper(void) { int i; @@ -105,11 +106,10 @@ looper(void) _exit(0); } -void +static void killer(void) { struct passwd *pw; - int i; setproctitle("killer"); if ((pw = getpwnam("nobody")) == NULL) @@ -124,14 +124,8 @@ killer(void) if ((gid = fork()) == 0) nlooper(); /* nobody looper */ - usleep(200); - i = 0; - for (;;) { - if (i++ > 1000) { - if (access("cont", R_OK) == -1) - break; - i = 0; - } + sleep(1); + while (access("cont", R_OK) == 0) { if (killpg(gid, SIGINFO) == -1) { if (errno == EPERM) continue; From owner-svn-src-user@freebsd.org Thu Mar 22 19:23:03 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 55C74F63554 for ; Thu, 22 Mar 2018 19:23:03 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 025178687B; Thu, 22 Mar 2018 19:23:03 +0000 (UTC) (envelope-from jeff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D75BA157AF; Thu, 22 Mar 2018 19:23:02 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MJN2RV062755; Thu, 22 Mar 2018 19:23:02 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MJN2ww062750; Thu, 22 Mar 2018 19:23:02 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803221923.w2MJN2ww062750@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 22 Mar 2018 19:23:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331370 - in user/jeff/numa/sys: kern sys vm x86/x86 X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in user/jeff/numa/sys: kern sys vm x86/x86 X-SVN-Commit-Revision: 331370 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 19:23:03 -0000 Author: jeff Date: Thu Mar 22 19:23:02 2018 New Revision: 331370 URL: https://svnweb.freebsd.org/changeset/base/331370 Log: Attempt to improve the include situation for vm_ndomains. Modified: user/jeff/numa/sys/kern/kern_cpuset.c user/jeff/numa/sys/sys/smp.h user/jeff/numa/sys/vm/vm_extern.h user/jeff/numa/sys/vm/vm_phys.h user/jeff/numa/sys/x86/x86/intr_machdep.c Modified: user/jeff/numa/sys/kern/kern_cpuset.c ============================================================================== --- user/jeff/numa/sys/kern/kern_cpuset.c Thu Mar 22 19:21:11 2018 (r331369) +++ user/jeff/numa/sys/kern/kern_cpuset.c Thu Mar 22 19:23:02 2018 (r331370) @@ -65,9 +65,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include +#include #ifdef DDB #include Modified: user/jeff/numa/sys/sys/smp.h ============================================================================== --- user/jeff/numa/sys/sys/smp.h Thu Mar 22 19:21:11 2018 (r331369) +++ user/jeff/numa/sys/sys/smp.h Thu Mar 22 19:23:02 2018 (r331370) @@ -169,7 +169,6 @@ extern u_int mp_maxid; extern int mp_maxcpus; extern int mp_ncpus; extern volatile int smp_started; -extern int vm_ndomains; extern cpuset_t all_cpus; extern cpuset_t cpuset_domain[MAXMEMDOM]; /* CPUs in each NUMA domain. */ Modified: user/jeff/numa/sys/vm/vm_extern.h ============================================================================== --- user/jeff/numa/sys/vm/vm_extern.h Thu Mar 22 19:21:11 2018 (r331369) +++ user/jeff/numa/sys/vm/vm_extern.h Thu Mar 22 19:23:02 2018 (r331370) @@ -45,6 +45,8 @@ struct vmem; struct cdev; struct cdevsw; +extern int vm_ndomains; + /* These operate on kernel virtual addresses only. */ vm_offset_t kva_alloc(vm_size_t); void kva_free(vm_offset_t, vm_size_t); Modified: user/jeff/numa/sys/vm/vm_phys.h ============================================================================== --- user/jeff/numa/sys/vm/vm_phys.h Thu Mar 22 19:21:11 2018 (r331369) +++ user/jeff/numa/sys/vm/vm_phys.h Thu Mar 22 19:23:02 2018 (r331370) @@ -52,7 +52,6 @@ struct mem_affinity { extern struct mem_affinity *mem_affinity; extern int *mem_locality; #endif -extern int vm_ndomains; struct vm_freelist { struct pglist pl; Modified: user/jeff/numa/sys/x86/x86/intr_machdep.c ============================================================================== --- user/jeff/numa/sys/x86/x86/intr_machdep.c Thu Mar 22 19:21:11 2018 (r331369) +++ user/jeff/numa/sys/x86/x86/intr_machdep.c Thu Mar 22 19:23:02 2018 (r331370) @@ -71,6 +71,9 @@ #include #endif +#include +#include + #define MAX_STRAY_LOG 5 typedef void (*mask_fn)(void *); From owner-svn-src-user@freebsd.org Thu Mar 22 19:38:25 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 59A57F64961 for ; Thu, 22 Mar 2018 19:38:25 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07FE28710F; Thu, 22 Mar 2018 19:38:25 +0000 (UTC) (envelope-from jeff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D827A15934; Thu, 22 Mar 2018 19:38:24 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MJcORm067924; Thu, 22 Mar 2018 19:38:24 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MJcMSW067896; Thu, 22 Mar 2018 19:38:22 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803221938.w2MJcMSW067896@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 22 Mar 2018 19:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331371 - in user/jeff/numa: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolchain/nm co... X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in user/jeff/numa: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolchain/nm contrib/llvm/include/llvm/M... X-SVN-Commit-Revision: 331371 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 19:38:26 -0000 Author: jeff Date: Thu Mar 22 19:38:21 2018 New Revision: 331371 URL: https://svnweb.freebsd.org/changeset/base/331371 Log: Merge from head Added: user/jeff/numa/contrib/processor-trace/ - copied from r331370, head/contrib/processor-trace/ user/jeff/numa/lib/libc/gen/getentropy.3 - copied unchanged from r331370, head/lib/libc/gen/getentropy.3 user/jeff/numa/lib/libc/gen/getentropy.c - copied unchanged from r331370, head/lib/libc/gen/getentropy.c user/jeff/numa/lib/libc/sys/getrandom.2 - copied unchanged from r331370, head/lib/libc/sys/getrandom.2 user/jeff/numa/lib/libc/tests/gen/getentropy_test.c - copied unchanged from r331370, head/lib/libc/tests/gen/getentropy_test.c user/jeff/numa/lib/libcasper/services/cap_pwd/cap_pwd.3 - copied unchanged from r331370, head/lib/libcasper/services/cap_pwd/cap_pwd.3 user/jeff/numa/lib/libcasper/services/cap_sysctl/cap_sysctl.3 - copied unchanged from r331370, head/lib/libcasper/services/cap_sysctl/cap_sysctl.3 user/jeff/numa/lib/libipt/ - copied from r331370, head/lib/libipt/ user/jeff/numa/stand/lua/hook.lua - copied unchanged from r331370, head/stand/lua/hook.lua user/jeff/numa/sys/compat/linux/linux_errno.c - copied unchanged from r331370, head/sys/compat/linux/linux_errno.c user/jeff/numa/sys/compat/linux/linux_errno.inc - copied unchanged from r331370, head/sys/compat/linux/linux_errno.inc user/jeff/numa/sys/contrib/libb2/ - copied from r331370, head/sys/contrib/libb2/ user/jeff/numa/sys/crypto/blake2/ - copied from r331370, head/sys/crypto/blake2/ user/jeff/numa/sys/dev/tcp_log/ - copied from r331370, head/sys/dev/tcp_log/ user/jeff/numa/sys/kern/sys_getrandom.c - copied unchanged from r331370, head/sys/kern/sys_getrandom.c user/jeff/numa/sys/modules/blake2/ - copied from r331370, head/sys/modules/blake2/ user/jeff/numa/sys/netinet/cc/cc_newreno.h - copied unchanged from r331370, head/sys/netinet/cc/cc_newreno.h user/jeff/numa/sys/netinet/tcp_log_buf.c - copied unchanged from r331370, head/sys/netinet/tcp_log_buf.c user/jeff/numa/sys/netinet/tcp_log_buf.h - copied unchanged from r331370, head/sys/netinet/tcp_log_buf.h user/jeff/numa/tests/sys/kern/sys_getrandom.c - copied unchanged from r331370, head/tests/sys/kern/sys_getrandom.c user/jeff/numa/tests/sys/opencrypto/blake2-kat.h - copied unchanged from r331370, head/tests/sys/opencrypto/blake2-kat.h user/jeff/numa/tests/sys/opencrypto/blake2_test.c - copied unchanged from r331370, head/tests/sys/opencrypto/blake2_test.c Deleted: user/jeff/numa/sys/crypto/chacha20/chacha20.c user/jeff/numa/sys/crypto/chacha20/chacha20.h user/jeff/numa/sys/modules/chacha20/ Modified: user/jeff/numa/Makefile.inc1 user/jeff/numa/ObsoleteFiles.inc user/jeff/numa/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c user/jeff/numa/contrib/blacklist/bin/conf.c user/jeff/numa/contrib/elftoolchain/nm/nm.c user/jeff/numa/contrib/llvm/include/llvm/MC/MCAssembler.h user/jeff/numa/contrib/llvm/include/llvm/MC/MCELFStreamer.h user/jeff/numa/contrib/llvm/include/llvm/MC/MCStreamer.h user/jeff/numa/contrib/llvm/lib/Analysis/InstructionSimplify.cpp user/jeff/numa/contrib/llvm/lib/IR/ConstantFold.cpp user/jeff/numa/contrib/llvm/lib/MC/ELFObjectWriter.cpp user/jeff/numa/contrib/llvm/lib/MC/MCAsmStreamer.cpp user/jeff/numa/contrib/llvm/lib/MC/MCELFStreamer.cpp user/jeff/numa/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp user/jeff/numa/contrib/llvm/lib/MC/MCStreamer.cpp user/jeff/numa/contrib/llvm/lib/Object/ModuleSymbolTable.cpp user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.cpp user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.h user/jeff/numa/contrib/llvm/projects/libunwind/include/__libunwind_config.h user/jeff/numa/contrib/llvm/projects/libunwind/include/libunwind.h user/jeff/numa/contrib/llvm/projects/libunwind/src/AddressSpace.hpp user/jeff/numa/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp user/jeff/numa/contrib/llvm/projects/libunwind/src/Registers.hpp user/jeff/numa/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp user/jeff/numa/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S user/jeff/numa/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S user/jeff/numa/contrib/llvm/projects/libunwind/src/config.h user/jeff/numa/contrib/llvm/projects/libunwind/src/libunwind.cpp user/jeff/numa/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp user/jeff/numa/contrib/telnet/telnetd/telnetd.c user/jeff/numa/etc/mtree/BSD.include.dist user/jeff/numa/etc/mtree/BSD.root.dist user/jeff/numa/include/Makefile user/jeff/numa/include/unistd.h user/jeff/numa/lib/Makefile user/jeff/numa/lib/libc/gen/Makefile.inc user/jeff/numa/lib/libc/gen/Symbol.map user/jeff/numa/lib/libc/gen/arc4random.c user/jeff/numa/lib/libc/include/libc_private.h user/jeff/numa/lib/libc/sys/Makefile.inc user/jeff/numa/lib/libc/sys/Symbol.map user/jeff/numa/lib/libc/sys/mlock.2 user/jeff/numa/lib/libc/tests/gen/Makefile user/jeff/numa/lib/libcasper/libcasper/libcasper.3 user/jeff/numa/lib/libcasper/services/cap_dns/cap_dns.3 user/jeff/numa/lib/libcasper/services/cap_grp/cap_grp.3 user/jeff/numa/lib/libcasper/services/cap_grp/cap_grp.c user/jeff/numa/lib/libcasper/services/cap_grp/cap_grp.h user/jeff/numa/lib/libcasper/services/cap_pwd/Makefile user/jeff/numa/lib/libcasper/services/cap_sysctl/Makefile user/jeff/numa/lib/libjail/jail.c user/jeff/numa/lib/libmd/sha512.3 user/jeff/numa/lib/libsysdecode/errno.c user/jeff/numa/lib/libthr/thread/thr_cancel.c user/jeff/numa/lib/libzstd/Makefile user/jeff/numa/libexec/tftpd/tests/functional.c user/jeff/numa/release/arm64/RPI3.conf user/jeff/numa/release/tools/gce.conf user/jeff/numa/sbin/ifconfig/ifieee80211.c user/jeff/numa/sbin/ipfw/ipfw.8 user/jeff/numa/sbin/savecore/savecore.8 user/jeff/numa/share/man/man4/altq.4 user/jeff/numa/share/man/man4/audit.4 user/jeff/numa/share/man/man4/cc_newreno.4 user/jeff/numa/share/man/man4/mod_cc.4 user/jeff/numa/share/man/man7/development.7 user/jeff/numa/share/man/man9/altq.9 user/jeff/numa/share/man/man9/cnv.9 user/jeff/numa/share/man/man9/owll.9 user/jeff/numa/share/man/man9/rwlock.9 user/jeff/numa/share/man/man9/style.9 user/jeff/numa/share/man/man9/zone.9 user/jeff/numa/share/misc/bsd-family-tree user/jeff/numa/share/misc/committers-ports.dot user/jeff/numa/share/mk/bsd.libnames.mk user/jeff/numa/share/mk/src.libnames.mk user/jeff/numa/share/mk/src.opts.mk user/jeff/numa/stand/common/bootstrap.h user/jeff/numa/stand/defaults/loader.conf user/jeff/numa/stand/defaults/loader.conf.5 user/jeff/numa/stand/defs.mk user/jeff/numa/stand/efi/boot1/boot1.c user/jeff/numa/stand/efi/loader/framebuffer.c user/jeff/numa/stand/forth/Makefile user/jeff/numa/stand/forth/efi.4th user/jeff/numa/stand/forth/loader.rc user/jeff/numa/stand/i386/loader/loader.rc user/jeff/numa/stand/lua/Makefile user/jeff/numa/stand/lua/color.lua user/jeff/numa/stand/lua/config.lua user/jeff/numa/stand/lua/core.lua user/jeff/numa/stand/lua/core.lua.8 user/jeff/numa/stand/lua/drawer.lua user/jeff/numa/stand/lua/loader.lua user/jeff/numa/stand/lua/menu.lua user/jeff/numa/stand/lua/screen.lua user/jeff/numa/sys/amd64/acpica/acpi_wakecode.S user/jeff/numa/sys/amd64/amd64/apic_vector.S user/jeff/numa/sys/amd64/amd64/atpic_vector.S user/jeff/numa/sys/amd64/amd64/cpu_switch.S user/jeff/numa/sys/amd64/amd64/db_interface.c user/jeff/numa/sys/amd64/amd64/exception.S user/jeff/numa/sys/amd64/amd64/fpu.c user/jeff/numa/sys/amd64/amd64/gdb_machdep.c user/jeff/numa/sys/amd64/amd64/locore.S user/jeff/numa/sys/amd64/amd64/mpboot.S user/jeff/numa/sys/amd64/amd64/sigtramp.S user/jeff/numa/sys/amd64/amd64/support.S user/jeff/numa/sys/amd64/amd64/xen-locore.S user/jeff/numa/sys/amd64/ia32/ia32_exception.S user/jeff/numa/sys/amd64/linux/linux_support.s user/jeff/numa/sys/amd64/linux/linux_sysvec.c user/jeff/numa/sys/amd64/linux32/linux.h user/jeff/numa/sys/amd64/linux32/linux32_support.s user/jeff/numa/sys/amd64/linux32/linux32_sysvec.c user/jeff/numa/sys/amd64/sgx/sgx_support.S user/jeff/numa/sys/arm/amlogic/aml8726/aml8726_clkmsr.c user/jeff/numa/sys/arm/amlogic/aml8726/aml8726_mp.c user/jeff/numa/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c user/jeff/numa/sys/arm/annapurna/alpine/alpine_machdep.c user/jeff/numa/sys/arm/arm/bcopy_page.S user/jeff/numa/sys/arm/arm/bcopyinout.S user/jeff/numa/sys/arm/arm/copystr.S user/jeff/numa/sys/arm/arm/cpu_asm-v6.S user/jeff/numa/sys/arm/arm/exception.S user/jeff/numa/sys/arm/arm/fusu.S user/jeff/numa/sys/arm/arm/hypervisor-stub.S user/jeff/numa/sys/arm/arm/in_cksum_arm.S user/jeff/numa/sys/arm/arm/locore-v4.S user/jeff/numa/sys/arm/arm/locore-v6.S user/jeff/numa/sys/arm/arm/pmap-v4.c user/jeff/numa/sys/arm/arm/support.S user/jeff/numa/sys/arm/arm/swtch-v4.S user/jeff/numa/sys/arm/arm/swtch-v6.S user/jeff/numa/sys/arm/arm/swtch.S user/jeff/numa/sys/arm/at91/at91_rst.c user/jeff/numa/sys/arm/broadcom/bcm2835/bcm2835_fb.c user/jeff/numa/sys/arm/broadcom/bcm2835/bcm2835_fbd.c user/jeff/numa/sys/arm/broadcom/bcm2835/bcm2835_machdep.c user/jeff/numa/sys/arm/freescale/fsl_ocotp.c user/jeff/numa/sys/arm/freescale/vybrid/vf_machdep.c user/jeff/numa/sys/arm/mv/mv_common.c user/jeff/numa/sys/arm/samsung/exynos/chrome_ec.c user/jeff/numa/sys/arm/samsung/exynos/exynos5_ehci.c user/jeff/numa/sys/arm/ti/am335x/am335x_lcd.c user/jeff/numa/sys/arm/ti/am335x/am335x_lcd_syscons.c user/jeff/numa/sys/arm64/arm64/bzero.S user/jeff/numa/sys/arm64/arm64/copyinout.S user/jeff/numa/sys/arm64/arm64/exception.S user/jeff/numa/sys/arm64/arm64/locore.S user/jeff/numa/sys/arm64/arm64/support.S user/jeff/numa/sys/arm64/arm64/swtch.S user/jeff/numa/sys/cam/nvme/nvme_da.c user/jeff/numa/sys/cam/scsi/scsi_all.h user/jeff/numa/sys/cam/scsi/scsi_ch.c user/jeff/numa/sys/cam/scsi/scsi_da.c user/jeff/numa/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/jeff/numa/sys/cddl/dev/dtrace/aarch64/dtrace_asm.S user/jeff/numa/sys/cddl/dev/dtrace/amd64/dtrace_asm.S user/jeff/numa/sys/cddl/dev/dtrace/arm/dtrace_asm.S user/jeff/numa/sys/cddl/dev/dtrace/i386/dtrace_asm.S user/jeff/numa/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/jeff/numa/sys/cddl/dev/dtrace/riscv/dtrace_asm.S user/jeff/numa/sys/cddl/dev/fbt/x86/fbt_isa.c user/jeff/numa/sys/compat/freebsd32/freebsd32_syscall.h user/jeff/numa/sys/compat/freebsd32/freebsd32_syscalls.c user/jeff/numa/sys/compat/freebsd32/freebsd32_sysent.c user/jeff/numa/sys/compat/freebsd32/freebsd32_systrace_args.c user/jeff/numa/sys/compat/freebsd32/syscalls.master user/jeff/numa/sys/compat/linux/linux_emul.h user/jeff/numa/sys/compat/linuxkpi/common/include/linux/pci.h user/jeff/numa/sys/conf/files user/jeff/numa/sys/conf/files.amd64 user/jeff/numa/sys/conf/files.i386 user/jeff/numa/sys/conf/kern.opts.mk user/jeff/numa/sys/conf/kern.post.mk user/jeff/numa/sys/conf/kmod.mk user/jeff/numa/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c user/jeff/numa/sys/dev/cardbus/cardbus.c user/jeff/numa/sys/dev/cxgbe/common/t4_hw.c user/jeff/numa/sys/dev/cxgbe/t4_main.c user/jeff/numa/sys/dev/drm/drm_bufs.c user/jeff/numa/sys/dev/drm/drm_irq.c user/jeff/numa/sys/dev/e1000/em_txrx.c user/jeff/numa/sys/dev/e1000/if_em.c user/jeff/numa/sys/dev/e1000/if_em.h user/jeff/numa/sys/dev/efidev/efidev.c user/jeff/numa/sys/dev/efidev/efirt.c (contents, props changed) user/jeff/numa/sys/dev/efidev/efirtc.c user/jeff/numa/sys/dev/fdt/fdt_common.c user/jeff/numa/sys/dev/flash/mx25l.c user/jeff/numa/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S user/jeff/numa/sys/dev/hyperv/vmbus/i386/vmbus_vector.S user/jeff/numa/sys/dev/ixgbe/if_ix.c user/jeff/numa/sys/dev/ixgbe/if_ixv.c user/jeff/numa/sys/dev/ixgbe/ixgbe_82598.c user/jeff/numa/sys/dev/ixgbe/ixgbe_82599.c user/jeff/numa/sys/dev/ixgbe/ixgbe_api.c user/jeff/numa/sys/dev/ixgbe/ixgbe_common.c user/jeff/numa/sys/dev/ixgbe/ixgbe_common.h user/jeff/numa/sys/dev/ixgbe/ixgbe_dcb.c user/jeff/numa/sys/dev/ixgbe/ixgbe_dcb_82598.c user/jeff/numa/sys/dev/ixgbe/ixgbe_dcb_82599.c user/jeff/numa/sys/dev/ixgbe/ixgbe_phy.c user/jeff/numa/sys/dev/ixgbe/ixgbe_type.h user/jeff/numa/sys/dev/ixgbe/ixgbe_vf.c user/jeff/numa/sys/dev/ixgbe/ixgbe_x540.c user/jeff/numa/sys/dev/ixgbe/ixgbe_x550.c user/jeff/numa/sys/dev/jedec_dimm/jedec_dimm.c user/jeff/numa/sys/dev/md/md.c user/jeff/numa/sys/dev/mpr/mpi/mpi2.h user/jeff/numa/sys/dev/mpr/mpi/mpi2_cnfg.h user/jeff/numa/sys/dev/mpr/mpi/mpi2_history.txt user/jeff/numa/sys/dev/mpr/mpi/mpi2_ioc.h user/jeff/numa/sys/dev/mpr/mpr_ioctl.h user/jeff/numa/sys/dev/mpr/mpr_sas.c user/jeff/numa/sys/dev/mpr/mpr_sas_lsi.c user/jeff/numa/sys/dev/mpr/mpr_user.c user/jeff/numa/sys/dev/mpr/mprvar.h user/jeff/numa/sys/dev/nvme/nvme.h user/jeff/numa/sys/dev/nvme/nvme_private.h user/jeff/numa/sys/dev/nvme/nvme_qpair.c user/jeff/numa/sys/dev/ofw/ofw_subr.c user/jeff/numa/sys/dev/ofw/openfirmio.c user/jeff/numa/sys/dev/ow/owc_gpiobus.c user/jeff/numa/sys/dev/pccard/pccard.c user/jeff/numa/sys/dev/pccbb/pccbb.c user/jeff/numa/sys/dev/random/randomdev.c user/jeff/numa/sys/dev/rtwn/if_rtwn_ridx.h user/jeff/numa/sys/dev/rtwn/rtl8188e/r88e_rx.c user/jeff/numa/sys/dev/rtwn/rtl8192c/r92c_rx.c user/jeff/numa/sys/dev/rtwn/rtl8812a/r12a_rx.c user/jeff/numa/sys/dev/usb/controller/musb_otg.c user/jeff/numa/sys/dev/usb/controller/musb_otg.h user/jeff/numa/sys/dev/usb/wlan/if_urtw.c user/jeff/numa/sys/dev/usb/wlan/if_zyd.c user/jeff/numa/sys/dev/vnic/thunder_bgx_fdt.c user/jeff/numa/sys/dts/Makefile user/jeff/numa/sys/geom/label/g_label.c user/jeff/numa/sys/i386/acpica/acpi_wakecode.S user/jeff/numa/sys/i386/i386/apic_vector.s user/jeff/numa/sys/i386/i386/atpic_vector.s user/jeff/numa/sys/i386/i386/bioscall.s user/jeff/numa/sys/i386/i386/exception.s user/jeff/numa/sys/i386/i386/locore.s user/jeff/numa/sys/i386/i386/mpboot.s user/jeff/numa/sys/i386/i386/sigtramp.s user/jeff/numa/sys/i386/i386/support.s user/jeff/numa/sys/i386/i386/swtch.s user/jeff/numa/sys/i386/i386/vm86.c user/jeff/numa/sys/i386/i386/vm86bios.s user/jeff/numa/sys/i386/ibcs2/ibcs2_ipc.c user/jeff/numa/sys/i386/ibcs2/ibcs2_misc.c user/jeff/numa/sys/i386/linux/linux.h user/jeff/numa/sys/i386/linux/linux_locore.s user/jeff/numa/sys/i386/linux/linux_support.s user/jeff/numa/sys/i386/linux/linux_sysvec.c user/jeff/numa/sys/kern/init_main.c user/jeff/numa/sys/kern/init_sysent.c user/jeff/numa/sys/kern/kern_jail.c user/jeff/numa/sys/kern/kern_lock.c user/jeff/numa/sys/kern/kern_mutex.c user/jeff/numa/sys/kern/kern_rwlock.c user/jeff/numa/sys/kern/kern_sendfile.c user/jeff/numa/sys/kern/kern_shutdown.c user/jeff/numa/sys/kern/kern_sx.c user/jeff/numa/sys/kern/subr_eventhandler.c user/jeff/numa/sys/kern/subr_witness.c user/jeff/numa/sys/kern/syscalls.c user/jeff/numa/sys/kern/syscalls.master user/jeff/numa/sys/kern/systrace_args.c user/jeff/numa/sys/kern/vfs_bio.c user/jeff/numa/sys/kern/vfs_mountroot.c user/jeff/numa/sys/mips/cavium/octeon_cop2.S user/jeff/numa/sys/mips/ingenic/jz4780_mpboot.S user/jeff/numa/sys/mips/mips/exception.S user/jeff/numa/sys/mips/mips/fp.S user/jeff/numa/sys/mips/mips/locore.S user/jeff/numa/sys/mips/mips/mpboot.S user/jeff/numa/sys/mips/mips/octeon_cop2_swtch.S user/jeff/numa/sys/mips/mips/support.S user/jeff/numa/sys/mips/mips/swtch.S user/jeff/numa/sys/mips/nlm/mpreset.S user/jeff/numa/sys/modules/Makefile user/jeff/numa/sys/modules/crypto/Makefile user/jeff/numa/sys/modules/dtrace/dtrace/Makefile user/jeff/numa/sys/modules/hyperv/vmbus/Makefile user/jeff/numa/sys/modules/imx/imx_spi/Makefile user/jeff/numa/sys/modules/iser/Makefile user/jeff/numa/sys/modules/linux/Makefile user/jeff/numa/sys/modules/linux64/Makefile user/jeff/numa/sys/modules/linux_common/Makefile user/jeff/numa/sys/modules/netgraph/checksum/Makefile user/jeff/numa/sys/modules/netmap/Makefile user/jeff/numa/sys/modules/sgx/Makefile user/jeff/numa/sys/net/bpf.c user/jeff/numa/sys/net/bpfdesc.h user/jeff/numa/sys/net/if_ethersubr.c user/jeff/numa/sys/net/if_llatbl.h user/jeff/numa/sys/net/if_media.h user/jeff/numa/sys/netinet/cc/cc.c user/jeff/numa/sys/netinet/cc/cc.h user/jeff/numa/sys/netinet/cc/cc_newreno.c user/jeff/numa/sys/netinet/if_ether.c user/jeff/numa/sys/netinet/in.c user/jeff/numa/sys/netinet/in_pcb.c user/jeff/numa/sys/netinet/tcp.h user/jeff/numa/sys/netinet/tcp_input.c user/jeff/numa/sys/netinet/tcp_output.c user/jeff/numa/sys/netinet/tcp_subr.c user/jeff/numa/sys/netinet/tcp_syncache.c user/jeff/numa/sys/netinet/tcp_timer.c user/jeff/numa/sys/netinet/tcp_timewait.c user/jeff/numa/sys/netinet/tcp_usrreq.c user/jeff/numa/sys/netinet/tcp_var.h user/jeff/numa/sys/netinet6/in6.c user/jeff/numa/sys/netinet6/in6_pcb.c user/jeff/numa/sys/netipsec/xform.h user/jeff/numa/sys/netipsec/xform_ah.c user/jeff/numa/sys/netipsec/xform_esp.c user/jeff/numa/sys/netipsec/xform_ipcomp.c user/jeff/numa/sys/netpfil/pf/pf_table.c user/jeff/numa/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c user/jeff/numa/sys/opencrypto/cryptodev.c user/jeff/numa/sys/opencrypto/cryptodev.h user/jeff/numa/sys/opencrypto/cryptosoft.c user/jeff/numa/sys/opencrypto/xform_auth.h user/jeff/numa/sys/powerpc/aim/locore32.S user/jeff/numa/sys/powerpc/aim/locore64.S user/jeff/numa/sys/powerpc/booke/locore.S user/jeff/numa/sys/powerpc/booke/pmap.c user/jeff/numa/sys/powerpc/cpufreq/mpc85xx_jog.c user/jeff/numa/sys/powerpc/powerpc/cpu_subr64.S user/jeff/numa/sys/powerpc/powerpc/sigcode32.S user/jeff/numa/sys/powerpc/powerpc/sigcode64.S user/jeff/numa/sys/powerpc/powerpc/swtch32.S user/jeff/numa/sys/powerpc/powerpc/swtch64.S user/jeff/numa/sys/powerpc/pseries/platform_chrp.c user/jeff/numa/sys/riscv/riscv/copyinout.S user/jeff/numa/sys/riscv/riscv/exception.S user/jeff/numa/sys/riscv/riscv/locore.S user/jeff/numa/sys/riscv/riscv/support.S user/jeff/numa/sys/riscv/riscv/swtch.S user/jeff/numa/sys/security/audit/audit_bsm_klib.c user/jeff/numa/sys/sparc64/pci/psycho.c user/jeff/numa/sys/sparc64/sbus/sbus.c user/jeff/numa/sys/sparc64/sparc64/exception.S user/jeff/numa/sys/sparc64/sparc64/interrupt.S user/jeff/numa/sys/sparc64/sparc64/locore.S user/jeff/numa/sys/sparc64/sparc64/mp_exception.S user/jeff/numa/sys/sparc64/sparc64/mp_locore.S user/jeff/numa/sys/sparc64/sparc64/support.S user/jeff/numa/sys/sparc64/sparc64/swtch.S user/jeff/numa/sys/sys/_stdarg.h user/jeff/numa/sys/sys/cdefs.h user/jeff/numa/sys/sys/ioccom.h user/jeff/numa/sys/sys/kernel.h user/jeff/numa/sys/sys/ktr_class.h user/jeff/numa/sys/sys/linker_set.h user/jeff/numa/sys/sys/lock.h user/jeff/numa/sys/sys/random.h user/jeff/numa/sys/sys/syscall.h user/jeff/numa/sys/sys/syscall.mk user/jeff/numa/sys/sys/sysproto.h user/jeff/numa/sys/vm/vm.h user/jeff/numa/sys/vm/vm_extern.h user/jeff/numa/sys/vm/vm_fault.c user/jeff/numa/sys/vm/vm_page.c user/jeff/numa/sys/vm/vm_pageout.h user/jeff/numa/sys/vm/vm_phys.c user/jeff/numa/sys/vm/vm_reserv.c user/jeff/numa/sys/vm/vm_reserv.h user/jeff/numa/sys/x86/include/ucontext.h user/jeff/numa/sys/x86/include/x86_var.h user/jeff/numa/sys/x86/isa/isa_dma.c user/jeff/numa/sys/x86/x86/autoconf.c user/jeff/numa/sys/x86/x86/cpu_machdep.c user/jeff/numa/sys/x86/x86/intr_machdep.c user/jeff/numa/tests/sys/aio/aio_kqueue_test.c user/jeff/numa/tests/sys/aio/aio_test.c user/jeff/numa/tests/sys/kern/Makefile user/jeff/numa/tests/sys/opencrypto/Makefile user/jeff/numa/usr.bin/calendar/calendars/calendar.freebsd user/jeff/numa/usr.bin/netstat/inet.c user/jeff/numa/usr.bin/netstat/main.c user/jeff/numa/usr.bin/netstat/netstat.1 user/jeff/numa/usr.bin/netstat/netstat.h user/jeff/numa/usr.bin/truss/syscalls.c user/jeff/numa/usr.sbin/efibootmgr/efibootmgr.c user/jeff/numa/usr.sbin/rpcbind/rpcbind.c user/jeff/numa/usr.sbin/syslogd/syslogd.c Directory Properties: user/jeff/numa/ (props changed) user/jeff/numa/cddl/ (props changed) user/jeff/numa/cddl/contrib/opensolaris/ (props changed) user/jeff/numa/contrib/blacklist/ (props changed) user/jeff/numa/contrib/elftoolchain/ (props changed) user/jeff/numa/contrib/llvm/ (props changed) user/jeff/numa/contrib/llvm/projects/libunwind/ (props changed) user/jeff/numa/contrib/llvm/tools/clang/ (props changed) user/jeff/numa/sys/cddl/contrib/opensolaris/ (props changed) user/jeff/numa/sys/contrib/zstd/ (props changed) Modified: user/jeff/numa/Makefile.inc1 ============================================================================== --- user/jeff/numa/Makefile.inc1 Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/Makefile.inc1 Thu Mar 22 19:38:21 2018 (r331371) @@ -1394,6 +1394,14 @@ INSTALLKERNEL= ${_kernel} .endif .endfor +_cleankernobj_fast_depend_hack: .PHONY +# 20180320 remove stale generated assym.s after renaming to .inc in r331254 +.if exists(${OBJTOP}/sys/${KERNCONF}/assym.s) + @echo Removing stale generated assym files + @rm -f ${OBJTOP}/sys/${KERNCONF}/assym.* \ + ${OBJTOP}/sys/${KERNCONF}/.depend.assym.* +.endif + ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # @@ -1429,6 +1437,8 @@ buildkernel: .MAKE .PHONY @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} +.else + ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack .endif .if !defined(NO_KERNELOBJ) @echo Modified: user/jeff/numa/ObsoleteFiles.inc ============================================================================== --- user/jeff/numa/ObsoleteFiles.inc Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/ObsoleteFiles.inc Thu Mar 22 19:38:21 2018 (r331371) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays +OLD_DIRS+=boot/overlays +# 20180311: remove sys/sys/i386/include/pcaudioio.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pcaudioio.h +.endif +# 20180310: remove sys/sys/dataacq.h +OLD_FILES+=usr/include/sys/dataacq.h # 20180306: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill @@ -51,7 +59,6 @@ OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz # 20180206: remove gdbtui OLD_FILES+=usr/bin/gdbtui # 20180201: Obsolete forth files -OLD_FILES+=boot/efi.4th OLD_FILES+=boot/pcibios.4th # 20180114: new clang import which bumps version from 5.0.1 to 6.0.0. OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h Modified: user/jeff/numa/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- user/jeff/numa/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 19:38:21 2018 (r331371) @@ -35,7 +35,7 @@ int main(int argc, char **argv) { for (;;) { - (void) syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); } return (0); Modified: user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 19:38:21 2018 (r331371) @@ -22,6 +22,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017-2018 Mark Johnston */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; Modified: user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 19:38:21 2018 (r331371) @@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags) "cannot take address of bit-field\n"); } - dtt.dtt_object = NULL; - dtt.dtt_ctfp = cp->dn_ctfp; - dtt.dtt_type = cp->dn_type; + dtt = (dtrace_typeinfo_t){ + .dtt_ctfp = cp->dn_ctfp, + .dtt_type = cp->dn_type, + }; if (dt_type_pointer(&dtt) == -1) { xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n", Modified: user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 19:38:21 2018 (r331371) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); } Modified: user/jeff/numa/contrib/blacklist/bin/conf.c ============================================================================== --- user/jeff/numa/contrib/blacklist/bin/conf.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/blacklist/bin/conf.c Thu Mar 22 19:38:21 2018 (r331371) @@ -1119,6 +1119,7 @@ conf_parse(const char *f) confset_free(&lc); confset_free(&rc); fclose(fp); + free(line); return; } } Modified: user/jeff/numa/contrib/elftoolchain/nm/nm.c ============================================================================== --- user/jeff/numa/contrib/elftoolchain/nm/nm.c Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/elftoolchain/nm/nm.c Thu Mar 22 19:38:21 2018 (r331371) @@ -1310,14 +1310,17 @@ read_elf(Elf *elf, const char *filename, Elf_Kind kind line_info = malloc(sizeof(struct line_info_head)); func_info = malloc(sizeof(struct func_info_head)); var_info = malloc(sizeof(struct var_info_head)); + if (line_info != NULL) + SLIST_INIT(line_info); + if (func_info != NULL) + SLIST_INIT(func_info); + if (var_info != NULL) + SLIST_INIT(var_info); if (line_info == NULL || func_info == NULL || var_info == NULL) { warn("malloc"); (void) dwarf_finish(dbg, &de); goto process_sym; } - SLIST_INIT(line_info); - SLIST_INIT(func_info); - SLIST_INIT(var_info); while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, &de)) == DW_DLV_OK) { Modified: user/jeff/numa/contrib/llvm/include/llvm/MC/MCAssembler.h ============================================================================== --- user/jeff/numa/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 19:38:21 2018 (r331371) @@ -206,6 +206,8 @@ class MCAssembler { (private) handleFixup(const MCAsmLayout &Layout, MCFragment &F, const MCFixup &Fixup); public: + std::vector> Symvers; + /// Construct a new assembler instance. // // FIXME: How are we going to parameterize this? Two obvious options are stay Modified: user/jeff/numa/contrib/llvm/include/llvm/MC/MCELFStreamer.h ============================================================================== --- user/jeff/numa/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 19:38:21 2018 (r331371) @@ -51,6 +51,8 @@ class MCELFStreamer : public MCObjectStreamer { (publi unsigned ByteAlignment) override; void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; Modified: user/jeff/numa/contrib/llvm/include/llvm/MC/MCStreamer.h ============================================================================== --- user/jeff/numa/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 19:38:21 2018 (r331371) @@ -519,9 +519,10 @@ class MCStreamer { (public) /// /// This corresponds to an assembler statement such as: /// .symver _start, foo@@SOME_VERSION - /// \param Alias - The versioned alias (i.e. "foo@@SOME_VERSION") + /// \param AliasName - The versioned alias (i.e. "foo@@SOME_VERSION") /// \param Aliasee - The aliased symbol (i.e. "_start") - virtual void emitELFSymverDirective(MCSymbol *Alias, const MCSymbol *Aliasee); + virtual void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee); /// \brief Emit a Linker Optimization Hint (LOH) directive. /// \param Args - Arguments of the LOH. Modified: user/jeff/numa/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -3697,7 +3697,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P. - if (match(Ops[1], m_Zero())) + if (match(Ops[1], m_Zero()) && Ops[0]->getType() == GEPTy) return Ops[0]; Type *Ty = SrcTy; @@ -3706,7 +3706,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P if P points to a type of zero size. - if (TyAllocSize == 0) + if (TyAllocSize == 0 && Ops[0]->getType() == GEPTy) return Ops[0]; // The following transforms are only safe if the ptrtoint cast Modified: user/jeff/numa/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -2018,8 +2018,16 @@ static bool isInBoundsIndices(ArrayRef Idxs) // If the first index is one and all the rest are zero, it's in bounds, // by the one-past-the-end rule. - if (!cast(Idxs[0])->isOne()) - return false; + if (auto *CI = dyn_cast(Idxs[0])) { + if (!CI->isOne()) + return false; + } else { + auto *CV = cast(Idxs[0]); + CI = dyn_cast_or_null(CV->getSplatValue()); + if (!CI || !CI->isOne()) + return false; + } + for (unsigned i = 1, e = Idxs.size(); i != e; ++i) if (!cast(Idxs[i])->isNullValue()) return false; @@ -2049,15 +2057,18 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe ArrayRef Idxs) { if (Idxs.empty()) return C; - if (isa(C)) { - Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value * const *)Idxs.data(), Idxs.size())); + Type *GEPTy = GetElementPtrInst::getGEPReturnType( + C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + + if (isa(C)) return UndefValue::get(GEPTy); - } Constant *Idx0 = cast(Idxs[0]); if (Idxs.size() == 1 && (Idx0->isNullValue() || isa(Idx0))) - return C; + return GEPTy->isVectorTy() && !C->getType()->isVectorTy() + ? ConstantVector::getSplat( + cast(GEPTy)->getNumElements(), C) + : C; if (C->isNullValue()) { bool isNull = true; Modified: user/jeff/numa/contrib/llvm/lib/MC/ELFObjectWriter.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -128,8 +128,6 @@ class ELFObjectWriter : public MCObjectWriter { /// @name Symbol Table Data /// @{ - BumpPtrAllocator Alloc; - StringSaver VersionSymSaver{Alloc}; StringTableBuilder StrTabBuilder{StringTableBuilder::ELF}; /// @} @@ -391,27 +389,29 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem const MCAsmLayout &Layout) { // The presence of symbol versions causes undefined symbols and // versions declared with @@@ to be renamed. - for (const MCSymbol &A : Asm.symbols()) { - const auto &Alias = cast(A); - // Not an alias. - if (!Alias.isVariable()) - continue; - auto *Ref = dyn_cast(Alias.getVariableValue()); - if (!Ref) - continue; - const auto &Symbol = cast(Ref->getSymbol()); - - StringRef AliasName = Alias.getName(); + for (const std::pair &P : Asm.Symvers) { + StringRef AliasName = P.first; + const auto &Symbol = cast(*P.second); size_t Pos = AliasName.find('@'); - if (Pos == StringRef::npos) - continue; + assert(Pos != StringRef::npos); + StringRef Prefix = AliasName.substr(0, Pos); + StringRef Rest = AliasName.substr(Pos); + StringRef Tail = Rest; + if (Rest.startswith("@@@")) + Tail = Rest.substr(Symbol.isUndefined() ? 2 : 1); + + auto *Alias = + cast(Asm.getContext().getOrCreateSymbol(Prefix + Tail)); + Asm.registerSymbol(*Alias); + const MCExpr *Value = MCSymbolRefExpr::create(&Symbol, Asm.getContext()); + Alias->setVariableValue(Value); + // Aliases defined with .symvar copy the binding from the symbol they alias. // This is the first place we are able to copy this information. - Alias.setExternal(Symbol.isExternal()); - Alias.setBinding(Symbol.getBinding()); + Alias->setExternal(Symbol.isExternal()); + Alias->setBinding(Symbol.getBinding()); - StringRef Rest = AliasName.substr(Pos); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; @@ -420,7 +420,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem !Rest.startswith("@@@")) report_fatal_error("A @@ version cannot be undefined"); - Renames.insert(std::make_pair(&Symbol, &Alias)); + Renames.insert(std::make_pair(&Symbol, Alias)); } } @@ -836,44 +836,7 @@ void ELFObjectWriter::computeSymbolTable( HasLargeSectionIndex = true; } - // The @@@ in symbol version is replaced with @ in undefined symbols and @@ - // in defined ones. - // - // FIXME: All name handling should be done before we get to the writer, - // including dealing with GNU-style version suffixes. Fixing this isn't - // trivial. - // - // We thus have to be careful to not perform the symbol version replacement - // blindly: - // - // The ELF format is used on Windows by the MCJIT engine. Thus, on - // Windows, the ELFObjectWriter can encounter symbols mangled using the MS - // Visual Studio C++ name mangling scheme. Symbols mangled using the MSVC - // C++ name mangling can legally have "@@@" as a sub-string. In that case, - // the EFLObjectWriter should not interpret the "@@@" sub-string as - // specifying GNU-style symbol versioning. The ELFObjectWriter therefore - // checks for the MSVC C++ name mangling prefix which is either "?", "@?", - // "__imp_?" or "__imp_@?". - // - // It would have been interesting to perform the MS mangling prefix check - // only when the target triple is of the form *-pc-windows-elf. But, it - // seems that this information is not easily accessible from the - // ELFObjectWriter. StringRef Name = Symbol.getName(); - SmallString<32> Buf; - if (!Name.startswith("?") && !Name.startswith("@?") && - !Name.startswith("__imp_?") && !Name.startswith("__imp_@?")) { - // This symbol isn't following the MSVC C++ name mangling convention. We - // can thus safely interpret the @@@ in symbol names as specifying symbol - // versioning. - size_t Pos = Name.find("@@@"); - if (Pos != StringRef::npos) { - Buf += Name.substr(0, Pos); - unsigned Skip = MSD.SectionIndex == ELF::SHN_UNDEF ? 2 : 1; - Buf += Name.substr(Pos + Skip); - Name = VersionSymSaver.save(Buf.c_str()); - } - } // Sections have their own string table if (Symbol.getType() != ELF::STT_SECTION) { Modified: user/jeff/numa/contrib/llvm/lib/MC/MCAsmStreamer.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -129,6 +129,9 @@ class MCAsmStreamer final : public MCStreamer { (publi void ChangeSection(MCSection *Section, const MCExpr *Subsection) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; + void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) override; void EmitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override; @@ -409,6 +412,14 @@ void MCAsmStreamer::ChangeSection(MCSection *Section, *MAI, getContext().getObjectFileInfo()->getTargetTriple(), OS, Subsection); } +} + +void MCAsmStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + OS << ".symver "; + Aliasee->print(OS, MAI); + OS << ", " << AliasName; + EmitEOL(); } void MCAsmStreamer::EmitLabel(MCSymbol *Symbol, SMLoc Loc) { Modified: user/jeff/numa/contrib/llvm/lib/MC/MCELFStreamer.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -337,6 +337,11 @@ void MCELFStreamer::emitELFSize(MCSymbol *Symbol, cons cast(Symbol)->setSize(Value); } +void MCELFStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + getAssembler().Symvers.push_back({AliasName, Aliasee}); +} + void MCELFStreamer::EmitLocalCommonSymbol(MCSymbol *S, uint64_t Size, unsigned ByteAlignment) { auto *Symbol = cast(S); Modified: user/jeff/numa/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -767,12 +767,8 @@ bool ELFAsmParser::ParseDirectiveSymver(StringRef, SML if (AliasName.find('@') == StringRef::npos) return TokError("expected a '@' in the name"); - MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); MCSymbol *Sym = getContext().getOrCreateSymbol(Name); - const MCExpr *Value = MCSymbolRefExpr::create(Sym, getContext()); - - getStreamer().EmitAssignment(Alias, Value); - getStreamer().emitELFSymverDirective(Alias, Sym); + getStreamer().emitELFSymverDirective(AliasName, Sym); return false; } Modified: user/jeff/numa/contrib/llvm/lib/MC/MCStreamer.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -925,7 +925,7 @@ void MCStreamer::EmitCOFFSymbolType(int Type) { llvm_unreachable("this directive only supported on COFF targets"); } void MCStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {} -void MCStreamer::emitELFSymverDirective(MCSymbol *Alias, +void MCStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) {} void MCStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) {} Modified: user/jeff/numa/contrib/llvm/lib/Object/ModuleSymbolTable.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -24,7 +24,6 @@ #include "llvm/IR/GlobalAlias.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Mangler.h" #include "llvm/IR/Module.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -69,81 +68,6 @@ void ModuleSymbolTable::addModule(Module *M) { }); } -// Ensure ELF .symver aliases get the same binding as the defined symbol -// they alias with. -static void handleSymverAliases(const Module &M, RecordStreamer &Streamer) { - if (Streamer.symverAliases().empty()) - return; - - // The name in the assembler will be mangled, but the name in the IR - // might not, so we first compute a mapping from mangled name to GV. - Mangler Mang; - SmallString<64> MangledName; - StringMap MangledNameMap; - auto GetMangledName = [&](const GlobalValue &GV) { - if (!GV.hasName()) - return; - - MangledName.clear(); - MangledName.reserve(GV.getName().size() + 1); - Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); - MangledNameMap[MangledName] = &GV; - }; - for (const Function &F : M) - GetMangledName(F); - for (const GlobalVariable &GV : M.globals()) - GetMangledName(GV); - for (const GlobalAlias &GA : M.aliases()) - GetMangledName(GA); - - // Walk all the recorded .symver aliases, and set up the binding - // for each alias. - for (auto &Symver : Streamer.symverAliases()) { - const MCSymbol *Aliasee = Symver.first; - MCSymbolAttr Attr = MCSA_Invalid; - - // First check if the aliasee binding was recorded in the asm. - RecordStreamer::State state = Streamer.getSymbolState(Aliasee); - switch (state) { - case RecordStreamer::Global: - case RecordStreamer::DefinedGlobal: - Attr = MCSA_Global; - break; - case RecordStreamer::UndefinedWeak: - case RecordStreamer::DefinedWeak: - Attr = MCSA_Weak; - break; - default: - break; - } - - // If we don't have a symbol attribute from assembly, then check if - // the aliasee was defined in the IR. - if (Attr == MCSA_Invalid) { - const auto *GV = M.getNamedValue(Aliasee->getName()); - if (!GV) { - auto MI = MangledNameMap.find(Aliasee->getName()); - if (MI != MangledNameMap.end()) - GV = MI->second; - else - continue; - } - if (GV->hasExternalLinkage()) - Attr = MCSA_Global; - else if (GV->hasLocalLinkage()) - Attr = MCSA_Local; - else if (GV->isWeakForLinker()) - Attr = MCSA_Weak; - } - if (Attr == MCSA_Invalid) - continue; - - // Set the detected binding on each alias with this aliasee. - for (auto &Alias : Symver.second) - Streamer.EmitSymbolAttribute(Alias, Attr); - } -} - void ModuleSymbolTable::CollectAsmSymbols( const Module &M, function_ref AsmSymbol) { @@ -176,7 +100,7 @@ void ModuleSymbolTable::CollectAsmSymbols( MCObjectFileInfo MOFI; MCContext MCCtx(MAI.get(), MRI.get(), &MOFI); MOFI.InitMCObjectFileInfo(TT, /*PIC*/ false, MCCtx); - RecordStreamer Streamer(MCCtx); + RecordStreamer Streamer(MCCtx, M); T->createNullTargetStreamer(Streamer); std::unique_ptr Buffer(MemoryBuffer::getMemBuffer(InlineAsm)); @@ -195,7 +119,7 @@ void ModuleSymbolTable::CollectAsmSymbols( if (Parser->Run(false)) return; - handleSymverAliases(M, Streamer); + Streamer.flushSymverDirectives(); for (auto &KV : Streamer) { StringRef Key = KV.first(); Modified: user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.cpp ============================================================================== --- user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 19:38:21 2018 (r331371) @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// #include "RecordStreamer.h" +#include "llvm/IR/Mangler.h" +#include "llvm/IR/Module.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" using namespace llvm; @@ -70,7 +73,8 @@ void RecordStreamer::markUsed(const MCSymbol &Symbol) void RecordStreamer::visitUsedSymbol(const MCSymbol &Sym) { markUsed(Sym); } -RecordStreamer::RecordStreamer(MCContext &Context) : MCStreamer(Context) {} +RecordStreamer::RecordStreamer(MCContext &Context, const Module &M) + : MCStreamer(Context), M(M) {} RecordStreamer::const_iterator RecordStreamer::begin() { return Symbols.begin(); @@ -112,7 +116,109 @@ void RecordStreamer::EmitCommonSymbol(MCSymbol *Symbol markDefined(*Symbol); } -void RecordStreamer::emitELFSymverDirective(MCSymbol *Alias, +RecordStreamer::State RecordStreamer::getSymbolState(const MCSymbol *Sym) { + auto SI = Symbols.find(Sym->getName()); + if (SI == Symbols.end()) + return NeverSeen; + return SI->second; +} + +void RecordStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) { - SymverAliasMap[Aliasee].push_back(Alias); + SymverAliasMap[Aliasee].push_back(AliasName); +} + +void RecordStreamer::flushSymverDirectives() { + // Mapping from mangled name to GV. + StringMap MangledNameMap; + // The name in the assembler will be mangled, but the name in the IR + // might not, so we first compute a mapping from mangled name to GV. + Mangler Mang; + SmallString<64> MangledName; + for (const GlobalValue &GV : M.global_values()) { + if (!GV.hasName()) + continue; + MangledName.clear(); + MangledName.reserve(GV.getName().size() + 1); + Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); + MangledNameMap[MangledName] = &GV; + } + + // Walk all the recorded .symver aliases, and set up the binding + // for each alias. + for (auto &Symver : SymverAliasMap) { + const MCSymbol *Aliasee = Symver.first; + MCSymbolAttr Attr = MCSA_Invalid; + bool IsDefined = false; + + // First check if the aliasee binding was recorded in the asm. + RecordStreamer::State state = getSymbolState(Aliasee); + switch (state) { + case RecordStreamer::Global: + case RecordStreamer::DefinedGlobal: + Attr = MCSA_Global; + break; + case RecordStreamer::UndefinedWeak: + case RecordStreamer::DefinedWeak: + Attr = MCSA_Weak; + break; + default: + break; + } + + switch (state) { + case RecordStreamer::Defined: + case RecordStreamer::DefinedGlobal: + case RecordStreamer::DefinedWeak: + IsDefined = true; + break; + case RecordStreamer::NeverSeen: + case RecordStreamer::Global: + case RecordStreamer::Used: + case RecordStreamer::UndefinedWeak: + break; + } + + if (Attr == MCSA_Invalid || !IsDefined) { + const GlobalValue *GV = M.getNamedValue(Aliasee->getName()); + if (!GV) { + auto MI = MangledNameMap.find(Aliasee->getName()); + if (MI != MangledNameMap.end()) + GV = MI->second; + } + if (GV) { + // If we don't have a symbol attribute from assembly, then check if + // the aliasee was defined in the IR. + if (Attr == MCSA_Invalid) { + if (GV->hasExternalLinkage()) + Attr = MCSA_Global; + else if (GV->hasLocalLinkage()) + Attr = MCSA_Local; + else if (GV->isWeakForLinker()) + Attr = MCSA_Weak; + } + IsDefined = IsDefined || !GV->isDeclarationForLinker(); + } + } + + // Set the detected binding on each alias with this aliasee. + for (auto AliasName : Symver.second) { + std::pair Split = AliasName.split("@@@"); + SmallString<128> NewName; + if (!Split.second.empty() && !Split.second.startswith("@")) { + // Special processing for "@@@" according + // https://sourceware.org/binutils/docs/as/Symver.html + const char *Separator = IsDefined ? "@@" : "@"; + AliasName = + (Split.first + Separator + Split.second).toStringRef(NewName); + } + MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); + // TODO: Handle "@@@". Depending on SymbolAttribute value it needs to be + // converted into @ or @@. + const MCExpr *Value = MCSymbolRefExpr::create(Aliasee, getContext()); + EmitAssignment(Alias, Value); + if (Attr != MCSA_Invalid) + EmitSymbolAttribute(Alias, Attr); + } + } } Modified: user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.h ============================================================================== --- user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 19:38:21 2018 (r331371) @@ -20,25 +20,32 @@ namespace llvm { +class GlobalValue; +class Module; + class RecordStreamer : public MCStreamer { public: enum State { NeverSeen, Global, Defined, DefinedGlobal, DefinedWeak, Used, UndefinedWeak}; private: + const Module &M; StringMap Symbols; // Map of aliases created by .symver directives, saved so we can update // their symbol binding after parsing complete. This maps from each // aliasee to its list of aliases. - DenseMap> SymverAliasMap; + DenseMap> SymverAliasMap; + /// Get the state recorded for the given symbol. + State getSymbolState(const MCSymbol *Sym); + void markDefined(const MCSymbol &Symbol); void markGlobal(const MCSymbol &Symbol, MCSymbolAttr Attribute); void markUsed(const MCSymbol &Symbol); void visitUsedSymbol(const MCSymbol &Sym) override; public: - RecordStreamer(MCContext &Context); + RecordStreamer(MCContext &Context, const Module &M); using const_iterator = StringMap::const_iterator; @@ -54,20 +61,11 @@ class RecordStreamer : public MCStreamer { (public) void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; /// Record .symver aliases for later processing. - void emitELFSymverDirective(MCSymbol *Alias, + void emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) override; - /// Return the map of .symver aliasee to associated aliases. - DenseMap> &symverAliases() { - return SymverAliasMap; - } - - /// Get the state recorded for the given symbol. - State getSymbolState(const MCSymbol *Sym) { - auto SI = Symbols.find(Sym->getName()); - if (SI == Symbols.end()) - return NeverSeen; - return SI->second; - } + // Emit ELF .symver aliases and ensure they have the same binding as the + // defined symbol they alias with. + void flushSymverDirectives(); }; } // end namespace llvm Modified: user/jeff/numa/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- user/jeff/numa/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 19:38:21 2018 (r331371) @@ -53,6 +53,38 @@ # define _LIBUNWIND_CONTEXT_SIZE 64 # define _LIBUNWIND_CURSOR_SIZE 76 # define _LIBUNWIND_MAX_REGISTER 96 +# elif defined(__mips__) +# if defined(_ABIO32) && _MIPS_SIM == _ABIO32 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 50 +# define _LIBUNWIND_CURSOR_SIZE 61 +# else +# define _LIBUNWIND_CONTEXT_SIZE 18 +# define _LIBUNWIND_CURSOR_SIZE 29 +# endif +# elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 78 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 46 +# endif +# elif defined(_ABI64) && _MIPS_SIM == _ABI64 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 79 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 47 +# endif +# else +# error "Unsupported MIPS ABI and/or environment" +# endif +# define _LIBUNWIND_MAX_REGISTER 66 # else # error "Unsupported architecture." # endif @@ -63,6 +95,8 @@ # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 # define _LIBUNWIND_MAX_REGISTER 120 Modified: user/jeff/numa/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- user/jeff/numa/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 19:38:21 2018 (r331371) @@ -604,4 +604,74 @@ enum { UNW_RISCV_D31 = 95, }; +// MIPS registers +enum { + UNW_MIPS_R0 = 0, + UNW_MIPS_R1 = 1, + UNW_MIPS_R2 = 2, + UNW_MIPS_R3 = 3, + UNW_MIPS_R4 = 4, + UNW_MIPS_R5 = 5, + UNW_MIPS_R6 = 6, + UNW_MIPS_R7 = 7, + UNW_MIPS_R8 = 8, + UNW_MIPS_R9 = 9, + UNW_MIPS_R10 = 10, + UNW_MIPS_R11 = 11, + UNW_MIPS_R12 = 12, + UNW_MIPS_R13 = 13, + UNW_MIPS_R14 = 14, + UNW_MIPS_R15 = 15, + UNW_MIPS_R16 = 16, + UNW_MIPS_R17 = 17, + UNW_MIPS_R18 = 18, + UNW_MIPS_R19 = 19, + UNW_MIPS_R20 = 20, + UNW_MIPS_R21 = 21, + UNW_MIPS_R22 = 22, + UNW_MIPS_R23 = 23, + UNW_MIPS_R24 = 24, + UNW_MIPS_R25 = 25, + UNW_MIPS_R26 = 26, + UNW_MIPS_R27 = 27, + UNW_MIPS_R28 = 28, + UNW_MIPS_R29 = 29, + UNW_MIPS_R30 = 30, + UNW_MIPS_R31 = 31, + UNW_MIPS_F0 = 32, + UNW_MIPS_F1 = 33, + UNW_MIPS_F2 = 34, + UNW_MIPS_F3 = 35, + UNW_MIPS_F4 = 36, + UNW_MIPS_F5 = 37, + UNW_MIPS_F6 = 38, + UNW_MIPS_F7 = 39, + UNW_MIPS_F8 = 40, + UNW_MIPS_F9 = 41, + UNW_MIPS_F10 = 42, + UNW_MIPS_F11 = 43, + UNW_MIPS_F12 = 44, + UNW_MIPS_F13 = 45, + UNW_MIPS_F14 = 46, + UNW_MIPS_F15 = 47, + UNW_MIPS_F16 = 48, + UNW_MIPS_F17 = 49, + UNW_MIPS_F18 = 50, + UNW_MIPS_F19 = 51, + UNW_MIPS_F20 = 52, + UNW_MIPS_F21 = 53, + UNW_MIPS_F22 = 54, + UNW_MIPS_F23 = 55, + UNW_MIPS_F24 = 56, + UNW_MIPS_F25 = 57, + UNW_MIPS_F26 = 58, + UNW_MIPS_F27 = 59, + UNW_MIPS_F28 = 60, + UNW_MIPS_F29 = 61, + UNW_MIPS_F30 = 62, + UNW_MIPS_F31 = 63, + UNW_MIPS_HI = 64, + UNW_MIPS_LO = 65, +}; + #endif Modified: user/jeff/numa/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- user/jeff/numa/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 19:38:21 2018 (r331371) @@ -148,6 +148,7 @@ class __attribute__((visibility("hidden"))) LocalAddre return val; } uintptr_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); static uint64_t getULEB128(pint_t &addr, pint_t end); static int64_t getSLEB128(pint_t &addr, pint_t end); @@ -169,6 +170,14 @@ inline uintptr_t LocalAddressSpace::getP(pint_t addr) #endif } +inline uint64_t LocalAddressSpace::getRegister(pint_t addr) { +#if defined(__LP64__) || defined(__mips64) + return get64(addr); +#else + return get32(addr); +#endif +} + /// Read a ULEB128 into a 64-bit word. inline uint64_t LocalAddressSpace::getULEB128(pint_t &addr, pint_t end) { const uint8_t *p = (uint8_t *)addr; @@ -496,6 +505,7 @@ class OtherAddressSpace { (public) uint32_t get32(pint_t addr); uint64_t get64(pint_t addr); pint_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); uint64_t getULEB128(pint_t &addr, pint_t end); int64_t getSLEB128(pint_t &addr, pint_t end); pint_t getEncodedP(pint_t &addr, pint_t end, uint8_t encoding, @@ -529,6 +539,11 @@ template uint64_t OtherAddressSpace

::g template typename P::uint_t OtherAddressSpace

::getP(pint_t addr) { return P::getP(*(uint64_t *)localCopy(addr)); +} + +template +typename P::uint_t OtherAddressSpace

::getRegister(pint_t addr) { + return P::getRegister(*(uint64_t *)localCopy(addr)); } template Modified: user/jeff/numa/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp ============================================================================== --- user/jeff/numa/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 19:38:21 2018 (r331371) @@ -83,10 +83,10 @@ typename A::pint_t DwarfInstructions::getSavedRe const RegisterLocation &savedReg) { switch (savedReg.location) { case CFI_Parser::kRegisterInCFA: - return addressSpace.getP(cfa + (pint_t)savedReg.value); + return addressSpace.getRegister(cfa + (pint_t)savedReg.value); case CFI_Parser::kRegisterAtExpression: - return addressSpace.getP( + return addressSpace.getRegister( evaluateExpression((pint_t)savedReg.value, addressSpace, registers, cfa)); Modified: user/jeff/numa/contrib/llvm/projects/libunwind/src/Registers.hpp ============================================================================== --- user/jeff/numa/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 19:23:02 2018 (r331370) +++ user/jeff/numa/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 19:38:21 2018 (r331371) @@ -2168,6 +2168,612 @@ inline void Registers_riscv::setVectorRegister(int, v1 _LIBUNWIND_ABORT("no riscv vector register support yet"); } #endif // _LIBUNWIND_TARGET_RISCV + +#if defined(_LIBUNWIND_TARGET_MIPS_O32) +/// Registers_mips_o32 holds the register state of a thread in a 32-bit MIPS +/// process. +class _LIBUNWIND_HIDDEN Registers_mips_o32 { +public: + Registers_mips_o32(); + Registers_mips_o32(const void *registers); + + bool validRegister(int num) const; + uint32_t getRegister(int num) const; + void setRegister(int num, uint32_t value); + bool validFloatRegister(int num) const; + double getFloatRegister(int num) const; + void setFloatRegister(int num, double value); + bool validVectorRegister(int num) const; + v128 getVectorRegister(int num) const; + void setVectorRegister(int num, v128 value); + const char *getRegisterName(int num); + void jumpto(); + static int lastDwarfRegNum() { return 65; } + + uint32_t getSP() const { return _registers.__r[29]; } + void setSP(uint32_t value) { _registers.__r[29] = value; } + uint32_t getIP() const { return _registers.__pc; } + void setIP(uint32_t value) { _registers.__pc = value; } + +private: + struct mips_o32_thread_state_t { + uint32_t __r[32]; + uint32_t __pc; + uint32_t __hi; + uint32_t __lo; + }; + + mips_o32_thread_state_t _registers; +#ifdef __mips_hard_float + /// O32 with 32-bit floating point registers only uses half of this + /// space. However, using the same layout for 32-bit vs 64-bit + /// floating point registers results in a single context size for + /// O32 with hard float. + uint32_t _padding; + double _floats[32]; +#endif +}; + +inline Registers_mips_o32::Registers_mips_o32(const void *registers) { + static_assert((check_fit::does_fit), + "mips_o32 registers do not fit into unw_context_t"); + memcpy(&_registers, static_cast(registers), + sizeof(_registers)); +} + +inline Registers_mips_o32::Registers_mips_o32() { + memset(&_registers, 0, sizeof(_registers)); +} + +inline bool Registers_mips_o32::validRegister(int regNum) const { + if (regNum == UNW_REG_IP) + return true; + if (regNum == UNW_REG_SP) + return true; + if (regNum < 0) + return false; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Thu Mar 22 19:49:38 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B5AEF659D0 for ; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0B69B87927; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 065A415ACE; Thu, 22 Mar 2018 19:49:38 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MJnbiY072856; Thu, 22 Mar 2018 19:49:37 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MJnbOg072854; Thu, 22 Mar 2018 19:49:37 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803221949.w2MJnbOg072854@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 22 Mar 2018 19:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331372 - user/jeff/numa/sys/vm X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: user/jeff/numa/sys/vm X-SVN-Commit-Revision: 331372 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 19:49:38 -0000 Author: jeff Date: Thu Mar 22 19:49:37 2018 New Revision: 331372 URL: https://svnweb.freebsd.org/changeset/base/331372 Log: Remove garbage diffs from merges and differences from head patches. Modified: user/jeff/numa/sys/vm/uma.h user/jeff/numa/sys/vm/vm_page.c Modified: user/jeff/numa/sys/vm/uma.h ============================================================================== --- user/jeff/numa/sys/vm/uma.h Thu Mar 22 19:38:21 2018 (r331371) +++ user/jeff/numa/sys/vm/uma.h Thu Mar 22 19:49:37 2018 (r331372) @@ -47,7 +47,6 @@ /* Types and type defs */ struct uma_zone; -struct vm_domain_iterator; /* Opaque type used as a handle to the zone */ typedef struct uma_zone * uma_zone_t; Modified: user/jeff/numa/sys/vm/vm_page.c ============================================================================== --- user/jeff/numa/sys/vm/vm_page.c Thu Mar 22 19:38:21 2018 (r331371) +++ user/jeff/numa/sys/vm/vm_page.c Thu Mar 22 19:49:37 2018 (r331372) @@ -790,7 +790,7 @@ vm_page_startup(vm_offset_t vaddr) vm_domain_freecnt_inc(vmd, pagecount); vm_cnt.v_page_count += (u_int)pagecount; - vmd = VM_DOMAIN(seg->domain);; + vmd = VM_DOMAIN(seg->domain); vmd->vmd_page_count += (u_int)pagecount; vmd->vmd_segs |= 1UL << m->segind; break; @@ -808,8 +808,13 @@ vm_page_startup(vm_offset_t vaddr) vm_page_blacklist_check(list, NULL); freeenv(list); - +#if VM_NRESERVLEVEL > 0 /* + * Initialize the reservation management system. + */ + vm_reserv_init(); +#endif + /* * Set an initial domain policy for thread0 so that allocations * can work. */ @@ -1865,9 +1870,7 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ - vm_page_lock(m); vm_page_free_toq(m); - vm_page_unlock(m); if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object); vm_radix_wait(); @@ -2070,9 +2073,7 @@ found: m->oflags = VPO_UNMANAGED; m->busy_lock = VPB_UNBUSIED; /* Don't change PG_ZERO. */ - vm_page_lock(m); vm_page_free_toq(m); - vm_page_unlock(m); } if (req & VM_ALLOC_WAITFAIL) { VM_OBJECT_WUNLOCK(object); @@ -2458,6 +2459,7 @@ static int vm_page_reclaim_run(int req_class, int domain, u_long npages, vm_page_t m_run, vm_paddr_t high) { + struct vm_domain *vmd; struct mtx *m_mtx; struct spglist free; vm_object_t object; @@ -2587,12 +2589,7 @@ retry: if (vm_page_free_prep(m, false)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); - m->oflags = VPO_UNMANAGED; -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#endif - SLIST_INSERT_HEAD(&free, m, - plinks.s.ss); + /* * The new page must be deactivated * before the object is unlocked. @@ -2608,12 +2605,6 @@ retry: plinks.s.ss); KASSERT(m->dirty == 0, ("page %p is dirty", m)); - m->oflags = VPO_UNMANAGED; -#if VM_NRESERVLEVEL > 0 - if (!vm_reserv_free_page(m)) -#endif - SLIST_INSERT_HEAD(&free, m, - plinks.s.ss); } } else error = EBUSY; @@ -2621,7 +2612,8 @@ unlock: VM_OBJECT_WUNLOCK(object); } else { MPASS(vm_phys_domain(m) == domain); - /* XXX order unsynchronized? */ + vmd = VM_DOMAIN(domain); + vm_domain_free_lock(vmd); order = m->order; if (order < VM_NFREEORDER) { /* @@ -2638,6 +2630,7 @@ unlock: else if (vm_reserv_is_page_free(m)) order = 0; #endif + vm_domain_free_unlock(vmd); if (order == VM_NFREEORDER) error = EINVAL; } @@ -2645,7 +2638,6 @@ unlock: if (m_mtx != NULL) mtx_unlock(m_mtx); if ((m = SLIST_FIRST(&free)) != NULL) { - struct vm_domain *vmd; int cnt; vmd = VM_DOMAIN(domain); @@ -3297,10 +3289,6 @@ vm_page_free_prep(vm_page_t m, bool pagequeue_locked) */ if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); -#if VM_NRESERVLEVEL > 0 - if (vm_reserv_free_page(m)) - return (false); -#endif #if VM_NRESERVLEVEL > 0 if (vm_reserv_free_page(m)) From owner-svn-src-user@freebsd.org Thu Mar 22 21:57:14 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 353CDF4AFCB for ; Thu, 22 Mar 2018 21:57:14 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D37D46DC14; Thu, 22 Mar 2018 21:57:13 +0000 (UTC) (envelope-from jeff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AEC9D16F1D; Thu, 22 Mar 2018 21:57:13 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2MLvDBY038918; Thu, 22 Mar 2018 21:57:13 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2MLvA1Z038891; Thu, 22 Mar 2018 21:57:10 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803222157.w2MLvA1Z038891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Thu, 22 Mar 2018 21:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331377 - in user/markj/vm-playground: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolc... X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: in user/markj/vm-playground: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall cddl/contrib/opensolaris/lib/libdtrace/common contrib/blacklist/bin contrib/elftoolchain/nm contrib/llvm/incl... X-SVN-Commit-Revision: 331377 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 21:57:14 -0000 Author: jeff Date: Thu Mar 22 21:57:10 2018 New Revision: 331377 URL: https://svnweb.freebsd.org/changeset/base/331377 Log: Merge from user/jeff/numa Added: user/markj/vm-playground/contrib/processor-trace/ - copied from r331373, user/jeff/numa/contrib/processor-trace/ user/markj/vm-playground/lib/libc/gen/getentropy.3 - copied unchanged from r331373, user/jeff/numa/lib/libc/gen/getentropy.3 user/markj/vm-playground/lib/libc/gen/getentropy.c - copied unchanged from r331373, user/jeff/numa/lib/libc/gen/getentropy.c user/markj/vm-playground/lib/libc/sys/getrandom.2 - copied unchanged from r331373, user/jeff/numa/lib/libc/sys/getrandom.2 user/markj/vm-playground/lib/libc/tests/gen/getentropy_test.c - copied unchanged from r331373, user/jeff/numa/lib/libc/tests/gen/getentropy_test.c user/markj/vm-playground/lib/libcasper/services/cap_pwd/cap_pwd.3 - copied unchanged from r331373, user/jeff/numa/lib/libcasper/services/cap_pwd/cap_pwd.3 user/markj/vm-playground/lib/libcasper/services/cap_sysctl/cap_sysctl.3 - copied unchanged from r331373, user/jeff/numa/lib/libcasper/services/cap_sysctl/cap_sysctl.3 user/markj/vm-playground/lib/libipt/ - copied from r331373, user/jeff/numa/lib/libipt/ user/markj/vm-playground/stand/lua/hook.lua - copied unchanged from r331373, user/jeff/numa/stand/lua/hook.lua user/markj/vm-playground/sys/compat/linux/linux_errno.c - copied unchanged from r331373, user/jeff/numa/sys/compat/linux/linux_errno.c user/markj/vm-playground/sys/compat/linux/linux_errno.inc - copied unchanged from r331373, user/jeff/numa/sys/compat/linux/linux_errno.inc user/markj/vm-playground/sys/contrib/libb2/ - copied from r331373, user/jeff/numa/sys/contrib/libb2/ user/markj/vm-playground/sys/crypto/blake2/ - copied from r331373, user/jeff/numa/sys/crypto/blake2/ user/markj/vm-playground/sys/dev/tcp_log/ - copied from r331373, user/jeff/numa/sys/dev/tcp_log/ user/markj/vm-playground/sys/kern/sys_getrandom.c - copied unchanged from r331373, user/jeff/numa/sys/kern/sys_getrandom.c user/markj/vm-playground/sys/modules/blake2/ - copied from r331373, user/jeff/numa/sys/modules/blake2/ user/markj/vm-playground/sys/netinet/cc/cc_newreno.h - copied unchanged from r331373, user/jeff/numa/sys/netinet/cc/cc_newreno.h user/markj/vm-playground/sys/netinet/tcp_log_buf.c - copied unchanged from r331373, user/jeff/numa/sys/netinet/tcp_log_buf.c user/markj/vm-playground/sys/netinet/tcp_log_buf.h - copied unchanged from r331373, user/jeff/numa/sys/netinet/tcp_log_buf.h user/markj/vm-playground/tests/sys/kern/sys_getrandom.c - copied unchanged from r331373, user/jeff/numa/tests/sys/kern/sys_getrandom.c user/markj/vm-playground/tests/sys/opencrypto/blake2-kat.h - copied unchanged from r331373, user/jeff/numa/tests/sys/opencrypto/blake2-kat.h user/markj/vm-playground/tests/sys/opencrypto/blake2_test.c - copied unchanged from r331373, user/jeff/numa/tests/sys/opencrypto/blake2_test.c Deleted: user/markj/vm-playground/sys/crypto/chacha20/chacha20.c user/markj/vm-playground/sys/crypto/chacha20/chacha20.h user/markj/vm-playground/sys/modules/chacha20/ Modified: user/markj/vm-playground/Makefile.inc1 user/markj/vm-playground/ObsoleteFiles.inc user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c user/markj/vm-playground/contrib/blacklist/bin/conf.c user/markj/vm-playground/contrib/elftoolchain/nm/nm.c user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindCursor.hpp user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindRegistersRestore.S user/markj/vm-playground/contrib/llvm/projects/libunwind/src/UnwindRegistersSave.S user/markj/vm-playground/contrib/llvm/projects/libunwind/src/config.h user/markj/vm-playground/contrib/llvm/projects/libunwind/src/libunwind.cpp user/markj/vm-playground/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp user/markj/vm-playground/contrib/telnet/telnetd/telnetd.c user/markj/vm-playground/etc/mtree/BSD.include.dist user/markj/vm-playground/etc/mtree/BSD.root.dist user/markj/vm-playground/include/Makefile user/markj/vm-playground/include/unistd.h user/markj/vm-playground/lib/Makefile user/markj/vm-playground/lib/libc/gen/Makefile.inc user/markj/vm-playground/lib/libc/gen/Symbol.map user/markj/vm-playground/lib/libc/gen/arc4random.c user/markj/vm-playground/lib/libc/include/libc_private.h user/markj/vm-playground/lib/libc/sys/Makefile.inc user/markj/vm-playground/lib/libc/sys/Symbol.map user/markj/vm-playground/lib/libc/sys/mlock.2 user/markj/vm-playground/lib/libc/tests/gen/Makefile user/markj/vm-playground/lib/libcasper/libcasper/libcasper.3 user/markj/vm-playground/lib/libcasper/services/cap_dns/cap_dns.3 user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.3 user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.c user/markj/vm-playground/lib/libcasper/services/cap_grp/cap_grp.h user/markj/vm-playground/lib/libcasper/services/cap_pwd/Makefile user/markj/vm-playground/lib/libcasper/services/cap_sysctl/Makefile user/markj/vm-playground/lib/libjail/jail.c user/markj/vm-playground/lib/libmd/sha512.3 user/markj/vm-playground/lib/libsysdecode/errno.c user/markj/vm-playground/lib/libthr/thread/thr_cancel.c user/markj/vm-playground/lib/libzstd/Makefile user/markj/vm-playground/libexec/tftpd/tests/functional.c user/markj/vm-playground/release/arm64/RPI3.conf user/markj/vm-playground/release/tools/gce.conf user/markj/vm-playground/sbin/ifconfig/ifieee80211.c user/markj/vm-playground/sbin/ipfw/ipfw.8 user/markj/vm-playground/sbin/savecore/savecore.8 user/markj/vm-playground/share/man/man4/altq.4 user/markj/vm-playground/share/man/man4/audit.4 user/markj/vm-playground/share/man/man4/cc_newreno.4 user/markj/vm-playground/share/man/man4/mod_cc.4 user/markj/vm-playground/share/man/man7/development.7 user/markj/vm-playground/share/man/man9/altq.9 user/markj/vm-playground/share/man/man9/cnv.9 user/markj/vm-playground/share/man/man9/owll.9 user/markj/vm-playground/share/man/man9/rwlock.9 user/markj/vm-playground/share/man/man9/style.9 user/markj/vm-playground/share/man/man9/zone.9 user/markj/vm-playground/share/misc/bsd-family-tree user/markj/vm-playground/share/misc/committers-ports.dot user/markj/vm-playground/share/mk/bsd.libnames.mk user/markj/vm-playground/share/mk/src.libnames.mk user/markj/vm-playground/share/mk/src.opts.mk user/markj/vm-playground/stand/common/bootstrap.h user/markj/vm-playground/stand/defaults/loader.conf user/markj/vm-playground/stand/defaults/loader.conf.5 user/markj/vm-playground/stand/defs.mk user/markj/vm-playground/stand/efi/boot1/boot1.c user/markj/vm-playground/stand/efi/loader/framebuffer.c user/markj/vm-playground/stand/forth/Makefile user/markj/vm-playground/stand/forth/efi.4th user/markj/vm-playground/stand/forth/loader.rc user/markj/vm-playground/stand/i386/loader/loader.rc user/markj/vm-playground/stand/lua/Makefile user/markj/vm-playground/stand/lua/color.lua user/markj/vm-playground/stand/lua/config.lua user/markj/vm-playground/stand/lua/core.lua user/markj/vm-playground/stand/lua/core.lua.8 user/markj/vm-playground/stand/lua/drawer.lua user/markj/vm-playground/stand/lua/loader.lua user/markj/vm-playground/stand/lua/menu.lua user/markj/vm-playground/stand/lua/screen.lua user/markj/vm-playground/sys/amd64/acpica/acpi_wakecode.S user/markj/vm-playground/sys/amd64/amd64/apic_vector.S user/markj/vm-playground/sys/amd64/amd64/atpic_vector.S user/markj/vm-playground/sys/amd64/amd64/cpu_switch.S user/markj/vm-playground/sys/amd64/amd64/db_interface.c user/markj/vm-playground/sys/amd64/amd64/exception.S user/markj/vm-playground/sys/amd64/amd64/fpu.c user/markj/vm-playground/sys/amd64/amd64/gdb_machdep.c user/markj/vm-playground/sys/amd64/amd64/locore.S user/markj/vm-playground/sys/amd64/amd64/mpboot.S user/markj/vm-playground/sys/amd64/amd64/sigtramp.S user/markj/vm-playground/sys/amd64/amd64/support.S user/markj/vm-playground/sys/amd64/amd64/xen-locore.S user/markj/vm-playground/sys/amd64/ia32/ia32_exception.S user/markj/vm-playground/sys/amd64/linux/linux_support.s user/markj/vm-playground/sys/amd64/linux/linux_sysvec.c user/markj/vm-playground/sys/amd64/linux32/linux.h user/markj/vm-playground/sys/amd64/linux32/linux32_support.s user/markj/vm-playground/sys/amd64/linux32/linux32_sysvec.c user/markj/vm-playground/sys/amd64/sgx/sgx_support.S user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_clkmsr.c user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_mp.c user/markj/vm-playground/sys/arm/amlogic/aml8726/aml8726_usb_phy-m3.c user/markj/vm-playground/sys/arm/annapurna/alpine/alpine_machdep.c user/markj/vm-playground/sys/arm/arm/bcopy_page.S user/markj/vm-playground/sys/arm/arm/bcopyinout.S user/markj/vm-playground/sys/arm/arm/copystr.S user/markj/vm-playground/sys/arm/arm/cpu_asm-v6.S user/markj/vm-playground/sys/arm/arm/exception.S user/markj/vm-playground/sys/arm/arm/fusu.S user/markj/vm-playground/sys/arm/arm/hypervisor-stub.S user/markj/vm-playground/sys/arm/arm/in_cksum_arm.S user/markj/vm-playground/sys/arm/arm/locore-v4.S user/markj/vm-playground/sys/arm/arm/locore-v6.S user/markj/vm-playground/sys/arm/arm/pmap-v4.c user/markj/vm-playground/sys/arm/arm/support.S user/markj/vm-playground/sys/arm/arm/swtch-v4.S user/markj/vm-playground/sys/arm/arm/swtch-v6.S user/markj/vm-playground/sys/arm/arm/swtch.S user/markj/vm-playground/sys/arm/at91/at91_rst.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_fb.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_fbd.c user/markj/vm-playground/sys/arm/broadcom/bcm2835/bcm2835_machdep.c user/markj/vm-playground/sys/arm/freescale/fsl_ocotp.c user/markj/vm-playground/sys/arm/freescale/vybrid/vf_machdep.c user/markj/vm-playground/sys/arm/mv/mv_common.c user/markj/vm-playground/sys/arm/samsung/exynos/chrome_ec.c user/markj/vm-playground/sys/arm/samsung/exynos/exynos5_ehci.c user/markj/vm-playground/sys/arm/ti/am335x/am335x_lcd.c user/markj/vm-playground/sys/arm/ti/am335x/am335x_lcd_syscons.c user/markj/vm-playground/sys/arm64/arm64/bzero.S user/markj/vm-playground/sys/arm64/arm64/copyinout.S user/markj/vm-playground/sys/arm64/arm64/exception.S user/markj/vm-playground/sys/arm64/arm64/locore.S user/markj/vm-playground/sys/arm64/arm64/support.S user/markj/vm-playground/sys/arm64/arm64/swtch.S user/markj/vm-playground/sys/cam/nvme/nvme_da.c user/markj/vm-playground/sys/cam/scsi/scsi_all.h user/markj/vm-playground/sys/cam/scsi/scsi_ch.c user/markj/vm-playground/sys/cam/scsi/scsi_da.c user/markj/vm-playground/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c user/markj/vm-playground/sys/cddl/dev/dtrace/aarch64/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/amd64/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/arm/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/i386/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/powerpc/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/dtrace/riscv/dtrace_asm.S user/markj/vm-playground/sys/cddl/dev/fbt/x86/fbt_isa.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_syscall.h user/markj/vm-playground/sys/compat/freebsd32/freebsd32_syscalls.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_sysent.c user/markj/vm-playground/sys/compat/freebsd32/freebsd32_systrace_args.c user/markj/vm-playground/sys/compat/freebsd32/syscalls.master user/markj/vm-playground/sys/compat/linux/linux_emul.h user/markj/vm-playground/sys/compat/linuxkpi/common/include/linux/pci.h user/markj/vm-playground/sys/conf/files user/markj/vm-playground/sys/conf/files.amd64 user/markj/vm-playground/sys/conf/files.i386 user/markj/vm-playground/sys/conf/kern.opts.mk user/markj/vm-playground/sys/conf/kern.post.mk user/markj/vm-playground/sys/conf/kmod.mk user/markj/vm-playground/sys/contrib/zstd/lib/freebsd/zstd_kfreebsd.c user/markj/vm-playground/sys/dev/cardbus/cardbus.c user/markj/vm-playground/sys/dev/cxgbe/common/t4_hw.c user/markj/vm-playground/sys/dev/cxgbe/t4_main.c user/markj/vm-playground/sys/dev/drm/drm_bufs.c user/markj/vm-playground/sys/dev/drm/drm_irq.c user/markj/vm-playground/sys/dev/e1000/em_txrx.c user/markj/vm-playground/sys/dev/e1000/if_em.c user/markj/vm-playground/sys/dev/e1000/if_em.h user/markj/vm-playground/sys/dev/efidev/efidev.c user/markj/vm-playground/sys/dev/efidev/efirt.c (contents, props changed) user/markj/vm-playground/sys/dev/efidev/efirtc.c user/markj/vm-playground/sys/dev/fdt/fdt_common.c user/markj/vm-playground/sys/dev/flash/mx25l.c user/markj/vm-playground/sys/dev/hyperv/vmbus/amd64/vmbus_vector.S user/markj/vm-playground/sys/dev/hyperv/vmbus/i386/vmbus_vector.S user/markj/vm-playground/sys/dev/ixgbe/if_ix.c user/markj/vm-playground/sys/dev/ixgbe/if_ixv.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_82598.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_82599.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_api.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_common.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_common.h user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb_82598.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_dcb_82599.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_phy.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_type.h user/markj/vm-playground/sys/dev/ixgbe/ixgbe_vf.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_x540.c user/markj/vm-playground/sys/dev/ixgbe/ixgbe_x550.c user/markj/vm-playground/sys/dev/jedec_dimm/jedec_dimm.c user/markj/vm-playground/sys/dev/md/md.c user/markj/vm-playground/sys/dev/mpr/mpi/mpi2.h user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_cnfg.h user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_history.txt user/markj/vm-playground/sys/dev/mpr/mpi/mpi2_ioc.h user/markj/vm-playground/sys/dev/mpr/mpr_ioctl.h user/markj/vm-playground/sys/dev/mpr/mpr_sas.c user/markj/vm-playground/sys/dev/mpr/mpr_sas_lsi.c user/markj/vm-playground/sys/dev/mpr/mpr_user.c user/markj/vm-playground/sys/dev/mpr/mprvar.h user/markj/vm-playground/sys/dev/nvme/nvme.h user/markj/vm-playground/sys/dev/nvme/nvme_private.h user/markj/vm-playground/sys/dev/nvme/nvme_qpair.c user/markj/vm-playground/sys/dev/ofw/ofw_subr.c user/markj/vm-playground/sys/dev/ofw/openfirmio.c user/markj/vm-playground/sys/dev/ow/owc_gpiobus.c user/markj/vm-playground/sys/dev/pccard/pccard.c user/markj/vm-playground/sys/dev/pccbb/pccbb.c user/markj/vm-playground/sys/dev/random/randomdev.c user/markj/vm-playground/sys/dev/rtwn/if_rtwn_ridx.h user/markj/vm-playground/sys/dev/rtwn/rtl8188e/r88e_rx.c user/markj/vm-playground/sys/dev/rtwn/rtl8192c/r92c_rx.c user/markj/vm-playground/sys/dev/rtwn/rtl8812a/r12a_rx.c user/markj/vm-playground/sys/dev/usb/controller/musb_otg.c user/markj/vm-playground/sys/dev/usb/controller/musb_otg.h user/markj/vm-playground/sys/dev/usb/wlan/if_urtw.c user/markj/vm-playground/sys/dev/usb/wlan/if_zyd.c user/markj/vm-playground/sys/dev/vnic/thunder_bgx_fdt.c user/markj/vm-playground/sys/dts/Makefile user/markj/vm-playground/sys/geom/label/g_label.c user/markj/vm-playground/sys/i386/acpica/acpi_wakecode.S user/markj/vm-playground/sys/i386/i386/apic_vector.s user/markj/vm-playground/sys/i386/i386/atpic_vector.s user/markj/vm-playground/sys/i386/i386/bioscall.s user/markj/vm-playground/sys/i386/i386/exception.s user/markj/vm-playground/sys/i386/i386/locore.s user/markj/vm-playground/sys/i386/i386/mpboot.s user/markj/vm-playground/sys/i386/i386/sigtramp.s user/markj/vm-playground/sys/i386/i386/support.s user/markj/vm-playground/sys/i386/i386/swtch.s user/markj/vm-playground/sys/i386/i386/vm86.c user/markj/vm-playground/sys/i386/i386/vm86bios.s user/markj/vm-playground/sys/i386/ibcs2/ibcs2_ipc.c user/markj/vm-playground/sys/i386/ibcs2/ibcs2_misc.c user/markj/vm-playground/sys/i386/linux/linux.h user/markj/vm-playground/sys/i386/linux/linux_locore.s user/markj/vm-playground/sys/i386/linux/linux_support.s user/markj/vm-playground/sys/i386/linux/linux_sysvec.c user/markj/vm-playground/sys/kern/init_main.c user/markj/vm-playground/sys/kern/init_sysent.c user/markj/vm-playground/sys/kern/kern_cpuset.c user/markj/vm-playground/sys/kern/kern_jail.c user/markj/vm-playground/sys/kern/kern_lock.c user/markj/vm-playground/sys/kern/kern_mutex.c user/markj/vm-playground/sys/kern/kern_rwlock.c user/markj/vm-playground/sys/kern/kern_sendfile.c user/markj/vm-playground/sys/kern/kern_shutdown.c user/markj/vm-playground/sys/kern/kern_sx.c user/markj/vm-playground/sys/kern/subr_eventhandler.c user/markj/vm-playground/sys/kern/subr_witness.c user/markj/vm-playground/sys/kern/syscalls.c user/markj/vm-playground/sys/kern/syscalls.master user/markj/vm-playground/sys/kern/systrace_args.c user/markj/vm-playground/sys/kern/vfs_bio.c user/markj/vm-playground/sys/kern/vfs_mountroot.c user/markj/vm-playground/sys/mips/cavium/octeon_cop2.S user/markj/vm-playground/sys/mips/ingenic/jz4780_mpboot.S user/markj/vm-playground/sys/mips/mips/exception.S user/markj/vm-playground/sys/mips/mips/fp.S user/markj/vm-playground/sys/mips/mips/locore.S user/markj/vm-playground/sys/mips/mips/mpboot.S user/markj/vm-playground/sys/mips/mips/octeon_cop2_swtch.S user/markj/vm-playground/sys/mips/mips/support.S user/markj/vm-playground/sys/mips/mips/swtch.S user/markj/vm-playground/sys/mips/nlm/mpreset.S user/markj/vm-playground/sys/modules/Makefile user/markj/vm-playground/sys/modules/crypto/Makefile user/markj/vm-playground/sys/modules/dtrace/dtrace/Makefile user/markj/vm-playground/sys/modules/hyperv/vmbus/Makefile user/markj/vm-playground/sys/modules/imx/imx_spi/Makefile user/markj/vm-playground/sys/modules/iser/Makefile user/markj/vm-playground/sys/modules/linux/Makefile user/markj/vm-playground/sys/modules/linux64/Makefile user/markj/vm-playground/sys/modules/linux_common/Makefile user/markj/vm-playground/sys/modules/netgraph/checksum/Makefile user/markj/vm-playground/sys/modules/netmap/Makefile user/markj/vm-playground/sys/modules/sgx/Makefile user/markj/vm-playground/sys/net/bpf.c user/markj/vm-playground/sys/net/bpfdesc.h user/markj/vm-playground/sys/net/if_ethersubr.c user/markj/vm-playground/sys/net/if_llatbl.h user/markj/vm-playground/sys/net/if_media.h user/markj/vm-playground/sys/netinet/cc/cc.c user/markj/vm-playground/sys/netinet/cc/cc.h user/markj/vm-playground/sys/netinet/cc/cc_newreno.c user/markj/vm-playground/sys/netinet/if_ether.c user/markj/vm-playground/sys/netinet/in.c user/markj/vm-playground/sys/netinet/in_pcb.c user/markj/vm-playground/sys/netinet/tcp.h user/markj/vm-playground/sys/netinet/tcp_input.c user/markj/vm-playground/sys/netinet/tcp_output.c user/markj/vm-playground/sys/netinet/tcp_subr.c user/markj/vm-playground/sys/netinet/tcp_syncache.c user/markj/vm-playground/sys/netinet/tcp_timer.c user/markj/vm-playground/sys/netinet/tcp_timewait.c user/markj/vm-playground/sys/netinet/tcp_usrreq.c user/markj/vm-playground/sys/netinet/tcp_var.h user/markj/vm-playground/sys/netinet6/in6.c user/markj/vm-playground/sys/netinet6/in6_pcb.c user/markj/vm-playground/sys/netipsec/xform.h user/markj/vm-playground/sys/netipsec/xform_ah.c user/markj/vm-playground/sys/netipsec/xform_esp.c user/markj/vm-playground/sys/netipsec/xform_ipcomp.c user/markj/vm-playground/sys/netpfil/pf/pf_table.c user/markj/vm-playground/sys/ofed/drivers/infiniband/core/ib_fmr_pool.c user/markj/vm-playground/sys/opencrypto/cryptodev.c user/markj/vm-playground/sys/opencrypto/cryptodev.h user/markj/vm-playground/sys/opencrypto/cryptosoft.c user/markj/vm-playground/sys/opencrypto/xform_auth.h user/markj/vm-playground/sys/powerpc/aim/locore32.S user/markj/vm-playground/sys/powerpc/aim/locore64.S user/markj/vm-playground/sys/powerpc/booke/locore.S user/markj/vm-playground/sys/powerpc/booke/pmap.c user/markj/vm-playground/sys/powerpc/cpufreq/mpc85xx_jog.c user/markj/vm-playground/sys/powerpc/powerpc/cpu_subr64.S user/markj/vm-playground/sys/powerpc/powerpc/sigcode32.S user/markj/vm-playground/sys/powerpc/powerpc/sigcode64.S user/markj/vm-playground/sys/powerpc/powerpc/swtch32.S user/markj/vm-playground/sys/powerpc/powerpc/swtch64.S user/markj/vm-playground/sys/powerpc/pseries/platform_chrp.c user/markj/vm-playground/sys/riscv/riscv/copyinout.S user/markj/vm-playground/sys/riscv/riscv/exception.S user/markj/vm-playground/sys/riscv/riscv/locore.S user/markj/vm-playground/sys/riscv/riscv/support.S user/markj/vm-playground/sys/riscv/riscv/swtch.S user/markj/vm-playground/sys/security/audit/audit_bsm_klib.c user/markj/vm-playground/sys/sparc64/pci/psycho.c user/markj/vm-playground/sys/sparc64/sbus/sbus.c user/markj/vm-playground/sys/sparc64/sparc64/exception.S user/markj/vm-playground/sys/sparc64/sparc64/interrupt.S user/markj/vm-playground/sys/sparc64/sparc64/locore.S user/markj/vm-playground/sys/sparc64/sparc64/mp_exception.S user/markj/vm-playground/sys/sparc64/sparc64/mp_locore.S user/markj/vm-playground/sys/sparc64/sparc64/support.S user/markj/vm-playground/sys/sparc64/sparc64/swtch.S user/markj/vm-playground/sys/sys/_stdarg.h user/markj/vm-playground/sys/sys/cdefs.h user/markj/vm-playground/sys/sys/ioccom.h user/markj/vm-playground/sys/sys/kernel.h user/markj/vm-playground/sys/sys/ktr_class.h user/markj/vm-playground/sys/sys/linker_set.h user/markj/vm-playground/sys/sys/lock.h user/markj/vm-playground/sys/sys/random.h user/markj/vm-playground/sys/sys/smp.h user/markj/vm-playground/sys/sys/syscall.h user/markj/vm-playground/sys/sys/syscall.mk user/markj/vm-playground/sys/sys/sysproto.h user/markj/vm-playground/sys/vm/uma.h user/markj/vm-playground/sys/vm/vm.h user/markj/vm-playground/sys/vm/vm_fault.c user/markj/vm-playground/sys/vm/vm_page.c user/markj/vm-playground/sys/vm/vm_pageout.h user/markj/vm-playground/sys/vm/vm_phys.c user/markj/vm-playground/sys/vm/vm_phys.h user/markj/vm-playground/sys/vm/vm_reserv.c user/markj/vm-playground/sys/vm/vm_reserv.h user/markj/vm-playground/sys/x86/include/ucontext.h user/markj/vm-playground/sys/x86/include/x86_var.h user/markj/vm-playground/sys/x86/isa/isa_dma.c user/markj/vm-playground/sys/x86/x86/autoconf.c user/markj/vm-playground/sys/x86/x86/cpu_machdep.c user/markj/vm-playground/sys/x86/x86/intr_machdep.c user/markj/vm-playground/tests/sys/aio/aio_kqueue_test.c user/markj/vm-playground/tests/sys/aio/aio_test.c user/markj/vm-playground/tests/sys/kern/Makefile user/markj/vm-playground/tests/sys/opencrypto/Makefile user/markj/vm-playground/usr.bin/calendar/calendars/calendar.freebsd user/markj/vm-playground/usr.bin/netstat/inet.c user/markj/vm-playground/usr.bin/netstat/main.c user/markj/vm-playground/usr.bin/netstat/netstat.1 user/markj/vm-playground/usr.bin/netstat/netstat.h user/markj/vm-playground/usr.bin/truss/syscalls.c user/markj/vm-playground/usr.sbin/efibootmgr/efibootmgr.c user/markj/vm-playground/usr.sbin/rpcbind/rpcbind.c user/markj/vm-playground/usr.sbin/syslogd/syslogd.c Directory Properties: user/markj/vm-playground/ (props changed) user/markj/vm-playground/cddl/ (props changed) user/markj/vm-playground/cddl/contrib/opensolaris/ (props changed) user/markj/vm-playground/contrib/blacklist/ (props changed) user/markj/vm-playground/contrib/elftoolchain/ (props changed) user/markj/vm-playground/contrib/llvm/ (props changed) user/markj/vm-playground/contrib/llvm/projects/libunwind/ (props changed) user/markj/vm-playground/contrib/llvm/tools/clang/ (props changed) user/markj/vm-playground/sys/cddl/contrib/opensolaris/ (props changed) user/markj/vm-playground/sys/contrib/zstd/ (props changed) Modified: user/markj/vm-playground/Makefile.inc1 ============================================================================== --- user/markj/vm-playground/Makefile.inc1 Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/Makefile.inc1 Thu Mar 22 21:57:10 2018 (r331377) @@ -1394,6 +1394,14 @@ INSTALLKERNEL= ${_kernel} .endif .endfor +_cleankernobj_fast_depend_hack: .PHONY +# 20180320 remove stale generated assym.s after renaming to .inc in r331254 +.if exists(${OBJTOP}/sys/${KERNCONF}/assym.s) + @echo Removing stale generated assym files + @rm -f ${OBJTOP}/sys/${KERNCONF}/assym.* \ + ${OBJTOP}/sys/${KERNCONF}/.depend.assym.* +.endif + ${WMAKE_TGTS:N_worldtmp:Nbuild${libcompat}} ${.ALLTARGETS:M_*:N_worldtmp}: .MAKE .PHONY # @@ -1429,6 +1437,8 @@ buildkernel: .MAKE .PHONY @echo ">>> stage 2.1: cleaning up the object tree" @echo "--------------------------------------------------------------" ${_+_}cd ${KRNLOBJDIR}/${_kernel}; ${KMAKE} ${CLEANDIR} +.else + ${_+_}cd ${.CURDIR}; ${WMAKE} _cleankernobj_fast_depend_hack .endif .if !defined(NO_KERNELOBJ) @echo Modified: user/markj/vm-playground/ObsoleteFiles.inc ============================================================================== --- user/markj/vm-playground/ObsoleteFiles.inc Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/ObsoleteFiles.inc Thu Mar 22 21:57:10 2018 (r331377) @@ -38,6 +38,14 @@ # xargs -n1 | sort | uniq -d; # done +# 20180319: remove /boot/overlays, replaced by /boot/dtb/overlays +OLD_DIRS+=boot/overlays +# 20180311: remove sys/sys/i386/include/pcaudioio.h +.if ${TARGET_ARCH} == "i386" +OLD_FILES+=usr/include/machine/pcaudioio.h +.endif +# 20180310: remove sys/sys/dataacq.h +OLD_FILES+=usr/include/sys/dataacq.h # 20180306: remove DTrace scripts made obsolete by dwatch(1) OLD_FILES+=usr/share/dtrace/watch_execve OLD_FILES+=usr/share/dtrace/watch_kill @@ -51,7 +59,6 @@ OLD_FILES+=usr/share/openssl/man/man1/c_rehash.1.gz # 20180206: remove gdbtui OLD_FILES+=usr/bin/gdbtui # 20180201: Obsolete forth files -OLD_FILES+=boot/efi.4th OLD_FILES+=boot/pcibios.4th # 20180114: new clang import which bumps version from 5.0.1 to 6.0.0. OLD_FILES+=usr/lib/clang/5.0.1/include/sanitizer/allocator_interface.h Modified: user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/syscall/tst.args.c Thu Mar 22 21:57:10 2018 (r331377) @@ -35,7 +35,7 @@ int main(int argc, char **argv) { for (;;) { - (void) syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); + (void) __syscall(SYS_mmap, NULL, 1, 2, 3, -1, 0x12345678); } return (0); Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Thu Mar 22 21:57:10 2018 (r331377) @@ -22,6 +22,7 @@ /* * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. + * Copyright 2017-2018 Mark Johnston */ #pragma ident "%Z%%M% %I% %E% SMI" @@ -265,7 +266,7 @@ prepare_elf32(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = ELF32_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF32_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; @@ -449,7 +450,7 @@ prepare_elf64(dtrace_hdl_t *dtp, const dof_hdr_t *dof, sym->st_value = 0; sym->st_size = 0; sym->st_info = GELF_ST_INFO(STB_GLOBAL, STT_FUNC); - sym->st_other = 0; + sym->st_other = ELF64_ST_VISIBILITY(STV_HIDDEN); sym->st_shndx = SHN_UNDEF; rel++; Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c Thu Mar 22 21:57:10 2018 (r331377) @@ -3069,9 +3069,10 @@ dt_cook_op1(dt_node_t *dnp, uint_t idflags) "cannot take address of bit-field\n"); } - dtt.dtt_object = NULL; - dtt.dtt_ctfp = cp->dn_ctfp; - dtt.dtt_type = cp->dn_type; + dtt = (dtrace_typeinfo_t){ + .dtt_ctfp = cp->dn_ctfp, + .dtt_type = cp->dn_type, + }; if (dt_type_pointer(&dtt) == -1) { xyerror(D_TYPE_ERR, "cannot find type for \"&\": %s*\n", Modified: user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c ============================================================================== --- user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/cddl/contrib/opensolaris/lib/libdtrace/common/dt_xlator.c Thu Mar 22 21:57:10 2018 (r331377) @@ -343,9 +343,11 @@ out: src_dtt.dtt_ctfp = src_ctfp; src_dtt.dtt_type = src_type; - dst_dtt.dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name; - dst_dtt.dtt_ctfp = dst_ctfp; - dst_dtt.dtt_type = dst_type; + dst_dtt = (dtrace_typeinfo_t){ + .dtt_object = dt_module_lookup_by_ctf(dtp, dst_ctfp)->dm_name, + .dtt_ctfp = dst_ctfp, + .dtt_type = dst_type, + }; return (dt_xlator_create(dtp, &src_dtt, &dst_dtt, NULL, NULL, NULL)); } Modified: user/markj/vm-playground/contrib/blacklist/bin/conf.c ============================================================================== --- user/markj/vm-playground/contrib/blacklist/bin/conf.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/blacklist/bin/conf.c Thu Mar 22 21:57:10 2018 (r331377) @@ -1119,6 +1119,7 @@ conf_parse(const char *f) confset_free(&lc); confset_free(&rc); fclose(fp); + free(line); return; } } Modified: user/markj/vm-playground/contrib/elftoolchain/nm/nm.c ============================================================================== --- user/markj/vm-playground/contrib/elftoolchain/nm/nm.c Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/elftoolchain/nm/nm.c Thu Mar 22 21:57:10 2018 (r331377) @@ -1310,14 +1310,17 @@ read_elf(Elf *elf, const char *filename, Elf_Kind kind line_info = malloc(sizeof(struct line_info_head)); func_info = malloc(sizeof(struct func_info_head)); var_info = malloc(sizeof(struct var_info_head)); + if (line_info != NULL) + SLIST_INIT(line_info); + if (func_info != NULL) + SLIST_INIT(func_info); + if (var_info != NULL) + SLIST_INIT(var_info); if (line_info == NULL || func_info == NULL || var_info == NULL) { warn("malloc"); (void) dwarf_finish(dbg, &de); goto process_sym; } - SLIST_INIT(line_info); - SLIST_INIT(func_info); - SLIST_INIT(var_info); while ((ret = dwarf_next_cu_header(dbg, NULL, NULL, NULL, NULL, NULL, &de)) == DW_DLV_OK) { Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCAssembler.h Thu Mar 22 21:57:10 2018 (r331377) @@ -206,6 +206,8 @@ class MCAssembler { (private) handleFixup(const MCAsmLayout &Layout, MCFragment &F, const MCFixup &Fixup); public: + std::vector> Symvers; + /// Construct a new assembler instance. // // FIXME: How are we going to parameterize this? Two obvious options are stay Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCELFStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -51,6 +51,8 @@ class MCELFStreamer : public MCObjectStreamer { (publi unsigned ByteAlignment) override; void emitELFSize(MCSymbol *Symbol, const MCExpr *Value) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; void EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; Modified: user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/include/llvm/MC/MCStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -519,9 +519,10 @@ class MCStreamer { (public) /// /// This corresponds to an assembler statement such as: /// .symver _start, foo@@SOME_VERSION - /// \param Alias - The versioned alias (i.e. "foo@@SOME_VERSION") + /// \param AliasName - The versioned alias (i.e. "foo@@SOME_VERSION") /// \param Aliasee - The aliased symbol (i.e. "_start") - virtual void emitELFSymverDirective(MCSymbol *Alias, const MCSymbol *Aliasee); + virtual void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee); /// \brief Emit a Linker Optimization Hint (LOH) directive. /// \param Args - Arguments of the LOH. Modified: user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Analysis/InstructionSimplify.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -3697,7 +3697,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P. - if (match(Ops[1], m_Zero())) + if (match(Ops[1], m_Zero()) && Ops[0]->getType() == GEPTy) return Ops[0]; Type *Ty = SrcTy; @@ -3706,7 +3706,7 @@ static Value *SimplifyGEPInst(Type *SrcTy, ArrayRef P if P points to a type of zero size. - if (TyAllocSize == 0) + if (TyAllocSize == 0 && Ops[0]->getType() == GEPTy) return Ops[0]; // The following transforms are only safe if the ptrtoint cast Modified: user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/IR/ConstantFold.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -2018,8 +2018,16 @@ static bool isInBoundsIndices(ArrayRef Idxs) // If the first index is one and all the rest are zero, it's in bounds, // by the one-past-the-end rule. - if (!cast(Idxs[0])->isOne()) - return false; + if (auto *CI = dyn_cast(Idxs[0])) { + if (!CI->isOne()) + return false; + } else { + auto *CV = cast(Idxs[0]); + CI = dyn_cast_or_null(CV->getSplatValue()); + if (!CI || !CI->isOne()) + return false; + } + for (unsigned i = 1, e = Idxs.size(); i != e; ++i) if (!cast(Idxs[i])->isNullValue()) return false; @@ -2049,15 +2057,18 @@ Constant *llvm::ConstantFoldGetElementPtr(Type *Pointe ArrayRef Idxs) { if (Idxs.empty()) return C; - if (isa(C)) { - Type *GEPTy = GetElementPtrInst::getGEPReturnType( - C, makeArrayRef((Value * const *)Idxs.data(), Idxs.size())); + Type *GEPTy = GetElementPtrInst::getGEPReturnType( + C, makeArrayRef((Value *const *)Idxs.data(), Idxs.size())); + + if (isa(C)) return UndefValue::get(GEPTy); - } Constant *Idx0 = cast(Idxs[0]); if (Idxs.size() == 1 && (Idx0->isNullValue() || isa(Idx0))) - return C; + return GEPTy->isVectorTy() && !C->getType()->isVectorTy() + ? ConstantVector::getSplat( + cast(GEPTy)->getNumElements(), C) + : C; if (C->isNullValue()) { bool isNull = true; Modified: user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/ELFObjectWriter.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -128,8 +128,6 @@ class ELFObjectWriter : public MCObjectWriter { /// @name Symbol Table Data /// @{ - BumpPtrAllocator Alloc; - StringSaver VersionSymSaver{Alloc}; StringTableBuilder StrTabBuilder{StringTableBuilder::ELF}; /// @} @@ -391,27 +389,29 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem const MCAsmLayout &Layout) { // The presence of symbol versions causes undefined symbols and // versions declared with @@@ to be renamed. - for (const MCSymbol &A : Asm.symbols()) { - const auto &Alias = cast(A); - // Not an alias. - if (!Alias.isVariable()) - continue; - auto *Ref = dyn_cast(Alias.getVariableValue()); - if (!Ref) - continue; - const auto &Symbol = cast(Ref->getSymbol()); - - StringRef AliasName = Alias.getName(); + for (const std::pair &P : Asm.Symvers) { + StringRef AliasName = P.first; + const auto &Symbol = cast(*P.second); size_t Pos = AliasName.find('@'); - if (Pos == StringRef::npos) - continue; + assert(Pos != StringRef::npos); + StringRef Prefix = AliasName.substr(0, Pos); + StringRef Rest = AliasName.substr(Pos); + StringRef Tail = Rest; + if (Rest.startswith("@@@")) + Tail = Rest.substr(Symbol.isUndefined() ? 2 : 1); + + auto *Alias = + cast(Asm.getContext().getOrCreateSymbol(Prefix + Tail)); + Asm.registerSymbol(*Alias); + const MCExpr *Value = MCSymbolRefExpr::create(&Symbol, Asm.getContext()); + Alias->setVariableValue(Value); + // Aliases defined with .symvar copy the binding from the symbol they alias. // This is the first place we are able to copy this information. - Alias.setExternal(Symbol.isExternal()); - Alias.setBinding(Symbol.getBinding()); + Alias->setExternal(Symbol.isExternal()); + Alias->setBinding(Symbol.getBinding()); - StringRef Rest = AliasName.substr(Pos); if (!Symbol.isUndefined() && !Rest.startswith("@@@")) continue; @@ -420,7 +420,7 @@ void ELFObjectWriter::executePostLayoutBinding(MCAssem !Rest.startswith("@@@")) report_fatal_error("A @@ version cannot be undefined"); - Renames.insert(std::make_pair(&Symbol, &Alias)); + Renames.insert(std::make_pair(&Symbol, Alias)); } } @@ -836,44 +836,7 @@ void ELFObjectWriter::computeSymbolTable( HasLargeSectionIndex = true; } - // The @@@ in symbol version is replaced with @ in undefined symbols and @@ - // in defined ones. - // - // FIXME: All name handling should be done before we get to the writer, - // including dealing with GNU-style version suffixes. Fixing this isn't - // trivial. - // - // We thus have to be careful to not perform the symbol version replacement - // blindly: - // - // The ELF format is used on Windows by the MCJIT engine. Thus, on - // Windows, the ELFObjectWriter can encounter symbols mangled using the MS - // Visual Studio C++ name mangling scheme. Symbols mangled using the MSVC - // C++ name mangling can legally have "@@@" as a sub-string. In that case, - // the EFLObjectWriter should not interpret the "@@@" sub-string as - // specifying GNU-style symbol versioning. The ELFObjectWriter therefore - // checks for the MSVC C++ name mangling prefix which is either "?", "@?", - // "__imp_?" or "__imp_@?". - // - // It would have been interesting to perform the MS mangling prefix check - // only when the target triple is of the form *-pc-windows-elf. But, it - // seems that this information is not easily accessible from the - // ELFObjectWriter. StringRef Name = Symbol.getName(); - SmallString<32> Buf; - if (!Name.startswith("?") && !Name.startswith("@?") && - !Name.startswith("__imp_?") && !Name.startswith("__imp_@?")) { - // This symbol isn't following the MSVC C++ name mangling convention. We - // can thus safely interpret the @@@ in symbol names as specifying symbol - // versioning. - size_t Pos = Name.find("@@@"); - if (Pos != StringRef::npos) { - Buf += Name.substr(0, Pos); - unsigned Skip = MSD.SectionIndex == ELF::SHN_UNDEF ? 2 : 1; - Buf += Name.substr(Pos + Skip); - Name = VersionSymSaver.save(Buf.c_str()); - } - } // Sections have their own string table if (Symbol.getType() != ELF::STT_SECTION) { Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCAsmStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -129,6 +129,9 @@ class MCAsmStreamer final : public MCStreamer { (publi void ChangeSection(MCSection *Section, const MCExpr *Subsection) override; + void emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) override; + void EmitLOHDirective(MCLOHType Kind, const MCLOHArgs &Args) override; void EmitLabel(MCSymbol *Symbol, SMLoc Loc = SMLoc()) override; @@ -409,6 +412,14 @@ void MCAsmStreamer::ChangeSection(MCSection *Section, *MAI, getContext().getObjectFileInfo()->getTargetTriple(), OS, Subsection); } +} + +void MCAsmStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + OS << ".symver "; + Aliasee->print(OS, MAI); + OS << ", " << AliasName; + EmitEOL(); } void MCAsmStreamer::EmitLabel(MCSymbol *Symbol, SMLoc Loc) { Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCELFStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -337,6 +337,11 @@ void MCELFStreamer::emitELFSize(MCSymbol *Symbol, cons cast(Symbol)->setSize(Value); } +void MCELFStreamer::emitELFSymverDirective(StringRef AliasName, + const MCSymbol *Aliasee) { + getAssembler().Symvers.push_back({AliasName, Aliasee}); +} + void MCELFStreamer::EmitLocalCommonSymbol(MCSymbol *S, uint64_t Size, unsigned ByteAlignment) { auto *Symbol = cast(S); Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -767,12 +767,8 @@ bool ELFAsmParser::ParseDirectiveSymver(StringRef, SML if (AliasName.find('@') == StringRef::npos) return TokError("expected a '@' in the name"); - MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); MCSymbol *Sym = getContext().getOrCreateSymbol(Name); - const MCExpr *Value = MCSymbolRefExpr::create(Sym, getContext()); - - getStreamer().EmitAssignment(Alias, Value); - getStreamer().emitELFSymverDirective(Alias, Sym); + getStreamer().emitELFSymverDirective(AliasName, Sym); return false; } Modified: user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/MC/MCStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -925,7 +925,7 @@ void MCStreamer::EmitCOFFSymbolType(int Type) { llvm_unreachable("this directive only supported on COFF targets"); } void MCStreamer::emitELFSize(MCSymbol *Symbol, const MCExpr *Value) {} -void MCStreamer::emitELFSymverDirective(MCSymbol *Alias, +void MCStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) {} void MCStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) {} Modified: user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/ModuleSymbolTable.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -24,7 +24,6 @@ #include "llvm/IR/GlobalAlias.h" #include "llvm/IR/GlobalValue.h" #include "llvm/IR/GlobalVariable.h" -#include "llvm/IR/Mangler.h" #include "llvm/IR/Module.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCContext.h" @@ -69,81 +68,6 @@ void ModuleSymbolTable::addModule(Module *M) { }); } -// Ensure ELF .symver aliases get the same binding as the defined symbol -// they alias with. -static void handleSymverAliases(const Module &M, RecordStreamer &Streamer) { - if (Streamer.symverAliases().empty()) - return; - - // The name in the assembler will be mangled, but the name in the IR - // might not, so we first compute a mapping from mangled name to GV. - Mangler Mang; - SmallString<64> MangledName; - StringMap MangledNameMap; - auto GetMangledName = [&](const GlobalValue &GV) { - if (!GV.hasName()) - return; - - MangledName.clear(); - MangledName.reserve(GV.getName().size() + 1); - Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); - MangledNameMap[MangledName] = &GV; - }; - for (const Function &F : M) - GetMangledName(F); - for (const GlobalVariable &GV : M.globals()) - GetMangledName(GV); - for (const GlobalAlias &GA : M.aliases()) - GetMangledName(GA); - - // Walk all the recorded .symver aliases, and set up the binding - // for each alias. - for (auto &Symver : Streamer.symverAliases()) { - const MCSymbol *Aliasee = Symver.first; - MCSymbolAttr Attr = MCSA_Invalid; - - // First check if the aliasee binding was recorded in the asm. - RecordStreamer::State state = Streamer.getSymbolState(Aliasee); - switch (state) { - case RecordStreamer::Global: - case RecordStreamer::DefinedGlobal: - Attr = MCSA_Global; - break; - case RecordStreamer::UndefinedWeak: - case RecordStreamer::DefinedWeak: - Attr = MCSA_Weak; - break; - default: - break; - } - - // If we don't have a symbol attribute from assembly, then check if - // the aliasee was defined in the IR. - if (Attr == MCSA_Invalid) { - const auto *GV = M.getNamedValue(Aliasee->getName()); - if (!GV) { - auto MI = MangledNameMap.find(Aliasee->getName()); - if (MI != MangledNameMap.end()) - GV = MI->second; - else - continue; - } - if (GV->hasExternalLinkage()) - Attr = MCSA_Global; - else if (GV->hasLocalLinkage()) - Attr = MCSA_Local; - else if (GV->isWeakForLinker()) - Attr = MCSA_Weak; - } - if (Attr == MCSA_Invalid) - continue; - - // Set the detected binding on each alias with this aliasee. - for (auto &Alias : Symver.second) - Streamer.EmitSymbolAttribute(Alias, Attr); - } -} - void ModuleSymbolTable::CollectAsmSymbols( const Module &M, function_ref AsmSymbol) { @@ -176,7 +100,7 @@ void ModuleSymbolTable::CollectAsmSymbols( MCObjectFileInfo MOFI; MCContext MCCtx(MAI.get(), MRI.get(), &MOFI); MOFI.InitMCObjectFileInfo(TT, /*PIC*/ false, MCCtx); - RecordStreamer Streamer(MCCtx); + RecordStreamer Streamer(MCCtx, M); T->createNullTargetStreamer(Streamer); std::unique_ptr Buffer(MemoryBuffer::getMemBuffer(InlineAsm)); @@ -195,7 +119,7 @@ void ModuleSymbolTable::CollectAsmSymbols( if (Parser->Run(false)) return; - handleSymverAliases(M, Streamer); + Streamer.flushSymverDirectives(); for (auto &KV : Streamer) { StringRef Key = KV.first(); Modified: user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.cpp Thu Mar 22 21:57:10 2018 (r331377) @@ -8,6 +8,9 @@ //===----------------------------------------------------------------------===// #include "RecordStreamer.h" +#include "llvm/IR/Mangler.h" +#include "llvm/IR/Module.h" +#include "llvm/MC/MCContext.h" #include "llvm/MC/MCSymbol.h" using namespace llvm; @@ -70,7 +73,8 @@ void RecordStreamer::markUsed(const MCSymbol &Symbol) void RecordStreamer::visitUsedSymbol(const MCSymbol &Sym) { markUsed(Sym); } -RecordStreamer::RecordStreamer(MCContext &Context) : MCStreamer(Context) {} +RecordStreamer::RecordStreamer(MCContext &Context, const Module &M) + : MCStreamer(Context), M(M) {} RecordStreamer::const_iterator RecordStreamer::begin() { return Symbols.begin(); @@ -112,7 +116,109 @@ void RecordStreamer::EmitCommonSymbol(MCSymbol *Symbol markDefined(*Symbol); } -void RecordStreamer::emitELFSymverDirective(MCSymbol *Alias, +RecordStreamer::State RecordStreamer::getSymbolState(const MCSymbol *Sym) { + auto SI = Symbols.find(Sym->getName()); + if (SI == Symbols.end()) + return NeverSeen; + return SI->second; +} + +void RecordStreamer::emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) { - SymverAliasMap[Aliasee].push_back(Alias); + SymverAliasMap[Aliasee].push_back(AliasName); +} + +void RecordStreamer::flushSymverDirectives() { + // Mapping from mangled name to GV. + StringMap MangledNameMap; + // The name in the assembler will be mangled, but the name in the IR + // might not, so we first compute a mapping from mangled name to GV. + Mangler Mang; + SmallString<64> MangledName; + for (const GlobalValue &GV : M.global_values()) { + if (!GV.hasName()) + continue; + MangledName.clear(); + MangledName.reserve(GV.getName().size() + 1); + Mang.getNameWithPrefix(MangledName, &GV, /*CannotUsePrivateLabel=*/false); + MangledNameMap[MangledName] = &GV; + } + + // Walk all the recorded .symver aliases, and set up the binding + // for each alias. + for (auto &Symver : SymverAliasMap) { + const MCSymbol *Aliasee = Symver.first; + MCSymbolAttr Attr = MCSA_Invalid; + bool IsDefined = false; + + // First check if the aliasee binding was recorded in the asm. + RecordStreamer::State state = getSymbolState(Aliasee); + switch (state) { + case RecordStreamer::Global: + case RecordStreamer::DefinedGlobal: + Attr = MCSA_Global; + break; + case RecordStreamer::UndefinedWeak: + case RecordStreamer::DefinedWeak: + Attr = MCSA_Weak; + break; + default: + break; + } + + switch (state) { + case RecordStreamer::Defined: + case RecordStreamer::DefinedGlobal: + case RecordStreamer::DefinedWeak: + IsDefined = true; + break; + case RecordStreamer::NeverSeen: + case RecordStreamer::Global: + case RecordStreamer::Used: + case RecordStreamer::UndefinedWeak: + break; + } + + if (Attr == MCSA_Invalid || !IsDefined) { + const GlobalValue *GV = M.getNamedValue(Aliasee->getName()); + if (!GV) { + auto MI = MangledNameMap.find(Aliasee->getName()); + if (MI != MangledNameMap.end()) + GV = MI->second; + } + if (GV) { + // If we don't have a symbol attribute from assembly, then check if + // the aliasee was defined in the IR. + if (Attr == MCSA_Invalid) { + if (GV->hasExternalLinkage()) + Attr = MCSA_Global; + else if (GV->hasLocalLinkage()) + Attr = MCSA_Local; + else if (GV->isWeakForLinker()) + Attr = MCSA_Weak; + } + IsDefined = IsDefined || !GV->isDeclarationForLinker(); + } + } + + // Set the detected binding on each alias with this aliasee. + for (auto AliasName : Symver.second) { + std::pair Split = AliasName.split("@@@"); + SmallString<128> NewName; + if (!Split.second.empty() && !Split.second.startswith("@")) { + // Special processing for "@@@" according + // https://sourceware.org/binutils/docs/as/Symver.html + const char *Separator = IsDefined ? "@@" : "@"; + AliasName = + (Split.first + Separator + Split.second).toStringRef(NewName); + } + MCSymbol *Alias = getContext().getOrCreateSymbol(AliasName); + // TODO: Handle "@@@". Depending on SymbolAttribute value it needs to be + // converted into @ or @@. + const MCExpr *Value = MCSymbolRefExpr::create(Aliasee, getContext()); + EmitAssignment(Alias, Value); + if (Attr != MCSA_Invalid) + EmitSymbolAttribute(Alias, Attr); + } + } } Modified: user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/lib/Object/RecordStreamer.h Thu Mar 22 21:57:10 2018 (r331377) @@ -20,25 +20,32 @@ namespace llvm { +class GlobalValue; +class Module; + class RecordStreamer : public MCStreamer { public: enum State { NeverSeen, Global, Defined, DefinedGlobal, DefinedWeak, Used, UndefinedWeak}; private: + const Module &M; StringMap Symbols; // Map of aliases created by .symver directives, saved so we can update // their symbol binding after parsing complete. This maps from each // aliasee to its list of aliases. - DenseMap> SymverAliasMap; + DenseMap> SymverAliasMap; + /// Get the state recorded for the given symbol. + State getSymbolState(const MCSymbol *Sym); + void markDefined(const MCSymbol &Symbol); void markGlobal(const MCSymbol &Symbol, MCSymbolAttr Attribute); void markUsed(const MCSymbol &Symbol); void visitUsedSymbol(const MCSymbol &Sym) override; public: - RecordStreamer(MCContext &Context); + RecordStreamer(MCContext &Context, const Module &M); using const_iterator = StringMap::const_iterator; @@ -54,20 +61,11 @@ class RecordStreamer : public MCStreamer { (public) void EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override; /// Record .symver aliases for later processing. - void emitELFSymverDirective(MCSymbol *Alias, + void emitELFSymverDirective(StringRef AliasName, const MCSymbol *Aliasee) override; - /// Return the map of .symver aliasee to associated aliases. - DenseMap> &symverAliases() { - return SymverAliasMap; - } - - /// Get the state recorded for the given symbol. - State getSymbolState(const MCSymbol *Sym) { - auto SI = Symbols.find(Sym->getName()); - if (SI == Symbols.end()) - return NeverSeen; - return SI->second; - } + // Emit ELF .symver aliases and ensure they have the same binding as the + // defined symbol they alias with. + void flushSymverDirectives(); }; } // end namespace llvm Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/include/__libunwind_config.h Thu Mar 22 21:57:10 2018 (r331377) @@ -53,6 +53,38 @@ # define _LIBUNWIND_CONTEXT_SIZE 64 # define _LIBUNWIND_CURSOR_SIZE 76 # define _LIBUNWIND_MAX_REGISTER 96 +# elif defined(__mips__) +# if defined(_ABIO32) && _MIPS_SIM == _ABIO32 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 50 +# define _LIBUNWIND_CURSOR_SIZE 61 +# else +# define _LIBUNWIND_CONTEXT_SIZE 18 +# define _LIBUNWIND_CURSOR_SIZE 29 +# endif +# elif defined(_ABIN32) && _MIPS_SIM == _ABIN32 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 78 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 46 +# endif +# elif defined(_ABI64) && _MIPS_SIM == _ABI64 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 +# if defined(__mips_hard_float) +# define _LIBUNWIND_CONTEXT_SIZE 67 +# define _LIBUNWIND_CURSOR_SIZE 79 +# else +# define _LIBUNWIND_CONTEXT_SIZE 35 +# define _LIBUNWIND_CURSOR_SIZE 47 +# endif +# else +# error "Unsupported MIPS ABI and/or environment" +# endif +# define _LIBUNWIND_MAX_REGISTER 66 # else # error "Unsupported architecture." # endif @@ -63,6 +95,8 @@ # define _LIBUNWIND_TARGET_AARCH64 1 # define _LIBUNWIND_TARGET_ARM 1 # define _LIBUNWIND_TARGET_OR1K 1 +# define _LIBUNWIND_TARGET_MIPS_O32 1 +# define _LIBUNWIND_TARGET_MIPS_NEWABI 1 # define _LIBUNWIND_CONTEXT_SIZE 128 # define _LIBUNWIND_CURSOR_SIZE 140 # define _LIBUNWIND_MAX_REGISTER 120 Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/include/libunwind.h Thu Mar 22 21:57:10 2018 (r331377) @@ -604,4 +604,74 @@ enum { UNW_RISCV_D31 = 95, }; +// MIPS registers +enum { + UNW_MIPS_R0 = 0, + UNW_MIPS_R1 = 1, + UNW_MIPS_R2 = 2, + UNW_MIPS_R3 = 3, + UNW_MIPS_R4 = 4, + UNW_MIPS_R5 = 5, + UNW_MIPS_R6 = 6, + UNW_MIPS_R7 = 7, + UNW_MIPS_R8 = 8, + UNW_MIPS_R9 = 9, + UNW_MIPS_R10 = 10, + UNW_MIPS_R11 = 11, + UNW_MIPS_R12 = 12, + UNW_MIPS_R13 = 13, + UNW_MIPS_R14 = 14, + UNW_MIPS_R15 = 15, + UNW_MIPS_R16 = 16, + UNW_MIPS_R17 = 17, + UNW_MIPS_R18 = 18, + UNW_MIPS_R19 = 19, + UNW_MIPS_R20 = 20, + UNW_MIPS_R21 = 21, + UNW_MIPS_R22 = 22, + UNW_MIPS_R23 = 23, + UNW_MIPS_R24 = 24, + UNW_MIPS_R25 = 25, + UNW_MIPS_R26 = 26, + UNW_MIPS_R27 = 27, + UNW_MIPS_R28 = 28, + UNW_MIPS_R29 = 29, + UNW_MIPS_R30 = 30, + UNW_MIPS_R31 = 31, + UNW_MIPS_F0 = 32, + UNW_MIPS_F1 = 33, + UNW_MIPS_F2 = 34, + UNW_MIPS_F3 = 35, + UNW_MIPS_F4 = 36, + UNW_MIPS_F5 = 37, + UNW_MIPS_F6 = 38, + UNW_MIPS_F7 = 39, + UNW_MIPS_F8 = 40, + UNW_MIPS_F9 = 41, + UNW_MIPS_F10 = 42, + UNW_MIPS_F11 = 43, + UNW_MIPS_F12 = 44, + UNW_MIPS_F13 = 45, + UNW_MIPS_F14 = 46, + UNW_MIPS_F15 = 47, + UNW_MIPS_F16 = 48, + UNW_MIPS_F17 = 49, + UNW_MIPS_F18 = 50, + UNW_MIPS_F19 = 51, + UNW_MIPS_F20 = 52, + UNW_MIPS_F21 = 53, + UNW_MIPS_F22 = 54, + UNW_MIPS_F23 = 55, + UNW_MIPS_F24 = 56, + UNW_MIPS_F25 = 57, + UNW_MIPS_F26 = 58, + UNW_MIPS_F27 = 59, + UNW_MIPS_F28 = 60, + UNW_MIPS_F29 = 61, + UNW_MIPS_F30 = 62, + UNW_MIPS_F31 = 63, + UNW_MIPS_HI = 64, + UNW_MIPS_LO = 65, +}; + #endif Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/AddressSpace.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -148,6 +148,7 @@ class __attribute__((visibility("hidden"))) LocalAddre return val; } uintptr_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); static uint64_t getULEB128(pint_t &addr, pint_t end); static int64_t getSLEB128(pint_t &addr, pint_t end); @@ -169,6 +170,14 @@ inline uintptr_t LocalAddressSpace::getP(pint_t addr) #endif } +inline uint64_t LocalAddressSpace::getRegister(pint_t addr) { +#if defined(__LP64__) || defined(__mips64) + return get64(addr); +#else + return get32(addr); +#endif +} + /// Read a ULEB128 into a 64-bit word. inline uint64_t LocalAddressSpace::getULEB128(pint_t &addr, pint_t end) { const uint8_t *p = (uint8_t *)addr; @@ -496,6 +505,7 @@ class OtherAddressSpace { (public) uint32_t get32(pint_t addr); uint64_t get64(pint_t addr); pint_t getP(pint_t addr); + uint64_t getRegister(pint_t addr); uint64_t getULEB128(pint_t &addr, pint_t end); int64_t getSLEB128(pint_t &addr, pint_t end); pint_t getEncodedP(pint_t &addr, pint_t end, uint8_t encoding, @@ -529,6 +539,11 @@ template uint64_t OtherAddressSpace

::g template typename P::uint_t OtherAddressSpace

::getP(pint_t addr) { return P::getP(*(uint64_t *)localCopy(addr)); +} + +template +typename P::uint_t OtherAddressSpace

::getRegister(pint_t addr) { + return P::getRegister(*(uint64_t *)localCopy(addr)); } template Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/DwarfInstructions.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -83,10 +83,10 @@ typename A::pint_t DwarfInstructions::getSavedRe const RegisterLocation &savedReg) { switch (savedReg.location) { case CFI_Parser::kRegisterInCFA: - return addressSpace.getP(cfa + (pint_t)savedReg.value); + return addressSpace.getRegister(cfa + (pint_t)savedReg.value); case CFI_Parser::kRegisterAtExpression: - return addressSpace.getP( + return addressSpace.getRegister( evaluateExpression((pint_t)savedReg.value, addressSpace, registers, cfa)); Modified: user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp ============================================================================== --- user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 21:18:34 2018 (r331376) +++ user/markj/vm-playground/contrib/llvm/projects/libunwind/src/Registers.hpp Thu Mar 22 21:57:10 2018 (r331377) @@ -2168,6 +2168,612 @@ inline void Registers_riscv::setVectorRegister(int, v1 _LIBUNWIND_ABORT("no riscv vector register support yet"); } #endif // _LIBUNWIND_TARGET_RISCV + +#if defined(_LIBUNWIND_TARGET_MIPS_O32) +/// Registers_mips_o32 holds the register state of a thread in a 32-bit MIPS +/// process. +class _LIBUNWIND_HIDDEN Registers_mips_o32 { +public: + Registers_mips_o32(); + Registers_mips_o32(const void *registers); + + bool validRegister(int num) const; + uint32_t getRegister(int num) const; + void setRegister(int num, uint32_t value); + bool validFloatRegister(int num) const; + double getFloatRegister(int num) const; + void setFloatRegister(int num, double value); + bool validVectorRegister(int num) const; + v128 getVectorRegister(int num) const; + void setVectorRegister(int num, v128 value); + const char *getRegisterName(int num); + void jumpto(); + static int lastDwarfRegNum() { return 65; } + + uint32_t getSP() const { return _registers.__r[29]; } + void setSP(uint32_t value) { _registers.__r[29] = value; } + uint32_t getIP() const { return _registers.__pc; } + void setIP(uint32_t value) { _registers.__pc = value; } + +private: + struct mips_o32_thread_state_t { + uint32_t __r[32]; + uint32_t __pc; + uint32_t __hi; + uint32_t __lo; + }; + + mips_o32_thread_state_t _registers; +#ifdef __mips_hard_float + /// O32 with 32-bit floating point registers only uses half of this + /// space. However, using the same layout for 32-bit vs 64-bit + /// floating point registers results in a single context size for + /// O32 with hard float. + uint32_t _padding; + double _floats[32]; +#endif +}; + +inline Registers_mips_o32::Registers_mips_o32(const void *registers) { + static_assert((check_fit::does_fit), + "mips_o32 registers do not fit into unw_context_t"); + memcpy(&_registers, static_cast(registers), + sizeof(_registers)); +} + +inline Registers_mips_o32::Registers_mips_o32() { + memset(&_registers, 0, sizeof(_registers)); +} + +inline bool Registers_mips_o32::validRegister(int regNum) const { + if (regNum == UNW_REG_IP) + return true; + if (regNum == UNW_REG_SP) + return true; + if (regNum < 0) + return false; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Fri Mar 23 14:34:42 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42430F4C5C3 for ; Fri, 23 Mar 2018 14:34:42 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E5FC476B6D; Fri, 23 Mar 2018 14:34:41 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E118821255; Fri, 23 Mar 2018 14:34:41 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NEYfLe041130; Fri, 23 Mar 2018 14:34:41 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NEYf3Y041129; Fri, 23 Mar 2018 14:34:41 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803231434.w2NEYf3Y041129@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 14:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331423 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331423 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 14:34:42 -0000 Author: markj Date: Fri Mar 23 14:34:41 2018 New Revision: 331423 URL: https://svnweb.freebsd.org/changeset/base/331423 Log: m_new should not inherit queue state. Found with pho's contigmalloc.sh script. Modified: user/markj/vm-playground/sys/vm/vm_page.c Modified: user/markj/vm-playground/sys/vm/vm_page.c ============================================================================== --- user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 13:52:26 2018 (r331422) +++ user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 14:34:41 2018 (r331423) @@ -2762,7 +2762,8 @@ retry: */ if (object->ref_count != 0) pmap_remove_all(m); - m_new->aflags = m->aflags; + m_new->aflags = m->aflags & + ~PGA_QUEUE_STATE_MASK; KASSERT(m_new->oflags == VPO_UNMANAGED, ("page %p is managed", m)); m_new->oflags = m->oflags & VPO_NOSYNC; From owner-svn-src-user@freebsd.org Fri Mar 23 14:36:25 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E8EE3F4C8CC for ; Fri, 23 Mar 2018 14:36:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9549276D19; Fri, 23 Mar 2018 14:36:24 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8C15021256; Fri, 23 Mar 2018 14:36:24 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NEaO35041275; Fri, 23 Mar 2018 14:36:24 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NEaOhQ041274; Fri, 23 Mar 2018 14:36:24 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803231436.w2NEaOhQ041274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 14:36:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331424 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331424 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 14:36:25 -0000 Author: markj Date: Fri Mar 23 14:36:24 2018 New Revision: 331424 URL: https://svnweb.freebsd.org/changeset/base/331424 Log: Fix a mismerge that resulted in a page leak. Modified: user/markj/vm-playground/sys/vm/vm_page.c Modified: user/markj/vm-playground/sys/vm/vm_page.c ============================================================================== --- user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 14:34:41 2018 (r331423) +++ user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 14:36:24 2018 (r331424) @@ -3680,7 +3680,6 @@ vm_page_free_toq(vm_page_t m) return; domain = vm_phys_domain(m); - freed = 0; vmd = VM_DOMAIN(domain); critical_enter(); @@ -3694,6 +3693,8 @@ vm_page_free_toq(vm_page_t m) critical_exit(); vm_domain_free_lock(vmd); + vm_phys_free_pages(m, 0); + freed = 1; VM_BATCHQ_FOREACH(&bq, m) { vm_phys_free_pages(m, 0); freed++; From owner-svn-src-user@freebsd.org Fri Mar 23 14:59:31 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E067F4EBAF for ; Fri, 23 Mar 2018 14:59:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0CAE478056; Fri, 23 Mar 2018 14:59:31 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 078F4215A8; Fri, 23 Mar 2018 14:59:31 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NExUAZ051770; Fri, 23 Mar 2018 14:59:30 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NExUUp051769; Fri, 23 Mar 2018 14:59:30 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803231459.w2NExUUp051769@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 14:59:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331427 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331427 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 14:59:31 -0000 Author: markj Date: Fri Mar 23 14:59:30 2018 New Revision: 331427 URL: https://svnweb.freebsd.org/changeset/base/331427 Log: Address a couple of FIXMEs. Note that PGA_DEQUEUE can only be set with the page lock held. Modified: user/markj/vm-playground/sys/vm/vm_page.c Modified: user/markj/vm-playground/sys/vm/vm_page.c ============================================================================== --- user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 14:39:34 2018 (r331426) +++ user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 14:59:30 2018 (r331427) @@ -2549,8 +2549,8 @@ retry: vm_reserv_size(level)) - pa); #endif } else if (object->memattr == VM_MEMATTR_DEFAULT && - /* XXX need to check PGA_DEQUEUE */ - m->queue != PQ_NONE && !vm_page_busied(m)) { + m->queue != PQ_NONE && + (m->aflags & PGA_DEQUEUE) == 0 && !vm_page_busied(m)) { /* * The page is allocated but eligible for * relocation. Extend the current run by one @@ -2701,8 +2701,9 @@ retry: error = EINVAL; else if (object->memattr != VM_MEMATTR_DEFAULT) error = EINVAL; - else if (m->queue != PQ_NONE && !vm_page_busied(m)) { - /* XXX need to check PGA_DEQUEUE */ + else if (m->queue != PQ_NONE && + (m->aflags & PGA_DEQUEUE) == 0 && + !vm_page_busied(m)) { KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, ("page %p has an unexpected memattr", m)); From owner-svn-src-user@freebsd.org Fri Mar 23 17:58:34 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 658CEF5F0B1 for ; Fri, 23 Mar 2018 17:58:34 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 19BB582B5F; Fri, 23 Mar 2018 17:58:34 +0000 (UTC) (envelope-from jeff@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 14AB523343; Fri, 23 Mar 2018 17:58:34 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NHwXJH045731; Fri, 23 Mar 2018 17:58:33 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NHwXGU045730; Fri, 23 Mar 2018 17:58:33 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201803231758.w2NHwXGU045730@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Fri, 23 Mar 2018 17:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331444 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: jeff X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331444 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 17:58:34 -0000 Author: jeff Date: Fri Mar 23 17:58:33 2018 New Revision: 331444 URL: https://svnweb.freebsd.org/changeset/base/331444 Log: Re-implement vm_pageout_free_pages(). Modified: user/markj/vm-playground/sys/vm/vm_pageout.c Modified: user/markj/vm-playground/sys/vm/vm_pageout.c ============================================================================== --- user/markj/vm-playground/sys/vm/vm_pageout.c Fri Mar 23 17:33:14 2018 (r331443) +++ user/markj/vm-playground/sys/vm/vm_pageout.c Fri Mar 23 17:58:33 2018 (r331444) @@ -1126,6 +1126,65 @@ dolaundry: } } +static int +vm_pageout_free_pages(vm_object_t object, vm_page_t m, struct mtx **mtxp) +{ + vm_page_t p, pp; + vm_pindex_t start; + int pcount, count; + + pcount = MAX(object->iosize / PAGE_SIZE, 1); + count = 1; + if (pcount == 1) { + vm_page_free(m); + goto out; + } + + /* Find the first page in the block. */ + start = m->pindex - (m->pindex % pcount); + for (p = m; p->pindex > start && (pp = vm_page_prev(p)) != NULL; + p = pp); + + /* Free the original page so we don't validate it twice. */ + if (p == m) + p = vm_page_next(m); + vm_page_free(m); + /* Iterate through the block range and free compatible pages. */ + /* XXX Fix cache miss on last page. */ + for (m = p; m != NULL && m->pindex < start + pcount; m = p) { + p = TAILQ_NEXT(m, listq); + vm_page_change_lock(m, mtxp); + if (vm_page_held(m) || vm_page_busied(m) || + m->queue != PQ_INACTIVE) + continue; + if (m->valid == 0) + goto free_page; + if ((m->aflags & PGA_REFERENCED) != 0) + continue; + if (object->ref_count != 0) { + if (pmap_ts_referenced(m)) { + vm_page_aflag_set(m, PGA_REFERENCED); + continue; + } + vm_page_test_dirty(m); + if (m->dirty == 0) + pmap_remove_all(m); + } + if (m->dirty) { + if ((object->flags & OBJ_DEAD) == 0) + vm_page_launder(m); + continue; + } +free_page: + vm_page_free(m); + count++; + } +out: + VM_CNT_ADD(v_dfree, count); + + return (count); +} + /* * vm_pageout_scan does the dirty work for the pageout daemon. * @@ -1364,9 +1423,8 @@ recheck: */ if (m->dirty == 0) { free_page: - vm_page_free(m); - page_shortage--; - VM_CNT_INC(v_dfree); + page_shortage -= vm_pageout_free_pages(object, + m, &mtx); } else if ((object->flags & OBJ_DEAD) == 0) vm_page_launder(m); continue; From owner-svn-src-user@freebsd.org Fri Mar 23 18:15:02 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F5D5F60B35 for ; Fri, 23 Mar 2018 18:15:02 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D373883E1F; Fri, 23 Mar 2018 18:15:01 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9D2223665; Fri, 23 Mar 2018 18:15:01 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NIF160055748; Fri, 23 Mar 2018 18:15:01 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NIF1ke055747; Fri, 23 Mar 2018 18:15:01 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803231815.w2NIF1ke055747@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 18:15:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331448 - user/markj/vm-playground/sys/vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: user/markj/vm-playground/sys/vm X-SVN-Commit-Revision: 331448 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 18:15:02 -0000 Author: markj Date: Fri Mar 23 18:15:01 2018 New Revision: 331448 URL: https://svnweb.freebsd.org/changeset/base/331448 Log: Avoid taking the queue lock in _vm_page_deactivate() when requeuing. Modified: user/markj/vm-playground/sys/vm/vm_page.c Modified: user/markj/vm-playground/sys/vm/vm_page.c ============================================================================== --- user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 18:11:06 2018 (r331447) +++ user/markj/vm-playground/sys/vm/vm_page.c Fri Mar 23 18:15:01 2018 (r331448) @@ -3863,15 +3863,10 @@ _vm_page_deactivate(vm_page_t m, bool noreuse) if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) return; - /* - * XXX we can do this with only one lock acquisition if m is already - * in PQ_INACTIVE - */ - vm_page_remque(m); - - pq = &vm_pagequeue_domain(m)->vmd_pagequeues[PQ_INACTIVE]; if (noreuse) { - /* This is a slow path. */ + /* This is slower than it could be. */ + vm_page_remque(m); + pq = &vm_pagequeue_domain(m)->vmd_pagequeues[PQ_INACTIVE]; vm_pagequeue_lock(pq); m->queue = PQ_INACTIVE; TAILQ_INSERT_BEFORE(&vm_pagequeue_domain(m)->vmd_inacthead, m, @@ -3881,8 +3876,11 @@ _vm_page_deactivate(vm_page_t m, bool noreuse) if ((m->aflags & PGA_REQUEUE) != 0) vm_page_aflag_clear(m, PGA_REQUEUE); vm_pagequeue_unlock(pq); - } else + } else if (!vm_page_inactive(m)) { + vm_page_remque(m); vm_page_enqueue_lazy(m, PQ_INACTIVE); + } else + vm_page_requeue(m); } /* From owner-svn-src-user@freebsd.org Fri Mar 23 18:41:29 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 126BAF6354B for ; Fri, 23 Mar 2018 18:41:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B69A385C63; Fri, 23 Mar 2018 18:41:28 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B146623AEF; Fri, 23 Mar 2018 18:41:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NIfSgS067855; Fri, 23 Mar 2018 18:41:28 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NIfS7b067849; Fri, 23 Mar 2018 18:41:28 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803231841.w2NIfS7b067849@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 18:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331457 - in user/jeff/numa/sys: amd64/include kern vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in user/jeff/numa/sys: amd64/include kern vm X-SVN-Commit-Revision: 331457 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 18:41:29 -0000 Author: markj Date: Fri Mar 23 18:41:28 2018 New Revision: 331457 URL: https://svnweb.freebsd.org/changeset/base/331457 Log: Add the WIP batch queue code. Discussed with: jeff Modified: user/jeff/numa/sys/amd64/include/vmparam.h user/jeff/numa/sys/kern/subr_witness.c user/jeff/numa/sys/vm/vm_object.c user/jeff/numa/sys/vm/vm_page.c user/jeff/numa/sys/vm/vm_page.h user/jeff/numa/sys/vm/vm_pageout.c user/jeff/numa/sys/vm/vm_pagequeue.h user/jeff/numa/sys/vm/vm_phys.c Modified: user/jeff/numa/sys/amd64/include/vmparam.h ============================================================================== --- user/jeff/numa/sys/amd64/include/vmparam.h Fri Mar 23 18:38:12 2018 (r331456) +++ user/jeff/numa/sys/amd64/include/vmparam.h Fri Mar 23 18:41:28 2018 (r331457) @@ -227,4 +227,10 @@ #define ZERO_REGION_SIZE (2 * 1024 * 1024) /* 2MB */ +/* + * Use a fairly large batch size since we expect amd64 systems to have + * lots of memory. + */ +#define VM_BATCHQUEUE_SIZE 31 + #endif /* _MACHINE_VMPARAM_H_ */ Modified: user/jeff/numa/sys/kern/subr_witness.c ============================================================================== --- user/jeff/numa/sys/kern/subr_witness.c Fri Mar 23 18:38:12 2018 (r331456) +++ user/jeff/numa/sys/kern/subr_witness.c Fri Mar 23 18:41:28 2018 (r331457) @@ -601,7 +601,6 @@ static struct witness_order_list_entry order_lists[] = * CDEV */ { "vm map (system)", &lock_class_mtx_sleep }, - { "vm pagequeue", &lock_class_mtx_sleep }, { "vnode interlock", &lock_class_mtx_sleep }, { "cdev", &lock_class_mtx_sleep }, { NULL, NULL }, @@ -611,11 +610,11 @@ static struct witness_order_list_entry order_lists[] = { "vm map (user)", &lock_class_sx }, { "vm object", &lock_class_rw }, { "vm page", &lock_class_mtx_sleep }, - { "vm pagequeue", &lock_class_mtx_sleep }, { "pmap pv global", &lock_class_rw }, { "pmap", &lock_class_mtx_sleep }, { "pmap pv list", &lock_class_rw }, { "vm page free queue", &lock_class_mtx_sleep }, + { "vm pagequeue", &lock_class_mtx_sleep }, { NULL, NULL }, /* * kqueue/VFS interaction Modified: user/jeff/numa/sys/vm/vm_object.c ============================================================================== --- user/jeff/numa/sys/vm/vm_object.c Fri Mar 23 18:38:12 2018 (r331456) +++ user/jeff/numa/sys/vm/vm_object.c Fri Mar 23 18:41:28 2018 (r331457) @@ -721,13 +721,11 @@ static void vm_object_terminate_pages(vm_object_t object) { vm_page_t p, p_next; - struct mtx *mtx, *mtx1; - struct vm_pagequeue *pq, *pq1; + struct mtx *mtx; VM_OBJECT_ASSERT_WLOCKED(object); mtx = NULL; - pq = NULL; /* * Free any remaining pageable pages. This also removes them from the @@ -737,51 +735,23 @@ vm_object_terminate_pages(vm_object_t object) */ TAILQ_FOREACH_SAFE(p, &object->memq, listq, p_next) { vm_page_assert_unbusied(p); - if ((object->flags & OBJ_UNMANAGED) == 0) { + if ((object->flags & OBJ_UNMANAGED) == 0) /* * vm_page_free_prep() only needs the page * lock for managed pages. */ - mtx1 = vm_page_lockptr(p); - if (mtx1 != mtx) { - if (mtx != NULL) - mtx_unlock(mtx); - if (pq != NULL) { - vm_pagequeue_unlock(pq); - pq = NULL; - } - mtx = mtx1; - mtx_lock(mtx); - } - } + vm_page_change_lock(p, &mtx); p->object = NULL; if (p->wire_count != 0) - goto unlist; + continue; VM_CNT_INC(v_pfree); p->flags &= ~PG_ZERO; - if (p->queue != PQ_NONE) { - KASSERT(p->queue < PQ_COUNT, ("vm_object_terminate: " - "page %p is not queued", p)); - pq1 = vm_page_pagequeue(p); - if (pq != pq1) { - if (pq != NULL) - vm_pagequeue_unlock(pq); - pq = pq1; - vm_pagequeue_lock(pq); - } - } - if (vm_page_free_prep(p, true)) - continue; -unlist: - TAILQ_REMOVE(&object->memq, p, listq); + + vm_page_free(p); } - if (pq != NULL) - vm_pagequeue_unlock(pq); if (mtx != NULL) mtx_unlock(mtx); - vm_page_free_phys_pglist(&object->memq); - /* * If the object contained any pages, then reset it to an empty state. * None of the object's fields, including "resident_page_count", were @@ -1964,7 +1934,6 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t { vm_page_t p, next; struct mtx *mtx; - struct pglist pgl; VM_OBJECT_ASSERT_WLOCKED(object); KASSERT((object->flags & OBJ_UNMANAGED) == 0 || @@ -1973,7 +1942,6 @@ vm_object_page_remove(vm_object_t object, vm_pindex_t if (object->resident_page_count == 0) return; vm_object_pip_add(object, 1); - TAILQ_INIT(&pgl); again: p = vm_page_find_least(object, start); mtx = NULL; @@ -2028,12 +1996,10 @@ again: if ((options & OBJPR_NOTMAPPED) == 0 && object->ref_count != 0) pmap_remove_all(p); p->flags &= ~PG_ZERO; - if (vm_page_free_prep(p, false)) - TAILQ_INSERT_TAIL(&pgl, p, listq); + vm_page_free(p); } if (mtx != NULL) mtx_unlock(mtx); - vm_page_free_phys_pglist(&pgl); vm_object_pip_wakeup(object); } Modified: user/jeff/numa/sys/vm/vm_page.c ============================================================================== --- user/jeff/numa/sys/vm/vm_page.c Fri Mar 23 18:38:12 2018 (r331456) +++ user/jeff/numa/sys/vm/vm_page.c Fri Mar 23 18:41:28 2018 (r331457) @@ -74,13 +74,6 @@ * * The page daemon can acquire and hold any pair of page queue * locks in any order. * - * * Batch queues are used to defer insertions of pages into the - * main paging queues. The aim is to reduce contention at the - * entry point of the queue by inserting multiple pages in an - * O(1) operation. This comes at the expense of strict LRU. - * Only a page lock is required to insert a page into a batch - * queue. - * * - The object lock is required when inserting or removing * pages from an object (vm_page_insert() or vm_page_remove()). * @@ -138,13 +131,11 @@ extern int uma_startup_count(int); extern void uma_startup(void *, int); extern int vmem_startup_count(void); -/* - * Associated with page of user-allocatable memory is a - * page structure. - */ - struct vm_domain vm_dom[MAXMEMDOM]; +static DPCPU_DEFINE(struct vm_batchqueue, pqbatch[MAXMEMDOM][PQ_COUNT]); +static DPCPU_DEFINE(struct vm_batchqueue, freeqbatch[MAXMEMDOM]); + struct mtx_padalign __exclusive_cache_line pa_lock[PA_LOCK_COUNT]; struct mtx_padalign __exclusive_cache_line vm_domainset_lock; @@ -183,7 +174,7 @@ static uma_zone_t fakepg_zone; static void vm_page_alloc_check(vm_page_t m); static void vm_page_clear_dirty_mask(vm_page_t m, vm_page_bits_t pagebits); -static void vm_page_enqueue(uint8_t queue, vm_page_t m); +static void vm_page_enqueue_lazy(vm_page_t m, uint8_t queue); static void vm_page_init(void *dummy); static int vm_page_insert_after(vm_page_t m, vm_object_t object, vm_pindex_t pindex, vm_page_t mpred); @@ -442,7 +433,7 @@ vm_page_domain_init(int domain) { struct vm_domain *vmd; struct vm_pagequeue *pq; - int i, j; + int i; vmd = VM_DOMAIN(domain); bzero(vmd, sizeof(*vmd)); @@ -464,15 +455,6 @@ vm_page_domain_init(int domain) TAILQ_INIT(&pq->pq_pl); mtx_init(&pq->pq_mutex, pq->pq_name, "vm pagequeue", MTX_DEF | MTX_DUPOK); - - /* - * The batch queue limits are set in vm_pageout_init() once - * we've set the paging targets. - */ - for (j = 0; j < BPQ_COUNT; j++) { - TAILQ_INIT(&pq->pq_bpqs[j].bpq_pl); - pq->pq_bpqs[j].bpq_lim = 1; - } } mtx_init(&vmd->vmd_free_mtx, "vm page free queue", NULL, MTX_DEF); mtx_init(&vmd->vmd_pageout_mtx, "vm pageout lock", NULL, MTX_DEF); @@ -1830,6 +1812,7 @@ again: KASSERT(m != NULL, ("missing page")); found: + vm_page_dequeue(m); vm_page_alloc_check(m); /* @@ -2026,8 +2009,10 @@ again: #if VM_NRESERVLEVEL > 0 found: #endif - for (m = m_ret; m < &m_ret[npages]; m++) + for (m = m_ret; m < &m_ret[npages]; m++) { + vm_page_dequeue(m); vm_page_alloc_check(m); + } /* * Initialize the pages. Only the PG_ZERO flag is inherited. @@ -2102,6 +2087,8 @@ vm_page_alloc_check(vm_page_t m) KASSERT(m->object == NULL, ("page %p has object", m)); KASSERT(m->queue == PQ_NONE, ("page %p has unexpected queue %d", m, m->queue)); + KASSERT((m->aflags & PGA_QUEUE_STATE_MASK) == 0, + ("page %p has unexpected queue state", m)); KASSERT(!vm_page_held(m), ("page %p is held", m)); KASSERT(!vm_page_busied(m), ("page %p is busy", m)); KASSERT(m->dirty == 0, ("page %p is dirty", m)); @@ -2171,6 +2158,7 @@ again: goto again; return (NULL); } + vm_page_dequeue(m); vm_page_alloc_check(m); /* @@ -2363,7 +2351,8 @@ retry: vm_reserv_size(level)) - pa); #endif } else if (object->memattr == VM_MEMATTR_DEFAULT && - m->queue != PQ_NONE && !vm_page_busied(m)) { + m->queue != PQ_NONE && + (m->aflags & PGA_DEQUEUE) == 0 && !vm_page_busied(m)) { /* * The page is allocated but eligible for * relocation. Extend the current run by one @@ -2514,7 +2503,9 @@ retry: error = EINVAL; else if (object->memattr != VM_MEMATTR_DEFAULT) error = EINVAL; - else if (m->queue != PQ_NONE && !vm_page_busied(m)) { + else if (m->queue != PQ_NONE && + (m->aflags & PGA_DEQUEUE) == 0 && + !vm_page_busied(m)) { KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, ("page %p has an unexpected memattr", m)); @@ -2574,7 +2565,8 @@ retry: */ if (object->ref_count != 0) pmap_remove_all(m); - m_new->aflags = m->aflags; + m_new->aflags = m->aflags & + ~PGA_QUEUE_STATE_MASK; KASSERT(m_new->oflags == VPO_UNMANAGED, ("page %p is managed", m)); m_new->oflags = m->oflags & VPO_NOSYNC; @@ -2586,7 +2578,7 @@ retry: vm_page_remque(m); vm_page_replace_checked(m_new, object, m->pindex, m); - if (vm_page_free_prep(m, false)) + if (vm_page_free_prep(m)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); @@ -2600,7 +2592,7 @@ retry: m->flags &= ~PG_ZERO; vm_page_remque(m); vm_page_remove(m); - if (vm_page_free_prep(m, false)) + if (vm_page_free_prep(m)) SLIST_INSERT_HEAD(&free, m, plinks.s.ss); KASSERT(m->dirty == 0, @@ -3043,146 +3035,288 @@ vm_page_pagequeue(vm_page_t m) return (&vm_pagequeue_domain(m)->vmd_pagequeues[m->queue]); } -/* - * vm_page_enqueue_batch: - * - * Concatenate the pages in a batch queue to their corresponding paging - * queue. - * - * The pagequeue must be locked. - */ +static struct mtx * +vm_page_pagequeue_lockptr(vm_page_t m) +{ + + if (m->queue == PQ_NONE) + return (NULL); + return (&vm_page_pagequeue(m)->pq_mutex); +} + static void -vm_page_enqueue_batch(struct vm_pagequeue *pq, u_int idx) +vm_pqbatch_process(struct vm_pagequeue *pq, struct vm_batchqueue *bq, + uint8_t queue) { - struct vm_batchqueue *bpq; + vm_page_t m; + int delta; + uint8_t aflags; - KASSERT(idx < BPQ_COUNT, ("invalid batch queue index %u", idx)); vm_pagequeue_assert_locked(pq); - bpq = &pq->pq_bpqs[idx]; - if (bpq->bpq_cnt != 0) { - TAILQ_CONCAT(&pq->pq_pl, &bpq->bpq_pl, plinks.q); - vm_pagequeue_cnt_add(pq, bpq->bpq_cnt); - bpq->bpq_cnt = 0; + delta = 0; + VM_BATCHQ_FOREACH(bq, m) { + if (__predict_false(m->queue != queue)) + continue; + + aflags = m->aflags; + if ((aflags & PGA_DEQUEUE) != 0) { + if (__predict_true((aflags & PGA_ENQUEUED) != 0)) { + TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); + delta--; + } + + /* + * Synchronize with the page daemon, which may be + * simultaneously scanning this page with only the page + * lock held. We must be careful to avoid leaving the + * page in a state where it appears to belong to a page + * queue. + */ + m->queue = PQ_NONE; + atomic_thread_fence_rel(); + vm_page_aflag_clear(m, PGA_QUEUE_STATE_MASK); + } else if ((aflags & PGA_ENQUEUED) == 0) { + TAILQ_INSERT_TAIL(&pq->pq_pl, m, plinks.q); + delta++; + vm_page_aflag_set(m, PGA_ENQUEUED); + if (__predict_false((aflags & PGA_REQUEUE) != 0)) + vm_page_aflag_clear(m, PGA_REQUEUE); + } else if ((aflags & PGA_REQUEUE) != 0) { + TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); + TAILQ_INSERT_TAIL(&pq->pq_pl, m, plinks.q); + vm_page_aflag_clear(m, PGA_REQUEUE); + } } + vm_batchqueue_init(bq); + vm_pagequeue_cnt_add(pq, delta); } /* - * vm_page_dequeue: + * vm_page_dequeue_lazy: * - * Remove the given page from its current page queue. + * Request removal of the given page from its current page + * queue. Physical removal from the queue may be deferred + * arbitrarily, and may be cancelled by later queue operations + * on that page. * * The page must be locked. */ -void -vm_page_dequeue(vm_page_t m) +static void +vm_page_dequeue_lazy(vm_page_t m) { + struct vm_batchqueue *bq; struct vm_pagequeue *pq; + int domain, queue; vm_page_assert_locked(m); - KASSERT(m->queue < PQ_COUNT, ("vm_page_dequeue: page %p is not queued", - m)); - pq = vm_page_pagequeue(m); - vm_pagequeue_lock(pq); - m->queue = PQ_NONE; - vm_page_enqueue_batch(pq, BPQ_IDX(m)); - TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); - vm_pagequeue_cnt_dec(pq); + + queue = m->queue; + if (queue == PQ_NONE) + return; + domain = vm_phys_domain(m); + pq = &VM_DOMAIN(domain)->vmd_pagequeues[queue]; + + vm_page_aflag_set(m, PGA_DEQUEUE); + + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); + if (vm_batchqueue_insert(bq, m)) { + critical_exit(); + return; + } + if (!vm_pagequeue_trylock(pq)) { + critical_exit(); + vm_pagequeue_lock(pq); + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); + } + vm_pqbatch_process(pq, bq, queue); + + /* + * The page may have been dequeued by another thread before we + * acquired the page queue lock. However, since we hold the + * page lock, the page's queue field cannot change a second + * time and we can safely clear PGA_DEQUEUE. + */ + KASSERT(m->queue == queue || m->queue == PQ_NONE, + ("%s: page %p migrated between queues", __func__, m)); + if (m->queue == queue) { + (void)vm_batchqueue_insert(bq, m); + vm_pqbatch_process(pq, bq, queue); + } else + vm_page_aflag_clear(m, PGA_DEQUEUE); vm_pagequeue_unlock(pq); + critical_exit(); } /* * vm_page_dequeue_locked: * - * Remove the given page from its current page queue. + * Remove the page from its page queue, which must be locked. + * If the page lock is not held, there is no guarantee that the + * page will not be enqueued by another thread before this function + * returns. In this case, it is up to the caller to ensure that + * no other threads hold a reference to the page. * - * The page and page queue must be locked. + * The page queue lock must be held. If the page is not already + * logically dequeued, the page lock must be held as well. */ void vm_page_dequeue_locked(vm_page_t m) { struct vm_pagequeue *pq; - vm_page_lock_assert(m, MA_OWNED); - pq = vm_page_pagequeue(m); - vm_pagequeue_assert_locked(pq); - vm_page_enqueue_batch(pq, BPQ_IDX(m)); + KASSERT(m->queue != PQ_NONE, + ("%s: page %p queue field is PQ_NONE", __func__, m)); + vm_pagequeue_assert_locked(vm_page_pagequeue(m)); + KASSERT((m->aflags & PGA_DEQUEUE) != 0 || + mtx_owned(vm_page_lockptr(m)), + ("%s: queued unlocked page %p", __func__, m)); + + if ((m->aflags & PGA_ENQUEUED) != 0) { + pq = vm_page_pagequeue(m); + TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); + vm_pagequeue_cnt_dec(pq); + } + + /* + * Synchronize with the page daemon, which may be simultaneously + * scanning this page with only the page lock held. We must be careful + * to avoid leaving the page in a state where it appears to belong to a + * page queue. + */ m->queue = PQ_NONE; - TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); - vm_pagequeue_cnt_dec(pq); + atomic_thread_fence_rel(); + vm_page_aflag_clear(m, PGA_QUEUE_STATE_MASK); } /* - * vm_page_enqueue: + * vm_page_dequeue: * - * Add the given page to the specified page queue. + * Remove the page from whichever page queue it's in, if any. + * If the page lock is not held, there is no guarantee that the + * page will not be enqueued by another thread before this function + * returns. In this case, it is up to the caller to ensure that + * no other threads hold a reference to the page. + */ +void +vm_page_dequeue(vm_page_t m) +{ + struct mtx *lock, *lock1; + + lock = vm_page_pagequeue_lockptr(m); + for (;;) { + if (lock == NULL) + return; + mtx_lock(lock); + if ((lock1 = vm_page_pagequeue_lockptr(m)) == lock) + break; + mtx_unlock(lock); + lock = lock1; + } + KASSERT(lock == vm_page_pagequeue_lockptr(m), + ("%s: page %p migrated directly between queues", __func__, m)); + vm_page_dequeue_locked(m); + mtx_unlock(lock); +} + +/* + * vm_page_enqueue_lazy: * + * Schedule the given page for insertion into the specified page queue. + * Physical insertion of the page may be deferred indefinitely. + * * The page must be locked. */ static void -vm_page_enqueue(uint8_t queue, vm_page_t m) +vm_page_enqueue_lazy(vm_page_t m, uint8_t queue) { - struct vm_batchqueue *bpq; + struct vm_batchqueue *bq; struct vm_pagequeue *pq; + int domain; - vm_page_lock_assert(m, MA_OWNED); - KASSERT(queue < PQ_COUNT, - ("vm_page_enqueue: invalid queue %u request for page %p", - queue, m)); + vm_page_assert_locked(m); + KASSERT(m->queue == PQ_NONE && (m->aflags & PGA_QUEUE_STATE_MASK) == 0, + ("%s: page %p is already enqueued", __func__, m)); + + domain = vm_phys_domain(m); pq = &vm_pagequeue_domain(m)->vmd_pagequeues[queue]; + + /* + * The queue field might be changed back to PQ_NONE by a concurrent + * call to vm_page_dequeue(). In that case the batch queue entry will + * be a no-op. + */ m->queue = queue; - bpq = &pq->pq_bpqs[BPQ_IDX(m)]; - TAILQ_INSERT_TAIL(&bpq->bpq_pl, m, plinks.q); - if (bpq->bpq_cnt++ >= bpq->bpq_lim) { + + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); + if (__predict_true(vm_batchqueue_insert(bq, m))) { + critical_exit(); + return; + } + if (!vm_pagequeue_trylock(pq)) { + critical_exit(); vm_pagequeue_lock(pq); - vm_page_enqueue_batch(pq, BPQ_IDX(m)); - vm_pagequeue_unlock(pq); + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); } + vm_pqbatch_process(pq, bq, queue); + (void)vm_batchqueue_insert(bq, m); + vm_pqbatch_process(pq, bq, queue); + vm_pagequeue_unlock(pq); + critical_exit(); } /* * vm_page_requeue: * - * Move the given page to the tail of its current page queue. + * Schedule a requeue of the given page. * * The page must be locked. */ void vm_page_requeue(vm_page_t m) { + struct vm_batchqueue *bq; struct vm_pagequeue *pq; + int domain, queue; vm_page_lock_assert(m, MA_OWNED); KASSERT(m->queue != PQ_NONE, - ("vm_page_requeue: page %p is not queued", m)); + ("%s: page %p is not enqueued", __func__, m)); + + domain = vm_phys_domain(m); + queue = m->queue; pq = vm_page_pagequeue(m); - vm_pagequeue_lock(pq); - vm_page_enqueue_batch(pq, BPQ_IDX(m)); - TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); - TAILQ_INSERT_TAIL(&pq->pq_pl, m, plinks.q); - vm_pagequeue_unlock(pq); -} -/* - * vm_page_requeue_locked: - * - * Move the given page to the tail of its current page queue. - * - * The page queue must be locked. - */ -void -vm_page_requeue_locked(vm_page_t m) -{ - struct vm_pagequeue *pq; + if (queue == PQ_NONE) + return; - vm_page_lock_assert(m, MA_OWNED); - KASSERT(m->queue != PQ_NONE, - ("vm_page_requeue_locked: page %p is not queued", m)); - pq = vm_page_pagequeue(m); - vm_pagequeue_assert_locked(pq); - vm_page_enqueue_batch(pq, BPQ_IDX(m)); - TAILQ_REMOVE(&pq->pq_pl, m, plinks.q); - TAILQ_INSERT_TAIL(&pq->pq_pl, m, plinks.q); + vm_page_aflag_set(m, PGA_REQUEUE); + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); + if (__predict_true(vm_batchqueue_insert(bq, m))) { + critical_exit(); + return; + } + if (!vm_pagequeue_trylock(pq)) { + critical_exit(); + vm_pagequeue_lock(pq); + critical_enter(); + bq = DPCPU_PTR(pqbatch[domain][queue]); + } + vm_pqbatch_process(pq, bq, queue); + KASSERT(m->queue == queue || m->queue == PQ_NONE, + ("%s: page %p migrated between queues", __func__, m)); + if (m->queue == queue) { + (void)vm_batchqueue_insert(bq, m); + vm_pqbatch_process(pq, bq, queue); + } else + vm_page_aflag_clear(m, PGA_REQUEUE); + vm_pagequeue_unlock(pq); + critical_exit(); } /* @@ -3200,18 +3334,18 @@ vm_page_activate(vm_page_t m) int queue; vm_page_lock_assert(m, MA_OWNED); - if ((queue = m->queue) != PQ_ACTIVE) { - if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { - if (m->act_count < ACT_INIT) - m->act_count = ACT_INIT; - if (queue != PQ_NONE) - vm_page_dequeue(m); - vm_page_enqueue(PQ_ACTIVE, m); - } - } else { - if (m->act_count < ACT_INIT) + + if ((queue = m->queue) == PQ_ACTIVE || m->wire_count > 0 || + (m->oflags & VPO_UNMANAGED) != 0) { + if (queue == PQ_ACTIVE && m->act_count < ACT_INIT) m->act_count = ACT_INIT; + return; } + + vm_page_remque(m); + if (m->act_count < ACT_INIT) + m->act_count = ACT_INIT; + vm_page_enqueue_lazy(m, PQ_ACTIVE); } /* @@ -3222,11 +3356,10 @@ vm_page_activate(vm_page_t m) * the page to the free list only if this function returns true. * * The object must be locked. The page must be locked if it is - * managed. For a queued managed page, the pagequeue_locked - * argument specifies whether the page queue is already locked. + * managed. */ bool -vm_page_free_prep(vm_page_t m, bool pagequeue_locked) +vm_page_free_prep(vm_page_t m) { #if defined(DIAGNOSTIC) && defined(PHYS_TO_DMAP) @@ -3242,14 +3375,14 @@ vm_page_free_prep(vm_page_t m, bool pagequeue_locked) if ((m->oflags & VPO_UNMANAGED) == 0) { vm_page_lock_assert(m, MA_OWNED); KASSERT(!pmap_page_is_mapped(m), - ("vm_page_free_toq: freeing mapped page %p", m)); + ("vm_page_free_prep: freeing mapped page %p", m)); } else KASSERT(m->queue == PQ_NONE, - ("vm_page_free_toq: unmanaged page %p is queued", m)); + ("vm_page_free_prep: unmanaged page %p is queued", m)); VM_CNT_INC(v_tfree); if (vm_page_sbusied(m)) - panic("vm_page_free: freeing busy page %p", m); + panic("vm_page_free_prep: freeing busy page %p", m); vm_page_remove(m); @@ -3265,21 +3398,23 @@ vm_page_free_prep(vm_page_t m, bool pagequeue_locked) return (false); } - if (m->queue != PQ_NONE) { - if (pagequeue_locked) - vm_page_dequeue_locked(m); - else - vm_page_dequeue(m); - } + /* + * Pages need not be dequeued before they are returned to the physical + * memory allocator, but they must at least be marked for a deferred + * dequeue. + */ + if ((m->oflags & VPO_UNMANAGED) == 0) + vm_page_dequeue_lazy(m); + m->valid = 0; vm_page_undirty(m); if (m->wire_count != 0) - panic("vm_page_free: freeing wired page %p", m); + panic("vm_page_free_prep: freeing wired page %p", m); if (m->hold_count != 0) { m->flags &= ~PG_ZERO; KASSERT((m->flags & PG_UNHOLDFREE) == 0, - ("vm_page_free: freeing PG_UNHOLDFREE page %p", m)); + ("vm_page_free_prep: freeing PG_UNHOLDFREE page %p", m)); m->flags |= PG_UNHOLDFREE; return (false); } @@ -3340,15 +3475,35 @@ vm_page_free_phys_pglist(struct pglist *tq) void vm_page_free_toq(vm_page_t m) { + struct vm_batchqueue *cpubq, bq; struct vm_domain *vmd; + int domain, freed; - if (!vm_page_free_prep(m, false)) + if (!vm_page_free_prep(m)) return; - vmd = vm_pagequeue_domain(m); + + domain = vm_phys_domain(m); + vmd = VM_DOMAIN(domain); + + critical_enter(); + cpubq = DPCPU_PTR(freeqbatch[domain]); + if (vm_batchqueue_insert(cpubq, m)) { + critical_exit(); + return; + } + memcpy(&bq, cpubq, sizeof(bq)); + vm_batchqueue_init(cpubq); + critical_exit(); + vm_domain_free_lock(vmd); vm_phys_free_pages(m, 0); + freed = 1; + VM_BATCHQ_FOREACH(&bq, m) { + vm_phys_free_pages(m, 0); + freed++; + } vm_domain_free_unlock(vmd); - vm_domain_freecnt_inc(vmd, 1); + vm_domain_freecnt_inc(vmd, freed); } /* @@ -3365,23 +3520,18 @@ void vm_page_free_pages_toq(struct spglist *free, bool update_wire_count) { vm_page_t m; - struct pglist pgl; int count; if (SLIST_EMPTY(free)) return; count = 0; - TAILQ_INIT(&pgl); while ((m = SLIST_FIRST(free)) != NULL) { count++; SLIST_REMOVE_HEAD(free, plinks.s.ss); - if (vm_page_free_prep(m, false)) - TAILQ_INSERT_TAIL(&pgl, m, listq); + vm_page_free_toq(m); } - vm_page_free_phys_pglist(&pgl); - if (update_wire_count) vm_wire_sub(count); } @@ -3440,22 +3590,25 @@ vm_page_unwire(vm_page_t m, uint8_t queue) KASSERT(queue < PQ_COUNT || queue == PQ_NONE, ("vm_page_unwire: invalid queue %u request for page %p", queue, m)); + if ((m->oflags & VPO_UNMANAGED) == 0) + vm_page_assert_locked(m); unwired = vm_page_unwire_noq(m); - if (unwired && (m->oflags & VPO_UNMANAGED) == 0 && m->object != NULL) { - if (m->queue == queue) { + if (!unwired || (m->oflags & VPO_UNMANAGED) != 0 || m->object == NULL) + return (unwired); + + if (m->queue == queue) { + if (queue == PQ_ACTIVE) + vm_page_reference(m); + else if (queue != PQ_NONE) + vm_page_requeue(m); + } else { + vm_page_dequeue(m); + if (queue != PQ_NONE) { + vm_page_enqueue_lazy(m, queue); if (queue == PQ_ACTIVE) - vm_page_reference(m); - else if (queue != PQ_NONE) - vm_page_requeue(m); - } else { - vm_page_remque(m); - if (queue != PQ_NONE) { - vm_page_enqueue(queue, m); - if (queue == PQ_ACTIVE) - /* Initialize act_count. */ - vm_page_activate(m); - } + /* Initialize act_count. */ + vm_page_activate(m); } } return (unwired); @@ -3503,44 +3656,33 @@ vm_page_unwire_noq(vm_page_t m) * The page must be locked. */ static inline void -_vm_page_deactivate(vm_page_t m, boolean_t noreuse) +_vm_page_deactivate(vm_page_t m, bool noreuse) { - struct vm_batchqueue *bpq; struct vm_pagequeue *pq; - int queue; vm_page_assert_locked(m); - if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { + if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + return; + + if (noreuse) { + /* This is slower than it could be. */ + vm_page_remque(m); pq = &vm_pagequeue_domain(m)->vmd_pagequeues[PQ_INACTIVE]; - /* Avoid multiple acquisitions of the inactive queue lock. */ - queue = m->queue; - if (queue == PQ_INACTIVE) { - vm_pagequeue_lock(pq); - vm_page_dequeue_locked(m); - } else { - if (queue != PQ_NONE) - vm_page_dequeue(m); - bpq = &pq->pq_bpqs[BPQ_IDX(m)]; - if (bpq->bpq_cnt < bpq->bpq_lim) { - bpq->bpq_cnt++; - m->queue = PQ_INACTIVE; - TAILQ_INSERT_TAIL(&bpq->bpq_pl, m, plinks.q); - return; - } - vm_pagequeue_lock(pq); - } + vm_pagequeue_lock(pq); m->queue = PQ_INACTIVE; - vm_page_enqueue_batch(pq, BPQ_IDX(m)); - if (noreuse) - TAILQ_INSERT_BEFORE( - &vm_pagequeue_domain(m)->vmd_inacthead, m, - plinks.q); - else - TAILQ_INSERT_TAIL(&pq->pq_pl, m, plinks.q); + TAILQ_INSERT_BEFORE(&vm_pagequeue_domain(m)->vmd_inacthead, m, + plinks.q); vm_pagequeue_cnt_inc(pq); + vm_page_aflag_set(m, PGA_ENQUEUED); + if ((m->aflags & PGA_REQUEUE) != 0) + vm_page_aflag_clear(m, PGA_REQUEUE); vm_pagequeue_unlock(pq); - } + } else if (!vm_page_inactive(m)) { + vm_page_remque(m); + vm_page_enqueue_lazy(m, PQ_INACTIVE); + } else + vm_page_requeue(m); } /* @@ -3553,7 +3695,7 @@ void vm_page_deactivate(vm_page_t m) { - _vm_page_deactivate(m, FALSE); + _vm_page_deactivate(m, false); } /* @@ -3566,7 +3708,7 @@ void vm_page_deactivate_noreuse(vm_page_t m) { - _vm_page_deactivate(m, TRUE); + _vm_page_deactivate(m, true); } /* @@ -3579,13 +3721,14 @@ vm_page_launder(vm_page_t m) { vm_page_assert_locked(m); - if (m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0) { - if (m->queue == PQ_LAUNDRY) - vm_page_requeue(m); - else { - vm_page_remque(m); - vm_page_enqueue(PQ_LAUNDRY, m); - } + if (m->wire_count > 0 || (m->oflags & VPO_UNMANAGED) != 0) + return; + + if (m->queue == PQ_LAUNDRY) + vm_page_requeue(m); + else { + vm_page_remque(m); + vm_page_enqueue_lazy(m, PQ_LAUNDRY); } } @@ -3601,9 +3744,9 @@ vm_page_unswappable(vm_page_t m) vm_page_assert_locked(m); KASSERT(m->wire_count == 0 && (m->oflags & VPO_UNMANAGED) == 0, ("page %p already unswappable", m)); - if (m->queue != PQ_NONE) - vm_page_dequeue(m); - vm_page_enqueue(PQ_UNSWAPPABLE, m); + + vm_page_remque(m); + vm_page_enqueue_lazy(m, PQ_UNSWAPPABLE); } /* Modified: user/jeff/numa/sys/vm/vm_page.h ============================================================================== --- user/jeff/numa/sys/vm/vm_page.h Fri Mar 23 18:38:12 2018 (r331456) +++ user/jeff/numa/sys/vm/vm_page.h Fri Mar 23 18:41:28 2018 (r331457) @@ -94,7 +94,9 @@ * In general, operations on this structure's mutable fields are * synchronized using either one of or a combination of the lock on the * object that the page belongs to (O), the pool lock for the page (P), - * or the lock for either the free or paging queue (Q). If a field is + * the per-domain lock for the free queues (F), or the page's queue + * lock (Q). The queue lock for a page depends on the value of its + * queue field and described in detail below. If a field is * annotated below with two of these locks, then holding either lock is * sufficient for read access, but both locks are required for write * access. An annotation of (C) indicates that the field is immutable. @@ -143,6 +145,28 @@ * causing the thread to block. vm_page_sleep_if_busy() can be used to * sleep until the page's busy state changes, after which the caller * must re-lookup the page and re-evaluate its state. + * + * The queue field is the index of the page queue containing the + * page, or PQ_NONE if the page is not enqueued. The queue lock of a + * page is the page queue lock corresponding to the page queue index, + * or the page lock (P) for the page. To modify the queue field, the + * queue lock for the old value of the field must be held. It is + * invalid for a page's queue field to transition between two distinct + * page queue indices. That is, when updating the queue field, either + * the new value or the old value must be PQ_NONE. + * + * To avoid contention on page queue locks, page queue operations + * (enqueue, dequeue, requeue) are batched using per-CPU queues. + * A deferred operation is requested by inserting an entry into a *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-user@freebsd.org Fri Mar 23 20:29:35 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B0D53F6C095 for ; Fri, 23 Mar 2018 20:29:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6364D8AE1E; Fri, 23 Mar 2018 20:29:35 +0000 (UTC) (envelope-from markj@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5E38B24B61; Fri, 23 Mar 2018 20:29:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2NKTZdF022550; Fri, 23 Mar 2018 20:29:35 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2NKTYoA022545; Fri, 23 Mar 2018 20:29:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201803232029.w2NKTYoA022545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Fri, 23 Mar 2018 20:29:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm X-SVN-Group: user X-SVN-Commit-Author: markj X-SVN-Commit-Paths: in user/markj/netdump/sys: kern netinet/netdump sys vm X-SVN-Commit-Revision: 331461 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2018 20:29:36 -0000 Author: markj Date: Fri Mar 23 20:29:34 2018 New Revision: 331461 URL: https://svnweb.freebsd.org/changeset/base/331461 Log: Address some but not all review feedback from cem. Modified: user/markj/netdump/sys/kern/kern_mbuf.c user/markj/netdump/sys/netinet/netdump/netdump_client.c user/markj/netdump/sys/sys/mbuf.h user/markj/netdump/sys/vm/uma_core.c Modified: user/markj/netdump/sys/kern/kern_mbuf.c ============================================================================== --- user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:20:04 2018 (r331460) +++ user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:29:34 2018 (r331461) @@ -381,11 +381,6 @@ mbuf_init(void *dummy) SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); #ifdef NETDUMP -/* External functions invoked from the netdump code. */ -void netdump_mbuf_init(int, int); -void netdump_mbuf_drain(void); -void netdump_mbuf_dump(void); - static struct mbufq nd_mbufq; static struct mbufq nd_clustq; @@ -407,7 +402,6 @@ nd_buf_import(void *arg, void **store, int count, int m = mbufq_dequeue(q); if (m == NULL) break; - trash_init(m, q == &nd_mbufq ? MSIZE : MCLBYTES, flags); store[i] = m; } return (i); @@ -429,7 +423,7 @@ nd_buf_release(void *arg, void **store, int count) } static int -nd_pack_import(void *arg, void **store, int count, int domain __unused, +nd_pack_import(void *arg __unused, void **store, int count, int domain __unused, int flags __unused) { struct mbuf *m; @@ -446,14 +440,14 @@ nd_pack_import(void *arg, void **store, int count, int break; } - mb_ctor_clust(clust, MCLBYTES, m, M_NOWAIT); + mb_ctor_clust(clust, MCLBYTES, m, 0); store[i] = m; } return (i); } static void -nd_pack_release(void *arg, void **store, int count) +nd_pack_release(void *arg __unused, void **store, int count) { struct mbuf *m; void *clust; Modified: user/markj/netdump/sys/netinet/netdump/netdump_client.c ============================================================================== --- user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:20:04 2018 (r331460) +++ user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:29:34 2018 (r331461) @@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$"); #define NETDDEBUGV_IF(i, f, ...) #endif -/* Defined in kern_mbuf.c. */ -void netdump_mbuf_init(int nmbuf, int nclust); -void netdump_mbuf_drain(void); -void netdump_mbuf_dump(void); - static int netdump_arp_gw(void); static void netdump_cleanup(void); static int netdump_configure(struct netdump_conf *); Modified: user/markj/netdump/sys/sys/mbuf.h ============================================================================== --- user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:20:04 2018 (r331460) +++ user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:29:34 2018 (r331461) @@ -1373,5 +1373,12 @@ mbuf_tstmp2timespec(struct mbuf *m, struct timespec *t } #endif +#ifdef NETDUMP +/* Invoked from the netdump client code. */ +void netdump_mbuf_init(int, int); +void netdump_mbuf_drain(void); +void netdump_mbuf_dump(void); +#endif + #endif /* _KERNEL */ #endif /* !_SYS_MBUF_H_ */ Modified: user/markj/netdump/sys/vm/uma_core.c ============================================================================== --- user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:20:04 2018 (r331460) +++ user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:29:34 2018 (r331461) @@ -1673,6 +1673,9 @@ zone_ctor(void *mem, int size, void *udata, int flags) } out: + KASSERT((arg->flags & (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET)) != + (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET), + ("Invalid zone flag combination")); if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0) zone->uz_count = BUCKET_MAX; else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0) From owner-svn-src-user@freebsd.org Sat Mar 24 02:46:38 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4B334F63723 for ; Sat, 24 Mar 2018 02:46:38 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6B4C72E27; Sat, 24 Mar 2018 02:46:37 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2O2kZ93033986; Fri, 23 Mar 2018 19:46:35 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2O2kZnB033985; Fri, 23 Mar 2018 19:46:35 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm In-Reply-To: <201803232029.w2NKTYoA022545@repo.freebsd.org> To: Mark Johnston Date: Fri, 23 Mar 2018 19:46:35 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-user@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 02:46:38 -0000 > Author: markj > Date: Fri Mar 23 20:29:34 2018 > New Revision: 331461 > URL: https://svnweb.freebsd.org/changeset/base/331461 > > Log: > Address some but not all review feedback from cem. Please be detailed in what is changing, as the above only tells us where it came from in a vague way as no review number is even cited. I know this is on a private branch, but when/if it is merged this becomes part of the main line. > Modified: > user/markj/netdump/sys/kern/kern_mbuf.c > user/markj/netdump/sys/netinet/netdump/netdump_client.c > user/markj/netdump/sys/sys/mbuf.h > user/markj/netdump/sys/vm/uma_core.c > > Modified: user/markj/netdump/sys/kern/kern_mbuf.c > ============================================================================== > --- user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:20:04 2018 (r331460) > +++ user/markj/netdump/sys/kern/kern_mbuf.c Fri Mar 23 20:29:34 2018 (r331461) > @@ -381,11 +381,6 @@ mbuf_init(void *dummy) > SYSINIT(mbuf, SI_SUB_MBUF, SI_ORDER_FIRST, mbuf_init, NULL); > > #ifdef NETDUMP > -/* External functions invoked from the netdump code. */ > -void netdump_mbuf_init(int, int); > -void netdump_mbuf_drain(void); > -void netdump_mbuf_dump(void); > - > static struct mbufq nd_mbufq; > static struct mbufq nd_clustq; > > @@ -407,7 +402,6 @@ nd_buf_import(void *arg, void **store, int count, int > m = mbufq_dequeue(q); > if (m == NULL) > break; > - trash_init(m, q == &nd_mbufq ? MSIZE : MCLBYTES, flags); > store[i] = m; > } > return (i); > @@ -429,7 +423,7 @@ nd_buf_release(void *arg, void **store, int count) > } > > static int > -nd_pack_import(void *arg, void **store, int count, int domain __unused, > +nd_pack_import(void *arg __unused, void **store, int count, int domain __unused, > int flags __unused) > { > struct mbuf *m; > @@ -446,14 +440,14 @@ nd_pack_import(void *arg, void **store, int count, int > break; > } > > - mb_ctor_clust(clust, MCLBYTES, m, M_NOWAIT); > + mb_ctor_clust(clust, MCLBYTES, m, 0); > store[i] = m; > } > return (i); > } > > static void > -nd_pack_release(void *arg, void **store, int count) > +nd_pack_release(void *arg __unused, void **store, int count) > { > struct mbuf *m; > void *clust; > > Modified: user/markj/netdump/sys/netinet/netdump/netdump_client.c > ============================================================================== > --- user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:20:04 2018 (r331460) > +++ user/markj/netdump/sys/netinet/netdump/netdump_client.c Fri Mar 23 20:29:34 2018 (r331461) > @@ -92,11 +92,6 @@ __FBSDID("$FreeBSD$"); > #define NETDDEBUGV_IF(i, f, ...) > #endif > > -/* Defined in kern_mbuf.c. */ > -void netdump_mbuf_init(int nmbuf, int nclust); > -void netdump_mbuf_drain(void); > -void netdump_mbuf_dump(void); > - > static int netdump_arp_gw(void); > static void netdump_cleanup(void); > static int netdump_configure(struct netdump_conf *); > > Modified: user/markj/netdump/sys/sys/mbuf.h > ============================================================================== > --- user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:20:04 2018 (r331460) > +++ user/markj/netdump/sys/sys/mbuf.h Fri Mar 23 20:29:34 2018 (r331461) > @@ -1373,5 +1373,12 @@ mbuf_tstmp2timespec(struct mbuf *m, struct timespec *t > } > #endif > > +#ifdef NETDUMP > +/* Invoked from the netdump client code. */ > +void netdump_mbuf_init(int, int); > +void netdump_mbuf_drain(void); > +void netdump_mbuf_dump(void); > +#endif > + > #endif /* _KERNEL */ > #endif /* !_SYS_MBUF_H_ */ > > Modified: user/markj/netdump/sys/vm/uma_core.c > ============================================================================== > --- user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:20:04 2018 (r331460) > +++ user/markj/netdump/sys/vm/uma_core.c Fri Mar 23 20:29:34 2018 (r331461) > @@ -1673,6 +1673,9 @@ zone_ctor(void *mem, int size, void *udata, int flags) > } > > out: > + KASSERT((arg->flags & (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET)) != > + (UMA_ZONE_MAXBUCKET | UMA_ZONE_NOBUCKET), > + ("Invalid zone flag combination")); > if ((arg->flags & UMA_ZONE_MAXBUCKET) != 0) > zone->uz_count = BUCKET_MAX; > else if ((arg->flags & UMA_ZONE_NOBUCKET) != 0) > > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-user@freebsd.org Sat Mar 24 03:13:22 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EAA3FF655A4 for ; Sat, 24 Mar 2018 03:13:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4867442C; Sat, 24 Mar 2018 03:13:21 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f180.google.com with SMTP id e7so17344617iof.2; Fri, 23 Mar 2018 20:13:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=GQOkxpVYkSbPXZdAy2HmKqrqOPC+47ddoEqV+cR7ZVE=; b=RBHTNpQV+/yz+ZxdwfdusxBfruBqSkmb8ykx96lq83/S4v8WO9RwLWpmCePLVo0Yl1 Hns5nd5NCVmdLnWQMKyyE+zdXR8ArxpJVf+NpTJ16Mw385NFH1Aq/+blOeSc/l8c7m3N bhSjryoV7/ALeQzPdMt4tcn6fChrXk69LEM847R9J1yOXhDneuPHcJskh1WZZq/I+KV5 cFb3wgLpmvjotGKepazt6Jgk47JlX1MgTBzkMvRlEZ/QgYJoisM7derrmMizUM6Rwj5B Ta9LQROxOWD+iNZwlqAAetgW+QHwsz89mSIRTc1fTU7bW0Tt722MlWstDqyEXUOEOKkw 7ENg== X-Gm-Message-State: AElRT7FTcF5/95Ytp+RiFL7bJw6F7JHEBteKC4/vFTFea13avLRJqk8a pZFEO3TaDRaXXT1mqnNecR5kbujZ X-Google-Smtp-Source: AG47ELsaZ0PX0GejtDlDbvo7icMZjZA1hPKMaQcwQpaVfY9fuHw3PDRuknaANLCo0+LLZ5EL3aDaTA== X-Received: by 10.107.135.82 with SMTP id j79mr28680003iod.14.1521860794590; Fri, 23 Mar 2018 20:06:34 -0700 (PDT) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com. [209.85.223.174]) by smtp.gmail.com with ESMTPSA id i94sm7104235ioo.46.2018.03.23.20.06.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Mar 2018 20:06:34 -0700 (PDT) Received: by mail-io0-f174.google.com with SMTP id l3so17327039iog.0; Fri, 23 Mar 2018 20:06:34 -0700 (PDT) X-Received: by 10.107.70.18 with SMTP id t18mr17013135ioa.220.1521860794310; Fri, 23 Mar 2018 20:06:34 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.62.19 with HTTP; Fri, 23 Mar 2018 20:06:33 -0700 (PDT) In-Reply-To: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> References: <201803232029.w2NKTYoA022545@repo.freebsd.org> <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> From: Conrad Meyer Date: Fri, 23 Mar 2018 20:06:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm To: "Rodney W. Grimes" Cc: src-committers , svn-src-user@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 03:13:22 -0000 The code review link is https://reviewboard.west.isilon.com/r/67553/ . It won't do you much good outside our corporate network, though. Here's a summary of the my feedback, which are pretty straightforward style-y cleanups and could easily be read out of the diff itself: 1. Move external function declarations from two .c files to a header (sys/mbuf.h). 2. Annotate unused parameters with __unused. 3. Replace unused M_FOO flags with 0 in mb_ctor_clust() invocation. Since valid M_FOO values are non-zero, this should result in an assertion if the APIs suddenly start using the passed flag value. 4. Add an assertion that mutually exclusive flags to zone_ctor (NOBUCKET | MAXBUCKET) are indeed mutually exclusive (NOBUCKET is new to this branch). The only change that isn't related to my feedback was: Drop trashing netdump mbufs during zone import subroutine. There are some further review comments which may eventually end up in this branch. Conrad On Fri, Mar 23, 2018 at 7:46 PM, Rodney W. Grimes wrote: >> Author: markj >> Date: Fri Mar 23 20:29:34 2018 >> New Revision: 331461 >> URL: https://svnweb.freebsd.org/changeset/base/331461 >> >> Log: >> Address some but not all review feedback from cem. > > Please be detailed in what is changing, as the above > only tells us where it came from in a vague way as > no review number is even cited. > > I know this is on a private branch, but when/if it > is merged this becomes part of the main line. From owner-svn-src-user@freebsd.org Sat Mar 24 04:35:17 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5DBF3F6A98B for ; Sat, 24 Mar 2018 04:35:17 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A176977BD6; Sat, 24 Mar 2018 04:35:16 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2O4ZBZf034491; Fri, 23 Mar 2018 21:35:11 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2O4ZBIn034490; Fri, 23 Mar 2018 21:35:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803240435.w2O4ZBIn034490@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm In-Reply-To: To: cem@freebsd.org Date: Fri, 23 Mar 2018 21:35:11 -0700 (PDT) CC: "Rodney W. Grimes" , src-committers , svn-src-user@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 04:35:17 -0000 > The code review link is https://reviewboard.west.isilon.com/r/67553/ . > It won't do you much good outside our corporate network, though. Then it should probably not be mentioned in a FreeBSD svn commit? > Here's a summary of the my feedback, which are pretty straightforward > style-y cleanups and could easily be read out of the diff itself: > > 1. Move external function declarations from two .c files to a header > (sys/mbuf.h). > 2. Annotate unused parameters with __unused. > 3. Replace unused M_FOO flags with 0 in mb_ctor_clust() invocation. > Since valid M_FOO values are non-zero, this should result in an > assertion if the APIs suddenly start using the passed flag value. > 4. Add an assertion that mutually exclusive flags to zone_ctor > (NOBUCKET | MAXBUCKET) are indeed mutually exclusive (NOBUCKET is new > to this branch). Thank you > The only change that isn't related to my feedback was: Drop trashing > netdump mbufs during zone import subroutine. > > There are some further review comments which may eventually end up in > this branch. The intent is to merge this branch to the main line at some point, so it is of benifit to have the commit messages here hold the same quality as if it was a commit to -current, correct? > Conrad > > On Fri, Mar 23, 2018 at 7:46 PM, Rodney W. Grimes > wrote: > >> Author: markj > >> Date: Fri Mar 23 20:29:34 2018 > >> New Revision: 331461 > >> URL: https://svnweb.freebsd.org/changeset/base/331461 > >> > >> Log: > >> Address some but not all review feedback from cem. > > > > Please be detailed in what is changing, as the above > > only tells us where it came from in a vague way as > > no review number is even cited. > > > > I know this is on a private branch, but when/if it > > is merged this becomes part of the main line. > -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-user@freebsd.org Sat Mar 24 05:03:21 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29934F6CFBC for ; Sat, 24 Mar 2018 05:03:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 986307917F; Sat, 24 Mar 2018 05:03:20 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 721963CE1C3; Sat, 24 Mar 2018 16:03:12 +1100 (AEDT) Date: Sat, 24 Mar 2018 16:03:11 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: rgrimes@freebsd.org cc: Mark Johnston , src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm In-Reply-To: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> Message-ID: <20180324153246.V927@besplex.bde.org> References: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=jMaHQTbOpqZ4ez4n5noA:9 a=Ok1cWiPjZdWjS-xC:21 a=aDCuVsFeLmuTuUg1:21 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 05:03:21 -0000 On Fri, 23 Mar 2018, Rodney W. Grimes wrote: >> Author: markj >> Date: Fri Mar 23 20:29:34 2018 >> New Revision: 331461 >> URL: https://svnweb.freebsd.org/changeset/base/331461 >> >> Log: >> Address some but not all review feedback from cem. > > Please be detailed in what is changing, as the above > only tells us where it came from in a vague way as > no review number is even cited. > > I know this is on a private branch, but when/if it > is merged this becomes part of the main line. Also, don't use spinmanagementspeak like "address" and "issue", or or programmerspeak like "kill". Bruce From owner-svn-src-user@freebsd.org Sat Mar 24 12:17:14 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E605F684A9 for ; Sat, 24 Mar 2018 12:17:14 +0000 (UTC) (envelope-from agapon@gmail.com) Received: from mail-lf0-f43.google.com (mail-lf0-f43.google.com [209.85.215.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 99E1B691CB; Sat, 24 Mar 2018 12:17:13 +0000 (UTC) (envelope-from agapon@gmail.com) Received: by mail-lf0-f43.google.com with SMTP id a22-v6so21928167lfg.9; Sat, 24 Mar 2018 05:17:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sQR5HOusHwDsTe25EwapTOhmDJ8WTaBdDk5OefzoaBc=; b=XjUCjbjuL824gjJFnDe5cLqqabR6kQ4LQCkZLCUlyZ1bXyKowUU/VGBiUr4sRrcP1m ffJ0yJgOSEmVHJZfcu1gS+DTGBB6YYc6LFsjQSXH7I60R3TJBeg+CzaGMcZhMwL7ysJi 8bV4j2tYnI+7QwWYD8uwwh1Caymvb/nfVt+d++VqChDFS6h+cqpVVqzb4mR34bKzu7EK NdEJkSvNtz8HBuBO/SMCy2O32ZguYcT9hfBG0msD9VQmNzJZZjXogUmW3dT2tenM8nPO OqbHGRIbTihJCuu6Sa6Au0CFIpCRYP5svmCHFKchIdLPbCcnTz5wQ7frUKZZIQweSS2Z qPsw== X-Gm-Message-State: AElRT7GzUONYgzZRGrA4GR8RMkanrPWcD2QDN0PYQXjV+yKOZK8czlir t1RkjJzUlxJdBWFU7jIB9+rVl0mZ X-Google-Smtp-Source: AIpwx4+9l/5ZmNzfKDxTc3Id4f/4siBvLXBvfZNvYylh5dcNxbtVZMwmKQEkMdYlP0HjbigkhF8VUA== X-Received: by 10.46.145.74 with SMTP id q10mr2314203ljg.13.1521893825549; Sat, 24 Mar 2018 05:17:05 -0700 (PDT) Received: from [192.168.0.88] (east.meadow.volia.net. [93.72.151.96]) by smtp.googlemail.com with ESMTPSA id j64sm1038697ljb.61.2018.03.24.05.17.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Mar 2018 05:17:04 -0700 (PDT) Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm To: rgrimes@freebsd.org, Mark Johnston Cc: src-committers@freebsd.org, svn-src-user@freebsd.org References: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> From: Andriy Gapon Message-ID: Date: Sat, 24 Mar 2018 14:17:02 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 12:17:14 -0000 On 24/03/2018 04:46, Rodney W. Grimes wrote: > I know this is on a private branch, but when/if it > is merged this becomes part of the main line. Not with svn, I think. At least, the way we use it. -- Andriy Gapon From owner-svn-src-user@freebsd.org Sat Mar 24 14:58:01 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88B0F51593 for ; Sat, 24 Mar 2018 14:58:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x234.google.com (mail-it0-x234.google.com [IPv6:2607:f8b0:4001:c0b::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3ACED7060D; Sat, 24 Mar 2018 14:58:01 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x234.google.com with SMTP id z143-v6so8046135itc.0; Sat, 24 Mar 2018 07:58:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MIP5oPufueyciMc6/SIoqDwZM0VuxtxPKZ684XotJhk=; b=R/DusoHIAF0gRl3//k7OBg53/uX57SCvq4rXycABSco7qD3YzgYFHTg4LLwGKb6kDG 1d5BX+JHHMWTqJ+iLOj4IaN9ze/purTo7ghwBYoLf0xRxc2dJ0EVUFb21CmWLimRimzc /t27RYxZbahjNOLD7ibskqt90EOKY99wTFtaqUHFi0j0BWzM8BWAo0tWEZhCb0iN1hmM HmN6RG00y0s3v6CWuQoSV9I8TRaZ9Z2v5autNMdhA3H1lN4R+w9qKxD+TZiiTF2bY1GM nW3s+RTkLdBtqmk7FJwzG+PliGuARDHKfah7d06LQjMVliTt5lbsjcPavKXDKf8bQ5Jc kbxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=MIP5oPufueyciMc6/SIoqDwZM0VuxtxPKZ684XotJhk=; b=uhMckca0Dru+WlsSYeqdDkWDqCkSaleAPwFxx3A0XkiLlTp68/lcJxWP7prw3eytOq ICOwlnnwwAdEVrdrT3WZNris7qFjBuV3JWeKLHmmlBLisxm90CM9BZPfn9NvLHP4o2kQ ES2qeUtJu4EBIxlde9Z866TjRq0Mpu7CW8jaxBo4j+jI4F4nsB2AfSH0wiSDd7ybvSeA thxfmGK8uH5OJpsny7GoCHOPTK62LPU/KGa6c+I/3bICw5kXQq1i91Pozbjg2wXS7g3k TLWAaAAKP+W8fK5l6Ye0lMVUHHvfCuUMtvLldPEPHAZQ4lPze12GlFXCAaNUMItWIvrX FYjw== X-Gm-Message-State: AElRT7GsO6e8QdM429T2fHF5JpSkN51e54e7kI7WW4d2mNmtvJYv9I2v Pes3bXrP59bNJk+/DnefPcV4Tw== X-Google-Smtp-Source: AIpwx4/pC/LPUY0qIBVUwZY69ihkDU/T68RbJkxJjlTEIOzLubZ4P+/J3SUNZ4MTpN7ZrW3g/+BhhA== X-Received: by 2002:a24:6e88:: with SMTP id w130-v6mr16601009itc.25.1521903480296; Sat, 24 Mar 2018 07:58:00 -0700 (PDT) Received: from raichu (toroon0560w-lp130-01-174-88-76-83.dsl.bell.ca. [174.88.76.83]) by smtp.gmail.com with ESMTPSA id a129-v6sm7622018itd.34.2018.03.24.07.57.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Mar 2018 07:57:59 -0700 (PDT) Sender: Mark Johnston Date: Sat, 24 Mar 2018 10:57:57 -0400 From: Mark Johnston To: Andriy Gapon Cc: rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm Message-ID: <20180324145757.GB58203@raichu> References: <201803240246.w2O2kZnB033985@pdx.rh.CN85.dnsmgr.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 14:58:01 -0000 On Sat, Mar 24, 2018 at 02:17:02PM +0200, Andriy Gapon wrote: > On 24/03/2018 04:46, Rodney W. Grimes wrote: > > I know this is on a private branch, but when/if it > > is merged this becomes part of the main line. > > Not with svn, I think. > At least, the way we use it. Indeed, I have no intention to merge the branch directly. I'm using an svn branch so that it's marginally easier for others to test. From owner-svn-src-user@freebsd.org Sat Mar 24 15:40:33 2018 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5ECB2F54D7C for ; Sat, 24 Mar 2018 15:40:33 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D653E71FB5; Sat, 24 Mar 2018 15:40:32 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2OFeOhg037036; Sat, 24 Mar 2018 08:40:24 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2OFeOcX037035; Sat, 24 Mar 2018 08:40:24 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803241540.w2OFeOcX037035@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r331461 - in user/markj/netdump/sys: kern netinet/netdump sys vm In-Reply-To: <20180324145757.GB58203@raichu> To: Mark Johnston Date: Sat, 24 Mar 2018 08:40:24 -0700 (PDT) CC: Andriy Gapon , rgrimes@freebsd.org, src-committers@freebsd.org, svn-src-user@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Mar 2018 15:40:33 -0000 > On Sat, Mar 24, 2018 at 02:17:02PM +0200, Andriy Gapon wrote: > > On 24/03/2018 04:46, Rodney W. Grimes wrote: > > > I know this is on a private branch, but when/if it > > > is merged this becomes part of the main line. > > > > Not with svn, I think. > > At least, the way we use it. > > Indeed, I have no intention to merge the branch directly. I'm using an > svn branch so that it's marginally easier for others to test. None the less as stated in: https://svnweb.freebsd.org/base/projects/GUIDELINES.txt?view=markup 12 General guidelines: 13 14 * Should be relevant to FreeBSD. 15 * Should be at least conceivably of interest to somebody else. 16 * Should be in a format that is suitable to merge into the base tree. 17 * Should be something that is worth people's time to read commit mail for. 18 * Write decent commit messages! Thanks, -- Rod Grimes rgrimes@freebsd.org